bootstrap-rn 0.4.6 → 0.4.8

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 (289) hide show
  1. package/lib/module/Context.js.map +1 -1
  2. package/lib/module/Provider.js +3 -7
  3. package/lib/module/Provider.js.map +1 -1
  4. package/lib/module/components/Body.js +8 -1
  5. package/lib/module/components/Body.js.map +1 -1
  6. package/lib/module/components/buttons/Button.js +10 -8
  7. package/lib/module/components/buttons/Button.js.map +1 -1
  8. package/lib/module/components/close/CloseButton.js +7 -3
  9. package/lib/module/components/close/CloseButton.js.map +1 -1
  10. package/lib/module/components/collapse/useCollapse.js +2 -3
  11. package/lib/module/components/collapse/useCollapse.js.map +1 -1
  12. package/lib/module/components/dropdown/Dropdown.js +1 -2
  13. package/lib/module/components/dropdown/Dropdown.js.map +1 -1
  14. package/lib/module/components/dropdown/DropdownContext.js.map +1 -1
  15. package/lib/module/components/dropdown/DropdownMenu.js +33 -59
  16. package/lib/module/components/dropdown/DropdownMenu.js.map +1 -1
  17. package/lib/module/components/dropdown/useDismissDropdown.js +5 -4
  18. package/lib/module/components/dropdown/useDismissDropdown.js.map +1 -1
  19. package/lib/module/components/dropdown/useDropdown.js +35 -11
  20. package/lib/module/components/dropdown/useDropdown.js.map +1 -1
  21. package/lib/module/components/dropdown/useToggleDropdown.js +4 -6
  22. package/lib/module/components/dropdown/useToggleDropdown.js.map +1 -1
  23. package/lib/module/components/forms/FormCheckInput.js +1 -1
  24. package/lib/module/components/forms/Input.js +1 -1
  25. package/lib/module/components/forms/Picker.js +1 -1
  26. package/lib/module/components/forms/internals/PickerNative.js +1 -1
  27. package/lib/module/components/forms/internals/PickerNative.js.map +1 -1
  28. package/lib/module/components/helpers/BackdropHandler.js +6 -92
  29. package/lib/module/components/helpers/BackdropHandler.js.map +1 -1
  30. package/lib/module/components/helpers/BackdropHandler.web.js +8 -0
  31. package/lib/module/components/helpers/BackdropHandler.web.js.map +1 -0
  32. package/lib/module/components/helpers/Dialog.js +29 -0
  33. package/lib/module/components/helpers/Dialog.js.map +1 -0
  34. package/lib/module/components/helpers/Dialog.web.js +117 -0
  35. package/lib/module/components/helpers/Dialog.web.js.map +1 -0
  36. package/lib/module/components/helpers/Portal.js +5 -0
  37. package/lib/module/components/helpers/Portal.js.map +1 -0
  38. package/lib/module/components/helpers/Portal.web.js +31 -0
  39. package/lib/module/components/helpers/Portal.web.js.map +1 -0
  40. package/lib/module/components/helpers/PortalHost.js +5 -0
  41. package/lib/module/components/helpers/PortalHost.js.map +1 -0
  42. package/lib/module/components/helpers/PortalHost.web.js +15 -0
  43. package/lib/module/components/helpers/PortalHost.web.js.map +1 -0
  44. package/lib/module/components/modal/Modal.js +58 -48
  45. package/lib/module/components/modal/Modal.js.map +1 -1
  46. package/lib/module/components/modal/ModalContext.js.map +1 -1
  47. package/lib/module/components/modal/ModalTitle.js +6 -0
  48. package/lib/module/components/modal/ModalTitle.js.map +1 -1
  49. package/lib/module/components/modal/useModal.js +4 -13
  50. package/lib/module/components/modal/useModal.js.map +1 -1
  51. package/lib/module/components/nav/useTabbable.js +2 -3
  52. package/lib/module/components/nav/useTabbable.js.map +1 -1
  53. package/lib/module/components/navbar/NavbarToggler.js +1 -1
  54. package/lib/module/components/navbar/useNavbar.js +2 -3
  55. package/lib/module/components/navbar/useNavbar.js.map +1 -1
  56. package/lib/module/components/offcanvas/Offcanvas.js +84 -82
  57. package/lib/module/components/offcanvas/Offcanvas.js.map +1 -1
  58. package/lib/module/components/offcanvas/OffcanvasContext.js.map +1 -1
  59. package/lib/module/components/offcanvas/OffcanvasTitle.js +6 -0
  60. package/lib/module/components/offcanvas/OffcanvasTitle.js.map +1 -1
  61. package/lib/module/components/offcanvas/useOffcanvas.js +6 -14
  62. package/lib/module/components/offcanvas/useOffcanvas.js.map +1 -1
  63. package/lib/module/components/pagination/PaginationItem.js +39 -39
  64. package/lib/module/components/popover/Popover.js +6 -8
  65. package/lib/module/components/popover/Popover.js.map +1 -1
  66. package/lib/module/components/popover/PopoverArrow.js +18 -9
  67. package/lib/module/components/popover/PopoverArrow.js.map +1 -1
  68. package/lib/module/components/popover/PopoverContext.js.map +1 -1
  69. package/lib/module/components/popover/injectPopover.js +48 -45
  70. package/lib/module/components/popover/injectPopover.js.map +1 -1
  71. package/lib/module/components/tooltip/Tooltip.js +7 -23
  72. package/lib/module/components/tooltip/Tooltip.js.map +1 -1
  73. package/lib/module/components/tooltip/TooltipArrow.js +22 -12
  74. package/lib/module/components/tooltip/TooltipArrow.js.map +1 -1
  75. package/lib/module/components/tooltip/TooltipContext.js.map +1 -1
  76. package/lib/module/components/tooltip/injectTooltip.js +46 -42
  77. package/lib/module/components/tooltip/injectTooltip.js.map +1 -1
  78. package/lib/module/hooks/useBackgroundNative.js.map +1 -1
  79. package/lib/module/hooks/useFocusRing.js +13 -0
  80. package/lib/module/hooks/useFocusRing.js.map +1 -0
  81. package/lib/module/hooks/useFocusRing.web.js +5 -0
  82. package/lib/module/hooks/useFocusRing.web.js.map +1 -0
  83. package/lib/module/hooks/useInteractionState.js +11 -11
  84. package/lib/module/hooks/useInteractionState.js.map +1 -1
  85. package/lib/module/hooks/useOverlay.js +121 -0
  86. package/lib/module/hooks/useOverlay.js.map +1 -0
  87. package/lib/module/hooks/useOverlay.web.js +113 -0
  88. package/lib/module/hooks/useOverlay.web.js.map +1 -0
  89. package/lib/module/hooks/useScrollbarEffects.js +7 -60
  90. package/lib/module/hooks/useScrollbarEffects.js.map +1 -1
  91. package/lib/module/hooks/useScrollbarEffects.web.js +59 -0
  92. package/lib/module/hooks/useScrollbarEffects.web.js.map +1 -0
  93. package/lib/module/index.js +3 -3
  94. package/lib/module/index.js.map +1 -1
  95. package/lib/module/style/StyleSheet.js +1 -3
  96. package/lib/module/style/StyleSheet.js.map +1 -1
  97. package/lib/module/theme/variables.js +9 -9
  98. package/lib/module/utils.js +0 -11
  99. package/lib/module/utils.js.map +1 -1
  100. package/lib/typescript/Context.d.ts +0 -1
  101. package/lib/typescript/Context.d.ts.map +1 -1
  102. package/lib/typescript/Provider.d.ts.map +1 -1
  103. package/lib/typescript/components/Body.d.ts.map +1 -1
  104. package/lib/typescript/components/Link.d.ts +1 -1
  105. package/lib/typescript/components/Link.d.ts.map +1 -1
  106. package/lib/typescript/components/Pressable.d.ts +1 -1
  107. package/lib/typescript/components/Pressable.d.ts.map +1 -1
  108. package/lib/typescript/components/TextInput.d.ts +3 -3
  109. package/lib/typescript/components/TextInput.d.ts.map +1 -1
  110. package/lib/typescript/components/buttons/Button.d.ts +1 -1
  111. package/lib/typescript/components/buttons/Button.d.ts.map +1 -1
  112. package/lib/typescript/components/close/CloseButton.d.ts +1 -1
  113. package/lib/typescript/components/close/CloseButton.d.ts.map +1 -1
  114. package/lib/typescript/components/collapse/useCollapse.d.ts.map +1 -1
  115. package/lib/typescript/components/dropdown/Dropdown.d.ts +0 -1
  116. package/lib/typescript/components/dropdown/Dropdown.d.ts.map +1 -1
  117. package/lib/typescript/components/dropdown/DropdownContext.d.ts +14 -3
  118. package/lib/typescript/components/dropdown/DropdownContext.d.ts.map +1 -1
  119. package/lib/typescript/components/dropdown/DropdownMenu.d.ts +0 -1
  120. package/lib/typescript/components/dropdown/DropdownMenu.d.ts.map +1 -1
  121. package/lib/typescript/components/dropdown/useDismissDropdown.d.ts +1 -1
  122. package/lib/typescript/components/dropdown/useDismissDropdown.d.ts.map +1 -1
  123. package/lib/typescript/components/dropdown/useDropdown.d.ts +38 -4
  124. package/lib/typescript/components/dropdown/useDropdown.d.ts.map +1 -1
  125. package/lib/typescript/components/dropdown/useToggleDropdown.d.ts +4 -3
  126. package/lib/typescript/components/dropdown/useToggleDropdown.d.ts.map +1 -1
  127. package/lib/typescript/components/forms/Picker.d.ts +1 -1
  128. package/lib/typescript/components/forms/internals/PickerNative.d.ts +1 -1
  129. package/lib/typescript/components/forms/internals/PickerNative.d.ts.map +1 -1
  130. package/lib/typescript/components/forms/internals/PickerWeb.d.ts +1 -1
  131. package/lib/typescript/components/forms/internals/PickerWeb.d.ts.map +1 -1
  132. package/lib/typescript/components/helpers/BackdropHandler.d.ts +2 -11
  133. package/lib/typescript/components/helpers/BackdropHandler.d.ts.map +1 -1
  134. package/lib/typescript/components/helpers/BackdropHandler.web.d.ts +3 -0
  135. package/lib/typescript/components/helpers/BackdropHandler.web.d.ts.map +1 -0
  136. package/lib/typescript/components/helpers/Dialog.d.ts +15 -0
  137. package/lib/typescript/components/helpers/Dialog.d.ts.map +1 -0
  138. package/lib/typescript/components/helpers/Dialog.web.d.ts +15 -0
  139. package/lib/typescript/components/helpers/Dialog.web.d.ts.map +1 -0
  140. package/lib/typescript/components/helpers/Portal.d.ts +8 -0
  141. package/lib/typescript/components/helpers/Portal.d.ts.map +1 -0
  142. package/lib/typescript/components/helpers/Portal.web.d.ts +8 -0
  143. package/lib/typescript/components/helpers/Portal.web.d.ts.map +1 -0
  144. package/lib/typescript/components/helpers/PortalHost.d.ts +6 -0
  145. package/lib/typescript/components/helpers/PortalHost.d.ts.map +1 -0
  146. package/lib/typescript/components/helpers/PortalHost.web.d.ts +7 -0
  147. package/lib/typescript/components/helpers/PortalHost.web.d.ts.map +1 -0
  148. package/lib/typescript/components/list-group/ListGroup.d.ts +1 -1
  149. package/lib/typescript/components/list-group/ListGroupItemAction.d.ts +1 -1
  150. package/lib/typescript/components/list-group/ListGroupItemAction.d.ts.map +1 -1
  151. package/lib/typescript/components/modal/Modal.d.ts +1 -1
  152. package/lib/typescript/components/modal/Modal.d.ts.map +1 -1
  153. package/lib/typescript/components/modal/ModalContext.d.ts +1 -0
  154. package/lib/typescript/components/modal/ModalContext.d.ts.map +1 -1
  155. package/lib/typescript/components/modal/ModalTitle.d.ts.map +1 -1
  156. package/lib/typescript/components/modal/useModal.d.ts +2 -1
  157. package/lib/typescript/components/modal/useModal.d.ts.map +1 -1
  158. package/lib/typescript/components/nav/Nav.d.ts +1 -1
  159. package/lib/typescript/components/nav/NavLink.d.ts +1 -1
  160. package/lib/typescript/components/nav/NavLink.d.ts.map +1 -1
  161. package/lib/typescript/components/nav/useTabbable.d.ts.map +1 -1
  162. package/lib/typescript/components/navbar/Navbar.d.ts +2 -2
  163. package/lib/typescript/components/navbar/NavbarBrand.d.ts +1 -1
  164. package/lib/typescript/components/navbar/NavbarBrand.d.ts.map +1 -1
  165. package/lib/typescript/components/navbar/NavbarToggler.d.ts +1 -1
  166. package/lib/typescript/components/navbar/NavbarToggler.d.ts.map +1 -1
  167. package/lib/typescript/components/navbar/useNavbar.d.ts.map +1 -1
  168. package/lib/typescript/components/offcanvas/Offcanvas.d.ts +1 -4
  169. package/lib/typescript/components/offcanvas/Offcanvas.d.ts.map +1 -1
  170. package/lib/typescript/components/offcanvas/OffcanvasContext.d.ts +3 -1
  171. package/lib/typescript/components/offcanvas/OffcanvasContext.d.ts.map +1 -1
  172. package/lib/typescript/components/offcanvas/OffcanvasTitle.d.ts.map +1 -1
  173. package/lib/typescript/components/offcanvas/useOffcanvas.d.ts +3 -1
  174. package/lib/typescript/components/offcanvas/useOffcanvas.d.ts.map +1 -1
  175. package/lib/typescript/components/popover/Popover.d.ts +3 -4
  176. package/lib/typescript/components/popover/Popover.d.ts.map +1 -1
  177. package/lib/typescript/components/popover/PopoverArrow.d.ts.map +1 -1
  178. package/lib/typescript/components/popover/PopoverContext.d.ts +3 -4
  179. package/lib/typescript/components/popover/PopoverContext.d.ts.map +1 -1
  180. package/lib/typescript/components/popover/injectPopover.d.ts +5 -7
  181. package/lib/typescript/components/popover/injectPopover.d.ts.map +1 -1
  182. package/lib/typescript/components/tooltip/Tooltip.d.ts +3 -4
  183. package/lib/typescript/components/tooltip/Tooltip.d.ts.map +1 -1
  184. package/lib/typescript/components/tooltip/TooltipArrow.d.ts.map +1 -1
  185. package/lib/typescript/components/tooltip/TooltipContext.d.ts +3 -4
  186. package/lib/typescript/components/tooltip/TooltipContext.d.ts.map +1 -1
  187. package/lib/typescript/components/tooltip/injectTooltip.d.ts +5 -7
  188. package/lib/typescript/components/tooltip/injectTooltip.d.ts.map +1 -1
  189. package/lib/typescript/hooks/useBackgroundNative.d.ts.map +1 -1
  190. package/lib/typescript/hooks/useFocusRing.d.ts +3 -0
  191. package/lib/typescript/hooks/useFocusRing.d.ts.map +1 -0
  192. package/lib/typescript/hooks/useFocusRing.web.d.ts +3 -0
  193. package/lib/typescript/hooks/useFocusRing.web.d.ts.map +1 -0
  194. package/lib/typescript/hooks/useInteractionState.d.ts +7 -7
  195. package/lib/typescript/hooks/useInteractionState.d.ts.map +1 -1
  196. package/lib/typescript/hooks/useOverlay.d.ts +64 -0
  197. package/lib/typescript/hooks/useOverlay.d.ts.map +1 -0
  198. package/lib/typescript/hooks/useOverlay.web.d.ts +37 -0
  199. package/lib/typescript/hooks/useOverlay.web.d.ts.map +1 -0
  200. package/lib/typescript/hooks/useScrollbarEffects.d.ts.map +1 -1
  201. package/lib/typescript/hooks/useScrollbarEffects.web.d.ts +7 -0
  202. package/lib/typescript/hooks/useScrollbarEffects.web.d.ts.map +1 -0
  203. package/lib/typescript/index.d.ts +5 -4
  204. package/lib/typescript/index.d.ts.map +1 -1
  205. package/lib/typescript/style/StyleSheet.d.ts.map +1 -1
  206. package/lib/typescript/types.d.ts +12 -6
  207. package/lib/typescript/types.d.ts.map +1 -1
  208. package/lib/typescript/utils.d.ts +2 -3
  209. package/lib/typescript/utils.d.ts.map +1 -1
  210. package/package.json +28 -21
  211. package/src/Context.ts +37 -38
  212. package/src/Provider.tsx +61 -66
  213. package/src/components/Body.tsx +68 -53
  214. package/src/components/TextInput.tsx +66 -66
  215. package/src/components/buttons/Button.tsx +381 -379
  216. package/src/components/close/CloseButton.tsx +142 -138
  217. package/src/components/collapse/useCollapse.ts +25 -26
  218. package/src/components/dropdown/Dropdown.tsx +77 -80
  219. package/src/components/dropdown/DropdownContext.ts +14 -3
  220. package/src/components/dropdown/DropdownMenu.tsx +243 -284
  221. package/src/components/dropdown/useDismissDropdown.ts +30 -29
  222. package/src/components/dropdown/useDropdown.ts +55 -38
  223. package/src/components/dropdown/useToggleDropdown.ts +31 -32
  224. package/src/components/forms/FormCheckInput.tsx +268 -268
  225. package/src/components/forms/Input.tsx +220 -220
  226. package/src/components/forms/Picker.tsx +1 -1
  227. package/src/components/forms/internals/PickerNative.tsx +9 -10
  228. package/src/components/helpers/BackdropHandler.tsx +5 -119
  229. package/src/components/helpers/BackdropHandler.web.tsx +6 -0
  230. package/src/components/helpers/Dialog.tsx +49 -0
  231. package/src/components/helpers/Dialog.web.tsx +145 -0
  232. package/src/components/helpers/Portal.tsx +10 -0
  233. package/src/components/helpers/Portal.web.tsx +42 -0
  234. package/src/components/helpers/PortalHost.tsx +7 -0
  235. package/src/components/helpers/PortalHost.web.tsx +14 -0
  236. package/src/components/modal/Modal.tsx +60 -48
  237. package/src/components/modal/ModalContext.ts +12 -11
  238. package/src/components/modal/ModalTitle.tsx +41 -31
  239. package/src/components/modal/useModal.ts +13 -25
  240. package/src/components/nav/useTabbable.ts +31 -32
  241. package/src/components/navbar/NavbarToggler.tsx +130 -130
  242. package/src/components/navbar/useNavbar.ts +30 -31
  243. package/src/components/offcanvas/Offcanvas.tsx +91 -92
  244. package/src/components/offcanvas/OffcanvasContext.ts +13 -11
  245. package/src/components/offcanvas/OffcanvasTitle.tsx +43 -33
  246. package/src/components/offcanvas/useOffcanvas.ts +12 -20
  247. package/src/components/pagination/PaginationItem.tsx +139 -139
  248. package/src/components/popover/Popover.tsx +87 -90
  249. package/src/components/popover/PopoverArrow.tsx +22 -6
  250. package/src/components/popover/PopoverContext.ts +13 -18
  251. package/src/components/popover/injectPopover.tsx +63 -55
  252. package/src/components/tooltip/Tooltip.tsx +79 -98
  253. package/src/components/tooltip/TooltipArrow.tsx +26 -8
  254. package/src/components/tooltip/TooltipContext.ts +13 -18
  255. package/src/components/tooltip/injectTooltip.tsx +62 -53
  256. package/src/hooks/useAction.ts +78 -78
  257. package/src/hooks/useBackgroundNative.tsx +6 -4
  258. package/src/hooks/useFocusRing.ts +13 -0
  259. package/src/hooks/useFocusRing.web.ts +3 -0
  260. package/src/hooks/useInteractionState.ts +75 -81
  261. package/src/hooks/useOverlay.ts +197 -0
  262. package/src/hooks/useOverlay.web.ts +190 -0
  263. package/src/hooks/useScrollbarEffects.ts +5 -83
  264. package/src/hooks/useScrollbarEffects.web.ts +83 -0
  265. package/src/index.ts +5 -5
  266. package/src/style/StyleSheet.ts +2 -5
  267. package/src/theme/variables.ts +1420 -1420
  268. package/src/types.ts +14 -14
  269. package/src/utils.ts +4 -22
  270. package/lib/module/components/SafeAreaView.js +0 -42
  271. package/lib/module/components/SafeAreaView.js.map +0 -1
  272. package/lib/module/components/helpers/Overlay.js +0 -50
  273. package/lib/module/components/helpers/Overlay.js.map +0 -1
  274. package/lib/module/hooks/useIdentifier.js +0 -14
  275. package/lib/module/hooks/useIdentifier.js.map +0 -1
  276. package/lib/module/hooks/useTrigger.js +0 -97
  277. package/lib/module/hooks/useTrigger.js.map +0 -1
  278. package/lib/typescript/components/SafeAreaView.d.ts +0 -12
  279. package/lib/typescript/components/SafeAreaView.d.ts.map +0 -1
  280. package/lib/typescript/components/helpers/Overlay.d.ts +0 -28
  281. package/lib/typescript/components/helpers/Overlay.d.ts.map +0 -1
  282. package/lib/typescript/hooks/useIdentifier.d.ts +0 -2
  283. package/lib/typescript/hooks/useIdentifier.d.ts.map +0 -1
  284. package/lib/typescript/hooks/useTrigger.d.ts +0 -33
  285. package/lib/typescript/hooks/useTrigger.d.ts.map +0 -1
  286. package/src/components/SafeAreaView.tsx +0 -64
  287. package/src/components/helpers/Overlay.tsx +0 -81
  288. package/src/hooks/useIdentifier.ts +0 -15
  289. package/src/hooks/useTrigger.ts +0 -141
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,aAAa,EAC1B,UAAU,IAAI,cAAc,EAC5B,SAAS,IAAI,aAAa,EAC1B,qBAAqB,EACrB,IAAI,EAC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IAAI,CAAC,CAAC;IAC1D,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAClD,CAAC"}
@@ -1,13 +1,12 @@
1
- import type { ExtendedStyle, ThemeVariables, StyleValue, PlacementAxis, TransformedPlacementAxis } from './types';
1
+ import type { ExtendedStyle, ThemeVariables, StyleValue } from './types';
2
2
  export declare function each<T extends Record<string, string | ((t: ThemeVariables) => StyleValue)>>(source: T, apply: (key: keyof T, resolve: (t: ThemeVariables) => StyleValue) => Record<string, any>): Record<string, any>;
