@nori-ui/core 1.5.0 → 1.7.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 (228) hide show
  1. package/dist/Table.shared-BymRgTnY.d.cts +54 -0
  2. package/dist/Table.shared-BymRgTnY.d.ts +54 -0
  3. package/dist/{chunk-7UKRN73P.js → chunk-2XJCLPNH.js} +3 -3
  4. package/dist/{chunk-7UKRN73P.js.map → chunk-2XJCLPNH.js.map} +1 -1
  5. package/dist/{chunk-76FZF4GM.js → chunk-3B345SQU.js} +8 -125
  6. package/dist/chunk-3B345SQU.js.map +1 -0
  7. package/dist/{chunk-WOF67PKT.js → chunk-3CEJ5TB4.js} +3 -3
  8. package/dist/{chunk-WOF67PKT.js.map → chunk-3CEJ5TB4.js.map} +1 -1
  9. package/dist/{chunk-JSAG5YO7.js → chunk-3IIIHZHT.js} +3 -3
  10. package/dist/{chunk-JSAG5YO7.js.map → chunk-3IIIHZHT.js.map} +1 -1
  11. package/dist/{chunk-46OT4PA6.js → chunk-3W3XYULK.js} +3 -3
  12. package/dist/{chunk-46OT4PA6.js.map → chunk-3W3XYULK.js.map} +1 -1
  13. package/dist/{chunk-6PO2IWB3.js → chunk-4UFAZLSZ.js} +5 -3
  14. package/dist/chunk-4UFAZLSZ.js.map +1 -0
  15. package/dist/chunk-5YHT252H.js +145 -0
  16. package/dist/chunk-5YHT252H.js.map +1 -0
  17. package/dist/chunk-73CUV7MW.js +125 -0
  18. package/dist/chunk-73CUV7MW.js.map +1 -0
  19. package/dist/{chunk-ZMSIYLSI.js → chunk-7FSFJA33.js} +3 -3
  20. package/dist/{chunk-ZMSIYLSI.js.map → chunk-7FSFJA33.js.map} +1 -1
  21. package/dist/chunk-C32XGHWO.js +202 -0
  22. package/dist/chunk-C32XGHWO.js.map +1 -0
  23. package/dist/{chunk-UUXWRDWW.js → chunk-C5HQPXRI.js} +3 -3
  24. package/dist/{chunk-UUXWRDWW.js.map → chunk-C5HQPXRI.js.map} +1 -1
  25. package/dist/{chunk-2UXKXUX2.js → chunk-CPIKN4BX.js} +3 -3
  26. package/dist/{chunk-2UXKXUX2.js.map → chunk-CPIKN4BX.js.map} +1 -1
  27. package/dist/{chunk-GELLSU64.js → chunk-EN4CLDGZ.js} +3 -3
  28. package/dist/{chunk-GELLSU64.js.map → chunk-EN4CLDGZ.js.map} +1 -1
  29. package/dist/{chunk-WAKKQROH.js → chunk-F5UKI7XD.js} +3 -3
  30. package/dist/{chunk-WAKKQROH.js.map → chunk-F5UKI7XD.js.map} +1 -1
  31. package/dist/{chunk-MJ4AGXS7.js → chunk-GJMHNEQ3.js} +3 -3
  32. package/dist/{chunk-MJ4AGXS7.js.map → chunk-GJMHNEQ3.js.map} +1 -1
  33. package/dist/chunk-GTAXVTLF.js +43 -0
  34. package/dist/chunk-GTAXVTLF.js.map +1 -0
  35. package/dist/{chunk-WTNDPO2V.js → chunk-H2LHWJ52.js} +3 -3
  36. package/dist/{chunk-WTNDPO2V.js.map → chunk-H2LHWJ52.js.map} +1 -1
  37. package/dist/{chunk-L5X4SYJ4.js → chunk-HXCETKCC.js} +3 -3
  38. package/dist/{chunk-L5X4SYJ4.js.map → chunk-HXCETKCC.js.map} +1 -1
  39. package/dist/chunk-IGBXSBF7.js +71 -0
  40. package/dist/chunk-IGBXSBF7.js.map +1 -0
  41. package/dist/{chunk-O4NMS3KB.js → chunk-IIVTPN62.js} +3 -3
  42. package/dist/{chunk-O4NMS3KB.js.map → chunk-IIVTPN62.js.map} +1 -1
  43. package/dist/{chunk-RM5TSXVE.js → chunk-ISCJST4P.js} +3 -3
  44. package/dist/{chunk-RM5TSXVE.js.map → chunk-ISCJST4P.js.map} +1 -1
  45. package/dist/{chunk-UF5OENHV.js → chunk-IWM2XDXH.js} +3 -3
  46. package/dist/{chunk-UF5OENHV.js.map → chunk-IWM2XDXH.js.map} +1 -1
  47. package/dist/chunk-J5LK2XHE.js +118 -0
  48. package/dist/chunk-J5LK2XHE.js.map +1 -0
  49. package/dist/chunk-KFFGDET3.js +27 -0
  50. package/dist/chunk-KFFGDET3.js.map +1 -0
  51. package/dist/{chunk-AFQIK6JI.js → chunk-L6VYDM7S.js} +3 -3
  52. package/dist/{chunk-AFQIK6JI.js.map → chunk-L6VYDM7S.js.map} +1 -1
  53. package/dist/chunk-M4BI63P6.js +188 -0
  54. package/dist/chunk-M4BI63P6.js.map +1 -0
  55. package/dist/{chunk-H7MFAFV4.js → chunk-MK57AOTI.js} +4 -4
  56. package/dist/{chunk-H7MFAFV4.js.map → chunk-MK57AOTI.js.map} +1 -1
  57. package/dist/{chunk-FDBQOQMW.js → chunk-MOAIQHR7.js} +3 -3
  58. package/dist/{chunk-FDBQOQMW.js.map → chunk-MOAIQHR7.js.map} +1 -1
  59. package/dist/{chunk-LWQZ257T.js → chunk-MYBBBLYE.js} +3 -3
  60. package/dist/{chunk-LWQZ257T.js.map → chunk-MYBBBLYE.js.map} +1 -1
  61. package/dist/{chunk-F7G6R373.js → chunk-O6M3F7BZ.js} +5 -5
  62. package/dist/{chunk-F7G6R373.js.map → chunk-O6M3F7BZ.js.map} +1 -1
  63. package/dist/{chunk-XP55RZ3D.js → chunk-OELY6K44.js} +3 -3
  64. package/dist/{chunk-XP55RZ3D.js.map → chunk-OELY6K44.js.map} +1 -1
  65. package/dist/{chunk-GRDVE3IR.js → chunk-OIHX5B4R.js} +3 -3
  66. package/dist/{chunk-GRDVE3IR.js.map → chunk-OIHX5B4R.js.map} +1 -1
  67. package/dist/{chunk-4I37QSEM.js → chunk-PGYEIXCO.js} +5 -5
  68. package/dist/{chunk-4I37QSEM.js.map → chunk-PGYEIXCO.js.map} +1 -1
  69. package/dist/{chunk-UJ5KFRDE.js → chunk-PJTCO76H.js} +3 -3
  70. package/dist/{chunk-UJ5KFRDE.js.map → chunk-PJTCO76H.js.map} +1 -1
  71. package/dist/{chunk-6JVUVBZH.js → chunk-PJXVLE24.js} +5 -5
  72. package/dist/{chunk-6JVUVBZH.js.map → chunk-PJXVLE24.js.map} +1 -1
  73. package/dist/{chunk-IGLMPAWE.js → chunk-PLQPBMG2.js} +3 -3
  74. package/dist/{chunk-IGLMPAWE.js.map → chunk-PLQPBMG2.js.map} +1 -1
  75. package/dist/{chunk-HTF6FDB6.js → chunk-PQW5LKAI.js} +3 -3
  76. package/dist/{chunk-HTF6FDB6.js.map → chunk-PQW5LKAI.js.map} +1 -1
  77. package/dist/{chunk-VMAGFYHG.js → chunk-RI4Y2C5U.js} +3 -3
  78. package/dist/{chunk-VMAGFYHG.js.map → chunk-RI4Y2C5U.js.map} +1 -1
  79. package/dist/{chunk-BNDUQNG7.js → chunk-SF6WPUC5.js} +3 -3
  80. package/dist/{chunk-BNDUQNG7.js.map → chunk-SF6WPUC5.js.map} +1 -1
  81. package/dist/{chunk-SINLREQV.js → chunk-STX5UKYT.js} +3 -3
  82. package/dist/{chunk-SINLREQV.js.map → chunk-STX5UKYT.js.map} +1 -1
  83. package/dist/{chunk-KCLWPSV5.js → chunk-TSWPHJIU.js} +4 -4
  84. package/dist/{chunk-KCLWPSV5.js.map → chunk-TSWPHJIU.js.map} +1 -1
  85. package/dist/{chunk-5BM6H2CD.js → chunk-U2ZKY2CP.js} +3 -3
  86. package/dist/{chunk-5BM6H2CD.js.map → chunk-U2ZKY2CP.js.map} +1 -1
  87. package/dist/{chunk-C6TRLHMW.js → chunk-UKDDK42K.js} +3 -3
  88. package/dist/{chunk-C6TRLHMW.js.map → chunk-UKDDK42K.js.map} +1 -1
  89. package/dist/{chunk-UPVNZPFV.js → chunk-USFXANEU.js} +3 -3
  90. package/dist/{chunk-UPVNZPFV.js.map → chunk-USFXANEU.js.map} +1 -1
  91. package/dist/{chunk-Y4ZRSW35.js → chunk-V5QSMDZL.js} +3 -3
  92. package/dist/{chunk-Y4ZRSW35.js.map → chunk-V5QSMDZL.js.map} +1 -1
  93. package/dist/{chunk-EFK7726V.js → chunk-V75O7QQO.js} +3 -3
  94. package/dist/{chunk-EFK7726V.js.map → chunk-V75O7QQO.js.map} +1 -1
  95. package/dist/{chunk-CGQIVFCN.js → chunk-VL2WNGPF.js} +3 -3
  96. package/dist/{chunk-CGQIVFCN.js.map → chunk-VL2WNGPF.js.map} +1 -1
  97. package/dist/{chunk-VCJF75T2.js → chunk-VLZANXRZ.js} +3 -3
  98. package/dist/{chunk-VCJF75T2.js.map → chunk-VLZANXRZ.js.map} +1 -1
  99. package/dist/{chunk-ND7MRYW7.js → chunk-VOF3S5I4.js} +4 -4
  100. package/dist/{chunk-ND7MRYW7.js.map → chunk-VOF3S5I4.js.map} +1 -1
  101. package/dist/chunk-VP7DRJUZ.js +3 -0
  102. package/dist/chunk-VP7DRJUZ.js.map +1 -0
  103. package/dist/chunk-XQNVWHMN.js +60 -0
  104. package/dist/chunk-XQNVWHMN.js.map +1 -0
  105. package/dist/{chunk-W3HMOOON.js → chunk-ZGFXKYA5.js} +3 -3
  106. package/dist/{chunk-W3HMOOON.js.map → chunk-ZGFXKYA5.js.map} +1 -1
  107. package/dist/client.cjs +935 -156
  108. package/dist/client.cjs.map +1 -1
  109. package/dist/client.d.cts +9 -0
  110. package/dist/client.d.ts +9 -0
  111. package/dist/client.js +57 -47
  112. package/dist/client.js.map +1 -1
  113. package/dist/components/Accordion/index.js +2 -2
  114. package/dist/components/Alert/index.js +2 -2
  115. package/dist/components/AlertDialog/index.js +2 -2
  116. package/dist/components/AspectRatio/index.cjs +67 -0
  117. package/dist/components/AspectRatio/index.cjs.map +1 -0
  118. package/dist/components/AspectRatio/index.d.cts +30 -0
  119. package/dist/components/AspectRatio/index.d.ts +30 -0
  120. package/dist/components/AspectRatio/index.js +5 -0
  121. package/dist/components/AspectRatio/index.js.map +1 -0
  122. package/dist/components/Avatar/index.js +2 -2
  123. package/dist/components/Badge/index.js +2 -2
  124. package/dist/components/Box/index.js +4 -4
  125. package/dist/components/Breadcrumb/index.cjs +3 -1
  126. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  127. package/dist/components/Breadcrumb/index.js +5 -5
  128. package/dist/components/Button/index.js +2 -2
  129. package/dist/components/ButtonGroup/index.cjs +83 -0
  130. package/dist/components/ButtonGroup/index.cjs.map +1 -0
  131. package/dist/components/ButtonGroup/index.d.cts +45 -0
  132. package/dist/components/ButtonGroup/index.d.ts +45 -0
  133. package/dist/components/ButtonGroup/index.js +5 -0
  134. package/dist/components/ButtonGroup/index.js.map +1 -0
  135. package/dist/components/Calendar/index.cjs +3 -1
  136. package/dist/components/Calendar/index.cjs.map +1 -1
  137. package/dist/components/Calendar/index.js +5 -5
  138. package/dist/components/Card/index.js +2 -2
  139. package/dist/components/Checkbox/index.js +2 -2
  140. package/dist/components/Collapsible/index.cjs +512 -0
  141. package/dist/components/Collapsible/index.cjs.map +1 -0
  142. package/dist/components/Collapsible/index.d.cts +50 -0
  143. package/dist/components/Collapsible/index.d.ts +50 -0
  144. package/dist/components/Collapsible/index.js +7 -0
  145. package/dist/components/Collapsible/index.js.map +1 -0
  146. package/dist/components/Combobox/index.js +3 -3
  147. package/dist/components/ContextMenu/index.js +4 -4
  148. package/dist/components/DataTable/index.cjs +770 -0
  149. package/dist/components/DataTable/index.cjs.map +1 -0
  150. package/dist/components/DataTable/index.d.cts +53 -0
  151. package/dist/components/DataTable/index.d.ts +53 -0
  152. package/dist/components/DataTable/index.js +8 -0
  153. package/dist/components/DataTable/index.js.map +1 -0
  154. package/dist/components/DatePicker/index.cjs +3 -1
  155. package/dist/components/DatePicker/index.cjs.map +1 -1
  156. package/dist/components/DatePicker/index.js +7 -7
  157. package/dist/components/Dialog/index.js +2 -2
  158. package/dist/components/DropdownMenu/index.js +3 -3
  159. package/dist/components/Empty/index.cjs +385 -0
  160. package/dist/components/Empty/index.cjs.map +1 -0
  161. package/dist/components/Empty/index.d.cts +32 -0
  162. package/dist/components/Empty/index.d.ts +32 -0
  163. package/dist/components/Empty/index.js +7 -0
  164. package/dist/components/Empty/index.js.map +1 -0
  165. package/dist/components/Field/index.cjs +3 -1
  166. package/dist/components/Field/index.cjs.map +1 -1
  167. package/dist/components/Field/index.d.cts +2 -2
  168. package/dist/components/Field/index.d.ts +2 -2
  169. package/dist/components/Field/index.js +3 -3
  170. package/dist/components/FloatButton/index.cjs +3 -1
  171. package/dist/components/FloatButton/index.cjs.map +1 -1
  172. package/dist/components/FloatButton/index.js +5 -5
  173. package/dist/components/HStack/index.js +4 -4
  174. package/dist/components/InputGroup/index.js +2 -2
  175. package/dist/components/Item/index.cjs +443 -0
  176. package/dist/components/Item/index.cjs.map +1 -0
  177. package/dist/components/Item/index.d.cts +40 -0
  178. package/dist/components/Item/index.d.ts +40 -0
  179. package/dist/components/Item/index.js +7 -0
  180. package/dist/components/Item/index.js.map +1 -0
  181. package/dist/components/Kbd/index.cjs +396 -0
  182. package/dist/components/Kbd/index.cjs.map +1 -0
  183. package/dist/components/Kbd/index.d.cts +22 -0
  184. package/dist/components/Kbd/index.d.ts +22 -0
  185. package/dist/components/Kbd/index.js +7 -0
  186. package/dist/components/Kbd/index.js.map +1 -0
  187. package/dist/components/Label/index.cjs +3 -1
  188. package/dist/components/Label/index.cjs.map +1 -1
  189. package/dist/components/Label/index.js +3 -3
  190. package/dist/components/Pagination/index.cjs +3 -1
  191. package/dist/components/Pagination/index.cjs.map +1 -1
  192. package/dist/components/Pagination/index.js +6 -5
  193. package/dist/components/Popover/index.js +2 -2
  194. package/dist/components/Progress/index.js +2 -2
  195. package/dist/components/Radio/index.js +2 -2
  196. package/dist/components/SegmentedControl/index.js +2 -2
  197. package/dist/components/Select/index.js +2 -2
  198. package/dist/components/Separator/index.js +2 -2
  199. package/dist/components/Sheet/index.js +2 -2
  200. package/dist/components/Skeleton/index.js +2 -2
  201. package/dist/components/Slider/index.js +2 -2
  202. package/dist/components/Switch/index.js +2 -2
  203. package/dist/components/Table/index.cjs +461 -0
  204. package/dist/components/Table/index.cjs.map +1 -0
  205. package/dist/components/Table/index.d.cts +16 -0
  206. package/dist/components/Table/index.d.ts +16 -0
  207. package/dist/components/Table/index.js +7 -0
  208. package/dist/components/Table/index.js.map +1 -0
  209. package/dist/components/Tabs/index.js +2 -2
  210. package/dist/components/Text/index.js +2 -2
  211. package/dist/components/TextArea/index.js +3 -3
  212. package/dist/components/TextInput/index.js +2 -2
  213. package/dist/components/Toggle/index.js +2 -2
  214. package/dist/components/Tooltip/index.js +2 -2
  215. package/dist/components/VStack/index.js +4 -4
  216. package/dist/i18n/index.cjs +3 -1
  217. package/dist/i18n/index.cjs.map +1 -1
  218. package/dist/i18n/index.js +1 -1
  219. package/dist/index.cjs +935 -156
  220. package/dist/index.cjs.map +1 -1
  221. package/dist/index.d.cts +9 -0
  222. package/dist/index.d.ts +9 -0
  223. package/dist/index.js +54 -44
  224. package/dist/slot/index.d.cts +2 -2
  225. package/dist/slot/index.d.ts +2 -2
  226. package/package.json +1 -1
  227. package/dist/chunk-6PO2IWB3.js.map +0 -1
  228. package/dist/chunk-76FZF4GM.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ContextMenu/ContextMenu.tsx"],"names":["RNText"],"mappings":";;;;;;;;AAmCA,IAAM,cAAA,GAAiB,cAA0C,IAAI,CAAA;AAErE,IAAM,oCAAoB,MAAA,CAAA,MAAM;AAC5B,EAAA,MAAM,GAAA,GAAM,WAAW,cAAc,CAAA;AACrC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,MAAM,qEAAqE,CAAA;AAAA,EACzF;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EAN0B,mBAAA,CAAA;AA+C1B,IAAM,eAAA,2BAAmB,EAAE,IAAA,EAAM,cAAc,KAAA,EAAO,YAAA,EAAc,UAAS,KAAwB;AACjG,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAkB,WAAW,CAAA;AACvD,EAAA,MAAM,eAAe,IAAA,KAAS,MAAA;AAC9B,EAAA,MAAM,OAAA,GAAU,eAAe,IAAA,GAAO,KAAA;AAEtC,EAAA,MAAM,OAAA,GAAU,WAAA;AAA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zD,EAAA,uBACI,GAAA,CAAC,mBAAA,EAAA,EAAoB,IAAA,EAAM,GAAA,CAAI,IAAA,EAAM,OACjC,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAa,GAAG,KAAA,EAAO,CAAA,EAC5B,CAAA;AAER,CAAA,EAR2B,oBAAA,CAAA;AAgBpB,IAAM,WAAA,GAAc,MAAA,CAAO,MAAA,CAAO,eAAA,EAAiB;AAAA,EACtD,OAAA,EAAS,kBAAA;AAAA,EACT,OAAA,EAAS,kBAAA;AAAA,EACT,IAAA,EAAM,QAAA;AAAA,EACN,SAAA,EAAW,aAAA;AAAA,EACX,KAAA,EAAO;AACX,CAAC","file":"chunk-KCLWPSV5.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n isValidElement,\n type ReactElement,\n type ReactNode,\n useCallback,\n useContext,\n useState,\n} from 'react';\nimport { Platform, Pressable, Text as RNText } from 'react-native';\nimport { Slot } from '../../slot';\nimport {\n MenuContent,\n type MenuContentProps,\n MenuContextProvider,\n MenuItem,\n type MenuItemProps,\n MenuLabel,\n type MenuLabelProps,\n MenuSeparator,\n type MenuSeparatorProps,\n} from '../DropdownMenu/DropdownMenu';\nimport { Popover, usePopoverContext } from '../Popover/Popover';\n\n// ---------------------------------------------------------------------------\n// ContextMenu internal context (separate from DropdownMenu's context)\n// ---------------------------------------------------------------------------\n\ntype ContextMenuCtxValue = {\n open: boolean;\n setOpen: (next: boolean) => void;\n};\n\nconst ContextMenuCtx = createContext<ContextMenuCtxValue | null>(null);\n\nconst useContextMenuCtx = () => {\n const ctx = useContext(ContextMenuCtx);\n if (!ctx) {\n throw new Error('ContextMenu compound parts must be rendered inside a <ContextMenu>.');\n }\n return ctx;\n};\n\n// ---------------------------------------------------------------------------\n// ContextMenu root\n// ---------------------------------------------------------------------------\n\nexport type ContextMenuProps = {\n /** Controlled open state. */\n open?: boolean;\n /** Initial open state (uncontrolled). @defaultValue false */\n defaultOpen?: boolean;\n /** Fires with the new open state. */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\n/**\n * Long-press (native) or right-click (web) triggered menu. Shares the same\n * compound surface as `DropdownMenu` but with a different trigger gesture.\n *\n * - **Web**: right-click (`contextmenu` event) opens the menu. The browser's\n * native context menu is suppressed via `preventDefault`.\n * - **Native**: long-press (`onLongPress`) opens the menu.\n *\n * The menu is anchored to the trigger element's bounding box (cursor-coordinate\n * anchoring is deferred to v2).\n *\n * ```tsx\n * <ContextMenu>\n * <ContextMenu.Trigger>\n * <View style={{ padding: 16 }}>\n * <Text>Right-click or long-press me</Text>\n * </View>\n * </ContextMenu.Trigger>\n * <ContextMenu.Content>\n * <ContextMenu.Item onSelect={() => console.log('copy')}>Copy</ContextMenu.Item>\n * <ContextMenu.Item onSelect={() => console.log('paste')}>Paste</ContextMenu.Item>\n * </ContextMenu.Content>\n * </ContextMenu>\n * ```\n */\nconst ContextMenuRoot = ({ open, defaultOpen = false, onOpenChange, children }: ContextMenuProps) => {\n const [inner, setInner] = useState<boolean>(defaultOpen);\n const isControlled = open !== undefined;\n const current = isControlled ? open : inner;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) {\n setInner(next);\n }\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n return (\n <ContextMenuCtx.Provider value={{ open: current, setOpen }}>\n <Popover open={current} onOpenChange={setOpen}>\n {children}\n </Popover>\n </ContextMenuCtx.Provider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// ContextMenu.Trigger\n// ---------------------------------------------------------------------------\n\nexport type ContextMenuTriggerProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Trigger element for ContextMenu.\n *\n * - Web: fires on `contextmenu` (right-click). Calls `preventDefault` so the\n * browser's native context menu is suppressed.\n * - Native: fires on `onLongPress`.\n */\nconst ContextMenuTrigger = ({ children, className, testID }: ContextMenuTriggerProps) => {\n const ctx = useContextMenuCtx();\n const popover = usePopoverContext('ContextMenu.Trigger');\n\n const openMenu = useCallback(() => {\n popover.measureTrigger();\n ctx.setOpen(true);\n }, [ctx, popover]);\n\n if (Platform.OS === 'web') {\n if (isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n const existing = child.props.onContextMenu as ((e: MouseEvent) => void) | undefined;\n return (\n <Slot\n ref={(node: HTMLElement | null) => {\n popover.triggerRef.current = node;\n }}\n onContextMenu={(e: MouseEvent) => {\n e.preventDefault();\n existing?.(e);\n openMenu();\n }}\n {...({\n 'aria-haspopup': 'menu',\n 'aria-expanded': ctx.open,\n 'aria-controls': popover.contentId,\n } as Record<string, unknown>)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n popover.triggerRef.current = node as unknown as HTMLElement | null;\n }}\n {...({\n onContextMenu: (e: MouseEvent) => {\n e.preventDefault();\n openMenu();\n },\n 'aria-haspopup': 'menu',\n 'aria-expanded': ctx.open,\n 'aria-controls': popover.contentId,\n } as Record<string, unknown>)}\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {typeof children === 'string' || typeof children === 'number' ? <RNText>{children}</RNText> : children}\n </Pressable>\n );\n }\n\n // Native — long press\n if (isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n const existing = child.props.onLongPress as ((e: unknown) => void) | undefined;\n return (\n <Slot\n ref={(node: unknown) => {\n popover.triggerRef.current = node as HTMLElement | null;\n }}\n onLongPress={(e: unknown) => {\n existing?.(e);\n openMenu();\n }}\n accessibilityRole=\"button\"\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n popover.triggerRef.current = node as unknown as HTMLElement | null;\n }}\n onLongPress={openMenu}\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {typeof children === 'string' || typeof children === 'number' ? <RNText>{children}</RNText> : children}\n </Pressable>\n );\n};\n\n// ---------------------------------------------------------------------------\n// ContextMenu.Content\n// ---------------------------------------------------------------------------\n\nexport type ContextMenuContentProps = MenuContentProps;\n\n/**\n * The floating menu surface for ContextMenu. Wraps the shared MenuContent and\n * provides the MenuContext so `ContextMenu.Item` can close the menu on select.\n */\nconst ContextMenuContent = (props: ContextMenuContentProps) => {\n const ctx = useContextMenuCtx();\n const close = useCallback(() => ctx.setOpen(false), [ctx]);\n return (\n <MenuContextProvider open={ctx.open} close={close}>\n <MenuContent {...props} />\n </MenuContextProvider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Public compound export\n// ---------------------------------------------------------------------------\n\nexport { MenuItem, type MenuItemProps, MenuLabel, type MenuLabelProps, MenuSeparator, type MenuSeparatorProps };\n\nexport const ContextMenu = Object.assign(ContextMenuRoot, {\n Trigger: ContextMenuTrigger,\n Content: ContextMenuContent,\n Item: MenuItem,\n Separator: MenuSeparator,\n Label: MenuLabel,\n});\n"]}
