@kanso-labs/react-native-kanso-ui 0.4.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.
Files changed (122) hide show
  1. package/dist/autocomplete/index.js +39 -0
  2. package/dist/autocomplete/index.js.map +1 -0
  3. package/dist/button/index.d.ts +2 -1
  4. package/dist/button/index.js +35 -2
  5. package/dist/button/index.js.map +1 -1
  6. package/dist/button/pending.js +1 -1
  7. package/dist/button/slots.d.ts +2 -1
  8. package/dist/button/slots.js.map +1 -1
  9. package/dist/chip/index.js +1 -1
  10. package/dist/components/autocomplete/index.d.ts +49 -0
  11. package/dist/components/autocomplete/index.js +87 -0
  12. package/dist/components/autocomplete/index.js.map +1 -0
  13. package/dist/components/avatar/index.d.ts +1 -1
  14. package/dist/components/button/index.d.ts +2 -2
  15. package/dist/components/button/index.js +196 -150
  16. package/dist/components/button/index.js.map +1 -1
  17. package/dist/components/card/index.d.ts +1 -1
  18. package/dist/components/card/index.js +1 -1
  19. package/dist/components/checkbox/index.d.ts +1 -1
  20. package/dist/components/checkbox/index.js +106 -193
  21. package/dist/components/checkbox/index.js.map +1 -1
  22. package/dist/components/chip/index.d.ts +1 -1
  23. package/dist/components/chip-group/index.d.ts +1 -1
  24. package/dist/components/chip-group/index.js +1 -1
  25. package/dist/components/copy-field/index.d.ts +1 -1
  26. package/dist/components/copy-field/index.js +1 -1
  27. package/dist/components/currency/index.d.ts +1 -1
  28. package/dist/components/currency/index.js +1 -1
  29. package/dist/components/dialog/index.d.ts +1 -1
  30. package/dist/components/dialog/index.js +3 -2
  31. package/dist/components/dialog/index.js.map +1 -1
  32. package/dist/components/icon-button/index.d.ts +2 -2
  33. package/dist/components/icon-button/index.js +205 -159
  34. package/dist/components/icon-button/index.js.map +1 -1
  35. package/dist/components/link/index.d.ts +1 -1
  36. package/dist/components/link/index.js +1 -1
  37. package/dist/components/list/index.d.ts +216 -0
  38. package/dist/components/list/index.js +1118 -0
  39. package/dist/components/list/index.js.map +1 -0
  40. package/dist/components/list-item/index.d.ts +63 -0
  41. package/dist/components/list-item/index.js +275 -0
  42. package/dist/components/list-item/index.js.map +1 -0
  43. package/dist/components/menu/index.d.ts +309 -0
  44. package/dist/components/menu/index.js +1283 -0
  45. package/dist/components/menu/index.js.map +1 -0
  46. package/dist/components/meter/index.d.ts +1 -1
  47. package/dist/components/meter/index.js +1 -1
  48. package/dist/components/number-field/index.d.ts +1 -1
  49. package/dist/components/number-field/index.js +2 -2
  50. package/dist/components/popover/index.d.ts +140 -0
  51. package/dist/components/popover/index.js +704 -0
  52. package/dist/components/popover/index.js.map +1 -0
  53. package/dist/components/product-icon/index.d.ts +1 -1
  54. package/dist/components/progress-indicator/index.d.ts +1 -1
  55. package/dist/components/progress-indicator/index.js +1 -1
  56. package/dist/components/radio-group/index.d.ts +1 -1
  57. package/dist/components/radio-group/index.js +1 -1
  58. package/dist/components/search-field/index.d.ts +12 -4
  59. package/dist/components/search-field/index.js +64 -58
  60. package/dist/components/search-field/index.js.map +1 -1
  61. package/dist/components/segmented-button/index.d.ts +1 -1
  62. package/dist/components/segmented-button/index.js +1 -1
  63. package/dist/components/separator/index.d.ts +1 -1
  64. package/dist/components/separator/index.js +1 -1
  65. package/dist/components/sheet/index.d.ts +1 -1
  66. package/dist/components/sheet/index.js +3 -2
  67. package/dist/components/sheet/index.js.map +1 -1
  68. package/dist/components/snackbar/index.d.ts +1 -1
  69. package/dist/components/snackbar/index.js +1 -1
  70. package/dist/components/stack/index.d.ts +1 -1
  71. package/dist/components/stack/index.js +1 -1
  72. package/dist/components/switch/index.d.ts +1 -1
  73. package/dist/components/switch/index.js +1 -1
  74. package/dist/components/text/index.d.ts +1 -1
  75. package/dist/components/text/index.js +1 -1
  76. package/dist/components/text-field/index.d.ts +1 -1
  77. package/dist/components/text-field/index.js +1 -1
  78. package/dist/control/checkbox-box.js +137 -0
  79. package/dist/control/checkbox-box.js.map +1 -0
  80. package/dist/control/index.js +1 -1
  81. package/dist/field/index.d.ts +1 -1
  82. package/dist/field/index.js +1 -1
  83. package/dist/form/index.d.ts +1 -1
  84. package/dist/glyphs/index.js +21 -2
  85. package/dist/glyphs/index.js.map +1 -1
  86. package/dist/i18n/index.js +16 -1
  87. package/dist/i18n/index.js.map +1 -1
  88. package/dist/i18n/messages.js +272 -34
  89. package/dist/i18n/messages.js.map +1 -1
  90. package/dist/index.d.ts +6 -1
  91. package/dist/index.js +7 -2
  92. package/dist/indicator/index.d.ts +1 -1
  93. package/dist/indicator/index.js +2 -2
  94. package/dist/mark/index.d.ts +1 -1
  95. package/dist/mark/index.js +1 -1
  96. package/dist/modal/index.d.ts +1 -1
  97. package/dist/modal/index.js +2 -9
  98. package/dist/modal/index.js.map +1 -1
  99. package/dist/overlay/anchored.d.ts +2 -0
  100. package/dist/overlay/anchored.js +182 -0
  101. package/dist/overlay/anchored.js.map +1 -0
  102. package/dist/overlay/host.d.ts +2 -0
  103. package/dist/overlay/host.js +1 -1
  104. package/dist/overlay/index.d.ts +4 -0
  105. package/dist/overlay/panel.js +215 -0
  106. package/dist/overlay/panel.js.map +1 -0
  107. package/dist/overlay/placement.d.ts +8 -0
  108. package/dist/overlay/placement.js +87 -0
  109. package/dist/overlay/placement.js.map +1 -0
  110. package/dist/press/index.js +1 -1
  111. package/dist/ref/index.js +15 -0
  112. package/dist/ref/index.js.map +1 -0
  113. package/dist/router/index.js +1 -1
  114. package/dist/row/index.js +158 -0
  115. package/dist/row/index.js.map +1 -0
  116. package/dist/row/styles.js +51 -0
  117. package/dist/row/styles.js.map +1 -0
  118. package/dist/theme/scope.js +1 -1
  119. package/dist/theme-scope.d.ts +1 -1
  120. package/dist/theme-scope.js +1 -1
  121. package/dist/typography/fonts.js +1 -1
  122. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","HostInstance","LayoutChangeEvent","ScrollViewProps","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","GestureType","AnimatedStyle","SharedValue","EdgeInsets","createContext","use","useCallback","useEffect","useId","useMemo","useState","I18nManager","Text","NativeText","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","SafeAreaInsetsContext","ButtonSlots","ModalOpenProps","ModalTrigger","ResolvedTheme","ButtonSlotContext","useWindowSizeClass","messagesFor","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","refsOf","useModalState","useModalTrigger","usePressFeedback","useTheme","composeStyles","themedStyles","useTypeRole","SIDE_WIDTH","TOP_MARGIN","PARTIAL","DRAG_SLOP","FLING","BAR_WIDTH","BAR_HEIGHT","BAR_SPACE","BAR_SIDE","stylesOf","colors","radii","shadows","spacing","create","bar","backgroundColor","onSurfaceVariant","borderRadius","pill","height","width","body","gap","lg","paddingHorizontal","xl","paddingVertical","bodyText","color","container","surfaceContainerLow","boxShadow","elevation1","overflow","containerBottom","borderTopLeftRadius","borderTopRightRadius","containerSide","borderBottomStartRadius","borderTopStartRadius","flex","footer","alignItems","borderTopColor","outlineVariant","borderTopWidth","flexDirection","flexShrink","flexWrap","sm","justifyContent","minHeight","paddingBottom","paddingTop","handle","alignSelf","header","borderBottomColor","borderBottomWidth","md","rootBottom","bottom","left","position","right","rootSide","end","maxWidth","top","title","minWidth","SheetLayout","expanded","pan","setTitle","node","titleId","toggle","SheetLayoutContext","SheetTriggerContext","SheetBodyProps","ref","SheetContentProps","Omit","SheetOpenProps","children","isDismissable","isKeyboardDismissDisabled","style","SheetHandleProps","defaultOpen","isOpen","onOpenChange","SheetPartProps","SheetProps","SheetTitleProps","SheetWindowProps","close","setPresent","present","slots","Stops","partial","settles","bottomBoundsOf","insets","maxHeight","Math","max","settleOf","at","velocity","find","stop","findLast","reduce","nearest","abs","Sheet","t0","$","_c","t1","context","t2","t3","SheetBody","contentContainerStyle","onContentSizeChange","onLayout","props","scrollEnabled","undefined","layout","useLayout","styles","text","content","setContent","room","setRoom","measureContent","event","nativeEvent","measureRoom","scrolls","overflows","t4","Native","enabled","blocksExternalGesture","native","T0","T1","t5","t6","t7","t8","t9","SheetContent","outer","state","SheetFooter","SheetHandle","label","theme","corners","feedback","dragHandle","handlers","ring","layer","SheetHeader","SheetTitle","role","SheetWindow","testID","full","setFull","setExpanded","stopsOf","stops","twoHeights","rest","motion","useSheetMotion","length","offset","useSheetDrag","Symbol","for","_temp","measure","labelledBy","t10","t11","scrim","t12","T2","t13","t14","t15","t16","sideInsetsOf","panel","t17","t18","t19","t20","t21","t22","was","paddingStart","lower","part","Error","reduceMotion","origin","lowest","follow","translation","set","min","get","settle","target","higher","duration","durationMedium1","easing","bezier","easingEmphasizedDecelerate","success","velocityY","Pan","activeOffsetY","runOnJS","onStart","translationY","onUpdate","translationY_0","onEnd","withTestId","shown","direction","isRTL","durationShort2","durationShort3","easingEmphasizedAccelerate","easingStandard","fade","enter","exit","gone","timer","setTimeout","clearTimeout","transform","translateY","progress","opacity","translateX","Body","Content","Footer","Handle","Header","Title","_c","NativeText"],"sources":["../../../src/components/sheet/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n HostInstance,\n LayoutChangeEvent,\n ScrollViewProps,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { GestureType } from 'react-native-gesture-handler'\nimport type { AnimatedStyle, SharedValue } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from 'react'\nimport {\n I18nManager,\n Text as NativeText,\n Pressable,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport {\n Gesture,\n GestureDetector,\n GestureHandlerRootView,\n} from 'react-native-gesture-handler'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { ModalOpenProps, ModalTrigger } from '../../modal'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { messagesFor } from '../../i18n'\nimport {\n insetsOf,\n ModalWindow,\n NO_INSETS,\n panelRoleOf,\n refsOf,\n useModalState,\n useModalTrigger,\n} from '../../modal'\nimport { usePressFeedback } from '../../press'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// The bottom sheets and side sheets spec pages' modal sheets, as kanso-ui's\n// Sheet draws them: one component, which is a bottom sheet in a compact\n// window, below 600dp, and a side sheet from the medium window up. Both sit on\n// surface container low at the first elevation level, over the scrim. The\n// bottom sheet spans the window, with the 28dp corner on its top two corners,\n// and stops 72dp short of the window's top, the page's top margin, so a long\n// body scrolls. The side sheet is 400dp wide and as tall as the window, along\n// the end edge, with the 16dp corner on its two start corners, and turns over\n// with the layout under right-to-left.\n//\n// **The bottom sheet drags**, which web's does not: the spec page draws a\n// sheet that is dragged between heights and swiped down to go, and web\n// records leaving it out as a departure that native need not repeat. A sheet\n// taller than half the window opens at half its height, as Android's modal\n// bottom sheet does, and is dragged up to the whole of it and back; one no\n// taller opens whole. Let go, it settles on the nearest of those heights, or\n// one height on in the direction of a fling, and below the lowest it goes,\n// unless `isDismissable` is false, which holds it at the lowest. The drag is\n// Gesture Handler's pan, through the builder API both its 2.x and its 3\n// export. While the sheet is at half height its body does not scroll, so a\n// drag on it raises the sheet; once whole, a body with more than it can show\n// scrolls, and the sheet is dragged by the handle, header and actions. At\n// half height the actions are below the fold, where the drag brings them.\n//\n// **The handle is a control where the sheet has two heights**, as Android's\n// drag handle is: a press moves the sheet to the other one, and it says which\n// it is at as expanded or collapsed. It takes the press feedback every control\n// does, over a 48dp target, and is named \"Drag handle\" in the device's locale\n// unless `aria-label` says otherwise. A sheet with one height has nothing for\n// it to do, and draws it as web does, as a mark the screen reader skips. The\n// side sheet draws no handle.\n//\n// **It is drawn in a React Native `Modal`**, through src/modal, as `Dialog`\n// is, so it keeps the `ThemeScope` around it, hosts its own overlays, and\n// takes its scrim, its back gesture and its focus handling from there. The\n// sheet's own panel is a Gesture Handler root, which Android needs for a\n// gesture inside a `Modal`'s window.\n//\n// **It animates out as well as in**, from the motion tokens: it arrives from\n// its edge over the medium duration on the emphasised decelerating curve and\n// leaves over the short one on the accelerating curve, while the scrim fades\n// on the standard one. Web only animates in, since React Aria keeps a closing\n// surface mounted only while a CSS animation runs. The side sheet fades as it\n// travels, as web's does; the bottom sheet does not, since its position is\n// also the drag's. Under reduced motion the sheet appears and leaves at once,\n// and the scrim still fades.\n//\n// **Its content sits inside the safe area** while its fill runs on under it:\n// the bottom sheet's above the home indicator and inside the side insets of a\n// phone held sideways, and the side sheet's under the status bar and over the\n// home indicator, inside the inset on its own edge.\n\n// The side sheet's width, web's and the side sheets page's.\nconst SIDE_WIDTH = 400\n\n// The bottom sheet's top margin once whole, the page's 72dp.\nconst TOP_MARGIN = 72\n\n// How much of the window a sheet with two heights shows at the lower one.\nconst PARTIAL = 0.5\n\n// How far a press travels before it is a drag, so a tap on the sheet's\n// content stays a tap.\nconst DRAG_SLOP = 8\n\n// A release faster than this, in dp a second, is a fling, which moves the\n// sheet one height on rather than to the nearest. Android's bottom sheet\n// takes the same speed as the one that hides it.\nconst FLING = 500\n\n// The handle's bar and the room above and below it, web's 32 by 4 with 22dp\n// either side, which with 8dp at its ends makes the 48dp target.\nconst BAR_WIDTH = 32\nconst BAR_HEIGHT = 4\nconst BAR_SPACE = 22\nconst BAR_SIDE = 8\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The handle's bar, on on-surface variant.\n bar: {\n backgroundColor: colors.onSurfaceVariant,\n borderRadius: radii.pill,\n height: BAR_HEIGHT,\n width: BAR_WIDTH,\n },\n // The body's padding, web's: 24dp at the sides, 16dp at either end\n // and between whatever it holds.\n body: {\n gap: spacing.lg,\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.lg,\n },\n // The text a body is handed as a string, in body medium on on-surface\n // variant, as the stories on web set theirs.\n bodyText: {\n color: colors.onSurfaceVariant,\n },\n // Both sheets' container, whose corners clip the body's scroll.\n container: {\n backgroundColor: colors.surfaceContainerLow,\n boxShadow: shadows.elevation1,\n overflow: 'hidden',\n },\n // The bottom sheet's container: the window's width, rounded on top.\n containerBottom: {\n borderTopLeftRadius: radii.xl,\n borderTopRightRadius: radii.xl,\n width: '100%',\n },\n // The side sheet's container, as tall as the window and rounded on the\n // corners that face the screen it covers.\n containerSide: {\n borderBottomStartRadius: radii.lg,\n borderTopStartRadius: radii.lg,\n flex: 1,\n },\n // The actions, web's: leading, wrapping onto another row when they do\n // not fit on one, over a divider, in a bar 72dp tall at least.\n footer: {\n alignItems: 'center',\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n gap: spacing.sm,\n justifyContent: 'flex-start',\n minHeight: 72,\n paddingBottom: spacing.xl,\n paddingHorizontal: spacing.xl,\n paddingTop: spacing.lg,\n },\n // The handle's 48dp target, centred along the sheet's top edge.\n handle: {\n alignItems: 'center',\n alignSelf: 'center',\n borderRadius: radii.pill,\n flexShrink: 0,\n paddingHorizontal: BAR_SIDE,\n paddingVertical: BAR_SPACE,\n },\n // The headline and whatever shares its row, a close button for one,\n // over a divider.\n header: {\n alignItems: 'center',\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.md,\n justifyContent: 'space-between',\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.sm,\n },\n // Where each sheet sits in the window. The panel is a Gesture Handler\n // root of its own, the size of the sheet, so a press beside it reaches\n // the scrim.\n rootBottom: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n },\n rootSide: {\n bottom: 0,\n end: 0,\n maxWidth: '100%',\n position: 'absolute',\n top: 0,\n width: SIDE_WIDTH,\n },\n // The headline gives way to whatever shares its row.\n title: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n minWidth: 0,\n },\n }),\n)\n\n// What the content's parts read: which sheet is drawn, whether it is at its\n// whole height, the drag a scrolling body holds off, and the headline.\ntype SheetLayout = {\n readonly bottom: boolean\n readonly expanded: boolean\n // Gesture Handler 3 deprecates its gesture builder, and this type, for hooks\n // that version 2 does not have, and the peer range admits both, so the sheet\n // keeps the builder while it does.\n // oxlint-disable-next-line typescript/no-deprecated -- see above\n readonly pan: GestureType\n readonly setTitle: (node: HostInstance | null) => void\n readonly titleId: string\n /** What a press on the handle does, where the sheet has two heights. */\n readonly toggle: (() => void) | undefined\n}\n\nconst SheetLayoutContext = createContext<null | SheetLayout>(null)\nconst SheetTriggerContext = createContext<ModalTrigger | null>(null)\n\ntype SheetBodyProps = ScrollViewProps & {\n readonly ref?: Ref<ComponentRef<typeof ScrollView>>\n}\n\ntype SheetContentProps = Omit<ViewProps, 'children' | 'style'> &\n SheetOpenProps & {\n readonly children?: ReactNode\n /**\n * Whether a press on the scrim, outside the sheet, and a swipe down past\n * its lowest height close it. Android's back gesture is\n * `isKeyboardDismissDisabled`'s, and this says nothing about it.\n * @default true\n */\n readonly isDismissable?: boolean\n /**\n * Keeps Android's back gesture, VoiceOver's escape gesture, and Escape on\n * web, from closing the sheet.\n * @default false\n */\n readonly isKeyboardDismissDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n readonly style?: StyleProp<ViewStyle>\n }\n\ntype SheetHandleProps = Omit<ViewProps, 'children'> & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetOpenProps = ModalOpenProps & {\n /** Whether the sheet starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the sheet is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the sheet opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\ntype SheetPartProps = ViewProps & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetProps = SheetOpenProps & {\n /** The button that opens the sheet, and `Sheet.Content`. */\n readonly children?: ReactNode\n}\n\ntype SheetTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\n// What the window draws once the sheet is open, and what it needs from the\n// part that keeps the open state.\ntype SheetWindowProps = Omit<\n SheetContentProps,\n 'defaultOpen' | 'isOpen' | 'onOpenChange'\n> & {\n readonly close: () => void\n readonly isDismissable: boolean\n readonly isKeyboardDismissDisabled: boolean\n readonly isOpen: boolean\n readonly setPresent: (present: boolean) => void\n readonly slots: ButtonSlots\n}\n\n// The heights a bottom sheet rests at, as how far its panel is moved down:\n// whole, at half the window where it is taller than that, and gone.\ntype Stops = {\n /** The lower height, where the sheet has two. */\n readonly partial: null | number\n /** Every height a release can settle on, highest first. */\n readonly settles: readonly number[]\n}\n\n// The bottom sheet's room and padding: no taller than the window less the top\n// margin, or less the status bar where that is the taller, and its content\n// above the home indicator and inside the side insets.\nfunction bottomBoundsOf(insets: EdgeInsets, height: number): ViewStyle {\n return {\n ...insetsOf(insets),\n maxHeight: height - Math.max(TOP_MARGIN, insets.top),\n paddingTop: 0,\n }\n}\n\n/**\n * Where a bottom sheet let go comes to rest: one height on in the direction of\n * a fling, and the nearest height otherwise. Heights are how far the panel is\n * moved down, highest first, and the highest is always the whole sheet, 0.\n */\nfunction settleOf(at: number, velocity: number, settles: readonly number[]) {\n if (velocity > FLING) {\n return settles.find((stop) => stop > at) ?? settles.at(-1) ?? 0\n }\n\n if (velocity < -FLING) {\n return settles.findLast((stop) => stop < at) ?? 0\n }\n\n return settles.reduce(\n (nearest, stop) =>\n Math.abs(stop - at) < Math.abs(nearest - at) ? stop : nearest,\n 0,\n )\n}\n\n/**\n * A modal sheet along an edge of the screen, the bottom sheets and side sheets\n * spec pages' modal sheets, paired by window size as kanso-ui's are: a bottom\n * sheet in a compact window, dragged between heights and swiped down to go,\n * and a side sheet along the end edge from the medium window up. Pass\n * `isOpen` with `onOpenChange` to hold the open state, or `defaultOpen` to let\n * it keep its own.\n *\n * ```tsx\n * <Sheet>\n * <Button>Open</Button>\n * <Sheet.Content>\n * <Sheet.Handle />\n * <Sheet.Header>\n * <Sheet.Title>Headline</Sheet.Title>\n * </Sheet.Header>\n * <Sheet.Body>Supporting text</Sheet.Body>\n * <Sheet.Footer>\n * <Button slot=\"close\">Done</Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet>\n * ```\n *\n * Composed rather than configured by props, as web's is. A `Button` or\n * `IconButton` inside `Sheet` and outside its content opens it, and one given\n * `slot=\"close\"` anywhere inside the content closes it. A sheet nothing on the\n * screen opens leaves `Sheet` out and passes `isOpen` and `onOpenChange` to\n * `Sheet.Content` instead.\n */\nfunction Sheet({ children, defaultOpen, isOpen, onOpenChange }: SheetProps) {\n const { context, slots } = useModalTrigger({\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n return (\n <SheetTriggerContext value={context}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetTriggerContext>\n )\n}\n\n/**\n * What the sheet shows, as a body that scrolls when its content runs past the\n * room it has. A string is drawn in body medium on on-surface variant;\n * anything else draws itself. `style`, `ref` and `testID` land on the\n * `ScrollView`.\n *\n * A body its content runs past takes focus, as web's is a tab stop, so a\n * keyboard can scroll it when nothing inside it takes focus; a call site's\n * own `focusable` still wins. A bottom sheet's body scrolls only once the\n * sheet is at its whole height, and holds the sheet's drag off while it does.\n */\nfunction SheetBody({\n children,\n contentContainerStyle,\n onContentSizeChange,\n onLayout,\n scrollEnabled = true,\n ...props\n}: SheetBodyProps) {\n const layout = useLayout('Sheet.Body')\n const styles = stylesOf(useTheme())\n const text = useTypeRole('bodyMedium')\n const [content, setContent] = useState(0)\n const [room, setRoom] = useState(0)\n const measureContent = useCallback(\n (width: number, height: number) => {\n setContent(height)\n onContentSizeChange?.(width, height)\n },\n [onContentSizeChange],\n )\n const measureRoom = useCallback(\n (event: LayoutChangeEvent) => {\n setRoom(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const scrolls = scrollEnabled && layout.expanded\n const overflows = content > room\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const native = Gesture.Native()\n .enabled(scrolls && overflows)\n .blocksExternalGesture(layout.pan)\n\n return (\n <GestureDetector gesture={native}>\n <ScrollView\n focusable={scrolls && overflows}\n onContentSizeChange={measureContent}\n onLayout={measureRoom}\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n styles.body,\n contentContainerStyle,\n )}\n scrollEnabled={scrolls}\n >\n {typeof children === 'string' ? (\n <NativeText style={composeStyles<TextStyle>(text, styles.bodyText)}>\n {children}\n </NativeText>\n ) : (\n children\n )}\n </ScrollView>\n </GestureDetector>\n )\n}\n\n/**\n * The sheet itself, and the scrim behind it. Everything the sheet shows goes\n * in here; the button that opens it stays outside it.\n *\n * Inside `Sheet`, the open state is the trigger's. On its own it is this\n * part's: `isOpen` with `onOpenChange` holds it, and a `slot=\"close\"` button,\n * the scrim, the swipe and the back gesture all report through\n * `onOpenChange`. `style`, `ref` and `testID` land on the container, and\n * `testID` names the drag `<testID>-drag` for Gesture Handler's test helpers.\n */\nfunction SheetContent({\n defaultOpen,\n isDismissable = true,\n isKeyboardDismissDisabled = false,\n isOpen,\n onOpenChange,\n ...props\n}: SheetContentProps) {\n const outer = use(SheetTriggerContext)\n const { close, present, setPresent, slots, state } = useModalState(outer, {\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n if (!present) {\n return null\n }\n\n return (\n <SheetWindow\n {...props}\n close={close}\n isDismissable={isDismissable}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n isOpen={state.isOpen}\n setPresent={setPresent}\n slots={slots}\n />\n )\n}\n\n/**\n * The sheet's actions, leading and wrapping onto another row when they do not\n * fit on one, over a divider. On a bottom sheet at half height they are below\n * the fold until the sheet is raised. `style`, `ref` and `testID` land on its\n * view.\n */\nfunction SheetFooter({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Footer')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.footer, style)} />\n )\n}\n\n/**\n * The bottom sheet's drag handle, a 32 by 4dp bar centred along its top edge.\n * Where the sheet has two heights it is a button moving it to the other one,\n * named \"Drag handle\" in the device's locale unless `aria-label` says\n * otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws\n * none. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHandle({\n 'aria-label': label,\n style,\n ...props\n}: SheetHandleProps) {\n const layout = useLayout('Sheet.Handle')\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, radii } = theme\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: { borderRadius: radii.pill },\n })\n const { toggle } = layout\n\n if (!layout.bottom) {\n return null\n }\n\n if (toggle === undefined) {\n return (\n <View\n aria-hidden\n {...props}\n style={composeStyles<ViewStyle>(styles.handle, style)}\n >\n <View style={styles.bar} />\n </View>\n )\n }\n\n return (\n <Pressable\n aria-expanded={layout.expanded}\n aria-label={label ?? messagesFor().dragHandle}\n role=\"button\"\n {...props}\n {...feedback.handlers}\n onPress={toggle}\n style={composeStyles<ViewStyle>(styles.handle, feedback.ring, style)}\n >\n {feedback.layer}\n <View style={styles.bar} />\n </Pressable>\n )\n}\n\n/**\n * The sheet's header: its `Sheet.Title`, and anything beside it, such as a\n * close button, over a divider. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHeader({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Header')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.header, style)} />\n )\n}\n\n/**\n * Names the sheet: the container is labelled by it, and a screen reader is\n * sent to it once the sheet shows. In title large on on-surface variant.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction SheetTitle({ ref, style, ...props }: SheetTitleProps) {\n const layout = useLayout('Sheet.Title')\n const styles = stylesOf(useTheme())\n const role = useTypeRole('titleLarge')\n\n return (\n <NativeText\n {...props}\n nativeID={layout.titleId}\n ref={refsOf(layout.setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * The open sheet, mounted from the moment it opens until its exit has run, so\n * each opening starts from its edge and at its first height.\n */\nfunction SheetWindow({\n children,\n close,\n isDismissable,\n isKeyboardDismissDisabled,\n isOpen,\n onLayout,\n setPresent,\n slots,\n style,\n testID,\n ...props\n}: SheetWindowProps) {\n const styles = stylesOf(useTheme())\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const { height } = useWindowDimensions()\n const bottom = useWindowSizeClass() === 'compact'\n const titleId = useId()\n const [title, setTitle] = useState<HostInstance | null>(null)\n // The panel's height as laid out, before any drag moves it, and whether a\n // sheet with two heights is at the higher one.\n const [full, setFull] = useState<null | number>(null)\n const [expanded, setExpanded] = useState(false)\n const stops = stopsOf(bottom, full, height, isDismissable)\n const twoHeights = stops.partial !== null\n const rest = stops.partial !== null && !expanded ? stops.partial : 0\n const motion = useSheetMotion({ bottom, full, isOpen, rest, setPresent })\n const pan = useSheetDrag({\n close,\n enabled: bottom && isOpen && stops.settles.length > 1,\n expanded,\n full,\n isDismissable,\n offset: motion.offset,\n rest,\n setExpanded,\n stops,\n testID,\n })\n const toggle = useCallback(() => {\n setExpanded((was) => !was)\n }, [])\n const layout = useMemo<SheetLayout>(\n () => ({\n bottom,\n expanded: !twoHeights || expanded,\n pan,\n setTitle,\n titleId,\n toggle: twoHeights ? toggle : undefined,\n }),\n [bottom, expanded, pan, titleId, toggle, twoHeights],\n )\n const measure = useCallback(\n (event: LayoutChangeEvent) => {\n setFull(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const labelledBy = title === null ? undefined : titleId\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isDismissable && isOpen ? close : undefined}\n scrim={motion.scrim}\n title={title}\n >\n <GestureHandlerRootView\n style={bottom ? styles.rootBottom : styles.rootSide}\n >\n <GestureDetector gesture={pan}>\n <Animated.View\n {...panelRoleOf('dialog', labelledBy)}\n onAccessibilityEscape={\n isKeyboardDismissDisabled ? undefined : close\n }\n {...props}\n onLayout={measure}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.container,\n bottom ? styles.containerBottom : styles.containerSide,\n bottom ? bottomBoundsOf(insets, height) : sideInsetsOf(insets),\n motion.panel,\n style,\n )}\n testID={testID}\n >\n <SheetLayoutContext value={layout}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetLayoutContext>\n </Animated.View>\n </GestureDetector>\n </GestureHandlerRootView>\n </ModalWindow>\n )\n}\n\n// The side sheet's padding: its content under the status bar, over the home\n// indicator and inside the inset on its own edge. Its start edge faces the\n// screen it covers, which has none.\nfunction sideInsetsOf(insets: EdgeInsets): ViewStyle {\n return { ...insetsOf(insets), paddingStart: 0 }\n}\n\nfunction stopsOf(\n bottom: boolean,\n full: null | number,\n height: number,\n isDismissable: boolean,\n): Stops {\n if (!bottom || full === null) {\n return { partial: null, settles: [0] }\n }\n\n const lower = full - height * PARTIAL\n const partial = lower > 0 ? lower : null\n\n return {\n partial,\n settles: [\n 0,\n ...(partial === null ? [] : [partial]),\n ...(isDismissable ? [full] : []),\n ],\n }\n}\n\nfunction useLayout(part: string) {\n const layout = use(SheetLayoutContext)\n\n if (layout === null) {\n throw new Error(`${part} is drawn inside Sheet.Content.`)\n }\n\n return layout\n}\n\n/**\n * The bottom sheet's drag. The panel follows the finger, no higher than its\n * whole height and no lower than gone, or than its lowest height when it may\n * not be dismissed, and once let go it settles where `settleOf` says: below\n * the lowest height it closes, and at another height it moves the sheet there.\n */\nfunction useSheetDrag({\n close,\n enabled,\n expanded,\n full,\n isDismissable,\n offset,\n rest,\n setExpanded,\n stops,\n testID,\n}: {\n readonly close: () => void\n readonly enabled: boolean\n readonly expanded: boolean\n readonly full: null | number\n readonly isDismissable: boolean\n readonly offset: SharedValue<number>\n readonly rest: number\n readonly setExpanded: (expanded: boolean) => void\n readonly stops: Stops\n readonly testID: string | undefined\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n // Where the panel stood when the drag was recognised. Gesture Handler\n // measures its translation from there, past the slop.\n const origin = useSharedValue(0)\n const lowest = stops.settles.at(-1) ?? 0\n\n function follow(translation: number) {\n offset.set(Math.min(lowest, Math.max(0, origin.get() + translation)))\n }\n\n function settle(target: number) {\n if (isDismissable && target === full) {\n close()\n return\n }\n\n const higher = target === 0\n if (stops.partial !== null && higher !== expanded) {\n setExpanded(higher)\n return\n }\n\n offset.set(\n reduceMotion\n ? target\n : withTiming(target, {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }),\n )\n }\n\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const pan = Gesture.Pan()\n .activeOffsetY([-DRAG_SLOP, DRAG_SLOP])\n .enabled(enabled)\n .runOnJS(true)\n .onStart(({ translationY }) => {\n origin.set(offset.get())\n follow(translationY)\n })\n .onUpdate(({ translationY }) => {\n follow(translationY)\n })\n .onEnd(({ velocityY }, success) => {\n settle(success ? settleOf(offset.get(), velocityY, stops.settles) : rest)\n })\n\n return testID === undefined ? pan : pan.withTestId(`${testID}-drag`)\n}\n\n/**\n * The scrim's and the panel's motion, and the timer that unmounts the sheet\n * once its exit has run. The bottom sheet's position is how far its panel is\n * moved down, which the drag sets too; it starts below the window and rises\n * to its height once that is measured. The side sheet's is how far it has\n * come in from its edge, which is the end edge, and so the left one under\n * right-to-left.\n */\nfunction useSheetMotion({\n bottom,\n full,\n isOpen,\n rest,\n setPresent,\n}: {\n readonly bottom: boolean\n readonly full: null | number\n readonly isOpen: boolean\n readonly rest: number\n readonly setPresent: (present: boolean) => void\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const { height } = useWindowDimensions()\n const offset = useSharedValue(height)\n const shown = useSharedValue(0)\n const scrim = useSharedValue(0)\n // A translation is not mirrored under a right-to-left layout, though the\n // side sheet's edge is, so it travels the other way there.\n const direction = I18nManager.isRTL ? -1 : 1\n\n useEffect(() => {\n const fade = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n const enter = {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }\n const exit = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingEmphasizedAccelerate),\n }\n\n if (isOpen) {\n scrim.set(withTiming(1, fade))\n if (!bottom) {\n shown.set(reduceMotion ? 1 : withTiming(1, enter))\n return undefined\n }\n if (full === null) {\n return undefined\n }\n // It rises from its own height below where it rests, not from the\n // bottom of the window, so it shows from the first frame.\n if (offset.get() > full) {\n offset.set(full)\n }\n offset.set(reduceMotion ? rest : withTiming(rest, enter))\n return undefined\n }\n\n scrim.set(withTiming(0, fade))\n if (bottom) {\n const gone = full ?? height\n offset.set(reduceMotion ? gone : withTiming(gone, exit))\n } else {\n shown.set(reduceMotion ? 0 : withTiming(0, exit))\n }\n const timer = setTimeout(\n () => {\n setPresent(false)\n },\n reduceMotion\n ? motion.durationShort2\n : Math.max(motion.durationShort2, motion.durationShort3),\n )\n\n return () => {\n clearTimeout(timer)\n }\n }, [\n bottom,\n full,\n height,\n isOpen,\n motion,\n offset,\n reduceMotion,\n rest,\n scrim,\n setPresent,\n shown,\n ])\n\n return {\n offset,\n panel: useAnimatedStyle(() => {\n 'worklet'\n if (bottom) {\n return { transform: [{ translateY: offset.get() }] }\n }\n\n const progress = shown.get()\n return {\n opacity: progress,\n transform: [{ translateX: (1 - progress) * SIDE_WIDTH * direction }],\n }\n }),\n scrim: useAnimatedStyle(() => {\n 'worklet'\n return { opacity: scrim.get() }\n }),\n }\n}\n\nSheet.Body = SheetBody\nSheet.Content = SheetContent\nSheet.Footer = SheetFooter\nSheet.Handle = SheetHandle\nSheet.Header = SheetHeader\nSheet.Title = SheetTitle\n\nexport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetFooter,\n SheetHandle,\n SheetHeader,\n SheetTitle,\n}\nexport type {\n SheetBodyProps,\n SheetContentProps,\n SheetHandleProps,\n SheetPartProps,\n SheetProps,\n SheetTitleProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAyHA,MAAM2D,aAAa;AAGnB,MAAMC,aAAa;AAGnB,MAAMC,UAAU;AAIhB,MAAMC,YAAY;AAKlB,MAAMC,QAAQ;AAId,MAAMC,YAAY;AAClB,MAAMC,aAAa;AACnB,MAAMC,YAAY;AAClB,MAAMC,WAAW;AAEjB,MAAMC,WAAWX,cACd,EAAEY,QAAQC,OAAOC,SAASC,cACzB7C,WAAW8C,OAAO;CAEhBC,KAAK;EACHC,iBAAiBN,OAAOO;EACxBC,cAAcP,MAAMQ;EACpBC,QAAQd;EACRe,OAAOhB;CACT;CAGAiB,MAAM;EACJC,KAAKV,QAAQW;EACbC,mBAAmBZ,QAAQa;EAC3BC,iBAAiBd,QAAQW;CAC3B;CAGAI,UAAU,EACRC,OAAOnB,OAAOO,iBAChB;CAEAa,WAAW;EACTd,iBAAiBN,OAAOqB;EACxBC,WAAWpB,QAAQqB;EACnBC,UAAU;CACZ;CAEAC,iBAAiB;EACfC,qBAAqBzB,MAAMe;EAC3BW,sBAAsB1B,MAAMe;EAC5BL,OAAO;CACT;CAGAiB,eAAe;EACbC,yBAAyB5B,MAAMa;EAC/BgB,sBAAsB7B,MAAMa;EAC5BiB,MAAM;CACR;CAGAC,QAAQ;EACNC,YAAY;EACZC,gBAAgBlC,OAAOmC;EACvBC,gBAAgB;EAChBC,eAAe;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;EAAAhE,EAAA,MAAAmE;EAAAnE,EAAA,MAAAgG;EAAAhG,EAAA,MAAA+D;EAAA/D,EAAA,MAAA4E;EAAA5E,EAAA,MAAAtB;EAAAsB,EAAA,MAAA2H;EAAA3H,EAAA,MAAAI;CAAA,OAAAA,KAAAJ,EAAA;CA/DDlK,UAAUoK,IAmDPE,EAYF;CAIQ,MAAAC,KAAAtJ,uBAAiB;EAAA;EAEtB,IAAIsF,QAAM,OACD,EAAAoM,WAAa,CAAC,EAAAC,YAAcvE,OAAMoC,IAAK,EAAE,CAAC,EAAE;EAGrD,MAAAoC,WAAiBhB,MAAKpB,IAAK;EAAC,OACrB;GAAAqC,SACID;GAAQF,WACN,CAAC,EAAAI,aAAe,IAAIF,YAAYpQ,aAAaqP,UAAU,CAAC;EACrE;CAAC,CACF;CACM,MAAAjG,KAAA5K,uBAAiB;EAAA;EAAA,OAEf,EAAA6R,SAAWhE,MAAK2B,IAAK,EAAE;CAAC,CAChC;CAAC,IAAArE;CAAA,IAAAlC,EAAA,QAAAmE,UAAAnE,EAAA,QAAAK,MAAAL,EAAA,QAAA2B,IAAA;EAjBGO,KAAA;GAAAiC;GAAAiB,OAEE/E;GAWLuE,OACKjD;EAIT;EAAC3B,EAAA,MAAAmE;EAAAnE,EAAA,MAAAK;EAAAL,EAAA,MAAA2B;EAAA3B,EAAA,MAAAkC;CAAA,OAAAA,KAAAlC,EAAA;CAAA,OAlBMkC;AAkBN;AAGHpC,MAAMgJ,OAAOxI;AACbR,MAAMiJ,UAAUxG;AAChBzC,MAAMkJ,SAAStG;AACf5C,MAAMmJ,SAAStG;AACf7C,MAAMoJ,SAAS9F;AACftD,MAAMqJ,QAAQ9F"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","HostInstance","LayoutChangeEvent","ScrollViewProps","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","GestureType","AnimatedStyle","SharedValue","EdgeInsets","createContext","use","useCallback","useEffect","useId","useMemo","useState","I18nManager","Text","NativeText","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","SafeAreaInsetsContext","ButtonSlots","ModalOpenProps","ModalTrigger","ResolvedTheme","ButtonSlotContext","useWindowSizeClass","messagesFor","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","useModalState","useModalTrigger","usePressFeedback","refsOf","useTheme","composeStyles","themedStyles","useTypeRole","SIDE_WIDTH","TOP_MARGIN","PARTIAL","DRAG_SLOP","FLING","BAR_WIDTH","BAR_HEIGHT","BAR_SPACE","BAR_SIDE","stylesOf","colors","radii","shadows","spacing","create","bar","backgroundColor","onSurfaceVariant","borderRadius","pill","height","width","body","gap","lg","paddingHorizontal","xl","paddingVertical","bodyText","color","container","surfaceContainerLow","boxShadow","elevation1","overflow","containerBottom","borderTopLeftRadius","borderTopRightRadius","containerSide","borderBottomStartRadius","borderTopStartRadius","flex","footer","alignItems","borderTopColor","outlineVariant","borderTopWidth","flexDirection","flexShrink","flexWrap","sm","justifyContent","minHeight","paddingBottom","paddingTop","handle","alignSelf","header","borderBottomColor","borderBottomWidth","md","rootBottom","bottom","left","position","right","rootSide","end","maxWidth","top","title","minWidth","SheetLayout","expanded","pan","setTitle","node","titleId","toggle","SheetLayoutContext","SheetTriggerContext","SheetBodyProps","ref","SheetContentProps","Omit","SheetOpenProps","children","isDismissable","isKeyboardDismissDisabled","style","SheetHandleProps","defaultOpen","isOpen","onOpenChange","SheetPartProps","SheetProps","SheetTitleProps","SheetWindowProps","close","setPresent","present","slots","Stops","partial","settles","bottomBoundsOf","insets","maxHeight","Math","max","settleOf","at","velocity","find","stop","findLast","reduce","nearest","abs","Sheet","t0","$","_c","t1","context","t2","t3","SheetBody","contentContainerStyle","onContentSizeChange","onLayout","props","scrollEnabled","undefined","layout","useLayout","styles","text","content","setContent","room","setRoom","measureContent","event","nativeEvent","measureRoom","scrolls","overflows","t4","Native","enabled","blocksExternalGesture","native","T0","T1","t5","t6","t7","t8","t9","SheetContent","outer","state","SheetFooter","SheetHandle","label","theme","corners","feedback","dragHandle","handlers","ring","layer","SheetHeader","SheetTitle","role","SheetWindow","testID","full","setFull","setExpanded","stopsOf","stops","twoHeights","rest","motion","useSheetMotion","length","offset","useSheetDrag","Symbol","for","_temp","measure","labelledBy","t10","t11","scrim","t12","T2","t13","t14","t15","t16","sideInsetsOf","panel","t17","t18","t19","t20","t21","t22","was","paddingStart","lower","part","Error","reduceMotion","origin","lowest","follow","translation","set","min","get","settle","target","higher","duration","durationMedium1","easing","bezier","easingEmphasizedDecelerate","success","velocityY","Pan","activeOffsetY","runOnJS","onStart","translationY","onUpdate","translationY_0","onEnd","withTestId","shown","direction","isRTL","durationShort2","durationShort3","easingEmphasizedAccelerate","easingStandard","fade","enter","exit","gone","timer","setTimeout","clearTimeout","transform","translateY","progress","opacity","translateX","Body","Content","Footer","Handle","Header","Title","_c","NativeText"],"sources":["../../../src/components/sheet/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n HostInstance,\n LayoutChangeEvent,\n ScrollViewProps,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { GestureType } from 'react-native-gesture-handler'\nimport type { AnimatedStyle, SharedValue } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from 'react'\nimport {\n I18nManager,\n Text as NativeText,\n Pressable,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport {\n Gesture,\n GestureDetector,\n GestureHandlerRootView,\n} from 'react-native-gesture-handler'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { ModalOpenProps, ModalTrigger } from '../../modal'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { messagesFor } from '../../i18n'\nimport {\n insetsOf,\n ModalWindow,\n NO_INSETS,\n panelRoleOf,\n useModalState,\n useModalTrigger,\n} from '../../modal'\nimport { usePressFeedback } from '../../press'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// The bottom sheets and side sheets spec pages' modal sheets, as kanso-ui's\n// Sheet draws them: one component, which is a bottom sheet in a compact\n// window, below 600dp, and a side sheet from the medium window up. Both sit on\n// surface container low at the first elevation level, over the scrim. The\n// bottom sheet spans the window, with the 28dp corner on its top two corners,\n// and stops 72dp short of the window's top, the page's top margin, so a long\n// body scrolls. The side sheet is 400dp wide and as tall as the window, along\n// the end edge, with the 16dp corner on its two start corners, and turns over\n// with the layout under right-to-left.\n//\n// **The bottom sheet drags**, which web's does not: the spec page draws a\n// sheet that is dragged between heights and swiped down to go, and web\n// records leaving it out as a departure that native need not repeat. A sheet\n// taller than half the window opens at half its height, as Android's modal\n// bottom sheet does, and is dragged up to the whole of it and back; one no\n// taller opens whole. Let go, it settles on the nearest of those heights, or\n// one height on in the direction of a fling, and below the lowest it goes,\n// unless `isDismissable` is false, which holds it at the lowest. The drag is\n// Gesture Handler's pan, through the builder API both its 2.x and its 3\n// export. While the sheet is at half height its body does not scroll, so a\n// drag on it raises the sheet; once whole, a body with more than it can show\n// scrolls, and the sheet is dragged by the handle, header and actions. At\n// half height the actions are below the fold, where the drag brings them.\n//\n// **The handle is a control where the sheet has two heights**, as Android's\n// drag handle is: a press moves the sheet to the other one, and it says which\n// it is at as expanded or collapsed. It takes the press feedback every control\n// does, over a 48dp target, and is named \"Drag handle\" in the device's locale\n// unless `aria-label` says otherwise. A sheet with one height has nothing for\n// it to do, and draws it as web does, as a mark the screen reader skips. The\n// side sheet draws no handle.\n//\n// **It is drawn in a React Native `Modal`**, through src/modal, as `Dialog`\n// is, so it keeps the `ThemeScope` around it, hosts its own overlays, and\n// takes its scrim, its back gesture and its focus handling from there. The\n// sheet's own panel is a Gesture Handler root, which Android needs for a\n// gesture inside a `Modal`'s window.\n//\n// **It animates out as well as in**, from the motion tokens: it arrives from\n// its edge over the medium duration on the emphasised decelerating curve and\n// leaves over the short one on the accelerating curve, while the scrim fades\n// on the standard one. Web only animates in, since React Aria keeps a closing\n// surface mounted only while a CSS animation runs. The side sheet fades as it\n// travels, as web's does; the bottom sheet does not, since its position is\n// also the drag's. Under reduced motion the sheet appears and leaves at once,\n// and the scrim still fades.\n//\n// **Its content sits inside the safe area** while its fill runs on under it:\n// the bottom sheet's above the home indicator and inside the side insets of a\n// phone held sideways, and the side sheet's under the status bar and over the\n// home indicator, inside the inset on its own edge.\n\n// The side sheet's width, web's and the side sheets page's.\nconst SIDE_WIDTH = 400\n\n// The bottom sheet's top margin once whole, the page's 72dp.\nconst TOP_MARGIN = 72\n\n// How much of the window a sheet with two heights shows at the lower one.\nconst PARTIAL = 0.5\n\n// How far a press travels before it is a drag, so a tap on the sheet's\n// content stays a tap.\nconst DRAG_SLOP = 8\n\n// A release faster than this, in dp a second, is a fling, which moves the\n// sheet one height on rather than to the nearest. Android's bottom sheet\n// takes the same speed as the one that hides it.\nconst FLING = 500\n\n// The handle's bar and the room above and below it, web's 32 by 4 with 22dp\n// either side, which with 8dp at its ends makes the 48dp target.\nconst BAR_WIDTH = 32\nconst BAR_HEIGHT = 4\nconst BAR_SPACE = 22\nconst BAR_SIDE = 8\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The handle's bar, on on-surface variant.\n bar: {\n backgroundColor: colors.onSurfaceVariant,\n borderRadius: radii.pill,\n height: BAR_HEIGHT,\n width: BAR_WIDTH,\n },\n // The body's padding, web's: 24dp at the sides, 16dp at either end\n // and between whatever it holds.\n body: {\n gap: spacing.lg,\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.lg,\n },\n // The text a body is handed as a string, in body medium on on-surface\n // variant, as the stories on web set theirs.\n bodyText: {\n color: colors.onSurfaceVariant,\n },\n // Both sheets' container, whose corners clip the body's scroll.\n container: {\n backgroundColor: colors.surfaceContainerLow,\n boxShadow: shadows.elevation1,\n overflow: 'hidden',\n },\n // The bottom sheet's container: the window's width, rounded on top.\n containerBottom: {\n borderTopLeftRadius: radii.xl,\n borderTopRightRadius: radii.xl,\n width: '100%',\n },\n // The side sheet's container, as tall as the window and rounded on the\n // corners that face the screen it covers.\n containerSide: {\n borderBottomStartRadius: radii.lg,\n borderTopStartRadius: radii.lg,\n flex: 1,\n },\n // The actions, web's: leading, wrapping onto another row when they do\n // not fit on one, over a divider, in a bar 72dp tall at least.\n footer: {\n alignItems: 'center',\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n gap: spacing.sm,\n justifyContent: 'flex-start',\n minHeight: 72,\n paddingBottom: spacing.xl,\n paddingHorizontal: spacing.xl,\n paddingTop: spacing.lg,\n },\n // The handle's 48dp target, centred along the sheet's top edge.\n handle: {\n alignItems: 'center',\n alignSelf: 'center',\n borderRadius: radii.pill,\n flexShrink: 0,\n paddingHorizontal: BAR_SIDE,\n paddingVertical: BAR_SPACE,\n },\n // The headline and whatever shares its row, a close button for one,\n // over a divider.\n header: {\n alignItems: 'center',\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.md,\n justifyContent: 'space-between',\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.sm,\n },\n // Where each sheet sits in the window. The panel is a Gesture Handler\n // root of its own, the size of the sheet, so a press beside it reaches\n // the scrim.\n rootBottom: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n },\n rootSide: {\n bottom: 0,\n end: 0,\n maxWidth: '100%',\n position: 'absolute',\n top: 0,\n width: SIDE_WIDTH,\n },\n // The headline gives way to whatever shares its row.\n title: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n minWidth: 0,\n },\n }),\n)\n\n// What the content's parts read: which sheet is drawn, whether it is at its\n// whole height, the drag a scrolling body holds off, and the headline.\ntype SheetLayout = {\n readonly bottom: boolean\n readonly expanded: boolean\n // Gesture Handler 3 deprecates its gesture builder, and this type, for hooks\n // that version 2 does not have, and the peer range admits both, so the sheet\n // keeps the builder while it does.\n // oxlint-disable-next-line typescript/no-deprecated -- see above\n readonly pan: GestureType\n readonly setTitle: (node: HostInstance | null) => void\n readonly titleId: string\n /** What a press on the handle does, where the sheet has two heights. */\n readonly toggle: (() => void) | undefined\n}\n\nconst SheetLayoutContext = createContext<null | SheetLayout>(null)\nconst SheetTriggerContext = createContext<ModalTrigger | null>(null)\n\ntype SheetBodyProps = ScrollViewProps & {\n readonly ref?: Ref<ComponentRef<typeof ScrollView>>\n}\n\ntype SheetContentProps = Omit<ViewProps, 'children' | 'style'> &\n SheetOpenProps & {\n readonly children?: ReactNode\n /**\n * Whether a press on the scrim, outside the sheet, and a swipe down past\n * its lowest height close it. Android's back gesture is\n * `isKeyboardDismissDisabled`'s, and this says nothing about it.\n * @default true\n */\n readonly isDismissable?: boolean\n /**\n * Keeps Android's back gesture, VoiceOver's escape gesture, and Escape on\n * web, from closing the sheet.\n * @default false\n */\n readonly isKeyboardDismissDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n readonly style?: StyleProp<ViewStyle>\n }\n\ntype SheetHandleProps = Omit<ViewProps, 'children'> & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetOpenProps = ModalOpenProps & {\n /** Whether the sheet starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the sheet is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the sheet opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\ntype SheetPartProps = ViewProps & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetProps = SheetOpenProps & {\n /** The button that opens the sheet, and `Sheet.Content`. */\n readonly children?: ReactNode\n}\n\ntype SheetTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\n// What the window draws once the sheet is open, and what it needs from the\n// part that keeps the open state.\ntype SheetWindowProps = Omit<\n SheetContentProps,\n 'defaultOpen' | 'isOpen' | 'onOpenChange'\n> & {\n readonly close: () => void\n readonly isDismissable: boolean\n readonly isKeyboardDismissDisabled: boolean\n readonly isOpen: boolean\n readonly setPresent: (present: boolean) => void\n readonly slots: ButtonSlots\n}\n\n// The heights a bottom sheet rests at, as how far its panel is moved down:\n// whole, at half the window where it is taller than that, and gone.\ntype Stops = {\n /** The lower height, where the sheet has two. */\n readonly partial: null | number\n /** Every height a release can settle on, highest first. */\n readonly settles: readonly number[]\n}\n\n// The bottom sheet's room and padding: no taller than the window less the top\n// margin, or less the status bar where that is the taller, and its content\n// above the home indicator and inside the side insets.\nfunction bottomBoundsOf(insets: EdgeInsets, height: number): ViewStyle {\n return {\n ...insetsOf(insets),\n maxHeight: height - Math.max(TOP_MARGIN, insets.top),\n paddingTop: 0,\n }\n}\n\n/**\n * Where a bottom sheet let go comes to rest: one height on in the direction of\n * a fling, and the nearest height otherwise. Heights are how far the panel is\n * moved down, highest first, and the highest is always the whole sheet, 0.\n */\nfunction settleOf(at: number, velocity: number, settles: readonly number[]) {\n if (velocity > FLING) {\n return settles.find((stop) => stop > at) ?? settles.at(-1) ?? 0\n }\n\n if (velocity < -FLING) {\n return settles.findLast((stop) => stop < at) ?? 0\n }\n\n return settles.reduce(\n (nearest, stop) =>\n Math.abs(stop - at) < Math.abs(nearest - at) ? stop : nearest,\n 0,\n )\n}\n\n/**\n * A modal sheet along an edge of the screen, the bottom sheets and side sheets\n * spec pages' modal sheets, paired by window size as kanso-ui's are: a bottom\n * sheet in a compact window, dragged between heights and swiped down to go,\n * and a side sheet along the end edge from the medium window up. Pass\n * `isOpen` with `onOpenChange` to hold the open state, or `defaultOpen` to let\n * it keep its own.\n *\n * ```tsx\n * <Sheet>\n * <Button>Open</Button>\n * <Sheet.Content>\n * <Sheet.Handle />\n * <Sheet.Header>\n * <Sheet.Title>Headline</Sheet.Title>\n * </Sheet.Header>\n * <Sheet.Body>Supporting text</Sheet.Body>\n * <Sheet.Footer>\n * <Button slot=\"close\">Done</Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet>\n * ```\n *\n * Composed rather than configured by props, as web's is. A `Button` or\n * `IconButton` inside `Sheet` and outside its content opens it, and one given\n * `slot=\"close\"` anywhere inside the content closes it. A sheet nothing on the\n * screen opens leaves `Sheet` out and passes `isOpen` and `onOpenChange` to\n * `Sheet.Content` instead.\n */\nfunction Sheet({ children, defaultOpen, isOpen, onOpenChange }: SheetProps) {\n const { context, slots } = useModalTrigger({\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n return (\n <SheetTriggerContext value={context}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetTriggerContext>\n )\n}\n\n/**\n * What the sheet shows, as a body that scrolls when its content runs past the\n * room it has. A string is drawn in body medium on on-surface variant;\n * anything else draws itself. `style`, `ref` and `testID` land on the\n * `ScrollView`.\n *\n * A body its content runs past takes focus, as web's is a tab stop, so a\n * keyboard can scroll it when nothing inside it takes focus; a call site's\n * own `focusable` still wins. A bottom sheet's body scrolls only once the\n * sheet is at its whole height, and holds the sheet's drag off while it does.\n */\nfunction SheetBody({\n children,\n contentContainerStyle,\n onContentSizeChange,\n onLayout,\n scrollEnabled = true,\n ...props\n}: SheetBodyProps) {\n const layout = useLayout('Sheet.Body')\n const styles = stylesOf(useTheme())\n const text = useTypeRole('bodyMedium')\n const [content, setContent] = useState(0)\n const [room, setRoom] = useState(0)\n const measureContent = useCallback(\n (width: number, height: number) => {\n setContent(height)\n onContentSizeChange?.(width, height)\n },\n [onContentSizeChange],\n )\n const measureRoom = useCallback(\n (event: LayoutChangeEvent) => {\n setRoom(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const scrolls = scrollEnabled && layout.expanded\n const overflows = content > room\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const native = Gesture.Native()\n .enabled(scrolls && overflows)\n .blocksExternalGesture(layout.pan)\n\n return (\n <GestureDetector gesture={native}>\n <ScrollView\n focusable={scrolls && overflows}\n onContentSizeChange={measureContent}\n onLayout={measureRoom}\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n styles.body,\n contentContainerStyle,\n )}\n scrollEnabled={scrolls}\n >\n {typeof children === 'string' ? (\n <NativeText style={composeStyles<TextStyle>(text, styles.bodyText)}>\n {children}\n </NativeText>\n ) : (\n children\n )}\n </ScrollView>\n </GestureDetector>\n )\n}\n\n/**\n * The sheet itself, and the scrim behind it. Everything the sheet shows goes\n * in here; the button that opens it stays outside it.\n *\n * Inside `Sheet`, the open state is the trigger's. On its own it is this\n * part's: `isOpen` with `onOpenChange` holds it, and a `slot=\"close\"` button,\n * the scrim, the swipe and the back gesture all report through\n * `onOpenChange`. `style`, `ref` and `testID` land on the container, and\n * `testID` names the drag `<testID>-drag` for Gesture Handler's test helpers.\n */\nfunction SheetContent({\n defaultOpen,\n isDismissable = true,\n isKeyboardDismissDisabled = false,\n isOpen,\n onOpenChange,\n ...props\n}: SheetContentProps) {\n const outer = use(SheetTriggerContext)\n const { close, present, setPresent, slots, state } = useModalState(outer, {\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n if (!present) {\n return null\n }\n\n return (\n <SheetWindow\n {...props}\n close={close}\n isDismissable={isDismissable}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n isOpen={state.isOpen}\n setPresent={setPresent}\n slots={slots}\n />\n )\n}\n\n/**\n * The sheet's actions, leading and wrapping onto another row when they do not\n * fit on one, over a divider. On a bottom sheet at half height they are below\n * the fold until the sheet is raised. `style`, `ref` and `testID` land on its\n * view.\n */\nfunction SheetFooter({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Footer')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.footer, style)} />\n )\n}\n\n/**\n * The bottom sheet's drag handle, a 32 by 4dp bar centred along its top edge.\n * Where the sheet has two heights it is a button moving it to the other one,\n * named \"Drag handle\" in the device's locale unless `aria-label` says\n * otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws\n * none. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHandle({\n 'aria-label': label,\n style,\n ...props\n}: SheetHandleProps) {\n const layout = useLayout('Sheet.Handle')\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, radii } = theme\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: { borderRadius: radii.pill },\n })\n const { toggle } = layout\n\n if (!layout.bottom) {\n return null\n }\n\n if (toggle === undefined) {\n return (\n <View\n aria-hidden\n {...props}\n style={composeStyles<ViewStyle>(styles.handle, style)}\n >\n <View style={styles.bar} />\n </View>\n )\n }\n\n return (\n <Pressable\n aria-expanded={layout.expanded}\n aria-label={label ?? messagesFor().dragHandle}\n role=\"button\"\n {...props}\n {...feedback.handlers}\n onPress={toggle}\n style={composeStyles<ViewStyle>(styles.handle, feedback.ring, style)}\n >\n {feedback.layer}\n <View style={styles.bar} />\n </Pressable>\n )\n}\n\n/**\n * The sheet's header: its `Sheet.Title`, and anything beside it, such as a\n * close button, over a divider. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHeader({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Header')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.header, style)} />\n )\n}\n\n/**\n * Names the sheet: the container is labelled by it, and a screen reader is\n * sent to it once the sheet shows. In title large on on-surface variant.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction SheetTitle({ ref, style, ...props }: SheetTitleProps) {\n const layout = useLayout('Sheet.Title')\n const styles = stylesOf(useTheme())\n const role = useTypeRole('titleLarge')\n\n return (\n <NativeText\n {...props}\n nativeID={layout.titleId}\n ref={refsOf(layout.setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * The open sheet, mounted from the moment it opens until its exit has run, so\n * each opening starts from its edge and at its first height.\n */\nfunction SheetWindow({\n children,\n close,\n isDismissable,\n isKeyboardDismissDisabled,\n isOpen,\n onLayout,\n setPresent,\n slots,\n style,\n testID,\n ...props\n}: SheetWindowProps) {\n const styles = stylesOf(useTheme())\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const { height } = useWindowDimensions()\n const bottom = useWindowSizeClass() === 'compact'\n const titleId = useId()\n const [title, setTitle] = useState<HostInstance | null>(null)\n // The panel's height as laid out, before any drag moves it, and whether a\n // sheet with two heights is at the higher one.\n const [full, setFull] = useState<null | number>(null)\n const [expanded, setExpanded] = useState(false)\n const stops = stopsOf(bottom, full, height, isDismissable)\n const twoHeights = stops.partial !== null\n const rest = stops.partial !== null && !expanded ? stops.partial : 0\n const motion = useSheetMotion({ bottom, full, isOpen, rest, setPresent })\n const pan = useSheetDrag({\n close,\n enabled: bottom && isOpen && stops.settles.length > 1,\n expanded,\n full,\n isDismissable,\n offset: motion.offset,\n rest,\n setExpanded,\n stops,\n testID,\n })\n const toggle = useCallback(() => {\n setExpanded((was) => !was)\n }, [])\n const layout = useMemo<SheetLayout>(\n () => ({\n bottom,\n expanded: !twoHeights || expanded,\n pan,\n setTitle,\n titleId,\n toggle: twoHeights ? toggle : undefined,\n }),\n [bottom, expanded, pan, titleId, toggle, twoHeights],\n )\n const measure = useCallback(\n (event: LayoutChangeEvent) => {\n setFull(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const labelledBy = title === null ? undefined : titleId\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isDismissable && isOpen ? close : undefined}\n scrim={motion.scrim}\n title={title}\n >\n <GestureHandlerRootView\n style={bottom ? styles.rootBottom : styles.rootSide}\n >\n <GestureDetector gesture={pan}>\n <Animated.View\n {...panelRoleOf('dialog', labelledBy)}\n onAccessibilityEscape={\n isKeyboardDismissDisabled ? undefined : close\n }\n {...props}\n onLayout={measure}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.container,\n bottom ? styles.containerBottom : styles.containerSide,\n bottom ? bottomBoundsOf(insets, height) : sideInsetsOf(insets),\n motion.panel,\n style,\n )}\n testID={testID}\n >\n <SheetLayoutContext value={layout}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetLayoutContext>\n </Animated.View>\n </GestureDetector>\n </GestureHandlerRootView>\n </ModalWindow>\n )\n}\n\n// The side sheet's padding: its content under the status bar, over the home\n// indicator and inside the inset on its own edge. Its start edge faces the\n// screen it covers, which has none.\nfunction sideInsetsOf(insets: EdgeInsets): ViewStyle {\n return { ...insetsOf(insets), paddingStart: 0 }\n}\n\nfunction stopsOf(\n bottom: boolean,\n full: null | number,\n height: number,\n isDismissable: boolean,\n): Stops {\n if (!bottom || full === null) {\n return { partial: null, settles: [0] }\n }\n\n const lower = full - height * PARTIAL\n const partial = lower > 0 ? lower : null\n\n return {\n partial,\n settles: [\n 0,\n ...(partial === null ? [] : [partial]),\n ...(isDismissable ? [full] : []),\n ],\n }\n}\n\nfunction useLayout(part: string) {\n const layout = use(SheetLayoutContext)\n\n if (layout === null) {\n throw new Error(`${part} is drawn inside Sheet.Content.`)\n }\n\n return layout\n}\n\n/**\n * The bottom sheet's drag. The panel follows the finger, no higher than its\n * whole height and no lower than gone, or than its lowest height when it may\n * not be dismissed, and once let go it settles where `settleOf` says: below\n * the lowest height it closes, and at another height it moves the sheet there.\n */\nfunction useSheetDrag({\n close,\n enabled,\n expanded,\n full,\n isDismissable,\n offset,\n rest,\n setExpanded,\n stops,\n testID,\n}: {\n readonly close: () => void\n readonly enabled: boolean\n readonly expanded: boolean\n readonly full: null | number\n readonly isDismissable: boolean\n readonly offset: SharedValue<number>\n readonly rest: number\n readonly setExpanded: (expanded: boolean) => void\n readonly stops: Stops\n readonly testID: string | undefined\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n // Where the panel stood when the drag was recognised. Gesture Handler\n // measures its translation from there, past the slop.\n const origin = useSharedValue(0)\n const lowest = stops.settles.at(-1) ?? 0\n\n function follow(translation: number) {\n offset.set(Math.min(lowest, Math.max(0, origin.get() + translation)))\n }\n\n function settle(target: number) {\n if (isDismissable && target === full) {\n close()\n return\n }\n\n const higher = target === 0\n if (stops.partial !== null && higher !== expanded) {\n setExpanded(higher)\n return\n }\n\n offset.set(\n reduceMotion\n ? target\n : withTiming(target, {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }),\n )\n }\n\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const pan = Gesture.Pan()\n .activeOffsetY([-DRAG_SLOP, DRAG_SLOP])\n .enabled(enabled)\n .runOnJS(true)\n .onStart(({ translationY }) => {\n origin.set(offset.get())\n follow(translationY)\n })\n .onUpdate(({ translationY }) => {\n follow(translationY)\n })\n .onEnd(({ velocityY }, success) => {\n settle(success ? settleOf(offset.get(), velocityY, stops.settles) : rest)\n })\n\n return testID === undefined ? pan : pan.withTestId(`${testID}-drag`)\n}\n\n/**\n * The scrim's and the panel's motion, and the timer that unmounts the sheet\n * once its exit has run. The bottom sheet's position is how far its panel is\n * moved down, which the drag sets too; it starts below the window and rises\n * to its height once that is measured. The side sheet's is how far it has\n * come in from its edge, which is the end edge, and so the left one under\n * right-to-left.\n */\nfunction useSheetMotion({\n bottom,\n full,\n isOpen,\n rest,\n setPresent,\n}: {\n readonly bottom: boolean\n readonly full: null | number\n readonly isOpen: boolean\n readonly rest: number\n readonly setPresent: (present: boolean) => void\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const { height } = useWindowDimensions()\n const offset = useSharedValue(height)\n const shown = useSharedValue(0)\n const scrim = useSharedValue(0)\n // A translation is not mirrored under a right-to-left layout, though the\n // side sheet's edge is, so it travels the other way there.\n const direction = I18nManager.isRTL ? -1 : 1\n\n useEffect(() => {\n const fade = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n const enter = {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }\n const exit = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingEmphasizedAccelerate),\n }\n\n if (isOpen) {\n scrim.set(withTiming(1, fade))\n if (!bottom) {\n shown.set(reduceMotion ? 1 : withTiming(1, enter))\n return undefined\n }\n if (full === null) {\n return undefined\n }\n // It rises from its own height below where it rests, not from the\n // bottom of the window, so it shows from the first frame.\n if (offset.get() > full) {\n offset.set(full)\n }\n offset.set(reduceMotion ? rest : withTiming(rest, enter))\n return undefined\n }\n\n scrim.set(withTiming(0, fade))\n if (bottom) {\n const gone = full ?? height\n offset.set(reduceMotion ? gone : withTiming(gone, exit))\n } else {\n shown.set(reduceMotion ? 0 : withTiming(0, exit))\n }\n const timer = setTimeout(\n () => {\n setPresent(false)\n },\n reduceMotion\n ? motion.durationShort2\n : Math.max(motion.durationShort2, motion.durationShort3),\n )\n\n return () => {\n clearTimeout(timer)\n }\n }, [\n bottom,\n full,\n height,\n isOpen,\n motion,\n offset,\n reduceMotion,\n rest,\n scrim,\n setPresent,\n shown,\n ])\n\n return {\n offset,\n panel: useAnimatedStyle(() => {\n 'worklet'\n if (bottom) {\n return { transform: [{ translateY: offset.get() }] }\n }\n\n const progress = shown.get()\n return {\n opacity: progress,\n transform: [{ translateX: (1 - progress) * SIDE_WIDTH * direction }],\n }\n }),\n scrim: useAnimatedStyle(() => {\n 'worklet'\n return { opacity: scrim.get() }\n }),\n }\n}\n\nSheet.Body = SheetBody\nSheet.Content = SheetContent\nSheet.Footer = SheetFooter\nSheet.Handle = SheetHandle\nSheet.Header = SheetHeader\nSheet.Title = SheetTitle\n\nexport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetFooter,\n SheetHandle,\n SheetHeader,\n SheetTitle,\n}\nexport type {\n SheetBodyProps,\n SheetContentProps,\n SheetHandleProps,\n SheetPartProps,\n SheetProps,\n SheetTitleProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyHA,MAAM2D,aAAa;AAGnB,MAAMC,aAAa;AAGnB,MAAMC,UAAU;AAIhB,MAAMC,YAAY;AAKlB,MAAMC,QAAQ;AAId,MAAMC,YAAY;AAClB,MAAMC,aAAa;AACnB,MAAMC,YAAY;AAClB,MAAMC,WAAW;AAEjB,MAAMC,WAAWX,cACd,EAAEY,QAAQC,OAAOC,SAASC,cACzB7C,WAAW8C,OAAO;CAEhBC,KAAK;EACHC,iBAAiBN,OAAOO;EACxBC,cAAcP,MAAMQ;EACpBC,QAAQd;EACRe,OAAOhB;CACT;CAGAiB,MAAM;EACJC,KAAKV,QAAQW;EACbC,mBAAmBZ,QAAQa;EAC3BC,iBAAiBd,QAAQW;CAC3B;CAGAI,UAAU,EACRC,OAAOnB,OAAOO,iBAChB;CAEAa,WAAW;EACTd,iBAAiBN,OAAOqB;EACxBC,WAAWpB,QAAQqB;EACnBC,UAAU;CACZ;CAEAC,iBAAiB;EACfC,qBAAqBzB,MAAMe;EAC3BW,sBAAsB1B,MAAMe;EAC5BL,OAAO;CACT;CAGAiB,eAAe;EACbC,yBAAyB5B,MAAMa;EAC/BgB,sBAAsB7B,MAAMa;EAC5BiB,MAAM;CACR;CAGAC,QAAQ;EACNC,YAAY;EACZC,gBAAgBlC,OAAOmC;EACvBC,gBAAgB;EAChBC,eAAe;EACfC,YAAY;EACZC,UAAU;EACV1B,KAAKV,QAAQqC;E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EAAAhG,EAAA,MAAA+D;EAAA/D,EAAA,MAAA4E;EAAA5E,EAAA,MAAAtB;EAAAsB,EAAA,MAAA2H;EAAA3H,EAAA,MAAAI;CAAA,OAAAA,KAAAJ,EAAA;CA/DDlK,UAAUoK,IAmDPE,EAYF;CAIQ,MAAAC,KAAAtJ,uBAAiB;EAAA;EAEtB,IAAIsF,QAAM,OACD,EAAAoM,WAAa,CAAC,EAAAC,YAAcvE,OAAMoC,IAAK,EAAE,CAAC,EAAE;EAGrD,MAAAoC,WAAiBhB,MAAKpB,IAAK;EAAC,OACrB;GAAAqC,SACID;GAAQF,WACN,CAAC,EAAAI,aAAe,IAAIF,YAAYpQ,aAAaqP,UAAU,CAAC;EACrE;CAAC,CACF;CACM,MAAAjG,KAAA5K,uBAAiB;EAAA;EAAA,OAEf,EAAA6R,SAAWhE,MAAK2B,IAAK,EAAE;CAAC,CAChC;CAAC,IAAArE;CAAA,IAAAlC,EAAA,QAAAmE,UAAAnE,EAAA,QAAAK,MAAAL,EAAA,QAAA2B,IAAA;EAjBGO,KAAA;GAAAiC;GAAAiB,OAEE/E;GAWLuE,OACKjD;EAIT;EAAC3B,EAAA,MAAAmE;EAAAnE,EAAA,MAAAK;EAAAL,EAAA,MAAA2B;EAAA3B,EAAA,MAAAkC;CAAA,OAAAA,KAAAlC,EAAA;CAAA,OAlBMkC;AAkBN;AAGHpC,MAAMgJ,OAAOxI;AACbR,MAAMiJ,UAAUxG;AAChBzC,MAAMkJ,SAAStG;AACf5C,MAAMmJ,SAAStG;AACf7C,MAAMoJ,SAAS9F;AACftD,MAAMqJ,QAAQ9F"}
@@ -1,5 +1,5 @@
1
- import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
2
1
  import { ComponentRef, Ref } from "react";
2
+ import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
3
3
  //#region src/components/snackbar/index.d.ts
4
4
  type ShownMessage = {
5
5
  readonly action: SnackbarAction | undefined;
@@ -6,9 +6,9 @@ import { hitSlop, usePressFeedback } from "../../press/index.js";
6
6
  import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
7
7
  import { Overlay } from "../../overlay/host.js";
8
8
  import { c } from "react/compiler-runtime";
9
- import { AccessibilityInfo, Platform, Pressable, StyleSheet, Text, View } from "react-native";
10
9
  import { use, useEffect, useRef, useState, useSyncExternalStore } from "react";
11
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { AccessibilityInfo, Platform, Pressable, StyleSheet, Text, View } from "react-native";
12
12
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
13
13
  import { SafeAreaInsetsContext } from "react-native-safe-area-context";
14
14
  //#region src/components/snackbar/index.tsx
@@ -1,5 +1,5 @@
1
- import { View, ViewProps } from "react-native";
2
1
  import { ComponentRef, Ref } from "react";
2
+ import { View, ViewProps } from "react-native";
3
3
  //#region src/components/stack/index.d.ts
4
4
  type StackAlign = 'baseline' | 'center' | 'end' | 'start' | 'stretch';
5
5
  type StackGap = 'lg' | 'md' | 'none' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxs' | 'xxxl';
@@ -1,8 +1,8 @@
1
1
  import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
3
  import { c } from "react/compiler-runtime";
4
- import { StyleSheet, View } from "react-native";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { StyleSheet, View } from "react-native";
6
6
  //#region src/components/stack/index.tsx
7
7
  const alignments = StyleSheet.create({
8
8
  baseline: { alignItems: "baseline" },
@@ -1,5 +1,5 @@
1
- import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
2
1
  import { ComponentRef, ReactNode, Ref } from "react";
2
+ import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
3
3
  //#region src/components/switch/index.d.ts
4
4
  type SwitchProps = Omit<ViewProps, 'children' | 'style'> & {
5
5
  /**
@@ -6,9 +6,9 @@ import { hitSlop, usePressFeedback } from "../../press/index.js";
6
6
  import { controlStylesOf } from "../../control/styles.js";
7
7
  import { ControlLabel, ControlMessage, describedBy, messageOf } from "../../control/index.js";
8
8
  import { c } from "react/compiler-runtime";
9
- import { I18nManager, Platform, Pressable, StyleSheet, View } from "react-native";
10
9
  import { useId, useState } from "react";
11
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { I18nManager, Platform, Pressable, StyleSheet, View } from "react-native";
12
12
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
13
13
  import { useToggleState } from "react-stately/useToggleState";
14
14
  import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
@@ -1,6 +1,6 @@
1
1
  import { TypeRole } from "../../typography/roles.js";
2
- import { Text, TextProps } from "react-native";
3
2
  import { ComponentRef, Ref } from "react";
3
+ import { Text, TextProps } from "react-native";
4
4
  //#region src/components/text/index.d.ts
5
5
  type TextProps$1 = TextProps & {
6
6
  readonly ref?: Ref<ComponentRef<typeof Text>>;
@@ -2,8 +2,8 @@ import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
3
  import { useTypeRole } from "../../typography/roles.js";
4
4
  import { c } from "react/compiler-runtime";
5
- import { StyleSheet, Text } from "react-native";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { StyleSheet, Text } from "react-native";
7
7
  //#region src/components/text/index.tsx
8
8
  const stylesOf = themedStyles(({ colors }) => StyleSheet.create({
9
9
  error: { color: colors.error },
@@ -1,7 +1,7 @@
1
1
  import { ValidationResult } from "../../form/index.js";
2
2
  import { FieldVariant } from "../../field/index.js";
3
- import { StyleProp, TextInput, TextInputProps, View, ViewStyle } from "react-native";
4
3
  import { ComponentRef, ReactNode, Ref } from "react";
4
+ import { StyleProp, TextInput, TextInputProps, View, ViewStyle } from "react-native";
5
5
  //#region src/components/text-field/index.d.ts
6
6
  type TextFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilityLabel' | 'aria-disabled' | 'aria-label' | 'children' | 'cursorColor' | 'defaultValue' | 'editable' | 'multiline' | 'numberOfLines' | 'onChange' | 'onChangeText' | 'placeholder' | 'placeholderTextColor' | 'readOnly' | 'selectionColor' | 'style' | 'underlineColorAndroid' | 'value'> & {
7
7
  /**
@@ -1,9 +1,9 @@
1
1
  import { useFieldValidation } from "../../form/index.js";
2
2
  import { FieldBox, FieldInput, FieldMessage, describedBy, useFieldFocus } from "../../field/index.js";
3
3
  import { c } from "react/compiler-runtime";
4
- import { View } from "react-native";
5
4
  import { useId, useImperativeHandle, useRef, useState } from "react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { View } from "react-native";
7
7
  //#region src/components/text-field/index.tsx
8
8
  function blurThen(onBlur, then) {
9
9
  return (event) => {
@@ -0,0 +1,137 @@
1
+ import { CheckGlyph, IndeterminateGlyph } from "../glyphs/index.js";
2
+ import { useTheme } from "../theme/scope.js";
3
+ import { composeStyles } from "../theme/styles.js";
4
+ import { withOpacity } from "../theme/color.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { StyleSheet } from "react-native";
8
+ import Animated, { Easing, useAnimatedStyle, useReducedMotion, withTiming } from "react-native-reanimated";
9
+ //#region src/control/checkbox-box.tsx
10
+ const BOX_SIZE = 18;
11
+ const styles = StyleSheet.create({ box: {
12
+ borderRadius: 2,
13
+ borderWidth: 2,
14
+ height: BOX_SIZE,
15
+ width: BOX_SIZE
16
+ } });
17
+ const glyphs = /* @__PURE__ */ new Map();
18
+ /**
19
+ * The box and its glyph, centred in a square view `within` across: the
20
+ * Checkbox's 40dp state layer, or a row's 24dp slot. `active` is a hovered,
21
+ * pressed or focused box, whose rule darkens while unmarked.
22
+ */
23
+ function CheckboxBox(t0) {
24
+ const $ = c(17);
25
+ const { active: t1, isDisabled: t2, isIndeterminate: t3, isSelected, tone, within } = t0;
26
+ const active = t1 === void 0 ? false : t1;
27
+ const isDisabled = t2 === void 0 ? false : t2;
28
+ const isIndeterminate = t3 === void 0 ? false : t3;
29
+ const theme = useTheme();
30
+ const marked = isSelected || isIndeterminate;
31
+ const t4 = tone ?? (marked ? "marked" : "unmarked");
32
+ let t5;
33
+ if ($[0] !== active || $[1] !== isDisabled || $[2] !== marked || $[3] !== t4 || $[4] !== theme) {
34
+ t5 = paintOf(theme, {
35
+ active,
36
+ isDisabled,
37
+ marked,
38
+ tone: t4
39
+ });
40
+ $[0] = active;
41
+ $[1] = isDisabled;
42
+ $[2] = marked;
43
+ $[3] = t4;
44
+ $[4] = theme;
45
+ $[5] = t5;
46
+ } else t5 = $[5];
47
+ const paint = t5;
48
+ const box = useBoxColors(paint);
49
+ const Glyph = isIndeterminate ? IndeterminateGlyph : isSelected ? CheckGlyph : null;
50
+ let t6;
51
+ if ($[6] !== box) {
52
+ t6 = composeStyles(styles.box, box);
53
+ $[6] = box;
54
+ $[7] = t6;
55
+ } else t6 = $[7];
56
+ let t7;
57
+ if ($[8] !== t6) {
58
+ t7 = /* @__PURE__ */ jsx(Animated.View, { style: t6 });
59
+ $[8] = t6;
60
+ $[9] = t7;
61
+ } else t7 = $[9];
62
+ let t8;
63
+ if ($[10] !== Glyph || $[11] !== paint || $[12] !== within) {
64
+ t8 = Glyph === null ? null : /* @__PURE__ */ jsx(Glyph, {
65
+ color: paint.glyph,
66
+ size: BOX_SIZE,
67
+ style: glyphAt(within)
68
+ });
69
+ $[10] = Glyph;
70
+ $[11] = paint;
71
+ $[12] = within;
72
+ $[13] = t8;
73
+ } else t8 = $[13];
74
+ let t9;
75
+ if ($[14] !== t7 || $[15] !== t8) {
76
+ t9 = /* @__PURE__ */ jsxs(Fragment, { children: [t7, t8] });
77
+ $[14] = t7;
78
+ $[15] = t8;
79
+ $[16] = t9;
80
+ } else t9 = $[16];
81
+ return t9;
82
+ }
83
+ function glyphAt(within) {
84
+ const known = glyphs.get(within);
85
+ if (known !== void 0) return known;
86
+ const inset = (within - BOX_SIZE) / 2;
87
+ const style = {
88
+ left: inset,
89
+ position: "absolute",
90
+ top: inset
91
+ };
92
+ glyphs.set(within, style);
93
+ return style;
94
+ }
95
+ /**
96
+ * What the box is painted in: its fill, its rule and the glyph's colour.
97
+ * Where the page draws no fill or no rule it is the colour beside it made
98
+ * clear rather than plain transparent black, so the box eases through its
99
+ * own colour rather than through grey.
100
+ */
101
+ function paintOf({ colors, stateLayerOpacity }, { active, isDisabled, marked, tone }) {
102
+ const disabled = withOpacity(colors.onSurface, stateLayerOpacity.disabledContent);
103
+ if (marked) {
104
+ const fill = isDisabled ? disabled : tone === "error" ? colors.error : colors.primary;
105
+ return {
106
+ fill,
107
+ glyph: isDisabled ? colors.surface : tone === "error" ? colors.onError : colors.onPrimary,
108
+ rule: withOpacity(fill, 0)
109
+ };
110
+ }
111
+ const rule = isDisabled ? disabled : tone === "error" ? colors.error : active ? colors.onSurface : colors.onSurfaceVariant;
112
+ return {
113
+ fill: withOpacity(rule, 0),
114
+ glyph: colors.onPrimary,
115
+ rule
116
+ };
117
+ }
118
+ function useBoxColors(t0) {
119
+ const { fill, rule } = t0;
120
+ const { motion } = useTheme();
121
+ const reduceMotion = useReducedMotion();
122
+ const timing = {
123
+ duration: motion.durationShort2,
124
+ easing: Easing.bezier(...motion.easingStandard)
125
+ };
126
+ return useAnimatedStyle(() => {
127
+ "worklet";
128
+ return {
129
+ backgroundColor: reduceMotion ? fill : withTiming(fill, timing),
130
+ borderColor: reduceMotion ? rule : withTiming(rule, timing)
131
+ };
132
+ });
133
+ }
134
+ //#endregion
135
+ export { CheckboxBox };
136
+
137
+ //# sourceMappingURL=checkbox-box.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-box.js","names":["ViewStyle","AnimatedStyle","StyleSheet","Animated","Easing","useAnimatedStyle","useReducedMotion","withTiming","ResolvedTheme","CheckGlyph","IndeterminateGlyph","withOpacity","useTheme","composeStyles","CheckboxTone","BOX_SIZE","BOX_CORNER","BOX_RULE","styles","create","box","borderRadius","borderWidth","height","width","glyphs","Map","CheckboxBox","t0","$","_c","active","t1","isDisabled","t2","isIndeterminate","t3","isSelected","tone","within","undefined","theme","marked","t4","t5","paintOf","paint","useBoxColors","Glyph","t6","t7","t8","glyph","glyphAt","t9","known","get","inset","style","left","position","top","const","set","colors","stateLayerOpacity","disabled","onSurface","disabledContent","fill","error","primary","surface","onError","onPrimary","rule","onSurfaceVariant","motion","reduceMotion","timing","duration","durationShort2","easing","bezier","easingStandard","backgroundColor","borderColor","_c"],"sources":["../../src/control/checkbox-box.tsx"],"sourcesContent":["import type { ViewStyle } from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\n\nimport { StyleSheet } from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n withTiming,\n} from 'react-native-reanimated'\n\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { CheckGlyph, IndeterminateGlyph } from '../glyphs'\nimport { withOpacity } from '../theme/color'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles } from '../theme/styles'\n\n// The box the checkbox page draws, apart from the press around it: Checkbox\n// draws it inside its state layer, and a list row that selects draws it in\n// its leading slot, where the row is what a screen reader hears and presses.\n\n/** Which pair of colours the box is drawn in. */\ntype CheckboxTone = 'error' | 'marked' | 'unmarked'\n\n// The box's side, its rule and its corner, from the page. The glyph is the\n// box's size and sits over the whole of it, rule included.\nconst BOX_SIZE = 18\nconst BOX_CORNER = 2\nconst BOX_RULE = 2\n\nconst styles = StyleSheet.create({\n box: {\n borderRadius: BOX_CORNER,\n borderWidth: BOX_RULE,\n height: BOX_SIZE,\n width: BOX_SIZE,\n },\n})\n\n// Where the glyph sits over the box, which the view around both centres. Over\n// the box rather than inside it, since a box's children are laid out inside\n// its rule and the glyph covers the rule as well.\nconst glyphs = new Map<number, ViewStyle>()\n\n/**\n * The box and its glyph, centred in a square view `within` across: the\n * Checkbox's 40dp state layer, or a row's 24dp slot. `active` is a hovered,\n * pressed or focused box, whose rule darkens while unmarked.\n */\nfunction CheckboxBox({\n active = false,\n isDisabled = false,\n isIndeterminate = false,\n isSelected,\n tone,\n within,\n}: {\n readonly active?: boolean\n readonly isDisabled?: boolean\n readonly isIndeterminate?: boolean\n readonly isSelected: boolean\n readonly tone?: CheckboxTone\n readonly within: number\n}) {\n const theme = useTheme()\n const marked = isSelected || isIndeterminate\n const paint = paintOf(theme, {\n active,\n isDisabled,\n marked,\n tone: tone ?? (marked ? 'marked' : 'unmarked'),\n })\n const box = useBoxColors(paint)\n const Glyph = isIndeterminate\n ? IndeterminateGlyph\n : isSelected\n ? CheckGlyph\n : null\n\n return (\n <>\n <Animated.View\n style={composeStyles<AnimatedStyle<ViewStyle>>(styles.box, box)}\n />\n {Glyph === null ? null : (\n <Glyph color={paint.glyph} size={BOX_SIZE} style={glyphAt(within)} />\n )}\n </>\n )\n}\n\n// The glyph's place over a box centred `within` across, kept per size so a\n// render hands the same style each time.\nfunction glyphAt(within: number): ViewStyle {\n const known = glyphs.get(within)\n\n if (known !== undefined) {\n return known\n }\n\n const inset = (within - BOX_SIZE) / 2\n const style = { left: inset, position: 'absolute', top: inset } as const\n\n glyphs.set(within, style)\n return style\n}\n\n/**\n * What the box is painted in: its fill, its rule and the glyph's colour.\n * Where the page draws no fill or no rule it is the colour beside it made\n * clear rather than plain transparent black, so the box eases through its\n * own colour rather than through grey.\n */\nfunction paintOf(\n { colors, stateLayerOpacity }: ResolvedTheme,\n {\n active,\n isDisabled,\n marked,\n tone,\n }: {\n readonly active: boolean\n readonly isDisabled: boolean\n readonly marked: boolean\n readonly tone: CheckboxTone\n },\n) {\n const disabled = withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContent,\n )\n\n if (marked) {\n const fill = isDisabled\n ? disabled\n : tone === 'error'\n ? colors.error\n : colors.primary\n const glyph = isDisabled\n ? colors.surface\n : tone === 'error'\n ? colors.onError\n : colors.onPrimary\n\n return { fill, glyph, rule: withOpacity(fill, 0) }\n }\n\n const rule = isDisabled\n ? disabled\n : tone === 'error'\n ? colors.error\n : active\n ? colors.onSurface\n : colors.onSurfaceVariant\n\n return { fill: withOpacity(rule, 0), glyph: colors.onPrimary, rule }\n}\n\n// The box's fill and rule, eased to as the state changes.\nfunction useBoxColors({ fill, rule }: { fill: string; rule: string }) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const timing = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n return useAnimatedStyle(() => {\n 'worklet'\n return {\n backgroundColor: reduceMotion ? fill : withTiming(fill, timing),\n borderColor: reduceMotion ? rule : withTiming(rule, timing),\n }\n })\n}\n\nexport type { CheckboxTone }\n\nexport { CheckboxBox }\n"],"mappings":";;;;;;;;;AA2BA,MAAMe,WAAW;AAIjB,MAAMG,SAAShB,WAAWiB,OAAO,EAC/BC,KAAK;CACHC,cAAcL;CACdM,aAAaL;CACbM,QAAQR;CACRS,OAAOT;AACT,EACF,CAAC;AAKD,MAAMU,yBAAS,IAAIC,IAAuB;;;;;;AAO1C,SAAAC,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAqB,MAAA,EAAAC,QAAAC,IAAAC,YAAAC,IAAAC,iBAAAC,IAAAC,YAAAC,MAAAC,WAAAX;CACnB,MAAAG,SAAAC,OAAAQ,KAAAA,IAAA,QAAAR;CACA,MAAAC,aAAAC,OAAAM,KAAAA,IAAA,QAAAN;CACA,MAAAC,kBAAAC,OAAAI,KAAAA,IAAA,QAAAJ;CAYA,MAAAK,QAAc7B,SAAS;CACvB,MAAA8B,SAAeL,cAAAF;CAKP,MAAAQ,KAAAL,SAASI,SAAA,WAAA;CAA+B,IAAAE;CAAA,IAAAf,EAAA,OAAAE,UAAAF,EAAA,OAAAI,cAAAJ,EAAA,OAAAa,UAAAb,EAAA,OAAAc,MAAAd,EAAA,OAAAY,OAAA;EAJlCG,KAAAC,QAAQJ,OAAO;GAAAV;GAAAE;GAAAS;GAAAJ,MAIrBK;EACR,CAAC;EAACd,EAAA,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from "../typography/roles.js";
4
4
  import { controlStylesOf } from "./styles.js";
5
5
  import { c } from "react/compiler-runtime";
6
- import { Platform, Text, View } from "react-native";
7
6
  import { jsx } from "react/jsx-runtime";
7
+ import { Platform, Text, View } from "react-native";
8
8
  //#region src/control/index.tsx
9
9
  const HIDDEN = {
10
10
  accessibilityElementsHidden: true,
@@ -1,5 +1,5 @@
1
+ import { ComponentRef, ReactNode, Ref, RefObject } from "react";
1
2
  import { StyleProp, TextInput, TextInputProps, ViewStyle } from "react-native";
2
- import { ComponentRef, ReactNode, Ref } from "react";
3
3
  import "react-native-reanimated";
4
4
  //#region src/field/index.d.ts
5
5
  /**
@@ -8,9 +8,9 @@ import { withOpacity } from "../theme/color.js";
8
8
  import { usePressFeedback } from "../press/index.js";
9
9
  import { fieldStylesOf } from "./styles.js";
10
10
  import { c } from "react/compiler-runtime";
11
- import { AccessibilityInfo, Platform, Pressable, Text, TextInput, View, useWindowDimensions } from "react-native";
12
11
  import { createContext, use, useEffect, useId, useRef, useState } from "react";
13
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ import { AccessibilityInfo, Platform, Pressable, Text, TextInput, View, useWindowDimensions } from "react-native";
14
14
  import Animated, { Easing, useAnimatedStyle, useDerivedValue, useReducedMotion, withTiming } from "react-native-reanimated";
15
15
  //#region src/field/index.tsx
16
16
  const ICON_SIZE = 24;
@@ -1,5 +1,5 @@
1
+ import { ComponentRef, RefObject } from "react";
1
2
  import { TextInput } from "react-native";
2
- import { ComponentRef } from "react";
3
3
  //#region src/form/index.d.ts
4
4
  /**
5
5
  * `aria` shows a field's error as soon as the field says so, and lets the