3
3
  export declare function normalize(value: object[]): object;
4
4
  export declare function makeProxy<T extends (string | number)[]>(name: string, keys: T): { [key in T[number]]: (t: ThemeVariables) => StyleValue; };
5
5
  export declare function makeArray(length: number, callback: (index: number) => object): object[];
6
6
  type FalsyValue = false | undefined | null | '' | 0;
7
7
  export declare function getStyles<T extends string>(styles: Record<string, ExtendedStyle>, keys: (T | FalsyValue)[]): ExtendedStyle[];
8
- export declare function concatRefs<T>(...refs: React.Ref<T>[]): React.Ref<T>;
8
+ export declare function concatRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.Ref<T>;
9
9
  export declare function optional(condition: boolean, value: object): object | undefined;
10
10
  export declare function getElementId(identifier: string, name: string): string;
11
- export declare function transformPlacement(placement: PlacementAxis): TransformedPlacementAxis;
12
11
  export {};
13
12
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACV,aAAa,EACb,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,IAAI,CAClB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,cAAc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AAE,IAAI,EAAE,MAAM,UAE5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-rn",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "Bootstrap RN provides Bootstrap components for React Native.",
5
5
  "author": "Markus Wetzel <markuswetzel@gmx.net>",
6
6
  "license": "MIT",