1
+ {"version":3,"sources":["../src/components/ContextMenu/ContextMenu.tsx"],"names":["RNText"],"mappings":";;;;;;;;AAmCA,IAAM,cAAA,GAAiB,cAA0C,IAAI,CAAA;AAErE,IAAM,oCAAoB,MAAA,CAAA,MAAM;AAC5B,EAAA,MAAM,GAAA,GAAM,WAAW,cAAc,CAAA;AACrC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,MAAM,qEAAqE,CAAA;AAAA,EACzF;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EAN0B,mBAAA,CAAA;AA+C1B,IAAM,eAAA,2BAAmB,EAAE,IAAA,EAAM,cAAc,KAAA,EAAO,YAAA,EAAc,UAAS,KAAwB;AACjG,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAkB,WAAW,CAAA;AACvD,EAAA,MAAM,eAAe,IAAA,KAAS,MAAA;AAC9B,EAAA,MAAM,OAAA,GAAU,eAAe,I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CAAI,QAAQ,KAAK,CAAA,EAAG,CAAC,GAAG,CAAC,CAAA;AACzD,EAAA,uBACI,GAAA,CAAC,mBAAA,EAAA,EAAoB,IAAA,EAAM,GAAA,CAAI,IAAA,EAAM,OACjC,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAa,GAAG,KAAA,EAAO,CAAA,EAC5B,CAAA;AAER,CAAA,EAR2B,oBAAA,CAAA;AAgBpB,IAAM,WAAA,GAAc,MAAA,CAAO,MAAA,CAAO,eAAA,EAAiB;AAAA,EACtD,OAAA,EAAS,kBAAA;AAAA,EACT,OAAA,EAAS,kBAAA;AAAA,EACT,IAAA,EAAM,QAAA;AAAA,EACN,SAAA,EAAW,aAAA;AAAA,EACX,KAAA,EAAO;AACX,CAAC","file":"chunk-TSWPHJIU.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n isValidElement,\n type ReactElement,\n type ReactNode,\n useCallback,\n useContext,\n useState,\n} from 'react';\nimport { Platform, Pressable, Text as RNText } from 'react-native';\nimport { Slot } from '../../slot';\nimport {\n MenuContent,\n type MenuContentProps,\n MenuContextProvider,\n MenuItem,\n type MenuItemProps,\n MenuLabel,\n type MenuLabelProps,\n MenuSeparator,\n type MenuSeparatorProps,\n} from '../DropdownMenu/DropdownMenu';\nimport { Popover, usePopoverContext } from '../Popover/Popover';\n\n// ---------------------------------------------------------------------------\n// ContextMenu internal context (separate from DropdownMenu's context)\n// ---------------------------------------------------------------------------\n\ntype ContextMenuCtxValue = {\n open: boolean;\n setOpen: (next: boolean) => void;\n};\n\nconst ContextMenuCtx = createContext<ContextMenuCtxValue | null>(null);\n\nconst useContextMenuCtx = () => {\n const ctx = useContext(ContextMenuCtx);\n if (!ctx) {\n throw new Error('ContextMenu compound parts must be rendered inside a <ContextMenu>.');\n }\n return ctx;\n};\n\n// ---------------------------------------------------------------------------\n// ContextMenu root\n// ---------------------------------------------------------------------------\n\nexport type ContextMenuProps = {\n /** Controlled open state. */\n open?: boolean;\n /** Initial open state (uncontrolled). @defaultValue false */\n defaultOpen?: boolean;\n /** Fires with the new open state. */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\n/**\n * Long-press (native) or right-click (web) triggered menu. Shares the same\n * compound surface as `DropdownMenu` but with a different trigger gesture.\n *\n * - **Web**: right-click (`contextmenu` event) opens the menu. The browser's\n * native context menu is suppressed via `preventDefault`.\n * - **Native**: long-press (`onLongPress`) opens the menu.\n *\n * The menu is anchored to the trigger element's bounding box (cursor-coordinate\n * anchoring is deferred to v2).\n *\n * ```tsx\n * <ContextMenu>\n * <ContextMenu.Trigger>\n * <View style={{ padding: 16 }}>\n * <Text>Right-click or long-press me</Text>\n * </View>\n * </ContextMenu.Trigger>\n * <ContextMenu.Content>\n * <ContextMenu.Item onSelect={() => console.log('copy')}>Copy</ContextMenu.Item>\n * <ContextMenu.Item onSelect={() => console.log('paste')}>Paste</ContextMenu.Item>\n * </ContextMenu.Content>\n * </ContextMenu>\n * ```\n */\nconst ContextMenuRoot = ({ open, defaultOpen = false, onOpenChange, children }: ContextMenuProps) => {\n const [inner, setInner] = useState<boolean>(defaultOpen);\n const isControlled = open !== undefined;\n const current = isControlled ? open : inner;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) {\n setInner(next);\n }\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n return (\n <ContextMenuCtx.Provider value={{ open: current, setOpen }}>\n <Popover open={current} onOpenChange={setOpen}>\n {children}\n </Popover>\n </ContextMenuCtx.Provider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// ContextMenu.Trigger\n// ---------------------------------------------------------------------------\n\nexport type ContextMenuTriggerProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Trigger element for ContextMenu.\n *\n * - Web: fires on `contextmenu` (right-click). Calls `preventDefault` so the\n * browser's native context menu is suppressed.\n * - Native: fires on `onLongPress`.\n */\nconst ContextMenuTrigger = ({ children, className, testID }: ContextMenuTriggerProps) => {\n const ctx = useContextMenuCtx();\n const popover = usePopoverContext('ContextMenu.Trigger');\n\n const openMenu = useCallback(() => {\n popover.measureTrigger();\n ctx.setOpen(true);\n }, [ctx, popover]);\n\n if (Platform.OS === 'web') {\n if (isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n const existing = child.props.onContextMenu as ((e: MouseEvent) => void) | undefined;\n return (\n <Slot\n ref={(node: HTMLElement | null) => {\n popover.triggerRef.current = node;\n }}\n onContextMenu={(e: MouseEvent) => {\n e.preventDefault();\n existing?.(e);\n openMenu();\n }}\n {...({\n 'aria-haspopup': 'menu',\n 'aria-expanded': ctx.open,\n 'aria-controls': popover.contentId,\n } as Record<string, unknown>)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n popover.triggerRef.current = node as unknown as HTMLElement | null;\n }}\n {...({\n onContextMenu: (e: MouseEvent) => {\n e.preventDefault();\n openMenu();\n },\n 'aria-haspopup': 'menu',\n 'aria-expanded': ctx.open,\n 'aria-controls': popover.contentId,\n } as Record<string, unknown>)}\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {typeof children === 'string' || typeof children === 'number' ? <RNText>{children}</RNText> : children}\n </Pressable>\n );\n }\n\n // Native — long press\n if (isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n const existing = child.props.onLongPress as ((e: unknown) => void) | undefined;\n return (\n <Slot\n ref={(node: unknown) => {\n popover.triggerRef.current = node as HTMLElement | null;\n }}\n onLongPress={(e: unknown) => {\n existing?.(e);\n openMenu();\n }}\n accessibilityRole=\"button\"\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n popover.triggerRef.current = node as unknown as HTMLElement | null;\n }}\n onLongPress={openMenu}\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {typeof children === 'string' || typeof children === 'number' ? <RNText>{children}</RNText> : children}\n </Pressable>\n );\n};\n\n// ---------------------------------------------------------------------------\n// ContextMenu.Content\n// ---------------------------------------------------------------------------\n\nexport type ContextMenuContentProps = MenuContentProps;\n\n/**\n * The floating menu surface for ContextMenu. Wraps the shared MenuContent and\n * provides the MenuContext so `ContextMenu.Item` can close the menu on select.\n */\nconst ContextMenuContent = (props: ContextMenuContentProps) => {\n const ctx = useContextMenuCtx();\n const close = useCallback(() => ctx.setOpen(false), [ctx]);\n return (\n <MenuContextProvider open={ctx.open} close={close}>\n <MenuContent {...props} />\n </MenuContextProvider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Public compound export\n// ---------------------------------------------------------------------------\n\nexport { MenuItem, type MenuItemProps, MenuLabel, type MenuLabelProps, MenuSeparator, type MenuSeparatorProps };\n\nexport const ContextMenu = Object.assign(ContextMenuRoot, {\n Trigger: ContextMenuTrigger,\n Content: ContextMenuContent,\n Item: MenuItem,\n Separator: MenuSeparator,\n Label: MenuLabel,\n});\n"]}
@@ -1,8 +1,8 @@
1
1
  import { BlurBackdrop } from './chunk-KWRDJPP3.js';
