@kanso-labs/react-native-kanso-ui 0.3.1 → 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 (123) 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 -0
  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 +3 -2
  30. package/dist/components/dialog/index.js +105 -242
  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 +137 -0
  66. package/dist/components/sheet/index.js +1091 -0
  67. package/dist/components/sheet/index.js.map +1 -0
  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/switch/index.js.map +1 -1
  75. package/dist/components/text/index.d.ts +1 -1
  76. package/dist/components/text/index.js +1 -1
  77. package/dist/components/text-field/index.d.ts +1 -1
  78. package/dist/components/text-field/index.js +1 -1
  79. package/dist/control/checkbox-box.js +137 -0
  80. package/dist/control/checkbox-box.js.map +1 -0
  81. package/dist/control/index.js +1 -1
  82. package/dist/field/index.d.ts +1 -1
  83. package/dist/field/index.js +1 -1
  84. package/dist/form/index.d.ts +1 -1
  85. package/dist/glyphs/index.js +21 -2
  86. package/dist/glyphs/index.js.map +1 -1
  87. package/dist/i18n/index.js +16 -1
  88. package/dist/i18n/index.js.map +1 -1
  89. package/dist/i18n/messages.js +374 -34
  90. package/dist/i18n/messages.js.map +1 -1
  91. package/dist/index.d.ts +7 -1
  92. package/dist/index.js +8 -2
  93. package/dist/indicator/index.d.ts +1 -1
  94. package/dist/indicator/index.js +2 -2
  95. package/dist/mark/index.d.ts +1 -1
  96. package/dist/mark/index.js +1 -1
  97. package/dist/modal/index.d.ts +16 -0
  98. package/dist/modal/index.js +277 -0
  99. package/dist/modal/index.js.map +1 -0
  100. package/dist/overlay/anchored.d.ts +2 -0
  101. package/dist/overlay/anchored.js +182 -0
  102. package/dist/overlay/anchored.js.map +1 -0
  103. package/dist/overlay/host.d.ts +2 -0
  104. package/dist/overlay/host.js +1 -1
  105. package/dist/overlay/index.d.ts +4 -0
  106. package/dist/overlay/panel.js +215 -0
  107. package/dist/overlay/panel.js.map +1 -0
  108. package/dist/overlay/placement.d.ts +8 -0
  109. package/dist/overlay/placement.js +87 -0
  110. package/dist/overlay/placement.js.map +1 -0
  111. package/dist/press/index.js +1 -1
  112. package/dist/ref/index.js +15 -0
  113. package/dist/ref/index.js.map +1 -0
  114. package/dist/router/index.js +1 -1
  115. package/dist/row/index.js +158 -0
  116. package/dist/row/index.js.map +1 -0
  117. package/dist/row/styles.js +51 -0
  118. package/dist/row/styles.js.map +1 -0
  119. package/dist/theme/scope.js +1 -1
  120. package/dist/theme-scope.d.ts +1 -1
  121. package/dist/theme-scope.js +1 -1
  122. package/dist/typography/fonts.js +1 -1
  123. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","GestureResponderEvent","HostInstance","LayoutChangeEvent","ModalProps","ScrollViewProps","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","AnimatedStyle","EdgeInsets","OverlayTriggerState","createContext","use","useCallback","useEffect","useId","useLayoutEffect","useMemo","useRef","useState","AccessibilityInfo","Modal","Text","NativeText","Platform","ScrollView","StyleSheet","useWindowDimensions","View","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","SafeAreaInsetsContext","useOverlayTriggerState","ButtonSlots","ResolvedTheme","AnimatedPressable","ButtonSlotContext","useWindowSizeClass","OverlayHost","withOpacity","useTheme","composeStyles","themedStyles","useTypeRole","MIN_WIDTH","MAX_WIDTH","SCALE_FROM","RISE_FROM","SCRIM_OPACITY","NO_INSETS","bottom","left","right","top","ORIENTATIONS","NO_PARTS","Readonly","Record","DialogPart","footer","header","title","stylesOf","colors","radii","shadows","sizing","spacing","create","actions","alignItems","flexDirection","flexShrink","flexWrap","gap","sm","justifyContent","padding","xl","actionsFull","borderTopColor","outlineVariant","borderTopWidth","minHeight","rowSm","paddingVertical","xs","bodyText","color","onSurfaceVariant","container","backgroundColor","surfaceContainerHigh","overflow","containerBasic","borderRadius","boxShadow","elevation3","maxHeight","maxWidth","minWidth","width","containerFull","flex","md","paddingBottom","lg","paddingHorizontal","paddingTop","headerFull","borderBottomColor","borderBottomWidth","layout","pointerEvents","position","layoutFull","scrim","onSurface","DialogLayout","basic","parts","register","part","setTitle","node","titleId","DialogTrigger","state","trigger","DialogLayoutContext","DialogTriggerContext","DialogBodyProps","ref","DialogContentProps","DialogOpenProps","Omit","children","isDismissable","isKeyboardDismissDisabled","role","style","defaultOpen","isOpen","onOpenChange","DialogPartProps","DialogProps","DialogTitleProps","bodyPaddingOf","Dialog","t0","$","_c","t1","setTrigger","t2","context","t3","default","event","target","currentTarget","open","slots","t4","t5","DialogBody","contentContainerStyle","onContentSizeChange","onLayout","props","useLayout","theme","styles","text","content","setContent","room","setRoom","height","measureContent","nativeEvent","measureRoom","T0","t6","DialogContent","undefined","outer","own","insets","sizeClass","setParts","Symbol","for","registerOf","present","setPresent","motion","useDialogMotion","close","t7","t8","useReturnFocus","labelledBy","web","OS","t9","focusOf","t10","t11","t12","panelRoleOf","t13","t14","insetsOf","panel","t15","t16","t17","t18","ignore","DialogFooter","DialogHeader","DialogTitle","refsOf","sendAccessibilityEvent","paddingLeft","paddingRight","Pick","T","other","current","update","reduceMotion","durationMedium1","durationShort2","durationShort3","easingEmphasizedAccelerate","easingEmphasizedDecelerate","easingStandard","fade","duration","easing","bezier","set","timer","setTimeout","Math","max","clearTimeout","shown","get","opacity","transform","scale","translateY","Error","gone","Body","Content","Footer","Header","Title","_c","NativeText"],"sources":["../../../src/components/dialog/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n GestureResponderEvent,\n HostInstance,\n LayoutChangeEvent,\n ModalProps,\n ScrollViewProps,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\nimport type { OverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport {\n AccessibilityInfo,\n Modal,\n Text as NativeText,\n Platform,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\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'\nimport { useOverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { AnimatedPressable } from '../../button'\nimport { ButtonSlotContext } from '../../button/slots'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { OverlayHost } from '../../overlay'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// The dialogs spec page's two dialogs, as kanso-ui's Dialog draws them: one\n// component, since the page pairs them by window size rather than offering a\n// choice. In a medium window or wider it is the basic dialog, a container on\n// surface container high with the 28dp corner, between 280 and 560dp wide,\n// centred over the scrim, with 24dp of padding all round, 16dp between the\n// headline and the body and 24dp between the body and the actions. In a\n// compact window, below 600dp, the same dialog fills the window as the page's\n// full-screen dialog: square corners, a 56dp header with the headline in\n// title large and a divider under it, and a 56dp action bar over a divider,\n// both inside the device's safe area.\n//\n// An alert dialog, `role=\"alertdialog\"`, is a question with two or three\n// answers rather than a task, and stays the basic dialog at every width, as\n// on web, where a question filling a phone read as a headline at the top of\n// the screen and its answers at the bottom with nothing between them.\n//\n// **It is drawn in a React Native `Modal`**, which keeps React context, so\n// the dialog keeps the `ThemeScope` around it, and which is a window of its\n// own on iOS and Android, above the screen and its overlays. The `Modal`\n// therefore hosts overlays of its own, so a snackbar or a popover raised from\n// inside the dialog draws above it rather than under it.\n//\n// **It animates out as well as in**, from the motion tokens: the panel scales\n// up from 90% on the emphasised decelerating curve, or rises 3% of the window\n// when it fills it, and leaves on the emphasised accelerating one, while the\n// scrim fades on the standard curve. Web only animates in, since React Aria\n// keeps a closing surface mounted only while a CSS animation runs; here the\n// dialog stays mounted until its exit has run. Under reduced motion the\n// panel appears and leaves at once, and the scrim still fades, which is what\n// says the dialog came and went.\n//\n// **A press on the scrim closes it**, unless `isDismissable` is false, and\n// Android's back gesture and VoiceOver's escape gesture close it, unless\n// `isKeyboardDismissDisabled`, the prop that keeps Escape from closing it on\n// web, which is the key React Native Web's `Modal` hands the same handler.\n// A button inside `Dialog` and outside its content opens it, and one given\n// `slot=\"close\"` inside the content closes it, through src/button's\n// slots.ts.\n//\n// **Focus moves into the dialog and back.** On iOS and Android the screen\n// reader is sent to the headline once the dialog shows, and back to the\n// button that opened it once it has gone. React Native Web's `Modal` traps\n// focus and restores it itself, and is the dialog element there, so on web it\n// takes the dialog's name and the panel takes no role of its own. That\n// `Modal` sets its role itself, so an alert dialog is announced as a dialog\n// in the web Storybook; kanso-ui, the library for web apps, keeps the role.\n\n// The panel's width bounds, the page's, and how far it travels as it\n// arrives: it scales up from 90% as the basic dialog, or rises 3% of the\n// window as the full-screen one, as web's keyframes have it.\nconst MIN_WIDTH = 280\nconst MAX_WIDTH = 560\nconst SCALE_FROM = 0.9\nconst RISE_FROM = 0.03\n\n// The scrim is the scrim role at 32%, the opacity Material Design gives a\n// modal's scrim and web mixes in.\nconst SCRIM_OPACITY = 0.32\n\n// Outside a SafeAreaProvider the insets are unknown, and the window's own edge\n// is the best bound there is.\nconst NO_INSETS = { bottom: 0, left: 0, right: 0, top: 0 }\n\n// iOS presents a `Modal` in portrait alone unless told otherwise, which would\n// turn an app held sideways round as the dialog opened.\nconst ORIENTATIONS: ModalProps['supportedOrientations'] = [\n 'portrait',\n 'portrait-upside-down',\n 'landscape',\n 'landscape-left',\n 'landscape-right',\n]\n\nconst NO_PARTS: Readonly<Record<DialogPart, number>> = {\n footer: 0,\n header: 0,\n title: 0,\n}\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The page's 24dp between the body and the actions, and 8dp between\n // the buttons. Actions that do not fit on one row wrap onto another,\n // still at the trailing edge.\n actions: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n gap: spacing.sm,\n justifyContent: 'flex-end',\n padding: spacing.xl,\n },\n // Full screen, the actions are the page's bottom action bar: 56dp at\n // least, over a divider, so an action whose label wraps grows the bar\n // rather than meeting the divider.\n actionsFull: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n minHeight: sizing.rowSm,\n paddingVertical: spacing.xs,\n },\n // The text a body is handed as a string, in the page's body medium on\n // on-surface variant, which is what web's body sets for its text.\n bodyText: {\n color: colors.onSurfaceVariant,\n },\n // Both dialogs' container, whose corner, where it has one, clips the\n // body's scroll.\n container: {\n backgroundColor: colors.surfaceContainerHigh,\n overflow: 'hidden',\n },\n // The basic dialog's container, centred over the scrim and only as\n // tall as the room the scrim's padding leaves, so the body scrolls\n // rather than running off the screen.\n containerBasic: {\n borderRadius: radii.xl,\n boxShadow: shadows.elevation3,\n maxHeight: '100%',\n maxWidth: MAX_WIDTH,\n minWidth: MIN_WIDTH,\n width: '100%',\n },\n // Full screen, the container fills the window with square corners, and\n // its fill runs on under the safe area its content keeps out of.\n containerFull: {\n flex: 1,\n },\n // The page's 24dp above the headline and 16dp between it and the body,\n // with the headline beside whatever else the header holds, a close\n // button for one.\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.md,\n justifyContent: 'space-between',\n paddingBottom: spacing.lg,\n paddingHorizontal: spacing.xl,\n paddingTop: spacing.xl,\n },\n // Full screen, the header is the page's own 56dp bar, at least, under\n // a divider.\n headerFull: {\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n minHeight: sizing.rowSm,\n paddingBottom: spacing.xs,\n paddingTop: spacing.xs,\n },\n // The scrim centres the container, which is what makes the dialog a\n // dialog rather than a sheet. Full screen it has no room to give. It\n // takes no touches itself, so a press around the container reaches the\n // scrim under it.\n layout: {\n alignItems: 'center',\n bottom: 0,\n justifyContent: 'center',\n left: 0,\n padding: spacing.xl,\n pointerEvents: 'box-none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n layoutFull: {\n alignItems: 'stretch',\n padding: 0,\n },\n scrim: {\n backgroundColor: withOpacity(colors.scrim, SCRIM_OPACITY),\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n // The headline gives way to whatever shares its row.\n title: {\n color: colors.onSurface,\n flexShrink: 1,\n },\n }),\n)\n\n// What the content's parts read: which of the two dialogs is drawn, which\n// parts are there, and the headline's name and node.\ntype DialogLayout = {\n readonly basic: boolean\n readonly parts: Readonly<Record<DialogPart, number>>\n readonly register: (part: DialogPart) => () => void\n readonly setTitle: (node: HostInstance | null) => void\n readonly titleId: string\n}\n\ntype DialogPart = 'footer' | 'header' | 'title'\n\n// What `Dialog` hands its content: the open state, and the button that last\n// opened it, for focus to return to.\ntype DialogTrigger = {\n readonly state: OverlayTriggerState\n readonly trigger: HostInstance | null\n}\n\nconst DialogLayoutContext = createContext<DialogLayout | null>(null)\nconst DialogTriggerContext = createContext<DialogTrigger | null>(null)\n\ntype DialogBodyProps = ScrollViewProps & {\n readonly ref?: Ref<ComponentRef<typeof ScrollView>>\n}\n\ntype DialogContentProps = DialogOpenProps &\n Omit<ViewProps, 'children' | 'role' | 'style'> & {\n readonly children?: ReactNode\n /**\n * Whether a press on the scrim, outside the container, closes the\n * dialog. Android's back gesture is `isKeyboardDismissDisabled`'s, and\n * this says nothing about it, so a dialog that has to be answered from\n * one of its actions turns off both.\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 dialog.\n * @default false\n */\n readonly isKeyboardDismissDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * `alertdialog` for a dialog interrupting with something that has to be\n * answered before the app carries on. It also keeps the dialog the basic\n * one in a compact window, centred and sized to its content, where a\n * dialog of the default role fills the window.\n * @default 'dialog'\n */\n readonly role?: 'alertdialog' | 'dialog'\n readonly style?: StyleProp<ViewStyle>\n }\n\ntype DialogOpenProps = {\n /** Whether the dialog starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the dialog is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the dialog opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\ntype DialogPartProps = ViewProps & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype DialogProps = DialogOpenProps & {\n /** The button that opens the dialog, and `Dialog.Content`. */\n readonly children?: ReactNode\n}\n\ntype DialogTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\n// The body's padding. The page's 24dp all round is spent by whichever part\n// is at each end, so the body takes the top of it when no header is there\n// and the bottom when no footer is. Full screen, it keeps 24dp under the\n// header's divider as well, which is the content padding the page gives the\n// full-screen dialog.\nfunction bodyPaddingOf(\n { basic, parts }: DialogLayout,\n spacing: ResolvedTheme['spacing'],\n): ViewStyle {\n return {\n gap: spacing.lg,\n paddingBottom: parts.footer > 0 ? 0 : spacing.xl,\n paddingHorizontal: spacing.xl,\n paddingTop: basic && parts.header > 0 ? 0 : spacing.xl,\n }\n}\n\n/**\n * A modal dialog centred over the screen, and the same dialog filling the\n * window in a compact window, the dialogs spec page's basic and full-screen\n * dialogs, paired by window size as the page pairs them. An alert dialog\n * stays the basic one at every width. Pass `isOpen` with `onOpenChange` to\n * hold the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <Dialog>\n * <Button>Open</Button>\n * <Dialog.Content>\n * <Dialog.Header>\n * <Dialog.Title>Headline</Dialog.Title>\n * </Dialog.Header>\n * <Dialog.Body>Supporting text</Dialog.Body>\n * <Dialog.Footer>\n * <Button slot=\"close\" variant=\"text\">Cancel</Button>\n * </Dialog.Footer>\n * </Dialog.Content>\n * </Dialog>\n * ```\n *\n * Composed rather than configured by props, as web's is, since a dialog's\n * header, body and actions all take arbitrary content. A `Button` or\n * `IconButton` inside `Dialog` and outside its content opens it, and one\n * given `slot=\"close\"` anywhere inside the content closes it. A dialog nothing on\n * the screen opens leaves `Dialog` out and passes `isOpen` and\n * `onOpenChange` to `Dialog.Content` instead.\n */\nfunction Dialog({ children, defaultOpen, isOpen, onOpenChange }: DialogProps) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const [trigger, setTrigger] = useState<HostInstance | null>(null)\n const context = useMemo(() => ({ state, trigger }), [state, trigger])\n // The default slot a button inside `Dialog` fills: it records\n // itself as the button focus returns to, and opens the dialog. React\n // Native types the target as a bare view tag too, which focus cannot be\n // sent to, so such a press records nothing.\n const slots = useMemo<ButtonSlots>(\n () => ({\n default: (event: GestureResponderEvent) => {\n const target = event.currentTarget\n\n setTrigger(typeof target === 'number' ? null : target)\n state.open()\n },\n }),\n [state],\n )\n\n return (\n <DialogTriggerContext value={context}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </DialogTriggerContext>\n )\n}\n\n/**\n * What the dialog shows, as a body that scrolls when its content runs past\n * the room it has. A string is drawn in the page's body medium on on-surface\n * variant; anything else draws itself. `style`, `ref` and `testID` land on\n * the `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.\n */\nfunction DialogBody({\n children,\n contentContainerStyle,\n onContentSizeChange,\n onLayout,\n ...props\n}: DialogBodyProps) {\n const layout = useLayout('Dialog.Body')\n const theme = useTheme()\n const styles = stylesOf(theme)\n const text = useTypeRole('bodyMedium')\n const { spacing } = theme\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\n return (\n <ScrollView\n focusable={content > room}\n onContentSizeChange={measureContent}\n onLayout={measureRoom}\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n bodyPaddingOf(layout, spacing),\n contentContainerStyle,\n )}\n >\n {typeof children === 'string' ? (\n <NativeText style={composeStyles<TextStyle>(text, styles.bodyText)}>\n {children}\n </NativeText>\n ) : (\n children\n )}\n </ScrollView>\n )\n}\n\n/**\n * The dialog itself, and the scrim behind it. Everything the dialog shows\n * goes in here; the button that opens it stays outside it.\n *\n * Inside `Dialog`, 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\"`\n * button, the scrim and the back gesture all report through `onOpenChange`.\n * `style`, `ref` and `testID` land on the container.\n */\nfunction DialogContent({\n children,\n defaultOpen,\n isDismissable = true,\n isKeyboardDismissDisabled = false,\n isOpen,\n onOpenChange,\n role = 'dialog',\n style,\n ...props\n}: DialogContentProps) {\n const outer = use(DialogTriggerContext)\n const own = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const state = outer?.state ?? own\n const theme = useTheme()\n const styles = stylesOf(theme)\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const sizeClass = useWindowSizeClass()\n const basic = role === 'alertdialog' || sizeClass !== 'compact'\n const titleId = useId()\n const [parts, setParts] = useState(NO_PARTS)\n const [register] = useState(() => registerOf(setParts))\n const [title, setTitle] = useState<HostInstance | null>(null)\n const [present, setPresent] = useState(state.isOpen)\n const motion = useDialogMotion(state.isOpen, present, setPresent, basic)\n const close = useCallback(() => {\n state.close()\n }, [state])\n const slots = useMemo<ButtonSlots>(() => ({ close }), [close])\n const layout = useMemo<DialogLayout>(\n () => ({ basic, parts, register, setTitle, titleId }),\n [basic, parts, register, titleId],\n )\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (state.isOpen && !present) {\n setPresent(true)\n }\n\n useReturnFocus(present, outer)\n\n if (!present) {\n return null\n }\n\n const labelledBy = parts.title > 0 ? titleId : undefined\n const web = Platform.OS === 'web'\n\n return (\n <Modal\n animationType=\"none\"\n aria-labelledby={web ? labelledBy : undefined}\n navigationBarTranslucent\n onRequestClose={isKeyboardDismissDisabled ? ignore : close}\n onShow={focusOf(title)}\n statusBarTranslucent\n supportedOrientations={ORIENTATIONS}\n transparent\n visible\n >\n {/* Nothing in the window takes the trigger's slot, the overlays this\n one hosts included, so a button in a snackbar raised from the dialog\n opens nothing; only the panel's buttons take the close slot. */}\n <ButtonSlotContext value={null}>\n <OverlayHost>\n {/* A screen reader and a keyboard skip the scrim: the first closes\n the dialog with the back or escape gesture, the second with\n Escape. React Native Web's Pressable is a tab stop unless told\n otherwise, whatever `focusable` says. */}\n <AnimatedPressable\n accessible={false}\n aria-hidden\n focusable={false}\n onPress={isDismissable && state.isOpen ? close : undefined}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.scrim,\n motion.scrim,\n )}\n tabIndex={-1}\n />\n <View\n style={composeStyles<ViewStyle>(\n styles.layout,\n basic ? undefined : styles.layoutFull,\n )}\n >\n <Animated.View\n {...(web ? undefined : panelRoleOf(role, labelledBy))}\n onAccessibilityEscape={\n isKeyboardDismissDisabled ? undefined : close\n }\n {...props}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.container,\n basic ? styles.containerBasic : styles.containerFull,\n basic ? undefined : insetsOf(insets),\n motion.panel,\n style,\n )}\n >\n <DialogLayoutContext value={layout}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </DialogLayoutContext>\n </Animated.View>\n </View>\n </OverlayHost>\n </ButtonSlotContext>\n </Modal>\n )\n}\n\n/**\n * The dialog's actions, at the trailing edge and wrapping onto another row\n * when they do not fit on one. Full screen they are the page's bottom action\n * bar. `style`, `ref` and `testID` land on its view.\n */\nfunction DialogFooter({ style, ...props }: DialogPartProps) {\n const layout = useLayout('Dialog.Footer')\n const styles = stylesOf(useTheme())\n const { register } = layout\n\n useLayoutEffect(() => register('footer'), [register])\n\n return (\n <View\n {...props}\n style={composeStyles<ViewStyle>(\n styles.actions,\n layout.basic ? undefined : styles.actionsFull,\n style,\n )}\n />\n )\n}\n\n/**\n * The dialog's header: its `Dialog.Title`, and anything beside it, such as a\n * close button. Full screen it is the page's header bar. `style`, `ref` and\n * `testID` land on its view.\n */\nfunction DialogHeader({ style, ...props }: DialogPartProps) {\n const layout = useLayout('Dialog.Header')\n const styles = stylesOf(useTheme())\n const { register } = layout\n\n useLayoutEffect(() => register('header'), [register])\n\n return (\n <View\n {...props}\n style={composeStyles<ViewStyle>(\n styles.header,\n layout.basic ? undefined : styles.headerFull,\n style,\n )}\n />\n )\n}\n\n/**\n * Names the dialog: the container is labelled by it, and a screen reader is\n * sent to it once the dialog shows. In headline small as the basic dialog,\n * and title large as the full-screen one, where it shares a 56dp bar.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction DialogTitle({ ref, style, ...props }: DialogTitleProps) {\n const layout = useLayout('Dialog.Title')\n const styles = stylesOf(useTheme())\n const role = useTypeRole(layout.basic ? 'headlineSmall' : 'titleLarge')\n const { register, setTitle } = layout\n\n useLayoutEffect(() => register('title'), [register])\n\n return (\n <NativeText\n {...props}\n nativeID={layout.titleId}\n ref={refsOf(setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n// Sends the screen reader to the headline once the dialog has shown. React\n// Native Web's `Modal` moves focus into itself.\nfunction focusOf(title: HostInstance | null) {\n return () => {\n if (title !== null && Platform.OS !== 'web') {\n AccessibilityInfo.sendAccessibilityEvent(title, 'focus')\n }\n }\n}\n\n// What the back gesture does on a dialog it may not close: nothing, rather\n// than leaving the handler out, which Android warns about.\nfunction ignore() {}\n\nfunction insetsOf(insets: EdgeInsets): ViewStyle {\n return {\n paddingBottom: insets.bottom,\n paddingLeft: insets.left,\n paddingRight: insets.right,\n paddingTop: insets.top,\n }\n}\n\n// The panel's role and name on iOS and Android. On web React Native Web's\n// `Modal` is the dialog element, so the panel takes neither there.\nfunction panelRoleOf(\n role: 'alertdialog' | 'dialog',\n labelledBy: string | undefined,\n): Pick<ViewProps, 'aria-labelledby' | 'aria-modal' | 'role'> {\n return { 'aria-labelledby': labelledBy, 'aria-modal': true, role }\n}\n\n// Every ref a node is handed to, the part's own and the call site's.\nfunction refsOf<T>(own: (node: null | T) => void, other: Ref<T> | undefined) {\n return (node: null | T) => {\n own(node)\n if (typeof other === 'function') {\n other(node)\n } else if (other !== null && other !== undefined) {\n other.current = node\n }\n }\n}\n\n// Counts each part as it mounts and unmounts, so the body knows which ends\n// it has to pad.\nfunction registerOf(\n setParts: (\n update: (\n parts: Readonly<Record<DialogPart, number>>,\n ) => Readonly<Record<DialogPart, number>>,\n ) => void,\n) {\n return (part: DialogPart) => {\n setParts((parts) => ({ ...parts, [part]: parts[part] + 1 }))\n\n return () => {\n setParts((parts) => ({ ...parts, [part]: parts[part] - 1 }))\n }\n }\n}\n\n/**\n * The scrim's and the panel's motion, and the timer that unmounts the dialog\n * once its exit has run. The panel arrives over the medium duration on the\n * emphasised decelerating curve and leaves over the short one on the\n * accelerating curve, and the scrim fades over the short one on the standard\n * curve, both ways. Under reduced motion the panel arrives and leaves at once.\n */\nfunction useDialogMotion(\n isOpen: boolean,\n present: boolean,\n setPresent: (present: boolean) => void,\n basic: boolean,\n) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const { height } = useWindowDimensions()\n const panel = useSharedValue(0)\n const scrim = useSharedValue(0)\n\n useEffect(() => {\n const fade = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n if (isOpen) {\n scrim.set(withTiming(1, fade))\n panel.set(\n reduceMotion\n ? 1\n : withTiming(1, {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }),\n )\n return undefined\n }\n\n if (!present) {\n return undefined\n }\n\n scrim.set(withTiming(0, fade))\n panel.set(\n reduceMotion\n ? 0\n : withTiming(0, {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingEmphasizedAccelerate),\n }),\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 }, [isOpen, motion, panel, present, reduceMotion, scrim, setPresent])\n\n return {\n panel: useAnimatedStyle(() => {\n 'worklet'\n const shown = panel.get()\n\n return basic\n ? {\n opacity: shown,\n transform: [{ scale: SCALE_FROM + (1 - SCALE_FROM) * shown }],\n }\n : {\n opacity: shown,\n transform: [{ translateY: (1 - shown) * RISE_FROM * height }],\n }\n }),\n scrim: useAnimatedStyle(() => {\n 'worklet'\n return { opacity: scrim.get() }\n }),\n }\n}\n\nfunction useLayout(part: string) {\n const layout = use(DialogLayoutContext)\n\n if (layout === null) {\n throw new Error(`${part} is drawn inside Dialog.Content.`)\n }\n\n return layout\n}\n\n// Sends the screen reader back to the button that opened the dialog once the\n// dialog has gone. React Native Web's `Modal` restores focus itself.\nfunction useReturnFocus(present: boolean, outer: DialogTrigger | null) {\n const shown = useRef(present)\n\n useEffect(() => {\n const trigger = outer?.trigger ?? null\n const gone = shown.current && !present\n\n shown.current = present\n if (gone && trigger !== null && Platform.OS !== 'web') {\n AccessibilityInfo.sendAccessibilityEvent(trigger, 'focus')\n }\n }, [outer, present])\n}\n\nDialog.Body = DialogBody\nDialog.Content = DialogContent\nDialog.Footer = DialogFooter\nDialog.Header = DialogHeader\nDialog.Title = DialogTitle\n\nexport {\n Dialog,\n DialogBody,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n}\nexport type {\n DialogBodyProps,\n DialogContentProps,\n DialogPartProps,\n DialogProps,\n DialogTitleProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8GA,MAAMqD,YAAY;AAClB,MAAMC,YAAY;AAClB,MAAMC,aAAa;AACnB,MAAMC,YAAY;AAIlB,MAAMC,gBAAgB;AAItB,MAAMC,YAAY;CAAEC,QAAQ;CAAGC,MAAM;CAAGC,OAAO;CAAGC,KAAK;AAAE;AAIzD,MAAMC,eAAoD;CACxD;CACA;CACA;CACA;CACA;AAAiB;AAGnB,MAAMC,WAAiD;CACrDI,QAAQ;CACRC,QAAQ;CACRC,OAAO;AACT;AAEA,MAAMC,WAAWpB,cACd,EAAEqB,QAAQC,OAAOC,SAASC,QAAQC,cACjC7C,WAAW8C,OAAO;CAIhBC,SAAS;EACPC,YAAY;EACZC,eAAe;EACfC,YAAY;EACZC,UAAU;EACVC,KAAKP,QAAQQ;EACbC,gBAAgB;EAChBC,SAASV,QAAQW;CACnB;CAIAC,aAAa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A,KAAAD;CAAA,OAAAA,KAAAC,EAAA;CAAA,IAAAE;CAAA,IAAAF,EAAA,OAAAoC,SAAApC,EAAA,OAAA4C,SAAA;EAAE1C,KAAA,CAACkC,OAAOQ,OAAO;EAAC5C,EAAA,KAAAoC;EAAApC,EAAA,KAAA4C;EAAA5C,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CARnB5I,UAAU2I,IAQPG,EAAgB;AAAC;AAGtBJ,OAAO6G,OAAO5F;AACdjB,OAAO8G,UAAU1E;AACjBpC,OAAO+G,SAASvC;AAChBxE,OAAOgH,SAASvC;AAChBzE,OAAOiH,QAAQvC"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","HostInstance","LayoutChangeEvent","ScrollViewProps","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","AnimatedStyle","createContext","use","useCallback","useEffect","useId","useLayoutEffect","useMemo","useState","Text","NativeText","ScrollView","StyleSheet","useWindowDimensions","View","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","SafeAreaInsetsContext","ModalOpenProps","ModalTrigger","ResolvedTheme","ButtonSlotContext","useWindowSizeClass","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","registerOf","useModalState","useModalTrigger","refsOf","useTheme","composeStyles","themedStyles","useTypeRole","MIN_WIDTH","MAX_WIDTH","SCALE_FROM","RISE_FROM","NO_PARTS","Readonly","Record","DialogPart","footer","header","title","stylesOf","colors","radii","shadows","sizing","spacing","create","actions","alignItems","flexDirection","flexShrink","flexWrap","gap","sm","justifyContent","padding","xl","actionsFull","borderTopColor","outlineVariant","borderTopWidth","minHeight","rowSm","paddingVertical","xs","bodyText","color","onSurfaceVariant","container","backgroundColor","surfaceContainerHigh","overflow","containerBasic","borderRadius","boxShadow","elevation3","maxHeight","maxWidth","minWidth","width","containerFull","flex","md","paddingBottom","lg","paddingHorizontal","paddingTop","headerFull","borderBottomColor","borderBottomWidth","layout","bottom","left","pointerEvents","position","right","top","layoutFull","onSurface","DialogLayout","basic","parts","register","part","setTitle","node","titleId","DialogLayoutContext","DialogTriggerContext","DialogBodyProps","ref","DialogContentProps","DialogOpenProps","Omit","children","isDismissable","isKeyboardDismissDisabled","role","style","defaultOpen","isOpen","onOpenChange","DialogPartProps","DialogProps","DialogTitleProps","bodyPaddingOf","Dialog","t0","$","_c","t1","context","slots","t2","t3","DialogBody","contentContainerStyle","onContentSizeChange","onLayout","props","useLayout","theme","styles","text","content","setContent","room","setRoom","height","measureContent","event","nativeEvent","measureRoom","T0","t4","t5","t6","DialogContent","undefined","outer","close","present","setPresent","state","insets","sizeClass","setParts","Symbol","for","motion","useDialogMotion","labelledBy","t7","t8","scrim","T1","t9","t10","t11","t12","t13","panel","t14","t15","t16","t17","t18","DialogFooter","DialogHeader","DialogTitle","reduceMotion","durationMedium1","durationShort2","durationShort3","easingEmphasizedAccelerate","easingEmphasizedDecelerate","easingStandard","fade","duration","easing","bezier","set","timer","setTimeout","Math","max","clearTimeout","shown","get","opacity","transform","scale","translateY","Error","Body","Content","Footer","Header","Title","_c","NativeText"],"sources":["../../../src/components/dialog/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 { AnimatedStyle } from 'react-native-reanimated'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useState,\n} from 'react'\nimport {\n Text as NativeText,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\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 { ModalOpenProps, ModalTrigger } from '../../modal'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport {\n insetsOf,\n ModalWindow,\n NO_INSETS,\n panelRoleOf,\n registerOf,\n useModalState,\n useModalTrigger,\n} from '../../modal'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// The dialogs spec page's two dialogs, as kanso-ui's Dialog draws them: one\n// component, since the page pairs them by window size rather than offering a\n// choice. In a medium window or wider it is the basic dialog, a container on\n// surface container high with the 28dp corner, between 280 and 560dp wide,\n// centred over the scrim, with 24dp of padding all round, 16dp between the\n// headline and the body and 24dp between the body and the actions. In a\n// compact window, below 600dp, the same dialog fills the window as the page's\n// full-screen dialog: square corners, a 56dp header with the headline in\n// title large and a divider under it, and a 56dp action bar over a divider,\n// both inside the device's safe area.\n//\n// An alert dialog, `role=\"alertdialog\"`, is a question with two or three\n// answers rather than a task, and stays the basic dialog at every width, as\n// on web, where a question filling a phone read as a headline at the top of\n// the screen and its answers at the bottom with nothing between them.\n//\n// **It is drawn in a React Native `Modal`**, through src/modal, which keeps\n// React context, so the dialog keeps the `ThemeScope` around it, and which is\n// a window of its own on iOS and Android, above the screen and its overlays.\n// The `Modal` therefore hosts overlays of its own, so a snackbar or a popover\n// raised from inside the dialog draws above it rather than under it.\n//\n// **It animates out as well as in**, from the motion tokens: the panel scales\n// up from 90% on the emphasised decelerating curve, or rises 3% of the window\n// when it fills it, and leaves on the emphasised accelerating one, while the\n// scrim fades on the standard curve. Web only animates in, since React Aria\n// keeps a closing surface mounted only while a CSS animation runs; here the\n// dialog stays mounted until its exit has run. Under reduced motion the\n// panel appears and leaves at once, and the scrim still fades, which is what\n// says the dialog came and went.\n//\n// **A press on the scrim closes it**, unless `isDismissable` is false, and\n// Android's back gesture and VoiceOver's escape gesture close it, unless\n// `isKeyboardDismissDisabled`, the prop that keeps Escape from closing it on\n// web, which is the key React Native Web's `Modal` hands the same handler.\n// A button inside `Dialog` and outside its content opens it, and one given\n// `slot=\"close\"` inside the content closes it, through src/button's\n// slots.ts.\n//\n// **Focus moves into the dialog and back.** On iOS and Android the screen\n// reader is sent to the headline once the dialog shows, and back to the\n// button that opened it once it has gone. React Native Web's `Modal` traps\n// focus and restores it itself, and is the dialog element there, so on web it\n// takes the dialog's name and the panel takes no role of its own. That\n// `Modal` sets its role itself, so an alert dialog is announced as a dialog\n// in the web Storybook; kanso-ui, the library for web apps, keeps the role.\n\n// The panel's width bounds, the page's, and how far it travels as it\n// arrives: it scales up from 90% as the basic dialog, or rises 3% of the\n// window as the full-screen one, as web's keyframes have it.\nconst MIN_WIDTH = 280\nconst MAX_WIDTH = 560\nconst SCALE_FROM = 0.9\nconst RISE_FROM = 0.03\n\nconst NO_PARTS: Readonly<Record<DialogPart, number>> = {\n footer: 0,\n header: 0,\n title: 0,\n}\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The page's 24dp between the body and the actions, and 8dp between\n // the buttons. Actions that do not fit on one row wrap onto another,\n // still at the trailing edge.\n actions: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n gap: spacing.sm,\n justifyContent: 'flex-end',\n padding: spacing.xl,\n },\n // Full screen, the actions are the page's bottom action bar: 56dp at\n // least, over a divider, so an action whose label wraps grows the bar\n // rather than meeting the divider.\n actionsFull: {\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n minHeight: sizing.rowSm,\n paddingVertical: spacing.xs,\n },\n // The text a body is handed as a string, in the page's body medium on\n // on-surface variant, which is what web's body sets for its text.\n bodyText: {\n color: colors.onSurfaceVariant,\n },\n // Both dialogs' container, whose corner, where it has one, clips the\n // body's scroll.\n container: {\n backgroundColor: colors.surfaceContainerHigh,\n overflow: 'hidden',\n },\n // The basic dialog's container, centred over the scrim and only as\n // tall as the room the scrim's padding leaves, so the body scrolls\n // rather than running off the screen.\n containerBasic: {\n borderRadius: radii.xl,\n boxShadow: shadows.elevation3,\n maxHeight: '100%',\n maxWidth: MAX_WIDTH,\n minWidth: MIN_WIDTH,\n width: '100%',\n },\n // Full screen, the container fills the window with square corners, and\n // its fill runs on under the safe area its content keeps out of.\n containerFull: {\n flex: 1,\n },\n // The page's 24dp above the headline and 16dp between it and the body,\n // with the headline beside whatever else the header holds, a close\n // button for one.\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.md,\n justifyContent: 'space-between',\n paddingBottom: spacing.lg,\n paddingHorizontal: spacing.xl,\n paddingTop: spacing.xl,\n },\n // Full screen, the header is the page's own 56dp bar, at least, under\n // a divider.\n headerFull: {\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n minHeight: sizing.rowSm,\n paddingBottom: spacing.xs,\n paddingTop: spacing.xs,\n },\n // The scrim centres the container, which is what makes the dialog a\n // dialog rather than a sheet. Full screen it has no room to give. It\n // takes no touches itself, so a press around the container reaches the\n // scrim under it.\n layout: {\n alignItems: 'center',\n bottom: 0,\n justifyContent: 'center',\n left: 0,\n padding: spacing.xl,\n pointerEvents: 'box-none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n layoutFull: {\n alignItems: 'stretch',\n padding: 0,\n },\n // The headline gives way to whatever shares its row.\n title: {\n color: colors.onSurface,\n flexShrink: 1,\n },\n }),\n)\n\n// What the content's parts read: which of the two dialogs is drawn, which\n// parts are there, and the headline's name and node.\ntype DialogLayout = {\n readonly basic: boolean\n readonly parts: Readonly<Record<DialogPart, number>>\n readonly register: (part: DialogPart) => () => void\n readonly setTitle: (node: HostInstance | null) => void\n readonly titleId: string\n}\n\ntype DialogPart = 'footer' | 'header' | 'title'\n\nconst DialogLayoutContext = createContext<DialogLayout | null>(null)\nconst DialogTriggerContext = createContext<ModalTrigger | null>(null)\n\ntype DialogBodyProps = ScrollViewProps & {\n readonly ref?: Ref<ComponentRef<typeof ScrollView>>\n}\n\ntype DialogContentProps = DialogOpenProps &\n Omit<ViewProps, 'children' | 'role' | 'style'> & {\n readonly children?: ReactNode\n /**\n * Whether a press on the scrim, outside the container, closes the\n * dialog. Android's back gesture is `isKeyboardDismissDisabled`'s, and\n * this says nothing about it, so a dialog that has to be answered from\n * one of its actions turns off both.\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 dialog.\n * @default false\n */\n readonly isKeyboardDismissDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * `alertdialog` for a dialog interrupting with something that has to be\n * answered before the app carries on. It also keeps the dialog the basic\n * one in a compact window, centred and sized to its content, where a\n * dialog of the default role fills the window.\n * @default 'dialog'\n */\n readonly role?: 'alertdialog' | 'dialog'\n readonly style?: StyleProp<ViewStyle>\n }\n\ntype DialogOpenProps = ModalOpenProps & {\n /** Whether the dialog starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the dialog is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the dialog opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\ntype DialogPartProps = ViewProps & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype DialogProps = DialogOpenProps & {\n /** The button that opens the dialog, and `Dialog.Content`. */\n readonly children?: ReactNode\n}\n\ntype DialogTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\n// The body's padding. The page's 24dp all round is spent by whichever part\n// is at each end, so the body takes the top of it when no header is there\n// and the bottom when no footer is. Full screen, it keeps 24dp under the\n// header's divider as well, which is the content padding the page gives the\n// full-screen dialog.\nfunction bodyPaddingOf(\n { basic, parts }: DialogLayout,\n spacing: ResolvedTheme['spacing'],\n): ViewStyle {\n return {\n gap: spacing.lg,\n paddingBottom: parts.footer > 0 ? 0 : spacing.xl,\n paddingHorizontal: spacing.xl,\n paddingTop: basic && parts.header > 0 ? 0 : spacing.xl,\n }\n}\n\n/**\n * A modal dialog centred over the screen, and the same dialog filling the\n * window in a compact window, the dialogs spec page's basic and full-screen\n * dialogs, paired by window size as the page pairs them. An alert dialog\n * stays the basic one at every width. Pass `isOpen` with `onOpenChange` to\n * hold the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <Dialog>\n * <Button>Open</Button>\n * <Dialog.Content>\n * <Dialog.Header>\n * <Dialog.Title>Headline</Dialog.Title>\n * </Dialog.Header>\n * <Dialog.Body>Supporting text</Dialog.Body>\n * <Dialog.Footer>\n * <Button slot=\"close\" variant=\"text\">Cancel</Button>\n * </Dialog.Footer>\n * </Dialog.Content>\n * </Dialog>\n * ```\n *\n * Composed rather than configured by props, as web's is, since a dialog's\n * header, body and actions all take arbitrary content. A `Button` or\n * `IconButton` inside `Dialog` and outside its content opens it, and one\n * given `slot=\"close\"` anywhere inside the content closes it. A dialog nothing on\n * the screen opens leaves `Dialog` out and passes `isOpen` and\n * `onOpenChange` to `Dialog.Content` instead.\n */\nfunction Dialog({ children, defaultOpen, isOpen, onOpenChange }: DialogProps) {\n const { context, slots } = useModalTrigger({\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n return (\n <DialogTriggerContext value={context}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </DialogTriggerContext>\n )\n}\n\n/**\n * What the dialog shows, as a body that scrolls when its content runs past\n * the room it has. A string is drawn in the page's body medium on on-surface\n * variant; anything else draws itself. `style`, `ref` and `testID` land on\n * the `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.\n */\nfunction DialogBody({\n children,\n contentContainerStyle,\n onContentSizeChange,\n onLayout,\n ...props\n}: DialogBodyProps) {\n const layout = useLayout('Dialog.Body')\n const theme = useTheme()\n const styles = stylesOf(theme)\n const text = useTypeRole('bodyMedium')\n const { spacing } = theme\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\n return (\n <ScrollView\n focusable={content > room}\n onContentSizeChange={measureContent}\n onLayout={measureRoom}\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n bodyPaddingOf(layout, spacing),\n contentContainerStyle,\n )}\n >\n {typeof children === 'string' ? (\n <NativeText style={composeStyles<TextStyle>(text, styles.bodyText)}>\n {children}\n </NativeText>\n ) : (\n children\n )}\n </ScrollView>\n )\n}\n\n/**\n * The dialog itself, and the scrim behind it. Everything the dialog shows\n * goes in here; the button that opens it stays outside it.\n *\n * Inside `Dialog`, 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\"`\n * button, the scrim and the back gesture all report through `onOpenChange`.\n * `style`, `ref` and `testID` land on the container.\n */\nfunction DialogContent({\n children,\n defaultOpen,\n isDismissable = true,\n isKeyboardDismissDisabled = false,\n isOpen,\n onOpenChange,\n role = 'dialog',\n style,\n ...props\n}: DialogContentProps) {\n const outer = use(DialogTriggerContext)\n const { close, present, setPresent, slots, state } = useModalState(outer, {\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n const theme = useTheme()\n const styles = stylesOf(theme)\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const sizeClass = useWindowSizeClass()\n const basic = role === 'alertdialog' || sizeClass !== 'compact'\n const titleId = useId()\n const [parts, setParts] = useState(NO_PARTS)\n const [register] = useState(() => registerOf(setParts))\n const [title, setTitle] = useState<HostInstance | null>(null)\n const motion = useDialogMotion(state.isOpen, present, setPresent, basic)\n const layout = useMemo<DialogLayout>(\n () => ({ basic, parts, register, setTitle, titleId }),\n [basic, parts, register, titleId],\n )\n\n if (!present) {\n return null\n }\n\n const labelledBy = parts.title > 0 ? titleId : undefined\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isDismissable && state.isOpen ? close : undefined}\n scrim={motion.scrim}\n title={title}\n >\n <View\n style={composeStyles<ViewStyle>(\n styles.layout,\n basic ? undefined : styles.layoutFull,\n )}\n >\n <Animated.View\n {...panelRoleOf(role, labelledBy)}\n onAccessibilityEscape={isKeyboardDismissDisabled ? undefined : close}\n {...props}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.container,\n basic ? styles.containerBasic : styles.containerFull,\n basic ? undefined : insetsOf(insets),\n motion.panel,\n style,\n )}\n >\n <DialogLayoutContext value={layout}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </DialogLayoutContext>\n </Animated.View>\n </View>\n </ModalWindow>\n )\n}\n\n/**\n * The dialog's actions, at the trailing edge and wrapping onto another row\n * when they do not fit on one. Full screen they are the page's bottom action\n * bar. `style`, `ref` and `testID` land on its view.\n */\nfunction DialogFooter({ style, ...props }: DialogPartProps) {\n const layout = useLayout('Dialog.Footer')\n const styles = stylesOf(useTheme())\n const { register } = layout\n\n useLayoutEffect(() => register('footer'), [register])\n\n return (\n <View\n {...props}\n style={composeStyles<ViewStyle>(\n styles.actions,\n layout.basic ? undefined : styles.actionsFull,\n style,\n )}\n />\n )\n}\n\n/**\n * The dialog's header: its `Dialog.Title`, and anything beside it, such as a\n * close button. Full screen it is the page's header bar. `style`, `ref` and\n * `testID` land on its view.\n */\nfunction DialogHeader({ style, ...props }: DialogPartProps) {\n const layout = useLayout('Dialog.Header')\n const styles = stylesOf(useTheme())\n const { register } = layout\n\n useLayoutEffect(() => register('header'), [register])\n\n return (\n <View\n {...props}\n style={composeStyles<ViewStyle>(\n styles.header,\n layout.basic ? undefined : styles.headerFull,\n style,\n )}\n />\n )\n}\n\n/**\n * Names the dialog: the container is labelled by it, and a screen reader is\n * sent to it once the dialog shows. In headline small as the basic dialog,\n * and title large as the full-screen one, where it shares a 56dp bar.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction DialogTitle({ ref, style, ...props }: DialogTitleProps) {\n const layout = useLayout('Dialog.Title')\n const styles = stylesOf(useTheme())\n const role = useTypeRole(layout.basic ? 'headlineSmall' : 'titleLarge')\n const { register, setTitle } = layout\n\n useLayoutEffect(() => register('title'), [register])\n\n return (\n <NativeText\n {...props}\n nativeID={layout.titleId}\n ref={refsOf(setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * The scrim's and the panel's motion, and the timer that unmounts the dialog\n * once its exit has run. The panel arrives over the medium duration on the\n * emphasised decelerating curve and leaves over the short one on the\n * accelerating curve, and the scrim fades over the short one on the standard\n * curve, both ways. Under reduced motion the panel arrives and leaves at once.\n */\nfunction useDialogMotion(\n isOpen: boolean,\n present: boolean,\n setPresent: (present: boolean) => void,\n basic: boolean,\n) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const { height } = useWindowDimensions()\n const panel = useSharedValue(0)\n const scrim = useSharedValue(0)\n\n useEffect(() => {\n const fade = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n if (isOpen) {\n scrim.set(withTiming(1, fade))\n panel.set(\n reduceMotion\n ? 1\n : withTiming(1, {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }),\n )\n return undefined\n }\n\n if (!present) {\n return undefined\n }\n\n scrim.set(withTiming(0, fade))\n panel.set(\n reduceMotion\n ? 0\n : withTiming(0, {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingEmphasizedAccelerate),\n }),\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 }, [isOpen, motion, panel, present, reduceMotion, scrim, setPresent])\n\n return {\n panel: useAnimatedStyle(() => {\n 'worklet'\n const shown = panel.get()\n\n return basic\n ? {\n opacity: shown,\n transform: [{ scale: SCALE_FROM + (1 - SCALE_FROM) * shown }],\n }\n : {\n opacity: shown,\n transform: [{ translateY: (1 - shown) * RISE_FROM * height }],\n }\n }),\n scrim: useAnimatedStyle(() => {\n 'worklet'\n return { opacity: scrim.get() }\n }),\n }\n}\n\nfunction useLayout(part: string) {\n const layout = use(DialogLayoutContext)\n\n if (layout === null) {\n throw new Error(`${part} is drawn inside Dialog.Content.`)\n }\n\n return layout\n}\n\nDialog.Body = DialogBody\nDialog.Content = DialogContent\nDialog.Footer = DialogFooter\nDialog.Header = DialogHeader\nDialog.Title = DialogTitle\n\nexport {\n Dialog,\n DialogBody,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n}\nexport type {\n DialogBodyProps,\n DialogContentProps,\n DialogPartProps,\n DialogProps,\n DialogTitleProps,\n}\n"],"mappings":";;;;;;;;;;;;;;AA4GA,MAAMkD,YAAY;AAClB,MAAMC,YAAY;AAClB,MAAMC,aAAa;AACnB,MAAMC,YAAY;AAElB,MAAMC,WAAiD;CACrDI,QAAQ;CACRC,QAAQ;CACRC,OAAO;AACT;AAEA,MAAMC,WAAWb,cACd,EAAEc,QAAQC,OAAOC,SAASC,QAAQC,cACjC3C,WAAW4C,OAAO;CAIhBC,SAAS;EACPC,YAAY;EACZC,eAAe;EACfC,YAAY;EACZC,UAAU;EACVC,KAAKP,QAAQQ;EACbC,gBAAgB;EAChBC,SAASV,QAAQW;CACnB;CAIAC,aAAa;EACXC,gBAAgBjB,OAAOkB;EACvBC,gBAAgB;EAChBC,WAAWjB,OAAOkB;EAClBC,iBAAiBlB,QAAQmB;CAC3B;CAGAC,UAAU,EACRC,OAAOzB,OAAO0B,iBAChB;CAGAC,WAAW;EACTC,iBAAiB5B,OAAO6B;EACxBC,UAAU;CACZ;CAIAC,gBAAgB;EACdC,cAAc/B,MAAMc;EACpBkB,WAAW/B,QAA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,MAAA8C;EAAA9C,EAAA,MAAAkC;EAAAlC,EAAA,MAAAE;CAAA,OAAAA,KAAAF,EAAA;CA5CpEtI,UAAUqI,IA4CPG,EAAiE;CAG3D,MAAAG,KAAA9H,uBAAiB;EAAA;EAEtB,MAAAwM,QAAc1B,MAAK2B,IAAK;EAAC,OAElB5G,QAAA;GAAA6G,SAEQF;GAAKG,WACH,CAAC,EAAAC,OAASpL,aAAc,qBAAkBgL,MAAM,CAAC;EAK9D,IARG;GAAAE,SAMQF;GAAKG,WACH,CAAC,EAAAE,aAAe,IAAIL,SAAS/K,YAAYoH,OAAO,CAAC;EAC9D;CAAC,CACN;CACM,MAAAd,KAAA/H,uBAAiB;EAAA;EAAA,OAEf,EAAA0M,SAAWnC,MAAKkC,IAAK,EAAE;CAAC,CAChC;CAAC,IAAAtD;CAAA,IAAA1B,EAAA,QAAAK,MAAAL,EAAA,QAAAM,IAAA;EAlBGoB,KAAA;GAAA2B,OACEhD;GAaLyC,OACKxC;EAIT;EAACN,EAAA,MAAAK;EAAAL,EAAA,MAAAM;EAAAN,EAAA,MAAA0B;CAAA,OAAAA,KAAA1B,EAAA;CAAA,OAnBM0B;AAmBN;AAGH,SAASd,UAAUrC,MAAc;CAC/B,MAAMb,SAASlG,IAAImH,mBAAmB;CAEtC,IAAIjB,WAAW,MACb,MAAM,IAAI2H,MAAM,GAAG9G,KAAI,iCAAkC;CAG3D,OAAOb;AACT;AAEAoC,OAAOwF,OAAO/E;AACdT,OAAOyF,UAAU1D;AACjB/B,OAAO0F,SAAS7B;AAChB7D,OAAO2F,SAAS7B;AAChB9D,OAAO4F,QAAQ7B"}
@@ -1,6 +1,6 @@
1
1
  import { ButtonLinkForm, ButtonPressForm, ButtonToggleForm } from "../../button/index.js";
2
- import { PressableProps, StyleProp, View, ViewStyle } from "react-native";
3
2
  import { ComponentRef, ReactNode, Ref } from "react";
3
+ import { PressableProps, StyleProp, View, ViewStyle } from "react-native";
4
4
  //#region src/components/icon-button/index.d.ts
5
5
  type IconButtonProps = (ButtonLinkForm | ButtonPressForm | ButtonToggleForm) & Omit<PressableProps, 'aria-label' | 'children' | 'disabled' | 'style'> & {
6
6
  /**
@@ -62,7 +62,7 @@ type IconButtonVariant = 'filled' | 'outlined' | 'standard' | 'tonal';
62
62
  * through `hitSlop`, which a `hitSlop` of the call site's own replaces.
63
63
  * `style`, `ref` and `testID` land on the `Pressable`.
64
64
  */
65
- declare function IconButton({ children, defaultSelected, disableRipple, hitSlop: ownHitSlop, href, isDisabled, isPending, isSelected, onBlur, onChange, onFocus, onHoverIn, onHoverOut, onLayout, onLongPress, onPress, onPressIn, onPressOut, pendingLabel, size, slot, style, type, variant, ...props }: IconButtonProps): import("react").JSX.Element;
65
+ declare function IconButton({ children, defaultSelected, delayLongPress, disableRipple, hitSlop: ownHitSlop, href, isDisabled, isPending, isSelected, onBlur, onChange, onFocus, onHoverIn, onHoverOut, onLayout, onLongPress, onPress, onPressIn, onPressOut, pendingLabel, ref, size, slot, style, type, variant, ...props }: IconButtonProps): import("react").JSX.Element;
66
66
  //#endregion
67
67
  export { IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant };
68
68
  //# sourceMappingURL=index.d.ts.map