@@ -31,32 +31,39 @@
31
31
  "lib"
32
32
  ],
33
33
  "dependencies": {
34
- "@react-native-aria/focus": "^0.2.7",
35
- "@react-native-aria/overlays": "^0.3.5",
34
+ "@floating-ui/react": "^0.27.16",
35
+ "@react-aria/focus": "^3.21.3",
36
+ "@rn-primitives/hooks": "^1.3.0",
37
+ "@rn-primitives/portal": "^1.3.0",
36
38
  "css-to-react-native": "^3.2.0",
37
39
  "tiny-invariant": "^1.3.1"
38
40
  },
39
41
  "devDependencies": {
40
- "@types/react": "~19.0.10",
41
- "cpy-cli": "^5.0.0",
42
- "packsy": "^0.2.4",
43
- "react": "19.0.0",
44
- "react-dom": "19.0.0",
45
- "react-native": "0.79.2",
46
- "react-native-builder-bob": "^0.40.10",
47
- "react-native-svg": "15.11.2",
48
- "react-native-web": "^0.20.0",
49
- "typescript": "~5.8.3"
42
+ "@types/react": "~19.1.10",
43
+ "@types/react-dom": "~19.1.10",
44
+ "packsy": "^0.2.5",
45
+ "react": "19.1.0",
46
+ "react-dom": "19.1.0",
47
+ "react-native": "0.81.5",
48
+ "react-native-builder-bob": "^0.40.17",
49
+ "react-native-safe-area-context": "~5.6.0",
50
+ "react-native-svg": "15.12.1",
51
+ "react-native-web": "^0.21.0",
52
+ "typescript": "~5.9.2"
50
53
  },