2
2
  import { Slot } from './chunk-ZIBNLXIV.js';
3
- import { cn } from './chunk-CHXHRJNZ.js';
4
3
  import { px } from './chunk-5A2QOOVN.js';
5
4
  import { useThemeColors, useColorScheme } from './chunk-R5JMDDCB.js';
5
+ import { cn } from './chunk-CHXHRJNZ.js';
6
6
  import { __name } from './chunk-WCQVDF3K.js';
7
7
  import { createContext, useState, useCallback, useId, useRef, isValidElement, useEffect, useContext } from 'react';
8
8
  import { Platform, Text, Pressable, View, Modal, StyleSheet } from 'react-native';
@@ -481,5 +481,5 @@ var AlertDialog = Object.assign(AlertDialogRoot, {
481
481
  });
482
482
 
483
483
  export { AlertDialog };
484
- //# sourceMappingURL=chunk-5BM6H2CD.js.map
485
- //# sourceMappingURL=chunk-5BM6H2CD.js.map
484
+ //# sourceMappingURL=chunk-U2ZKY2CP.js.map
485
+ //# sourceMappingURL=chunk-U2ZKY2CP.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/AlertDialog/AlertDialog.tsx"],"names":["RNText"],"mappings":";;;;;;;;;;AAgCA,IAAM,kBAAA,GAAqB,cAA8C,IAAI,CAAA;AAE7E,IAAM,qBAAA,2BAAyB,KAAA,KAA2C;AACtE,EAAA,MAAM,GAAA,GAAM,WAAW,kBAAkB,CAAA;AACzC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,CAAA,EAAI,KAAK,CAAA,2CAAA,CAA6C,CAAA;AAAA,EAC1E;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EAN8B,uBAAA,CAAA;AAkC9B,IAAM,eAAA,2BAAmB,EAAE,IAAA,EAAM,cAAc,KAAA,EAAO,YAAA,EAAc,UAAS,KAAwB;AACjG,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAkB,WAAW,CAAA;AACvD,EAAA,MAAM,eAAe,IAAA,KAAS,MAAA;AAC9B,EAAA,MAAM,OAAA,GAAU,eAAe,IAAA,GAAO,KAAA;AAEtC,EAAA,MAAM,OAAA,GAAU,WAAA;AAAA,IACZ,CAAC,IAAA,KAAkB;AACf,MAAA,IAAI,CAAC,YAAA,EAAc;AACf,QAAA,QAAA,CAAS,IAAI,CAAA;AAAA,MACjB;AACA,MAAA,YAAA,GAAe,IAAI,CAAA;AAAA,IACvB,CAAA;AAAA,IACA,CAAC,cAAc,YAAY;AAAA,GAC/B;AAEA,EAAA,MAAM,SAAS,KAAA,EAAM;AACrB,EAAA,MAAM,UAAA,GAAa,OAA2B,IAAI,CAAA;AAClD,EAAA,MAAM,SAAA,GAAY,OAA2B,IAAI,CAAA;AAEjD,EAAA,MAAM,QAAA,GAAoC;AAAA,IACtC,IAAA,EAAM,OAAA;AAAA,IACN,OAAA;AAAA,IACA,OAA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;AAAA,MACzC,GAAI,SAAA,KAAc,MAAA,GAAY,EAAE,SAAA,KAAc,EAAC;AAAA,MAE/C,6BAAmB,QAAQ;AAAA;AAAA,GAChC;AAER,CAAA,EA7CiC,mBAAA,CAAA;AAqD1B,IAAM,iBAAA,mBAAoB,MAAA,CAAA,CAAC,EAAE,QAAA,EAAU,WAAU,KAA8B;AAClF,EAAA,MAAM,SAAS,cAAA,EAAe;AAC9B,EAAA,uBACI,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACG,SAAA,EAAW,EAAA,CAAG,8CAAA,EAAgD,SAAS,CAAA;AAAA,MACvE,KAAA,EAAO;AAAA,QACH,SAAA,EAAW,EAAA,CAAG,MAAA,CAAO,OAAA,CAAQ,GAAG,CAAC,CAAA;AAAA,QACjC,aAAA,EAAe,KAAA;AAAA,QACf,UAAA,EAAY,QAAA;AAAA,QACZ,cAAA,EAAgB,UAAA;AAAA,QAChB,GAAA,EAAK,EAAA,CAAG,MAAA,CAAO,OAAA,CAAQ,GAAG,CAAC;AAAA,OAC/B;AAAA,MAEC;AAAA;AAAA,GACL;AAER,CAAA,EAhBiC,mBAAA,CAAA;AAyB1B,IAAM,WAAA,GAAc,MAAA,CAAO,MAAA,CAAO,eAAA,EAAiB;AAAA,EACtD,OAAA,EAAS,kBAAA;AAAA,EACT,OAAA,EAAS,kBAAA;AAAA,EACT,KAAA,EAAO,gBAAA;AAAA,EACP,WAAA,EAAa,sBAAA;AAAA,EACb,MAAA,EAAQ,iBAAA;AAAA,EACR,MAAA,EAAQ,iBAAA;AAAA,EACR,MAAA,EAAQ;AACZ,CAAC","file":"chunk-5BM6H2CD.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n isValidElement,\n type ReactElement,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\nimport type { ViewStyle } from 'react-native';\nimport { Modal, Platform, Pressable, Text as RNText, StyleSheet, View } from 'react-native';\nimport { Slot } from '../../slot';\nimport { px } from '../../theme/px';\nimport { useColorScheme } from '../../theme/use-color-scheme';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\nimport { BlurBackdrop } from '../Dialog/blur-backdrop';\n\ntype AlertDialogContextValue = {\n open: boolean;\n setOpen: (next: boolean) => void;\n titleId: string;\n descriptionId: string;\n triggerRef: { current: HTMLElement | null };\n cancelRef: { current: HTMLElement | null };\n};\n\nconst AlertDialogContext = createContext<AlertDialogContextValue | null>(null);\n\nconst useAlertDialogContext = (label: string): AlertDialogContextValue => {\n const ctx = useContext(AlertDialogContext);\n if (!ctx) {\n throw new Error(`<${label}> must be rendered inside an <AlertDialog>.`);\n }\n return ctx;\n};\n\nexport type AlertDialogProps = {\n /** Controlled open state. */\n open?: boolean;\n /** Uncontrolled initial open state. @defaultValue false */\n defaultOpen?: boolean;\n /** Fires with the new open state. */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\n/**\n * Confirmation dialog that **forces a user response**. Use for destructive\n * or otherwise irreversible actions (\"Delete project?\", \"Sign out everyone?\").\n *\n * Differs from `Dialog` in two important ways:\n * - The backdrop click does **not** dismiss.\n * - The Escape key does **not** dismiss.\n *\n * The user must press `AlertDialogCancel` or `AlertDialogAction` to close.\n * Initial focus lands on Cancel — the less destructive choice — so a stray\n * Enter keypress doesn't fire the destructive action.\n *\n * For non-destructive content (forms, info, settings), prefer `Dialog` —\n * it allows Escape and click-outside to dismiss, which is the expected\n * affordance for forgettable interactions.\n */\nconst AlertDialogRoot = ({ open, defaultOpen = false, onOpenChange, children }: AlertDialogProps) => {\n const [inner, setInner] = useState<boolean>(defaultOpen);\n const isControlled = open !== undefined;\n const current = isControlled ? open : inner;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) {\n setInner(next);\n }\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const baseId = useId();\n const triggerRef = useRef<HTMLElement | null>(null);\n const cancelRef = useRef<HTMLElement | null>(null);\n\n const ctxValue: AlertDialogContextValue = {\n open: current,\n setOpen,\n titleId: `${baseId}-title`,\n descriptionId: `${baseId}-description`,\n triggerRef,\n cancelRef,\n };\n\n return <AlertDialogContext.Provider value={ctxValue}>{children}</AlertDialogContext.Provider>;\n};\n\nexport type AlertDialogTriggerProps = {\n /** Render the child as the trigger (Slot pattern). Default true. */\n asChild?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Element that opens the alert dialog when activated. `asChild` by default\n * so any element (Button, Link, custom Pressable) becomes the trigger.\n */\nexport const AlertDialogTrigger = ({ asChild = true, children, className, testID }: AlertDialogTriggerProps) => {\n const ctx = useAlertDialogContext('AlertDialogTrigger');\n const onPress = useCallback(() => ctx.setOpen(true), [ctx]);\n\n if (asChild && isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n // Pass both onClick (web HTML button) and onPress (RN Pressable / our\n // own Button) so the trigger fires regardless of the wrapped child's\n // event model.\n const fire = (existing: ((e: unknown) => void) | undefined) => (event: unknown) => {\n existing?.(event);\n ctx.setOpen(true);\n };\n return (\n <Slot\n ref={(node: HTMLElement | null) => {\n ctx.triggerRef.current = node;\n }}\n onClick={fire(child.props.onClick as ((e: unknown) => void) | undefined)}\n onPress={fire(child.props.onPress as ((e: unknown) => void) | undefined)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n ctx.triggerRef.current = node as unknown as HTMLElement | null;\n }}\n onPress={onPress}\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {wrapStringChildren(children)}\n </Pressable>\n );\n};\n\n// On native, raw strings rendered as children of a non-Text component\n// throw \"Text strings must be rendered within a <Text> component\". On\n// web, react-native-web silently tolerates it. Wrap any string/number\n// children in an RNText so the same JSX renders cleanly on both\n// platforms. Non-string children are passed through unchanged.\nfunction wrapStringChildren(children: ReactNode): ReactNode {\n if (typeof children === 'string' || typeof children === 'number') {\n return <RNText>{children}</RNText>;\n }\n return children;\n}\n\n// Same scrim + blur recipe as Dialog (see Dialog.tsx). 24% black + 4px\n// blur leaves the page text \"almost readable\" behind the dialog rather\n// than fully obscured. Native keeps a flat scrim — RN doesn't have\n// backdrop-filter and the native shim would be an extra peer dep.\nconst SCRIM_COLOR = 'rgba(0, 0, 0, 0.24)';\nconst BLUR_AMOUNT = 4;\n\n// Static overlay layout. The animatable scrim color + backdrop-filter\n// are pushed onto the overlay's DOM ref via useEffect inside the\n// component because rn-web's style filter drops keys it doesn't\n// recognise as RN style props (backdropFilter, transitionProperty).\n// See the Dialog backdrop-blur implementation for the same trick.\nconst OVERLAY_LAYOUT_BASE: ViewStyle = {\n position: Platform.OS === 'web' ? ('fixed' as unknown as 'absolute') : 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n alignItems: 'center',\n justifyContent: 'center',\n // Native overlay stays transparent — the BlurBackdrop sibling renders\n // dim + frosted-glass via expo-blur, and a SCRIM_COLOR layer on top\n // would hide the blur. Web keeps its CSS overlay path (the imperative\n // useEffect below sets backgroundColor + backdrop-filter on web).\n ...(Platform.OS === 'web' ? ({ zIndex: 50 } as ViewStyle) : { backgroundColor: 'transparent' }),\n};\n\n// Layout / animation only; theme-driven dimensions are merged inside\n// AlertDialogContent.\nconst CONTENT_LAYOUT_BASE: ViewStyle = {\n width: '100%',\n maxWidth: 480, // component-density literal — not from theme\n ...(Platform.OS === 'web'\n ? ({\n boxShadow: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)',\n // Subtle scale-in: 0.95 → 1 over 150ms. Honors prefers-reduced-motion\n // via the media query below — set as a CSS variable so the keyframe\n // can be disabled without remounting.\n animationName: 'nori-alert-dialog-in',\n animationDuration: '150ms',\n animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n animationFillMode: 'both',\n } as ViewStyle)\n : { elevation: 24 }),\n};\n\nconst FOCUSABLE_SELECTOR =\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), [role=\"button\"]:not([aria-disabled=\"true\"]), [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * react-native-web renders our `<Button>` (which wraps `Pressable`) as a\n * `<div role=\"button\">` without a tabindex. That's invisible to native focus\n * APIs in browsers AND jsdom. Poke a `tabindex=\"0\"` onto the node so\n * `.focus()` actually sets `document.activeElement`.\n *\n * Idempotent — only sets it when missing.\n */\nfunction ensureFocusable(node: HTMLElement | null): void {\n if (!node) {\n return;\n }\n if (node.hasAttribute('tabindex')) {\n return;\n }\n node.setAttribute('tabindex', '0');\n}\n\nconst KEYFRAMES_STYLE_ID = 'nori-alert-dialog-keyframes';\nconst KEYFRAMES_CSS = `\n@keyframes nori-alert-dialog-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-nori-alert-dialog-content] { animation: none !important; }\n}\n`;\n\nfunction ensureKeyframesInjected(): void {\n if (Platform.OS !== 'web') {\n return;\n }\n if (typeof document === 'undefined') {\n return;\n }\n if (document.getElementById(KEYFRAMES_STYLE_ID)) {\n return;\n }\n const style = document.createElement('style');\n style.id = KEYFRAMES_STYLE_ID;\n style.textContent = KEYFRAMES_CSS;\n document.head.appendChild(style);\n}\n\nexport type AlertDialogContentProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * The visible alert dialog surface — overlay + centered card. Renders only\n * while open. On web: traps focus inside, locks body scroll, restores focus\n * on close. Crucially, neither overlay click nor Escape closes — the user\n * MUST press an explicit Cancel/Action button.\n */\nexport const AlertDialogContent = ({ children, className, testID }: AlertDialogContentProps) => {\n const ctx = useAlertDialogContext('AlertDialogContent');\n const colors = useThemeColors();\n const scheme = useColorScheme();\n const contentRef = useRef<HTMLDivElement | null>(null);\n const overlayDomRef = useRef<HTMLElement | null>(null);\n const overlayStyle: ViewStyle = {\n ...OVERLAY_LAYOUT_BASE,\n padding: px(colors.spacing['4']),\n };\n const contentStyle: ViewStyle = {\n ...CONTENT_LAYOUT_BASE,\n borderRadius: px(colors.radius.xl),\n padding: px(colors.spacing['6']),\n gap: px(colors.spacing['3']),\n };\n // Two-phase mount: render overlay at scrim 0 / blur 0 first, then\n // flip to target values on the next frame so CSS transitions have a\n // start state to interpolate from. Same pattern as Dialog.\n const [entered, setEntered] = useState(false);\n useEffect(() => {\n if (Platform.OS !== 'web') {\n setEntered(true);\n return;\n }\n if (!ctx.open) {\n setEntered(false);\n return;\n }\n const id = requestAnimationFrame(() => setEntered(true));\n return () => cancelAnimationFrame(id);\n }, [ctx.open]);\n\n // Animated scrim + backdrop-filter — pushed onto the overlay's DOM\n // node directly because rn-web's style filter drops the\n // transition/backdrop-filter keys when passed via the View's `style`\n // prop. Web only; native uses the flat scrim baked into\n // OVERLAY_BASE_STYLE.\n useEffect(() => {\n if (Platform.OS !== 'web') {\n return;\n }\n const node = overlayDomRef.current;\n if (!node) {\n return;\n }\n node.style.transitionProperty = 'background-color, backdrop-filter, -webkit-backdrop-filter';\n node.style.transitionDuration = '150ms, 200ms, 200ms';\n node.style.transitionTimingFunction = 'ease-out';\n if (entered) {\n node.style.backgroundColor = SCRIM_COLOR;\n node.style.backdropFilter = `blur(${BLUR_AMOUNT}px)`;\n node.style.setProperty('-webkit-backdrop-filter', `blur(${BLUR_AMOUNT}px)`);\n } else {\n node.style.backgroundColor = 'rgba(0, 0, 0, 0)';\n node.style.backdropFilter = 'blur(0px)';\n node.style.setProperty('-webkit-backdrop-filter', 'blur(0px)');\n }\n }, [entered]);\n\n useEffect(() => {\n if (!ctx.open) {\n return;\n }\n if (Platform.OS !== 'web') {\n return;\n }\n if (typeof document === 'undefined') {\n return;\n }\n\n ensureKeyframesInjected();\n\n const previouslyFocused = document.activeElement as HTMLElement | null;\n\n // Lock body scroll. Preserve the previous inline value so we don't\n // clobber a consumer-set lock.\n const prevBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n\n // Initial focus: prefer the Cancel button (least destructive default).\n // Fall back to first focusable. Only fall back to the container if\n // there's nothing focusable at all (an alertdialog with no actions\n // is a misuse — we still want it to receive keydown for the trap).\n const focusInitial = () => {\n const node = contentRef.current;\n if (!node) {\n return;\n }\n // Make every focusable target reachable up front. RN-Web Pressables\n // render as `<div role=\"button\">` without tabindex; without this\n // poke, programmatic `.focus()` on them is a no-op.\n const focusable = node.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR);\n for (const el of focusable) {\n ensureFocusable(el);\n }\n const cancel = ctx.cancelRef.current;\n if (cancel?.focus) {\n ensureFocusable(cancel);\n cancel.focus();\n return;\n }\n const first = focusable[0];\n if (first) {\n first.focus();\n } else {\n node.setAttribute('tabindex', '-1');\n node.focus();\n }\n };\n focusInitial();\n\n // Focus trap only — Escape does NOT close (alert dialog contract).\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Tab') {\n return;\n }\n const node = contentRef.current;\n if (!node) {\n return;\n }\n // Don't filter by `offsetParent` here: jsdom always reports `null`\n // for it (no layout engine), which would collapse the trap to the\n // currently focused element only. AlertDialog's content surface is\n // tightly controlled; trust the selector.\n const focusable = Array.from(node.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR));\n if (focusable.length === 0) {\n event.preventDefault();\n return;\n }\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n if (!first || !last) {\n return;\n }\n // Make every focusable target reachable from jsdom too.\n for (const el of focusable) {\n ensureFocusable(el);\n }\n if (event.shiftKey) {\n if (document.activeElement === first || !node.contains(document.activeElement)) {\n event.preventDefault();\n last.focus();\n }\n } else if (document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n document.addEventListener('keydown', onKeyDown);\n\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n document.body.style.overflow = prevBodyOverflow;\n const restoreTo = ctx.triggerRef.current ?? previouslyFocused;\n restoreTo?.focus?.();\n };\n }, [ctx.open, ctx.triggerRef, ctx.cancelRef]);\n\n // RN Modal's `onRequestClose` fires on Android hardware back. We\n // intentionally make it a no-op: an alert dialog cannot be backed out\n // of without an explicit choice. A consumer that needs Android back to\n // mean \"cancel\" should wire it via their own action.\n const onRequestClose = useCallback(() => {\n /* intentional no-op — alert dialog requires explicit action */\n }, []);\n\n return (\n <Modal\n visible={ctx.open}\n transparent\n // Web: 'none' so RN's built-in fade doesn't fight our own\n // overlay/content transitions (its layer-level fade caused\n // backdrop-filter to \"snap in\" at the end on Dialog — same\n // failure mode applies here). Native keeps 'fade' since we\n // have no CSS transition path there.\n animationType={Platform.OS === 'web' ? 'none' : 'fade'}\n onRequestClose={onRequestClose}\n >\n {/* Native blur layer; renders nothing on web (CSS handles\n it) or when expo-blur isn't installed. */}\n <BlurBackdrop intensity={60} tint={scheme === 'dark' ? 'dark' : 'light'} style={StyleSheet.absoluteFill} />\n <View\n ref={(node) => {\n overlayDomRef.current = node as unknown as HTMLElement | null;\n }}\n accessibilityRole=\"none\"\n aria-hidden={true}\n style={overlayStyle}\n // Note: this is a <View>, not a <Pressable>. The overlay must NOT\n // dismiss on click for an alert dialog.\n >\n <View\n ref={(node) => {\n contentRef.current = node as unknown as HTMLDivElement | null;\n }}\n role=\"alertdialog\"\n accessibilityRole=\"alert\"\n aria-modal={true}\n aria-labelledby={ctx.titleId}\n aria-describedby={ctx.descriptionId}\n {...(testID !== undefined ? { testID } : {})}\n {...({ 'data-nori-alert-dialog-content': 'true' } as Record<string, string>)}\n className={cn('w-full max-w-md rounded-xl bg-semantic-background-elevated p-6 gap-3', className)}\n style={[contentStyle, { backgroundColor: colors.semantic.background.elevated }]}\n >\n <View\n className=\"flex-col gap-1.5\"\n style={{ flexDirection: 'column', gap: px(colors.spacing['2']) - 2 }}\n >\n {children}\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nexport type AlertDialogTextProps = {\n children?: ReactNode;\n className?: string;\n};\n\n/** Heading inside AlertDialogContent. Wires `aria-labelledby`. */\nexport const AlertDialogTitle = ({ children, className }: AlertDialogTextProps) => {\n const ctx = useAlertDialogContext('AlertDialogTitle');\n const colors = useThemeColors();\n return (\n <RNText\n nativeID={ctx.titleId}\n id={ctx.titleId}\n role=\"heading\"\n aria-level={2}\n className={cn('text-lg font-semibold text-semantic-text-default', className)}\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.display,\n fontSize: px(colors.fontSize.lg),\n fontWeight: colors.fontWeight.semibold as '600',\n }}\n >\n {children}\n </RNText>\n );\n};\n\n/** Body description inside AlertDialogContent. Wires `aria-describedby`. */\nexport const AlertDialogDescription = ({ children, className }: AlertDialogTextProps) => {\n const ctx = useAlertDialogContext('AlertDialogDescription');\n const colors = useThemeColors();\n return (\n <RNText\n nativeID={ctx.descriptionId}\n id={ctx.descriptionId}\n className={cn('text-sm text-semantic-text-muted', className)}\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n );\n};\n\nexport type AlertDialogActionProps = {\n /** Render the child as the action (Slot pattern). Default true. */\n asChild?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n /** Forwarded to the wrapped child / fallback Pressable. Fires before close. */\n onPress?: (event?: unknown) => void;\n};\n\n/**\n * The destructive / confirming action. Closes the dialog AND forwards\n * `onPress` to the consumer's handler so they can run the side effect.\n */\nexport const AlertDialogAction = ({ asChild = true, children, className, testID, onPress }: AlertDialogActionProps) => {\n const ctx = useAlertDialogContext('AlertDialogAction');\n const handle = useCallback(\n (event?: unknown) => {\n onPress?.(event);\n ctx.setOpen(false);\n },\n [ctx, onPress]\n );\n\n if (asChild && isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n // Wrap both event names so an HTML button (onClick) and an RN\n // Pressable / Button (onPress) both fire — and both still call the\n // child's own handler if present.\n const fire = (existing: ((e: unknown) => void) | undefined) => (event: unknown) => {\n existing?.(event);\n handle(event);\n };\n return (\n <Slot\n onClick={fire(child.props.onClick as ((e: unknown) => void) | undefined)}\n onPress={fire(child.props.onPress as ((e: unknown) => void) | undefined)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n onPress={handle}\n role=\"button\"\n accessibilityRole=\"button\"\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {wrapStringChildren(children)}\n </Pressable>\n );\n};\n\nexport type AlertDialogCancelProps = {\n /** Render the child as the cancel button (Slot pattern). Default true. */\n asChild?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n /** Forwarded to the wrapped child / fallback Pressable. Fires before close. */\n onPress?: (event?: unknown) => void;\n};\n\n/**\n * The cancel / dismiss action. Closes the dialog AND forwards `onPress`.\n * Receives initial focus inside `AlertDialogContent` — Cancel is the\n * least destructive default, so a stray Enter keypress can't fire the\n * destructive action.\n */\nexport const AlertDialogCancel = ({ asChild = true, children, className, testID, onPress }: AlertDialogCancelProps) => {\n const ctx = useAlertDialogContext('AlertDialogCancel');\n const handle = useCallback(\n (event?: unknown) => {\n onPress?.(event);\n ctx.setOpen(false);\n },\n [ctx, onPress]\n );\n\n if (asChild && isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n const fire = (existing: ((e: unknown) => void) | undefined) => (event: unknown) => {\n existing?.(event);\n handle(event);\n };\n return (\n <Slot\n ref={(node: HTMLElement | null) => {\n ctx.cancelRef.current = node;\n }}\n onClick={fire(child.props.onClick as ((e: unknown) => void) | undefined)}\n onPress={fire(child.props.onPress as ((e: unknown) => void) | undefined)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n ctx.cancelRef.current = node as unknown as HTMLElement | null;\n }}\n onPress={handle}\n role=\"button\"\n accessibilityRole=\"button\"\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {wrapStringChildren(children)}\n </Pressable>\n );\n};\n\nexport type AlertDialogFooterProps = {\n children?: ReactNode;\n className?: string;\n};\n\n/** Convenience row for action buttons (right-aligned). */\nexport const AlertDialogFooter = ({ children, className }: AlertDialogFooterProps) => {\n const colors = useThemeColors();\n return (\n <View\n className={cn('mt-4 flex-row items-center justify-end gap-2', className)}\n style={{\n marginTop: px(colors.spacing['4']),\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'flex-end',\n gap: px(colors.spacing['2']),\n }}\n >\n {children}\n </View>\n );\n};\n\n/**\n * Public `AlertDialog` value — the root function plus its `.Trigger`,\n * `.Content`, `.Title`, `.Description`, `.Footer`, `.Action`, and `.Cancel`\n * static members. `Object.assign` produces a value whose inferred type carries\n * the static properties, so `.d.ts` consumers can write `<AlertDialog.Content>`\n * without a separate import.\n */\nexport const AlertDialog = Object.assign(AlertDialogRoot, {\n Trigger: AlertDialogTrigger,\n Content: AlertDialogContent,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Footer: AlertDialogFooter,\n Action: AlertDialogAction,\n Cancel: AlertDialogCancel,\n});\n"]}
1
+ {"version":3,"sources":["../src/components/AlertDialog/AlertDialog.tsx"],"names":["RNText"],"mappings":";;;;;;;;;;AAgCA,IAAM,kBAAA,GAAqB,cAA8C,IAAI,CAAA;AAE7E,IAAM,qBAAA,2BAAyB,KAAA,KAA2C;AACtE,EAAA,MAAM,GAAA,GAAM,WAAW,kBAAkB,CAAA;AACzC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,CAAA,EAAI,KAAK,CAAA,2CAAA,CAA6C,CAAA;AAAA,EAC1E;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EAN8B,uBAAA,CAAA;A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A,EAAe,KAAA;AAAA,QACf,UAAA,EAAY,QAAA;AAAA,QACZ,cAAA,EAAgB,UAAA;AAAA,QAChB,GAAA,EAAK,EAAA,CAAG,MAAA,CAAO,OAAA,CAAQ,GAAG,CAAC;AAAA,OAC/B;AAAA,MAEC;AAAA;AAAA,GACL;AAER,CAAA,EAhBiC,mBAAA,CAAA;AAyB1B,IAAM,WAAA,GAAc,MAAA,CAAO,MAAA,CAAO,eAAA,EAAiB;AAAA,EACtD,OAAA,EAAS,kBAAA;AAAA,EACT,OAAA,EAAS,kBAAA;AAAA,EACT,KAAA,EAAO,gBAAA;AAAA,EACP,WAAA,EAAa,sBAAA;AAAA,EACb,MAAA,EAAQ,iBAAA;AAAA,EACR,MAAA,EAAQ,iBAAA;AAAA,EACR,MAAA,EAAQ;AACZ,CAAC","file":"chunk-U2ZKY2CP.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n isValidElement,\n type ReactElement,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\nimport type { ViewStyle } from 'react-native';\nimport { Modal, Platform, Pressable, Text as RNText, StyleSheet, View } from 'react-native';\nimport { Slot } from '../../slot';\nimport { px } from '../../theme/px';\nimport { useColorScheme } from '../../theme/use-color-scheme';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\nimport { BlurBackdrop } from '../Dialog/blur-backdrop';\n\ntype AlertDialogContextValue = {\n open: boolean;\n setOpen: (next: boolean) => void;\n titleId: string;\n descriptionId: string;\n triggerRef: { current: HTMLElement | null };\n cancelRef: { current: HTMLElement | null };\n};\n\nconst AlertDialogContext = createContext<AlertDialogContextValue | null>(null);\n\nconst useAlertDialogContext = (label: string): AlertDialogContextValue => {\n const ctx = useContext(AlertDialogContext);\n if (!ctx) {\n throw new Error(`<${label}> must be rendered inside an <AlertDialog>.`);\n }\n return ctx;\n};\n\nexport type AlertDialogProps = {\n /** Controlled open state. */\n open?: boolean;\n /** Uncontrolled initial open state. @defaultValue false */\n defaultOpen?: boolean;\n /** Fires with the new open state. */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\n/**\n * Confirmation dialog that **forces a user response**. Use for destructive\n * or otherwise irreversible actions (\"Delete project?\", \"Sign out everyone?\").\n *\n * Differs from `Dialog` in two important ways:\n * - The backdrop click does **not** dismiss.\n * - The Escape key does **not** dismiss.\n *\n * The user must press `AlertDialogCancel` or `AlertDialogAction` to close.\n * Initial focus lands on Cancel — the less destructive choice — so a stray\n * Enter keypress doesn't fire the destructive action.\n *\n * For non-destructive content (forms, info, settings), prefer `Dialog` —\n * it allows Escape and click-outside to dismiss, which is the expected\n * affordance for forgettable interactions.\n */\nconst AlertDialogRoot = ({ open, defaultOpen = false, onOpenChange, children }: AlertDialogProps) => {\n const [inner, setInner] = useState<boolean>(defaultOpen);\n const isControlled = open !== undefined;\n const current = isControlled ? open : inner;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) {\n setInner(next);\n }\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const baseId = useId();\n const triggerRef = useRef<HTMLElement | null>(null);\n const cancelRef = useRef<HTMLElement | null>(null);\n\n const ctxValue: AlertDialogContextValue = {\n open: current,\n setOpen,\n titleId: `${baseId}-title`,\n descriptionId: `${baseId}-description`,\n triggerRef,\n cancelRef,\n };\n\n return <AlertDialogContext.Provider value={ctxValue}>{children}</AlertDialogContext.Provider>;\n};\n\nexport type AlertDialogTriggerProps = {\n /** Render the child as the trigger (Slot pattern). Default true. */\n asChild?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Element that opens the alert dialog when activated. `asChild` by default\n * so any element (Button, Link, custom Pressable) becomes the trigger.\n */\nexport const AlertDialogTrigger = ({ asChild = true, children, className, testID }: AlertDialogTriggerProps) => {\n const ctx = useAlertDialogContext('AlertDialogTrigger');\n const onPress = useCallback(() => ctx.setOpen(true), [ctx]);\n\n if (asChild && isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n // Pass both onClick (web HTML button) and onPress (RN Pressable / our\n // own Button) so the trigger fires regardless of the wrapped child's\n // event model.\n const fire = (existing: ((e: unknown) => void) | undefined) => (event: unknown) => {\n existing?.(event);\n ctx.setOpen(true);\n };\n return (\n <Slot\n ref={(node: HTMLElement | null) => {\n ctx.triggerRef.current = node;\n }}\n onClick={fire(child.props.onClick as ((e: unknown) => void) | undefined)}\n onPress={fire(child.props.onPress as ((e: unknown) => void) | undefined)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n ctx.triggerRef.current = node as unknown as HTMLElement | null;\n }}\n onPress={onPress}\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {wrapStringChildren(children)}\n </Pressable>\n );\n};\n\n// On native, raw strings rendered as children of a non-Text component\n// throw \"Text strings must be rendered within a <Text> component\". On\n// web, react-native-web silently tolerates it. Wrap any string/number\n// children in an RNText so the same JSX renders cleanly on both\n// platforms. Non-string children are passed through unchanged.\nfunction wrapStringChildren(children: ReactNode): ReactNode {\n if (typeof children === 'string' || typeof children === 'number') {\n return <RNText>{children}</RNText>;\n }\n return children;\n}\n\n// Same scrim + blur recipe as Dialog (see Dialog.tsx). 24% black + 4px\n// blur leaves the page text \"almost readable\" behind the dialog rather\n// than fully obscured. Native keeps a flat scrim — RN doesn't have\n// backdrop-filter and the native shim would be an extra peer dep.\nconst SCRIM_COLOR = 'rgba(0, 0, 0, 0.24)';\nconst BLUR_AMOUNT = 4;\n\n// Static overlay layout. The animatable scrim color + backdrop-filter\n// are pushed onto the overlay's DOM ref via useEffect inside the\n// component because rn-web's style filter drops keys it doesn't\n// recognise as RN style props (backdropFilter, transitionProperty).\n// See the Dialog backdrop-blur implementation for the same trick.\nconst OVERLAY_LAYOUT_BASE: ViewStyle = {\n position: Platform.OS === 'web' ? ('fixed' as unknown as 'absolute') : 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n alignItems: 'center',\n justifyContent: 'center',\n // Native overlay stays transparent — the BlurBackdrop sibling renders\n // dim + frosted-glass via expo-blur, and a SCRIM_COLOR layer on top\n // would hide the blur. Web keeps its CSS overlay path (the imperative\n // useEffect below sets backgroundColor + backdrop-filter on web).\n ...(Platform.OS === 'web' ? ({ zIndex: 50 } as ViewStyle) : { backgroundColor: 'transparent' }),\n};\n\n// Layout / animation only; theme-driven dimensions are merged inside\n// AlertDialogContent.\nconst CONTENT_LAYOUT_BASE: ViewStyle = {\n width: '100%',\n maxWidth: 480, // component-density literal — not from theme\n ...(Platform.OS === 'web'\n ? ({\n boxShadow: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)',\n // Subtle scale-in: 0.95 → 1 over 150ms. Honors prefers-reduced-motion\n // via the media query below — set as a CSS variable so the keyframe\n // can be disabled without remounting.\n animationName: 'nori-alert-dialog-in',\n animationDuration: '150ms',\n animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n animationFillMode: 'both',\n } as ViewStyle)\n : { elevation: 24 }),\n};\n\nconst FOCUSABLE_SELECTOR =\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), [role=\"button\"]:not([aria-disabled=\"true\"]), [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * react-native-web renders our `<Button>` (which wraps `Pressable`) as a\n * `<div role=\"button\">` without a tabindex. That's invisible to native focus\n * APIs in browsers AND jsdom. Poke a `tabindex=\"0\"` onto the node so\n * `.focus()` actually sets `document.activeElement`.\n *\n * Idempotent — only sets it when missing.\n */\nfunction ensureFocusable(node: HTMLElement | null): void {\n if (!node) {\n return;\n }\n if (node.hasAttribute('tabindex')) {\n return;\n }\n node.setAttribute('tabindex', '0');\n}\n\nconst KEYFRAMES_STYLE_ID = 'nori-alert-dialog-keyframes';\nconst KEYFRAMES_CSS = `\n@keyframes nori-alert-dialog-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-nori-alert-dialog-content] { animation: none !important; }\n}\n`;\n\nfunction ensureKeyframesInjected(): void {\n if (Platform.OS !== 'web') {\n return;\n }\n if (typeof document === 'undefined') {\n return;\n }\n if (document.getElementById(KEYFRAMES_STYLE_ID)) {\n return;\n }\n const style = document.createElement('style');\n style.id = KEYFRAMES_STYLE_ID;\n style.textContent = KEYFRAMES_CSS;\n document.head.appendChild(style);\n}\n\nexport type AlertDialogContentProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * The visible alert dialog surface — overlay + centered card. Renders only\n * while open. On web: traps focus inside, locks body scroll, restores focus\n * on close. Crucially, neither overlay click nor Escape closes — the user\n * MUST press an explicit Cancel/Action button.\n */\nexport const AlertDialogContent = ({ children, className, testID }: AlertDialogContentProps) => {\n const ctx = useAlertDialogContext('AlertDialogContent');\n const colors = useThemeColors();\n const scheme = useColorScheme();\n const contentRef = useRef<HTMLDivElement | null>(null);\n const overlayDomRef = useRef<HTMLElement | null>(null);\n const overlayStyle: ViewStyle = {\n ...OVERLAY_LAYOUT_BASE,\n padding: px(colors.spacing['4']),\n };\n const contentStyle: ViewStyle = {\n ...CONTENT_LAYOUT_BASE,\n borderRadius: px(colors.radius.xl),\n padding: px(colors.spacing['6']),\n gap: px(colors.spacing['3']),\n };\n // Two-phase mount: render overlay at scrim 0 / blur 0 first, then\n // flip to target values on the next frame so CSS transitions have a\n // start state to interpolate from. Same pattern as Dialog.\n const [entered, setEntered] = useState(false);\n useEffect(() => {\n if (Platform.OS !== 'web') {\n setEntered(true);\n return;\n }\n if (!ctx.open) {\n setEntered(false);\n return;\n }\n const id = requestAnimationFrame(() => setEntered(true));\n return () => cancelAnimationFrame(id);\n }, [ctx.open]);\n\n // Animated scrim + backdrop-filter — pushed onto the overlay's DOM\n // node directly because rn-web's style filter drops the\n // transition/backdrop-filter keys when passed via the View's `style`\n // prop. Web only; native uses the flat scrim baked into\n // OVERLAY_BASE_STYLE.\n useEffect(() => {\n if (Platform.OS !== 'web') {\n return;\n }\n const node = overlayDomRef.current;\n if (!node) {\n return;\n }\n node.style.transitionProperty = 'background-color, backdrop-filter, -webkit-backdrop-filter';\n node.style.transitionDuration = '150ms, 200ms, 200ms';\n node.style.transitionTimingFunction = 'ease-out';\n if (entered) {\n node.style.backgroundColor = SCRIM_COLOR;\n node.style.backdropFilter = `blur(${BLUR_AMOUNT}px)`;\n node.style.setProperty('-webkit-backdrop-filter', `blur(${BLUR_AMOUNT}px)`);\n } else {\n node.style.backgroundColor = 'rgba(0, 0, 0, 0)';\n node.style.backdropFilter = 'blur(0px)';\n node.style.setProperty('-webkit-backdrop-filter', 'blur(0px)');\n }\n }, [entered]);\n\n useEffect(() => {\n if (!ctx.open) {\n return;\n }\n if (Platform.OS !== 'web') {\n return;\n }\n if (typeof document === 'undefined') {\n return;\n }\n\n ensureKeyframesInjected();\n\n const previouslyFocused = document.activeElement as HTMLElement | null;\n\n // Lock body scroll. Preserve the previous inline value so we don't\n // clobber a consumer-set lock.\n const prevBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n\n // Initial focus: prefer the Cancel button (least destructive default).\n // Fall back to first focusable. Only fall back to the container if\n // there's nothing focusable at all (an alertdialog with no actions\n // is a misuse — we still want it to receive keydown for the trap).\n const focusInitial = () => {\n const node = contentRef.current;\n if (!node) {\n return;\n }\n // Make every focusable target reachable up front. RN-Web Pressables\n // render as `<div role=\"button\">` without tabindex; without this\n // poke, programmatic `.focus()` on them is a no-op.\n const focusable = node.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR);\n for (const el of focusable) {\n ensureFocusable(el);\n }\n const cancel = ctx.cancelRef.current;\n if (cancel?.focus) {\n ensureFocusable(cancel);\n cancel.focus();\n return;\n }\n const first = focusable[0];\n if (first) {\n first.focus();\n } else {\n node.setAttribute('tabindex', '-1');\n node.focus();\n }\n };\n focusInitial();\n\n // Focus trap only — Escape does NOT close (alert dialog contract).\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Tab') {\n return;\n }\n const node = contentRef.current;\n if (!node) {\n return;\n }\n // Don't filter by `offsetParent` here: jsdom always reports `null`\n // for it (no layout engine), which would collapse the trap to the\n // currently focused element only. AlertDialog's content surface is\n // tightly controlled; trust the selector.\n const focusable = Array.from(node.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR));\n if (focusable.length === 0) {\n event.preventDefault();\n return;\n }\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n if (!first || !last) {\n return;\n }\n // Make every focusable target reachable from jsdom too.\n for (const el of focusable) {\n ensureFocusable(el);\n }\n if (event.shiftKey) {\n if (document.activeElement === first || !node.contains(document.activeElement)) {\n event.preventDefault();\n last.focus();\n }\n } else if (document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n document.addEventListener('keydown', onKeyDown);\n\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n document.body.style.overflow = prevBodyOverflow;\n const restoreTo = ctx.triggerRef.current ?? previouslyFocused;\n restoreTo?.focus?.();\n };\n }, [ctx.open, ctx.triggerRef, ctx.cancelRef]);\n\n // RN Modal's `onRequestClose` fires on Android hardware back. We\n // intentionally make it a no-op: an alert dialog cannot be backed out\n // of without an explicit choice. A consumer that needs Android back to\n // mean \"cancel\" should wire it via their own action.\n const onRequestClose = useCallback(() => {\n /* intentional no-op — alert dialog requires explicit action */\n }, []);\n\n return (\n <Modal\n visible={ctx.open}\n transparent\n // Web: 'none' so RN's built-in fade doesn't fight our own\n // overlay/content transitions (its layer-level fade caused\n // backdrop-filter to \"snap in\" at the end on Dialog — same\n // failure mode applies here). Native keeps 'fade' since we\n // have no CSS transition path there.\n animationType={Platform.OS === 'web' ? 'none' : 'fade'}\n onRequestClose={onRequestClose}\n >\n {/* Native blur layer; renders nothing on web (CSS handles\n it) or when expo-blur isn't installed. */}\n <BlurBackdrop intensity={60} tint={scheme === 'dark' ? 'dark' : 'light'} style={StyleSheet.absoluteFill} />\n <View\n ref={(node) => {\n overlayDomRef.current = node as unknown as HTMLElement | null;\n }}\n accessibilityRole=\"none\"\n aria-hidden={true}\n style={overlayStyle}\n // Note: this is a <View>, not a <Pressable>. The overlay must NOT\n // dismiss on click for an alert dialog.\n >\n <View\n ref={(node) => {\n contentRef.current = node as unknown as HTMLDivElement | null;\n }}\n role=\"alertdialog\"\n accessibilityRole=\"alert\"\n aria-modal={true}\n aria-labelledby={ctx.titleId}\n aria-describedby={ctx.descriptionId}\n {...(testID !== undefined ? { testID } : {})}\n {...({ 'data-nori-alert-dialog-content': 'true' } as Record<string, string>)}\n className={cn('w-full max-w-md rounded-xl bg-semantic-background-elevated p-6 gap-3', className)}\n style={[contentStyle, { backgroundColor: colors.semantic.background.elevated }]}\n >\n <View\n className=\"flex-col gap-1.5\"\n style={{ flexDirection: 'column', gap: px(colors.spacing['2']) - 2 }}\n >\n {children}\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nexport type AlertDialogTextProps = {\n children?: ReactNode;\n className?: string;\n};\n\n/** Heading inside AlertDialogContent. Wires `aria-labelledby`. */\nexport const AlertDialogTitle = ({ children, className }: AlertDialogTextProps) => {\n const ctx = useAlertDialogContext('AlertDialogTitle');\n const colors = useThemeColors();\n return (\n <RNText\n nativeID={ctx.titleId}\n id={ctx.titleId}\n role=\"heading\"\n aria-level={2}\n className={cn('text-lg font-semibold text-semantic-text-default', className)}\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.display,\n fontSize: px(colors.fontSize.lg),\n fontWeight: colors.fontWeight.semibold as '600',\n }}\n >\n {children}\n </RNText>\n );\n};\n\n/** Body description inside AlertDialogContent. Wires `aria-describedby`. */\nexport const AlertDialogDescription = ({ children, className }: AlertDialogTextProps) => {\n const ctx = useAlertDialogContext('AlertDialogDescription');\n const colors = useThemeColors();\n return (\n <RNText\n nativeID={ctx.descriptionId}\n id={ctx.descriptionId}\n className={cn('text-sm text-semantic-text-muted', className)}\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n );\n};\n\nexport type AlertDialogActionProps = {\n /** Render the child as the action (Slot pattern). Default true. */\n asChild?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n /** Forwarded to the wrapped child / fallback Pressable. Fires before close. */\n onPress?: (event?: unknown) => void;\n};\n\n/**\n * The destructive / confirming action. Closes the dialog AND forwards\n * `onPress` to the consumer's handler so they can run the side effect.\n */\nexport const AlertDialogAction = ({ asChild = true, children, className, testID, onPress }: AlertDialogActionProps) => {\n const ctx = useAlertDialogContext('AlertDialogAction');\n const handle = useCallback(\n (event?: unknown) => {\n onPress?.(event);\n ctx.setOpen(false);\n },\n [ctx, onPress]\n );\n\n if (asChild && isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n // Wrap both event names so an HTML button (onClick) and an RN\n // Pressable / Button (onPress) both fire — and both still call the\n // child's own handler if present.\n const fire = (existing: ((e: unknown) => void) | undefined) => (event: unknown) => {\n existing?.(event);\n handle(event);\n };\n return (\n <Slot\n onClick={fire(child.props.onClick as ((e: unknown) => void) | undefined)}\n onPress={fire(child.props.onPress as ((e: unknown) => void) | undefined)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n onPress={handle}\n role=\"button\"\n accessibilityRole=\"button\"\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {wrapStringChildren(children)}\n </Pressable>\n );\n};\n\nexport type AlertDialogCancelProps = {\n /** Render the child as the cancel button (Slot pattern). Default true. */\n asChild?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n /** Forwarded to the wrapped child / fallback Pressable. Fires before close. */\n onPress?: (event?: unknown) => void;\n};\n\n/**\n * The cancel / dismiss action. Closes the dialog AND forwards `onPress`.\n * Receives initial focus inside `AlertDialogContent` — Cancel is the\n * least destructive default, so a stray Enter keypress can't fire the\n * destructive action.\n */\nexport const AlertDialogCancel = ({ asChild = true, children, className, testID, onPress }: AlertDialogCancelProps) => {\n const ctx = useAlertDialogContext('AlertDialogCancel');\n const handle = useCallback(\n (event?: unknown) => {\n onPress?.(event);\n ctx.setOpen(false);\n },\n [ctx, onPress]\n );\n\n if (asChild && isValidElement(children)) {\n const child = children as ReactElement<Record<string, unknown>>;\n const fire = (existing: ((e: unknown) => void) | undefined) => (event: unknown) => {\n existing?.(event);\n handle(event);\n };\n return (\n <Slot\n ref={(node: HTMLElement | null) => {\n ctx.cancelRef.current = node;\n }}\n onClick={fire(child.props.onClick as ((e: unknown) => void) | undefined)}\n onPress={fire(child.props.onPress as ((e: unknown) => void) | undefined)}\n {...(testID !== undefined ? { 'data-testid': testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {child}\n </Slot>\n );\n }\n\n return (\n <Pressable\n ref={(node) => {\n ctx.cancelRef.current = node as unknown as HTMLElement | null;\n }}\n onPress={handle}\n role=\"button\"\n accessibilityRole=\"button\"\n {...(testID !== undefined ? { testID } : {})}\n {...(className !== undefined ? { className } : {})}\n >\n {wrapStringChildren(children)}\n </Pressable>\n );\n};\n\nexport type AlertDialogFooterProps = {\n children?: ReactNode;\n className?: string;\n};\n\n/** Convenience row for action buttons (right-aligned). */\nexport const AlertDialogFooter = ({ children, className }: AlertDialogFooterProps) => {\n const colors = useThemeColors();\n return (\n <View\n className={cn('mt-4 flex-row items-center justify-end gap-2', className)}\n style={{\n marginTop: px(colors.spacing['4']),\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'flex-end',\n gap: px(colors.spacing['2']),\n }}\n >\n {children}\n </View>\n );\n};\n\n/**\n * Public `AlertDialog` value — the root function plus its `.Trigger`,\n * `.Content`, `.Title`, `.Description`, `.Footer`, `.Action`, and `.Cancel`\n * static members. `Object.assign` produces a value whose inferred type carries\n * the static properties, so `.d.ts` consumers can write `<AlertDialog.Content>`\n * without a separate import.\n */\nexport const AlertDialog = Object.assign(AlertDialogRoot, {\n Trigger: AlertDialogTrigger,\n Content: AlertDialogContent,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Footer: AlertDialogFooter,\n Action: AlertDialogAction,\n Cancel: AlertDialogCancel,\n});\n"]}
@@ -1,6 +1,6 @@
1
- import { cn } from './chunk-CHXHRJNZ.js';
2
1
  import { px } from './chunk-5A2QOOVN.js';
3
2
  import { useThemeColors } from './chunk-R5JMDDCB.js';
3
+ import { cn } from './chunk-CHXHRJNZ.js';
4
4
  import { __name } from './chunk-WCQVDF3K.js';
5
5
  import { createContext, useRef, useEffect, useCallback, useState, useMemo, useContext } from 'react';
6
6
  import { Pressable, View, Text } from 'react-native';
@@ -272,5 +272,5 @@ var Radio = Object.assign(RadioOption, {
272
272
  });
273
273
 
274
274
  export { Radio };
275
- //# sourceMappingURL=chunk-C6TRLHMW.js.map
276
- //# sourceMappingURL=chunk-C6TRLHMW.js.map
275
+ //# sourceMappingURL=chunk-UKDDK42K.js.map
276
+ //# sourceMappingURL=chunk-UKDDK42K.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Radio/Radio.tsx"],"names":["RNText"],"mappings":";;;;;;;;AAkCA,IAAM,iBAAA,GAAoB,cAA6C,IAAI,CAAA;AAE3E,IAAM,uCAAuB,MAAA,CAAA,MAA8B;AACvD,EAAA,MAAM,GAAA,GAAM,WAAW,iBAAiB,CAAA;AACxC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,MAAM,kDAAkD,CAAA;AAAA,EACtE;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EAN6B,sBAAA,CAAA;AAgE7B,IAAM,eAAA,GAA6B,EAAE,aAAA,EAAe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AAC,IAAA,EAAA,EAAK,OAAO,aAAA,EAAgB,QAAA,EAAA,QAAA,uBAAY,IAAA,EAAA,EAAK,KAAA,EAAO,aAAA,EAAe,CAAA,GAAK,IAAA,EAAK,CAAA;AAAA,QAC7E,QAAA,KACI,UAAU,MAAA,mBACP,GAAA;AAAA,UAACA,IAAA;AAAA,UAAA;AAAA,YACG,KAAA,EAAO;AAAA,cACH,KAAA,EAAO,MAAA,CAAO,QAAA,CAAS,IAAA,CAAK,OAAA;AAAA,cAC5B,UAAA,EAAY,OAAO,UAAA,CAAW,IAAA;AAAA,cAC9B,QAAA,EAAU,EAAA,CAAG,MAAA,CAAO,QAAA,CAAS,EAAE;AAAA,aACnC;AAAA,YAEC,QAAA,EAAA;AAAA;AAAA,SACL,GACA,IAAA;AAAA;AAAA;AAAA,GACZ;AAER,CAAA,EAxEoB,aAAA,CAAA;AA6EpB,SAAS,aAAA,CAAc,KAA6B,KAAA,EAAwB;AAQxE,EAAA,OAAO,IAAA;AACX;AATS,MAAA,CAAA,aAAA,EAAA,eAAA,CAAA;AAmBF,IAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,WAAA,EAAa;AAAA,EAC5C,KAAA,EAAO;AACX,CAAC","file":"chunk-C6TRLHMW.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n type KeyboardEvent,\n type ReactNode,\n type RefObject,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { ViewStyle } from 'react-native';\nimport { Pressable, Text as RNText, View } from 'react-native';\nimport { px } from '../../theme/px';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\n\nexport type RadioGroupOrientation = 'horizontal' | 'vertical';\n\ntype RadioRefMap = Map<string, RefObject<HTMLElement | null>>;\n\ntype RadioGroupContextValue = {\n value: string | undefined;\n select: (next: string) => void;\n disabled: boolean;\n orientation: RadioGroupOrientation;\n name: string | undefined;\n register: (value: string, ref: RefObject<HTMLElement | null>) => void;\n unregister: (value: string) => void;\n};\n\nconst RadioGroupContext = createContext<RadioGroupContextValue | null>(null);\n\nconst useRadioGroupContext = (): RadioGroupContextValue => {\n const ctx = useContext(RadioGroupContext);\n if (!ctx) {\n throw new Error('<Radio> must be rendered inside a <Radio.Group>.');\n }\n return ctx;\n};\n\nexport type RadioGroupProps = {\n /** Controlled selected value. */\n value?: string;\n /** Uncontrolled initial value. */\n defaultValue?: string;\n /** Fires with the new value when the selection changes. */\n onChange?: (next: string) => void;\n /** When true, every Radio inside is non-interactive. Individual Radios can also opt in. */\n disabled?: boolean;\n /**\n * Layout orientation. Drives the keyboard nav axis (Down/Up for vertical,\n * Right/Left for horizontal — both pairs work in either orientation as a\n * usability bonus).\n * @defaultValue 'vertical'\n */\n orientation?: RadioGroupOrientation;\n /** HTML `name` for form integration on web. Optional but recommended. */\n name?: string;\n children?: ReactNode;\n className?: string;\n testID?: string;\n // ── Accessibility / Field.Control injection ──────────────────────────────\n /** HTML id forwarded to the radiogroup container. Injected by Field.Control. */\n id?: string;\n /** React Native equivalent of `id`. Injected by Field.Control. */\n nativeID?: string;\n /** Points to the element that labels this group. Injected by Field.Control. */\n 'aria-labelledby'?: string;\n /** React Native equivalent of `aria-labelledby`. Injected by Field.Control. */\n accessibilityLabelledBy?: string;\n /** Points to description / error elements. Injected by Field.Control. */\n 'aria-describedby'?: string;\n /** React Native equivalent of `aria-describedby`. Injected by Field.Control. */\n accessibilityDescribedBy?: string;\n /** Marks the group as invalid. Injected by Field.Control when Field has an error. */\n 'aria-invalid'?: boolean;\n /** Marks the group as required. Injected by Field.Control when Field is required. */\n 'aria-required'?: boolean;\n};\n\nexport type RadioProps = {\n /** Unique value within the group. Required. */\n value: string;\n /** Visible label that doubles as the accessibility label. */\n label?: string;\n /** Disable just this option. */\n disabled?: boolean;\n /** Custom content rendered next to the radio dot. Overrides `label`. */\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n// Layout-only base; theme-driven gap is merged inside Radio. The dot\n// dimensions are component-density literals — not from theme — because the\n// radio dot has a fixed visual ramp independent of the spacing scale.\nconst ROW_LAYOUT_BASE: ViewStyle = { flexDirection: 'row', alignItems: 'center' };\nconst DOT_OUTER_BASE: ViewStyle = {\n width: 18, // component-density literal — not from theme\n height: 18, // component-density literal — not from theme\n borderRadius: 9, // perfect circle of dot diameter — not from theme\n borderWidth: 1.5,\n alignItems: 'center',\n justifyContent: 'center',\n};\nconst DOT_INNER_BASE: ViewStyle = {\n width: 8, // component-density literal — not from theme\n height: 8, // component-density literal — not from theme\n borderRadius: 4, // perfect circle — not from theme\n};\n\n/**\n * Single-selection group of radio buttons. Container owns the value;\n * children declare their `value` and any extra disabled state.\n *\n * Keyboard nav follows the WAI-ARIA radiogroup pattern:\n * - Tab into the group → focus lands on the selected option (or the\n * first when nothing is selected). Tab out leaves the group.\n * - ArrowDown / ArrowRight → next option (wraps).\n * - ArrowUp / ArrowLeft → previous option (wraps).\n * - Home / End → first / last.\n * - Selection follows focus, so an arrow key both moves focus and\n * activates the option (the standard radiogroup behavior).\n */\nexport const RadioGroup = ({\n value,\n defaultValue,\n onChange,\n disabled = false,\n orientation = 'vertical',\n name,\n children,\n className,\n testID,\n id,\n nativeID,\n 'aria-labelledby': ariaLabelledBy,\n accessibilityLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n accessibilityDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-required': ariaRequired,\n}: RadioGroupProps) => {\n const [inner, setInner] = useState<string | undefined>(defaultValue);\n const isControlled = value !== undefined;\n const current = isControlled ? value : inner;\n\n const refs = useRef<RadioRefMap>(new Map());\n const orderRef = useRef<string[]>([]);\n\n const register = useCallback((v: string, ref: RefObject<HTMLElement | null>) => {\n refs.current.set(v, ref);\n if (!orderRef.current.includes(v)) {\n orderRef.current.push(v);\n }\n }, []);\n\n const unregister = useCallback((v: string) => {\n refs.current.delete(v);\n orderRef.current = orderRef.current.filter((x) => x !== v);\n }, []);\n\n const select = useCallback(\n (next: string) => {\n if (disabled) {\n return;\n }\n if (!isControlled) {\n setInner(next);\n }\n onChange?.(next);\n },\n [disabled, isControlled, onChange]\n );\n\n const focusValue = useCallback((next: string) => {\n const ref = refs.current.get(next);\n ref?.current?.focus?.();\n }, []);\n\n const moveBy = useCallback(\n (offset: 1 | -1) => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n const idx = current ? order.indexOf(current) : -1;\n const start = idx === -1 ? (offset === 1 ? -1 : 0) : idx;\n const len = order.length;\n const next = order[(start + offset + len) % len];\n if (!next) {\n return;\n }\n select(next);\n focusValue(next);\n },\n [current, focusValue, select]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowRight': {\n event.preventDefault();\n moveBy(1);\n return;\n }\n case 'ArrowUp':\n case 'ArrowLeft': {\n event.preventDefault();\n moveBy(-1);\n return;\n }\n case 'Home': {\n event.preventDefault();\n const first = order[0];\n if (first) {\n select(first);\n focusValue(first);\n }\n return;\n }\n case 'End': {\n event.preventDefault();\n const last = order[order.length - 1];\n if (last) {\n select(last);\n focusValue(last);\n }\n return;\n }\n }\n },\n [focusValue, moveBy, select]\n );\n\n const ctxValue = useMemo<RadioGroupContextValue>(\n () => ({ value: current, select, disabled, orientation, name, register, unregister }),\n [current, select, disabled, orientation, name, register, unregister]\n );\n\n // RN's View doesn't model onKeyDown in its TS surface but RN-Web passes\n // it through to the underlying div. Cast at the spread boundary.\n const groupProps: Record<string, unknown> = {\n role: 'radiogroup',\n accessibilityRole: 'radiogroup',\n 'aria-orientation': orientation,\n 'aria-disabled': disabled || undefined,\n onKeyDown: handleKeyDown,\n ...(testID !== undefined ? { testID } : {}),\n ...(id !== undefined ? { id } : {}),\n ...(nativeID !== undefined ? { nativeID } : {}),\n ...(ariaLabelledBy !== undefined ? { 'aria-labelledby': ariaLabelledBy } : {}),\n ...(accessibilityLabelledBy !== undefined ? { accessibilityLabelledBy } : {}),\n ...(ariaDescribedBy !== undefined ? { 'aria-describedby': ariaDescribedBy } : {}),\n ...(accessibilityDescribedBy !== undefined ? { accessibilityDescribedBy } : {}),\n ...(ariaInvalid ? { 'aria-invalid': true } : {}),\n ...(ariaRequired ? { 'aria-required': true } : {}),\n };\n\n return (\n <RadioGroupContext.Provider value={ctxValue}>\n <RadioGroupViewport\n groupProps={groupProps}\n orientation={orientation}\n disabled={disabled}\n {...(className !== undefined ? { className } : {})}\n >\n {children}\n </RadioGroupViewport>\n </RadioGroupContext.Provider>\n );\n};\n\n// Inner view so we can call useThemeColors() to source the orientation\n// gap from the spacing token scale (the parent owns hooks for state).\nconst RadioGroupViewport = ({\n groupProps,\n orientation,\n disabled,\n className,\n children,\n}: {\n groupProps: Record<string, unknown>;\n orientation: RadioGroupOrientation;\n disabled: boolean;\n className?: string;\n children?: ReactNode;\n}) => {\n const colors = useThemeColors();\n return (\n <View\n {...groupProps}\n className={cn(\n orientation === 'horizontal' ? 'flex-row gap-4' : 'flex-col gap-3',\n disabled ? 'opacity-60' : undefined,\n className\n )}\n style={[\n orientation === 'horizontal'\n ? { flexDirection: 'row', gap: px(colors.spacing['4']) }\n : { flexDirection: 'column', gap: px(colors.spacing['3']) },\n disabled ? { opacity: 0.6 } : null,\n ]}\n >\n {children}\n </View>\n );\n};\n\n/**\n * One option inside a `<Radio.Group>`. Must be rendered inside one — throws\n * with a clear message if not.\n */\nconst RadioOption = ({ value, label, disabled, children, className, testID }: RadioProps) => {\n const ctx = useRadioGroupContext();\n const colors = useThemeColors();\n const ownRef = useRef<HTMLElement | null>(null);\n const selected = ctx.value === value;\n const isDisabled = disabled || ctx.disabled;\n\n useEffect(() => {\n ctx.register(value, ownRef);\n return () => ctx.unregister(value);\n }, [ctx, value]);\n\n const onPress = useCallback(() => {\n if (isDisabled) {\n return;\n }\n ctx.select(value);\n }, [ctx, value, isDisabled]);\n\n // Roving tabindex: only the selected option (or the first when nothing\n // is selected) participates in the tab order.\n const tabIndex = selected || (ctx.value === undefined && isFirstOption(ctx, value)) ? 0 : -1;\n\n const accessibilityLabel = label ?? value;\n\n const radioProps: Record<string, unknown> = {\n ref: (node: HTMLElement | null) => {\n ownRef.current = node;\n },\n role: 'radio',\n accessibilityRole: 'radio',\n 'aria-checked': selected,\n accessibilityState: { checked: selected, disabled: Boolean(isDisabled) },\n accessibilityLabel,\n 'aria-label': accessibilityLabel,\n tabIndex,\n onPress,\n ...(isDisabled ? { 'aria-disabled': true, disabled: true } : {}),\n ...(testID !== undefined ? { testID } : {}),\n ...(ctx.name ? { name: ctx.name } : {}),\n };\n\n const dotOuterStyle: ViewStyle = {\n ...DOT_OUTER_BASE,\n backgroundColor: colors.semantic.background.elevated,\n borderColor: selected ? colors.semantic.interactive.primary : colors.color.neutral['400'],\n };\n const dotInnerStyle: ViewStyle = { ...DOT_INNER_BASE, backgroundColor: colors.semantic.interactive.primary };\n\n const rowStyle: ViewStyle = { ...ROW_LAYOUT_BASE, gap: px(colors.spacing['2']) };\n\n return (\n <Pressable\n {...radioProps}\n className={cn('flex-row items-center gap-2', isDisabled ? 'opacity-60' : undefined, className)}\n style={[rowStyle, isDisabled ? { opacity: 0.6 } : null]}\n >\n <View style={dotOuterStyle}>{selected ? <View style={dotInnerStyle} /> : null}</View>\n {children ??\n (label !== undefined ? (\n <RNText\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.md),\n }}\n >\n {label}\n </RNText>\n ) : null)}\n </Pressable>\n );\n};\n\n// Tiny helper: when no value is selected yet, the first registered Radio is\n// the tabbable one. This is computed inside Radio (not the context) so we\n// don't have to re-render every Radio whenever the order changes.\nfunction isFirstOption(ctx: RadioGroupContextValue, value: string): boolean {\n // We only have access to register/unregister; Radio doesn't get a peek\n // at the order list. The simple-but-correct fallback: every Radio renders\n // tabIndex=0 when value is undefined, which is harmless for one-radio\n // groups and equivalent to the standard \"tab into the first\" for\n // multi-radio groups (browsers honor the first tabIndex=0 they hit).\n void ctx;\n void value;\n return true;\n}\n\n/**\n * Public `Radio` value — the per-option component plus its `.Group` static\n * member (the cluster). Use `<Radio.Group>` to wrap a list of `<Radio />`s.\n *\n * `Object.assign` produces a value whose inferred type carries the static\n * properties, so `.d.ts` consumers can write `<Radio.Group>` without a\n * separate import.\n */\nexport const Radio = Object.assign(RadioOption, {\n Group: RadioGroup,\n});\n"]}
1
+ {"version":3,"sources":["../src/components/Radio/Radio.tsx"],"names":["RNText"],"mappings":";;;;;;;;AAkCA,IAAM,iBAAA,GAAoB,cAA6C,IAAI,CAAA;AAE3E,IAAM,uCAAuB,MAAA,CAAA,MAA8B;AACvD,EAAA,MAAM,GAAA,GAAM,WAAW,iBAAiB,CAAA;AACxC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,MAAM,kDAAkD,CAAA;AAAA,EACtE;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EAN6B,sBAAA,CAAA;AAgE7B,IAAM,eAAA,GAA6B,EAAE,aAAA,EAAe,KAAA,EAAO,YAAY,QAAA,EAAS;AAChF,IAAM,cAAA,GAA4B;AAAA,EAC9B,KAAA,EAAO,EAAA;AAAA;AAAA,EACP,MAAA,EAAQ,EAAA;AAAA;AAAA,EACR,YAAA,EAAc,CAAA;AAAA;AAAA,EACd,WAAA,EAAa,GAAA;AAAA,EACb,UAAA,EAAY,QAAA;AAAA,EACZ,cAAA,EAAgB;AACpB,CAAA;AACA,IAAM,cAAA,GAA4B;AAAA,EAC9B,KAAA,EAAO,CAAA;AAAA;AAAA,EACP,MAAA,EAAQ,CAAA;AAAA;AAAA,EACR,YAAA,EAAc;AAAA;AAClB,CAAA;AAeO,IAAM,6BAAa,MAAA,CAAA,CAAC;AAAA,EACvB,KAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA,GAAW,KAAA;AAAA,EACX,WAAA,GAAc,UAAA;AAAA,EACd,IAAA;AAAA,E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AA6B,KAAA,EAAwB;AAQxE,EAAA,OAAO,IAAA;AACX;AATS,MAAA,CAAA,aAAA,EAAA,eAAA,CAAA;AAmBF,IAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,WAAA,EAAa;AAAA,EAC5C,KAAA,EAAO;AACX,CAAC","file":"chunk-UKDDK42K.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n type KeyboardEvent,\n type ReactNode,\n type RefObject,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { ViewStyle } from 'react-native';\nimport { Pressable, Text as RNText, View } from 'react-native';\nimport { px } from '../../theme/px';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\n\nexport type RadioGroupOrientation = 'horizontal' | 'vertical';\n\ntype RadioRefMap = Map<string, RefObject<HTMLElement | null>>;\n\ntype RadioGroupContextValue = {\n value: string | undefined;\n select: (next: string) => void;\n disabled: boolean;\n orientation: RadioGroupOrientation;\n name: string | undefined;\n register: (value: string, ref: RefObject<HTMLElement | null>) => void;\n unregister: (value: string) => void;\n};\n\nconst RadioGroupContext = createContext<RadioGroupContextValue | null>(null);\n\nconst useRadioGroupContext = (): RadioGroupContextValue => {\n const ctx = useContext(RadioGroupContext);\n if (!ctx) {\n throw new Error('<Radio> must be rendered inside a <Radio.Group>.');\n }\n return ctx;\n};\n\nexport type RadioGroupProps = {\n /** Controlled selected value. */\n value?: string;\n /** Uncontrolled initial value. */\n defaultValue?: string;\n /** Fires with the new value when the selection changes. */\n onChange?: (next: string) => void;\n /** When true, every Radio inside is non-interactive. Individual Radios can also opt in. */\n disabled?: boolean;\n /**\n * Layout orientation. Drives the keyboard nav axis (Down/Up for vertical,\n * Right/Left for horizontal — both pairs work in either orientation as a\n * usability bonus).\n * @defaultValue 'vertical'\n */\n orientation?: RadioGroupOrientation;\n /** HTML `name` for form integration on web. Optional but recommended. */\n name?: string;\n children?: ReactNode;\n className?: string;\n testID?: string;\n // ── Accessibility / Field.Control injection ──────────────────────────────\n /** HTML id forwarded to the radiogroup container. Injected by Field.Control. */\n id?: string;\n /** React Native equivalent of `id`. Injected by Field.Control. */\n nativeID?: string;\n /** Points to the element that labels this group. Injected by Field.Control. */\n 'aria-labelledby'?: string;\n /** React Native equivalent of `aria-labelledby`. Injected by Field.Control. */\n accessibilityLabelledBy?: string;\n /** Points to description / error elements. Injected by Field.Control. */\n 'aria-describedby'?: string;\n /** React Native equivalent of `aria-describedby`. Injected by Field.Control. */\n accessibilityDescribedBy?: string;\n /** Marks the group as invalid. Injected by Field.Control when Field has an error. */\n 'aria-invalid'?: boolean;\n /** Marks the group as required. Injected by Field.Control when Field is required. */\n 'aria-required'?: boolean;\n};\n\nexport type RadioProps = {\n /** Unique value within the group. Required. */\n value: string;\n /** Visible label that doubles as the accessibility label. */\n label?: string;\n /** Disable just this option. */\n disabled?: boolean;\n /** Custom content rendered next to the radio dot. Overrides `label`. */\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n// Layout-only base; theme-driven gap is merged inside Radio. The dot\n// dimensions are component-density literals — not from theme — because the\n// radio dot has a fixed visual ramp independent of the spacing scale.\nconst ROW_LAYOUT_BASE: ViewStyle = { flexDirection: 'row', alignItems: 'center' };\nconst DOT_OUTER_BASE: ViewStyle = {\n width: 18, // component-density literal — not from theme\n height: 18, // component-density literal — not from theme\n borderRadius: 9, // perfect circle of dot diameter — not from theme\n borderWidth: 1.5,\n alignItems: 'center',\n justifyContent: 'center',\n};\nconst DOT_INNER_BASE: ViewStyle = {\n width: 8, // component-density literal — not from theme\n height: 8, // component-density literal — not from theme\n borderRadius: 4, // perfect circle — not from theme\n};\n\n/**\n * Single-selection group of radio buttons. Container owns the value;\n * children declare their `value` and any extra disabled state.\n *\n * Keyboard nav follows the WAI-ARIA radiogroup pattern:\n * - Tab into the group → focus lands on the selected option (or the\n * first when nothing is selected). Tab out leaves the group.\n * - ArrowDown / ArrowRight → next option (wraps).\n * - ArrowUp / ArrowLeft → previous option (wraps).\n * - Home / End → first / last.\n * - Selection follows focus, so an arrow key both moves focus and\n * activates the option (the standard radiogroup behavior).\n */\nexport const RadioGroup = ({\n value,\n defaultValue,\n onChange,\n disabled = false,\n orientation = 'vertical',\n name,\n children,\n className,\n testID,\n id,\n nativeID,\n 'aria-labelledby': ariaLabelledBy,\n accessibilityLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n accessibilityDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-required': ariaRequired,\n}: RadioGroupProps) => {\n const [inner, setInner] = useState<string | undefined>(defaultValue);\n const isControlled = value !== undefined;\n const current = isControlled ? value : inner;\n\n const refs = useRef<RadioRefMap>(new Map());\n const orderRef = useRef<string[]>([]);\n\n const register = useCallback((v: string, ref: RefObject<HTMLElement | null>) => {\n refs.current.set(v, ref);\n if (!orderRef.current.includes(v)) {\n orderRef.current.push(v);\n }\n }, []);\n\n const unregister = useCallback((v: string) => {\n refs.current.delete(v);\n orderRef.current = orderRef.current.filter((x) => x !== v);\n }, []);\n\n const select = useCallback(\n (next: string) => {\n if (disabled) {\n return;\n }\n if (!isControlled) {\n setInner(next);\n }\n onChange?.(next);\n },\n [disabled, isControlled, onChange]\n );\n\n const focusValue = useCallback((next: string) => {\n const ref = refs.current.get(next);\n ref?.current?.focus?.();\n }, []);\n\n const moveBy = useCallback(\n (offset: 1 | -1) => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n const idx = current ? order.indexOf(current) : -1;\n const start = idx === -1 ? (offset === 1 ? -1 : 0) : idx;\n const len = order.length;\n const next = order[(start + offset + len) % len];\n if (!next) {\n return;\n }\n select(next);\n focusValue(next);\n },\n [current, focusValue, select]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowRight': {\n event.preventDefault();\n moveBy(1);\n return;\n }\n case 'ArrowUp':\n case 'ArrowLeft': {\n event.preventDefault();\n moveBy(-1);\n return;\n }\n case 'Home': {\n event.preventDefault();\n const first = order[0];\n if (first) {\n select(first);\n focusValue(first);\n }\n return;\n }\n case 'End': {\n event.preventDefault();\n const last = order[order.length - 1];\n if (last) {\n select(last);\n focusValue(last);\n }\n return;\n }\n }\n },\n [focusValue, moveBy, select]\n );\n\n const ctxValue = useMemo<RadioGroupContextValue>(\n () => ({ value: current, select, disabled, orientation, name, register, unregister }),\n [current, select, disabled, orientation, name, register, unregister]\n );\n\n // RN's View doesn't model onKeyDown in its TS surface but RN-Web passes\n // it through to the underlying div. Cast at the spread boundary.\n const groupProps: Record<string, unknown> = {\n role: 'radiogroup',\n accessibilityRole: 'radiogroup',\n 'aria-orientation': orientation,\n 'aria-disabled': disabled || undefined,\n onKeyDown: handleKeyDown,\n ...(testID !== undefined ? { testID } : {}),\n ...(id !== undefined ? { id } : {}),\n ...(nativeID !== undefined ? { nativeID } : {}),\n ...(ariaLabelledBy !== undefined ? { 'aria-labelledby': ariaLabelledBy } : {}),\n ...(accessibilityLabelledBy !== undefined ? { accessibilityLabelledBy } : {}),\n ...(ariaDescribedBy !== undefined ? { 'aria-describedby': ariaDescribedBy } : {}),\n ...(accessibilityDescribedBy !== undefined ? { accessibilityDescribedBy } : {}),\n ...(ariaInvalid ? { 'aria-invalid': true } : {}),\n ...(ariaRequired ? { 'aria-required': true } : {}),\n };\n\n return (\n <RadioGroupContext.Provider value={ctxValue}>\n <RadioGroupViewport\n groupProps={groupProps}\n orientation={orientation}\n disabled={disabled}\n {...(className !== undefined ? { className } : {})}\n >\n {children}\n </RadioGroupViewport>\n </RadioGroupContext.Provider>\n );\n};\n\n// Inner view so we can call useThemeColors() to source the orientation\n// gap from the spacing token scale (the parent owns hooks for state).\nconst RadioGroupViewport = ({\n groupProps,\n orientation,\n disabled,\n className,\n children,\n}: {\n groupProps: Record<string, unknown>;\n orientation: RadioGroupOrientation;\n disabled: boolean;\n className?: string;\n children?: ReactNode;\n}) => {\n const colors = useThemeColors();\n return (\n <View\n {...groupProps}\n className={cn(\n orientation === 'horizontal' ? 'flex-row gap-4' : 'flex-col gap-3',\n disabled ? 'opacity-60' : undefined,\n className\n )}\n style={[\n orientation === 'horizontal'\n ? { flexDirection: 'row', gap: px(colors.spacing['4']) }\n : { flexDirection: 'column', gap: px(colors.spacing['3']) },\n disabled ? { opacity: 0.6 } : null,\n ]}\n >\n {children}\n </View>\n );\n};\n\n/**\n * One option inside a `<Radio.Group>`. Must be rendered inside one — throws\n * with a clear message if not.\n */\nconst RadioOption = ({ value, label, disabled, children, className, testID }: RadioProps) => {\n const ctx = useRadioGroupContext();\n const colors = useThemeColors();\n const ownRef = useRef<HTMLElement | null>(null);\n const selected = ctx.value === value;\n const isDisabled = disabled || ctx.disabled;\n\n useEffect(() => {\n ctx.register(value, ownRef);\n return () => ctx.unregister(value);\n }, [ctx, value]);\n\n const onPress = useCallback(() => {\n if (isDisabled) {\n return;\n }\n ctx.select(value);\n }, [ctx, value, isDisabled]);\n\n // Roving tabindex: only the selected option (or the first when nothing\n // is selected) participates in the tab order.\n const tabIndex = selected || (ctx.value === undefined && isFirstOption(ctx, value)) ? 0 : -1;\n\n const accessibilityLabel = label ?? value;\n\n const radioProps: Record<string, unknown> = {\n ref: (node: HTMLElement | null) => {\n ownRef.current = node;\n },\n role: 'radio',\n accessibilityRole: 'radio',\n 'aria-checked': selected,\n accessibilityState: { checked: selected, disabled: Boolean(isDisabled) },\n accessibilityLabel,\n 'aria-label': accessibilityLabel,\n tabIndex,\n onPress,\n ...(isDisabled ? { 'aria-disabled': true, disabled: true } : {}),\n ...(testID !== undefined ? { testID } : {}),\n ...(ctx.name ? { name: ctx.name } : {}),\n };\n\n const dotOuterStyle: ViewStyle = {\n ...DOT_OUTER_BASE,\n backgroundColor: colors.semantic.background.elevated,\n borderColor: selected ? colors.semantic.interactive.primary : colors.color.neutral['400'],\n };\n const dotInnerStyle: ViewStyle = { ...DOT_INNER_BASE, backgroundColor: colors.semantic.interactive.primary };\n\n const rowStyle: ViewStyle = { ...ROW_LAYOUT_BASE, gap: px(colors.spacing['2']) };\n\n return (\n <Pressable\n {...radioProps}\n className={cn('flex-row items-center gap-2', isDisabled ? 'opacity-60' : undefined, className)}\n style={[rowStyle, isDisabled ? { opacity: 0.6 } : null]}\n >\n <View style={dotOuterStyle}>{selected ? <View style={dotInnerStyle} /> : null}</View>\n {children ??\n (label !== undefined ? (\n <RNText\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.md),\n }}\n >\n {label}\n </RNText>\n ) : null)}\n </Pressable>\n );\n};\n\n// Tiny helper: when no value is selected yet, the first registered Radio is\n// the tabbable one. This is computed inside Radio (not the context) so we\n// don't have to re-render every Radio whenever the order changes.\nfunction isFirstOption(ctx: RadioGroupContextValue, value: string): boolean {\n // We only have access to register/unregister; Radio doesn't get a peek\n // at the order list. The simple-but-correct fallback: every Radio renders\n // tabIndex=0 when value is undefined, which is harmless for one-radio\n // groups and equivalent to the standard \"tab into the first\" for\n // multi-radio groups (browsers honor the first tabIndex=0 they hit).\n void ctx;\n void value;\n return true;\n}\n\n/**\n * Public `Radio` value — the per-option component plus its `.Group` static\n * member (the cluster). Use `<Radio.Group>` to wrap a list of `<Radio />`s.\n *\n * `Object.assign` produces a value whose inferred type carries the static\n * properties, so `.d.ts` consumers can write `<Radio.Group>` without a\n * separate import.\n */\nexport const Radio = Object.assign(RadioOption, {\n Group: RadioGroup,\n});\n"]}
@@ -1,4 +1,4 @@
1
- import { TextInput } from './chunk-EFK7726V.js';
1
+ import { TextInput } from './chunk-V75O7QQO.js';
2
2
  import { __name } from './chunk-WCQVDF3K.js';