51
54
  "peerDependencies": {
52
- "@types/react": ">=17",
53
- "react": ">=17",
54
- "react-dom": ">=17",
55
- "react-native": ">=0.63.0",
56
- "react-native-svg": ">=12.3.0"
55
+ "react": ">=19",
56
+ "react-dom": ">=19",
57
+ "react-native": ">=0.78",
58
+ "react-native-safe-area-context": ">=5",
59
+ "react-native-svg": ">=15",
60
+ "react-native-web": ">=0.20"
57
61
  },
58
62
  "peerDependenciesMeta": {
59
- "@types/react": {
63
+ "react-dom": {
64
+ "optional": true
65
+ },
66
+ "react-native-web": {
60
67
  "optional": true
61
68
  }
62
69
  },
@@ -79,7 +86,7 @@
79
86
  ]
80
87
  },
81
88
  "engines": {
82
- "node": ">= 8",
83
- "npm": ">= 5"
89
+ "node": ">= 16",
90
+ "npm": ">= 8"
84
91
  }
85
92
  }
package/src/Context.ts CHANGED
@@ -1,38 +1,37 @@
1
- import React from 'react';
2
- import { View as BaseView } from 'react-native';
3
- import type { ExtendedStyle, Viewport } from './types';
4
-
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- type ModifierProps = any;
7
-
8
- export type Modifier = (
9
- props: ModifierProps,
10
- ref: React.Ref<unknown>,
11
- ) => ModifierProps & { ref?: React.Ref<unknown> };
12
-
13
- export type Modifiers = {
14
- useFormField?: Modifier;
15
- useTabbable?: Modifier;
16
- useActionable?: Modifier;
17
- };
18
-
19
- export type BootstrapRNContextType = {
20
- utilities: Record<string, ExtendedStyle>;
21
- modifiers: Modifiers;
22
- scrollbars: {
23
- hide: () => void;
24
- show: () => void;
25
- };
26
- fixed: React.RefObject<BaseView>[];
27
- getViewport(): Viewport;
28
- addFixedElement: (ref: unknown) => {
29
- remove: () => void;
30
- };
31
- generateKey(prefix: string): string;
32
- };
33
-
34
- const Context = React.createContext<BootstrapRNContextType | null>(null);
35
-
36
- Context.displayName = 'BootstrapRNContext';
37
-
38
- export default Context;
1
+ import React from 'react';
2
+ import { View as BaseView } from 'react-native';
3
+ import type { ExtendedStyle, Viewport } from './types';
4
+
5
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
+ type ModifierProps = any;
7
+
8
+ export type Modifier = (
9
+ props: ModifierProps,
10
+ ref: React.Ref<unknown>,
11
+ ) => ModifierProps & { ref?: React.Ref<unknown> };
12
+
13
+ export type Modifiers = {
14
+ useFormField?: Modifier;
15
+ useTabbable?: Modifier;
16
+ useActionable?: Modifier;
17
+ };
18
+
19
+ export type BootstrapRNContextType = {
20
+ utilities: Record<string, ExtendedStyle>;
21
+ modifiers: Modifiers;
22
+ scrollbars: {
23
+ hide: () => void;
24
+ show: () => void;
25
+ };
26
+ fixed: React.RefObject<BaseView>[];
27
+ getViewport(): Viewport;
28
+ addFixedElement: (ref: unknown) => {
29
+ remove: () => void;
30
+ };
31
+ };
32
+
33
+ const Context = React.createContext<BootstrapRNContextType | null>(null);
34
+
35
+ Context.displayName = 'BootstrapRNContext';
36
+
37
+ export default Context;
package/src/Provider.tsx CHANGED
@@ -1,66 +1,61 @@
1
- import React, { useMemo, useRef } from 'react';
2
- import { View as BaseView } from 'react-native';
3
- import { OverlayProvider } from '@react-native-aria/overlays';
4
- import useViewport from './hooks/useViewport';
5
- import useScrollbarEffects from './hooks/useScrollbarEffects';
6
- import Context, { Modifiers } from './Context';
7
- import type { ExtendedStyle, Viewport } from './types';
8
-
9
- type ProviderProps = {
10
- children: React.ReactNode;
11
- utilities?: Record<string, ExtendedStyle>;
12
- modifiers?: Modifiers;
13
- ssrViewport: Viewport;
14
- };
15
-
16
- function Provider({
17
- children,
18
- utilities = {},
19
- modifiers = {},
20
- ssrViewport,
21
- }: ProviderProps) {
22
- const viewport = useViewport(ssrViewport);
23
-
24
- const fixed: React.RefObject<BaseView>[] = useMemo(() => [], []);
25
-
26
- const counter = useRef(0);
27
-
28
- const scrollbars = useScrollbarEffects(fixed);
29
-
30
- const context = useMemo(
31
- () => ({
32
- utilities,
33
- modifiers,
34
- scrollbars,
35
- fixed,
36
- getViewport() {
37
- return viewport;
38
- },
39
- addFixedElement(ref: React.RefObject<BaseView>) {
40
- fixed.push(ref);
41
-
42
- return {
43
- remove() {
44
- const index = fixed.findIndex((item) => item === ref);
45
-
46
- fixed.splice(index, 1);
47
- },
48
- };
49
- },
50
- generateKey(prefix: string) {
51
- counter.current += 1;
52
-
53
- return `ui-${prefix}-${counter.current}`;
54
- },
55
- }),
56
- [utilities, modifiers, scrollbars, fixed, viewport, fixed, counter],
57
- );
58
-
59
- return (
60
- <Context.Provider value={context}>
61
- <OverlayProvider>{children}</OverlayProvider>
62
- </Context.Provider>
63
- );
64
- }
65
-
66
- export default Provider;
1
+ import React, { useMemo, useRef } from 'react';
2
+ import { View as BaseView } from 'react-native';
3
+ import { SafeAreaProvider } from 'react-native-safe-area-context';
4
+ import useViewport from './hooks/useViewport';
5
+ import useScrollbarEffects from './hooks/useScrollbarEffects';
6
+ import Context, { Modifiers } from './Context';
7
+ import type { ExtendedStyle, Viewport } from './types';
8
+
9
+ type ProviderProps = {
10
+ children: React.ReactNode;
11
+ utilities?: Record<string, ExtendedStyle>;
12
+ modifiers?: Modifiers;
13
+ ssrViewport: Viewport;
14
+ };
15
+
16
+ function Provider({
17
+ children,
18
+ utilities = {},
19
+ modifiers = {},
20
+ ssrViewport,
21
+ }: ProviderProps) {
22
+ const viewport = useViewport(ssrViewport);
23
+
24
+ const fixed: React.RefObject<BaseView>[] = useMemo(() => [], []);
25
+
26
+ const counter = useRef(0);
27
+
28
+ const scrollbars = useScrollbarEffects(fixed);
29
+
30
+ const context = useMemo(
31
+ () => ({
32
+ utilities,
33
+ modifiers,
34
+ scrollbars,
35
+ fixed,
36
+ getViewport() {
37
+ return viewport;
38
+ },
39
+ addFixedElement(ref: React.RefObject<BaseView>) {
40
+ fixed.push(ref);
41
+
42
+ return {
43
+ remove() {
44
+ const index = fixed.findIndex((item) => item === ref);
45
+
46
+ fixed.splice(index, 1);
47
+ },
48
+ };
49
+ },
50
+ }),
51
+ [utilities, modifiers, scrollbars, fixed, viewport, fixed, counter],
52
+ );
53
+
54
+ return (
55
+ <Context.Provider value={context}>
56
+ <SafeAreaProvider>{children}</SafeAreaProvider>
57
+ </Context.Provider>
58
+ );
59
+ }
60
+
61
+ export default Provider;
@@ -1,53 +1,68 @@
1
- import React, { useMemo } from 'react';
2
- import StyleSheet from '../style/StyleSheet';
3
- import css from '../style/css';
4
- import { getStyles } from '../utils';
5
- import TextStyleContext from '../style/TextStyleContext';
6
- import useMedia from '../hooks/useMedia';
7
- import useStyle from '../hooks/useStyle';
8
- import View, { ViewProps, ViewRef } from './View';
9
-
10
- export interface BodyProps extends ViewProps {}
11
-
12
- const styles = StyleSheet.create({
13
- body: css`
14
- background-color: $body-bg;
15
- flex-grow: 1; // added for bootstrap-rn
16
- flex-shrink: 1; // added for bootstrap-rn
17
- `,
18
- 'body --text': css`
19
- color: $body-color;
20
- text-align: $body-text-align;
21
- `,
22
- });
23
-
24
- const Body = React.forwardRef<ViewRef, BodyProps>((props, ref) => {
25
- const { children, style, textStyle, styleName, ...elementProps } = props;
26
-
27
- const classes = getStyles(styles, ['body']);
28
- const textClasses = getStyles(styles, ['body --text']);
29
-
30
- const media = useMedia();
31
-
32
- const resolveStyle = useStyle([classes, style], styleName);
33
- const resolveTextStyle = useStyle([textClasses, textStyle]);
34
-
35
- const contextValue = useMemo(
36
- () => ({
37
- style: resolveTextStyle({ media }),
38
- }),
39
- [resolveTextStyle, media],
40
- );
41
-
42
- return (
43
- <View {...elementProps} ref={ref} style={resolveStyle({ media })}>
44
- <TextStyleContext.Provider value={contextValue}>
45
- {children}
46
- </TextStyleContext.Provider>
47
- </View>
48
- );
49
- });
50
-
51
- Body.displayName = 'Body';
52
-
53
- export default Body;
1
+ import React, { useMemo } from 'react';
2
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
3
+ import StyleSheet from '../style/StyleSheet';
4
+ import css from '../style/css';
5
+ import { getStyles } from '../utils';
6
+ import TextStyleContext from '../style/TextStyleContext';
7
+ import useMedia from '../hooks/useMedia';
8
+ import useStyle from '../hooks/useStyle';
9
+ import View, { ViewProps, ViewRef } from './View';
10
+
11
+ export interface BodyProps extends ViewProps {}
12
+
13
+ const styles = StyleSheet.create({
14
+ body: css`
15
+ background-color: $body-bg;
16
+ flex-grow: 1; // added for bootstrap-rn
17
+ flex-shrink: 1; // added for bootstrap-rn
18
+ `,
19
+ 'body --text': css`
20
+ color: $body-color;
21
+ text-align: $body-text-align;
22
+ `,
23
+ });
24
+
25
+ const Body = React.forwardRef<ViewRef, BodyProps>((props, ref) => {
26
+ const { children, style, textStyle, styleName, ...elementProps } = props;
27
+
28
+ const classes = getStyles(styles, ['body']);
29
+ const textClasses = getStyles(styles, ['body --text']);
30
+
31
+ const media = useMedia();
32
+
33
+ const insets = useSafeAreaInsets();
34
+
35
+ const resolveStyle = useStyle(
36
+ [
37
+ classes,
38
+ {
39
+ marginTop: insets.top,
40
+ marginBottom: insets.bottom,
41
+ marginRight: insets.right,
42
+ marginLeft: insets.left,
43
+ },
44
+ style,
45
+ ],
46
+ styleName,
47
+ );
48
+ const resolveTextStyle = useStyle([textClasses, textStyle]);
49
+
50
+ const contextValue = useMemo(
51
+ () => ({
52
+ style: resolveTextStyle({ media }),
53
+ }),
54
+ [resolveTextStyle, media],
55
+ );
56
+
57
+ return (
58
+ <View {...elementProps} ref={ref} style={resolveStyle({ media })}>
59
+ <TextStyleContext.Provider value={contextValue}>
60
+ {children}
61
+ </TextStyleContext.Provider>
62
+ </View>
63
+ );
64
+ });
65
+
66
+ Body.displayName = 'Body';
67
+
68
+ export default Body;
@@ -1,66 +1,66 @@
1
- import React, { useState } from 'react';
2
- import {
3
- TextInput as BaseTextInput,
4
- TextInputProps as BaseTextInputProps,
5
- TextInputFocusEventData,
6
- NativeSyntheticEvent,
7
- } from 'react-native';
8
- import useMedia from '../hooks/useMedia';
9
- import useStyle from '../hooks/useStyle';
10
- import type { ExtendedTextStyle, StyleProp, StyleName } from '../types';
11
-
12
- export type TextInputRef = BaseTextInput;
13
-
14
- export interface TextInputProps extends Omit<BaseTextInputProps, 'style'> {
15
- onFocus?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;
16
- onBlur?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;
17
- autoFocus?: boolean;
18
- style?: StyleProp<ExtendedTextStyle>;
19
- styleName?: StyleName;
20
- disabled?: boolean;
21
- readOnly?: boolean;
22
- // Info: Property is not on BaseTextInputProps yet.
23
- rows?: number;
24
- }
25
-
26
- const TextInput = React.forwardRef<TextInputRef, TextInputProps>(
27
- (props, ref) => {
28
- const {
29
- onFocus = () => {},
30
- onBlur = () => {},
31
- autoFocus = false,
32
- style,
33
- styleName,
34
- ...elementProps
35
- } = props;
36
-
37
- const [focused, setFocused] = useState(autoFocus);
38
-
39
- const media = useMedia();
40
- const resolveStyle = useStyle(style, styleName);
41
-
42
- return (
43
- <BaseTextInput
44
- {...elementProps}
45
- ref={ref}
46
- onFocus={(event) => {
47
- setFocused(true);
48
- onFocus(event);
49
- }}
50
- onBlur={(event) => {
51
- setFocused(false);
52
- onBlur(event);
53
- }}
54
- autoFocus={autoFocus}
55
- style={resolveStyle({
56
- media,
57
- interaction: { focus: focused, focusVisible: focused },
58
- })}
59
- />
60
- );
61
- },
62
- );
63
-
64
- TextInput.displayName = 'TextInput';
65
-
66
- export default TextInput;
1
+ import React, { useState } from 'react';
2
+ import {
3
+ TextInput as BaseTextInput,
4
+ TextInputProps as BaseTextInputProps,
5
+ FocusEvent,
6
+ BlurEvent,
7
+ } from 'react-native';
8
+ import useMedia from '../hooks/useMedia';
9
+ import useStyle from '../hooks/useStyle';
10
+ import type { ExtendedTextStyle, StyleProp, StyleName } from '../types';
11
+
12
+ export type TextInputRef = BaseTextInput;
13
+
14
+ export interface TextInputProps extends Omit<BaseTextInputProps, 'style'> {
15
+ onFocus?: (e: FocusEvent) => void;
16
+ onBlur?: (e: BlurEvent) => void;
17
+ autoFocus?: boolean;
18
+ style?: StyleProp<ExtendedTextStyle>;
19
+ styleName?: StyleName;
20
+ disabled?: boolean;
21
+ readOnly?: boolean;
22
+ // Info: Property is not on BaseTextInputProps yet.
23
+ rows?: number;
24
+ }
25
+
26
+ const TextInput = React.forwardRef<TextInputRef, TextInputProps>(
27
+ (props, ref) => {
28
+ const {
29
+ onFocus = () => {},
30
+ onBlur = () => {},
31
+ autoFocus = false,
32
+ style,
33
+ styleName,
34
+ ...elementProps
35
+ } = props;
36
+
37
+ const [focused, setFocused] = useState(autoFocus);
38
+
39
+ const media = useMedia();
40
+ const resolveStyle = useStyle(style, styleName);
41
+
42
+ return (
43
+ <BaseTextInput
44
+ {...elementProps}
45
+ ref={ref}
46
+ onFocus={(event) => {
47
+ setFocused(true);
48
+ onFocus(event);
49
+ }}
50
+ onBlur={(event) => {
51
+ setFocused(false);
52
+ onBlur(event);
53
+ }}
54
+ autoFocus={autoFocus}
55
+ style={resolveStyle({
56
+ media,
57
+ interaction: { focus: focused, focusVisible: focused },
58
+ })}
59
+ />
60
+ );
61
+ },
62
+ );
63
+
64
+ TextInput.displayName = 'TextInput';
65
+
66
+ export default TextInput;