3
3
  import { jsx } from 'nativewind/jsx-runtime';
4
4
 
@@ -9,5 +9,5 @@ var TextArea = /* @__PURE__ */ __name(({ numberOfLines = 4, resize = "vertical",
9
9
  }, "TextArea");
10
10
 
11
11
  export { TextArea };
12
- //# sourceMappingURL=chunk-UPVNZPFV.js.map
13
- //# sourceMappingURL=chunk-UPVNZPFV.js.map
12
+ //# sourceMappingURL=chunk-USFXANEU.js.map
13
+ //# sourceMappingURL=chunk-USFXANEU.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";;;;AAuBO,IAAM,QAAA,mBAAW,MAAA,CAAA,CAAC,EAAE,aAAA,GAAgB,CAAA,EAAG,SAAS,UAAA,EAAY,KAAA,EAAO,GAAG,IAAA,EAAK,KAAqB;AAInG,EAAA,MAAM,WAAA,GAAc,EAAE,MAAA,EAAO;AAC7B,EAAA,MAAM,SAAS,KAAA,KAAU,MAAA,GAAY,WAAA,GAAc,CAAC,aAAa,KAAK,CAAA;AACtE,EAAA,uBAAO,GAAA,CAAC,aAAU,SAAA,EAAS,IAAA,EAAC,eAA+B,GAAG,IAAA,EAAM,OAAO,MAAA,EAAQ,CAAA;AACvF,CAAA,EAPwB,UAAA","file":"chunk-UPVNZPFV.js","sourcesContent":["import type { TextStyle } from 'react-native';\nimport type { TextInputProps } from '../TextInput';\nimport { TextInput } from '../TextInput';\n\nexport type TextAreaResize = 'none' | 'vertical' | 'horizontal' | 'both';\n\nexport type TextAreaProps = TextInputProps & {\n /**\n * On web, controls the underlying `<textarea>`'s resize handle. Ignored\n * on native (where height is determined by `numberOfLines`).\n * @defaultValue 'vertical'\n */\n resize?: TextAreaResize;\n};\n\n/**\n * Multi-line text input. Thin wrapper over TextInput that fixes `multiline=true`\n * and provides a sensible default for `numberOfLines`.\n *\n * The web textarea is vertically resizable by default — set `resize=\"none\"`\n * to lock it. On native, the prop is a no-op since RN's `<TextInput multiline>`\n * sizes from `numberOfLines`.\n */\nexport const TextArea = ({ numberOfLines = 4, resize = 'vertical', style, ...rest }: TextAreaProps) => {\n // `resize` isn't part of RN's TextStyle but react-native-web passes\n // unknown style props through to the DOM <textarea>, so this lands\n // on the right element on web and is silently ignored on native.\n const resizeStyle = { resize } as unknown as TextStyle;\n const merged = style === undefined ? resizeStyle : [resizeStyle, style];\n return <TextInput multiline numberOfLines={numberOfLines} {...rest} style={merged} />;\n};\n"]}
1
+ {"version":3,"sources":["../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";;;;AAuBO,IAAM,QAAA,mBAAW,MAAA,CAAA,CAAC,EAAE,aAAA,GAAgB,CAAA,EAAG,SAAS,UAAA,EAAY,KAAA,EAAO,GAAG,IAAA,EAAK,KAAqB;AAInG,EAAA,MAAM,WAAA,GAAc,EAAE,MAAA,EAAO;AAC7B,EAAA,MAAM,SAAS,KAAA,KAAU,MAAA,GAAY,WAAA,GAAc,CAAC,aAAa,KAAK,CAAA;AACtE,EAAA,uBAAO,GAAA,CAAC,aAAU,SAAA,EAAS,IAAA,EAAC,eAA+B,GAAG,IAAA,EAAM,OAAO,MAAA,EAAQ,CAAA;AACvF,CAAA,EAPwB,UAAA","file":"chunk-USFXANEU.js","sourcesContent":["import type { TextStyle } from 'react-native';\nimport type { TextInputProps } from '../TextInput';\nimport { TextInput } from '../TextInput';\n\nexport type TextAreaResize = 'none' | 'vertical' | 'horizontal' | 'both';\n\nexport type TextAreaProps = TextInputProps & {\n /**\n * On web, controls the underlying `<textarea>`'s resize handle. Ignored\n * on native (where height is determined by `numberOfLines`).\n * @defaultValue 'vertical'\n */\n resize?: TextAreaResize;\n};\n\n/**\n * Multi-line text input. Thin wrapper over TextInput that fixes `multiline=true`\n * and provides a sensible default for `numberOfLines`.\n *\n * The web textarea is vertically resizable by default — set `resize=\"none\"`\n * to lock it. On native, the prop is a no-op since RN's `<TextInput multiline>`\n * sizes from `numberOfLines`.\n */\nexport const TextArea = ({ numberOfLines = 4, resize = 'vertical', style, ...rest }: TextAreaProps) => {\n // `resize` isn't part of RN's TextStyle but react-native-web passes\n // unknown style props through to the DOM <textarea>, so this lands\n // on the right element on web and is silently ignored on native.\n const resizeStyle = { resize } as unknown as TextStyle;\n const merged = style === undefined ? resizeStyle : [resizeStyle, style];\n return <TextInput multiline numberOfLines={numberOfLines} {...rest} style={merged} />;\n};\n"]}
@@ -1,9 +1,9 @@
1
1
  import { useAnimatedNumber } from './chunk-RB3YBWQ4.js';
2
2
  import { AnimatedView } from './chunk-RGJ3NBKE.js';
3
3
  import { defaultSemanticIcons } from './chunk-7Z4NMNX6.js';
4
- import { cn } from './chunk-CHXHRJNZ.js';
5
4
  import { px } from './chunk-5A2QOOVN.js';
6
5
  import { useThemeColors } from './chunk-R5JMDDCB.js';
6
+ import { cn } from './chunk-CHXHRJNZ.js';
7
7
  import { __name } from './chunk-WCQVDF3K.js';
8
8
  import { createContext, useId, useRef, useState, useCallback, useMemo, useEffect, useContext } from 'react';
9
9
  import { View, Platform, Text, Pressable } from 'react-native';
@@ -446,5 +446,5 @@ var Accordion = Object.assign(AccordionRoot, {
446
446
  });
447
447
 
448
448
  export { Accordion };
449
- //# sourceMappingURL=chunk-Y4ZRSW35.js.map
450
- //# sourceMappingURL=chunk-Y4ZRSW35.js.map
449
+ //# sourceMappingURL=chunk-V5QSMDZL.js.map
450
+ //# sourceMappingURL=chunk-V5QSMDZL.js.map