@platform-blocks/ui 0.1.1

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 (533) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -0
  3. package/lib/cjs/index.js +35531 -0
  4. package/lib/cjs/index.js.map +1 -0
  5. package/lib/components/Accessibility/AccessibilityDemo.d.ts +5 -0
  6. package/lib/components/Accessibility/AccessibilityHelpers.d.ts +49 -0
  7. package/lib/components/Accessibility/AccessibilityTesting.d.ts +24 -0
  8. package/lib/components/Accessibility/AccessibleComponents.d.ts +20 -0
  9. package/lib/components/Accessibility/index.d.ts +2 -0
  10. package/lib/components/Accordion/Accordion.d.ts +9 -0
  11. package/lib/components/Accordion/AccordionItem.d.ts +23 -0
  12. package/lib/components/Accordion/defaults.d.ts +13 -0
  13. package/lib/components/Accordion/hooks/useAccordionItemAnimation.d.ts +17 -0
  14. package/lib/components/Accordion/hooks/useMeasuredHeight.d.ts +8 -0
  15. package/lib/components/Accordion/index.d.ts +5 -0
  16. package/lib/components/Accordion/styles.d.ts +17 -0
  17. package/lib/components/Accordion/tokens.d.ts +12 -0
  18. package/lib/components/Accordion/types.d.ts +180 -0
  19. package/lib/components/Alert/Alert.d.ts +2 -0
  20. package/lib/components/Alert/index.d.ts +2 -0
  21. package/lib/components/Alert/types.d.ts +25 -0
  22. package/lib/components/AppShell/AppShell.d.ts +48 -0
  23. package/lib/components/AppShell/BottomAppBar.d.ts +3 -0
  24. package/lib/components/AppShell/MobileMenu.d.ts +10 -0
  25. package/lib/components/AppShell/StatusBarManager.d.ts +7 -0
  26. package/lib/components/AppShell/app-layout/AppLayoutProvider.d.ts +8 -0
  27. package/lib/components/AppShell/app-layout/AppLayoutRenderer.d.ts +5 -0
  28. package/lib/components/AppShell/app-layout/context.d.ts +4 -0
  29. package/lib/components/AppShell/app-layout/defineAppLayout.d.ts +2 -0
  30. package/lib/components/AppShell/app-layout/index.d.ts +5 -0
  31. package/lib/components/AppShell/app-layout/types.d.ts +120 -0
  32. package/lib/components/AppShell/context.d.ts +44 -0
  33. package/lib/components/AppShell/defaults.d.ts +6 -0
  34. package/lib/components/AppShell/hooks/useBreakpoint.d.ts +9 -0
  35. package/lib/components/AppShell/hooks/useResponsiveValue.d.ts +2 -0
  36. package/lib/components/AppShell/index.d.ts +12 -0
  37. package/lib/components/AppShell/meta.schema.d.ts +14 -0
  38. package/lib/components/AppShell/types.d.ts +228 -0
  39. package/lib/components/AppStoreBadge/AppStoreBadge.d.ts +5 -0
  40. package/lib/components/AppStoreBadge/ConvenienceComponents.d.ts +88 -0
  41. package/lib/components/AppStoreBadge/examples/usage-examples.d.ts +4 -0
  42. package/lib/components/AppStoreBadge/index.d.ts +3 -0
  43. package/lib/components/AppStoreBadge/types.d.ts +36 -0
  44. package/lib/components/AppStoreButton/AppStoreButton.d.ts +5 -0
  45. package/lib/components/AppStoreButton/ConvenienceComponents.d.ts +8 -0
  46. package/lib/components/AppStoreButton/index.d.ts +3 -0
  47. package/lib/components/AppStoreButton/types.d.ts +36 -0
  48. package/lib/components/AudioPlayer/AudioPlayer.d.ts +3 -0
  49. package/lib/components/AudioPlayer/AudioPlayerDemo.d.ts +2 -0
  50. package/lib/components/AudioPlayer/index.d.ts +2 -0
  51. package/lib/components/AudioPlayer/types.d.ts +232 -0
  52. package/lib/components/AutoComplete/AutoComplete.d.ts +6 -0
  53. package/lib/components/AutoComplete/index.d.ts +2 -0
  54. package/lib/components/AutoComplete/types.d.ts +120 -0
  55. package/lib/components/Avatar/Avatar.d.ts +3 -0
  56. package/lib/components/Avatar/AvatarGroup.d.ts +3 -0
  57. package/lib/components/Avatar/index.d.ts +3 -0
  58. package/lib/components/Avatar/types.d.ts +30 -0
  59. package/lib/components/Badge/Badge.d.ts +4 -0
  60. package/lib/components/Badge/index.d.ts +3 -0
  61. package/lib/components/Badge/types.d.ts +26 -0
  62. package/lib/components/Block/Block.d.ts +36 -0
  63. package/lib/components/Block/index.d.ts +2 -0
  64. package/lib/components/Block/types.d.ts +102 -0
  65. package/lib/components/Block/utils.d.ts +28 -0
  66. package/lib/components/Blockquote/Blockquote.d.ts +3 -0
  67. package/lib/components/Blockquote/BlockquoteAttribution.d.ts +3 -0
  68. package/lib/components/Blockquote/BlockquoteAuthor.d.ts +3 -0
  69. package/lib/components/Blockquote/BlockquoteMeta.d.ts +3 -0
  70. package/lib/components/Blockquote/BlockquoteSource.d.ts +3 -0
  71. package/lib/components/Blockquote/index.d.ts +6 -0
  72. package/lib/components/Blockquote/styles.d.ts +80 -0
  73. package/lib/components/Blockquote/types.d.ts +74 -0
  74. package/lib/components/BrandButton/BrandButton.d.ts +3 -0
  75. package/lib/components/BrandButton/index.d.ts +2 -0
  76. package/lib/components/BrandButton/types.d.ts +23 -0
  77. package/lib/components/BrandIcon/BrandIcon.d.ts +27 -0
  78. package/lib/components/BrandIcon/brands.d.ts +520 -0
  79. package/lib/components/BrandIcon/index.d.ts +2 -0
  80. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -0
  81. package/lib/components/Breadcrumbs/index.d.ts +2 -0
  82. package/lib/components/Breadcrumbs/types.d.ts +35 -0
  83. package/lib/components/Button/Button.d.ts +3 -0
  84. package/lib/components/Button/SoundButton.d.ts +22 -0
  85. package/lib/components/Button/defaults.d.ts +7 -0
  86. package/lib/components/Button/index.d.ts +2 -0
  87. package/lib/components/Button/styles/resolver.d.ts +7 -0
  88. package/lib/components/Button/tokens.d.ts +16 -0
  89. package/lib/components/Button/types.d.ts +67 -0
  90. package/lib/components/Calendar/Calendar.d.ts +3 -0
  91. package/lib/components/Calendar/Day.d.ts +3 -0
  92. package/lib/components/Calendar/Month.d.ts +3 -0
  93. package/lib/components/Calendar/MonthPicker.d.ts +2 -0
  94. package/lib/components/Calendar/YearPicker.d.ts +2 -0
  95. package/lib/components/Calendar/index.d.ts +8 -0
  96. package/lib/components/Calendar/types.d.ts +92 -0
  97. package/lib/components/Calendar/utils.d.ts +31 -0
  98. package/lib/components/Can/Can.d.ts +30 -0
  99. package/lib/components/Can/PermissionDemo.d.ts +2 -0
  100. package/lib/components/Can/ability.d.ts +89 -0
  101. package/lib/components/Can/builder.d.ts +113 -0
  102. package/lib/components/Can/context.d.ts +25 -0
  103. package/lib/components/Can/index.d.ts +6 -0
  104. package/lib/components/Can/types.d.ts +228 -0
  105. package/lib/components/Card/Card.d.ts +3 -0
  106. package/lib/components/Card/index.d.ts +2 -0
  107. package/lib/components/Card/types.d.ts +15 -0
  108. package/lib/components/Carousel/Carousel.d.ts +4 -0
  109. package/lib/components/Carousel/index.d.ts +2 -0
  110. package/lib/components/Carousel/styles.d.ts +21 -0
  111. package/lib/components/Carousel/types.d.ts +51 -0
  112. package/lib/components/Checkbox/Checkbox.d.ts +4 -0
  113. package/lib/components/Checkbox/index.d.ts +2 -0
  114. package/lib/components/Checkbox/styles.d.ts +71 -0
  115. package/lib/components/Checkbox/types.d.ts +52 -0
  116. package/lib/components/Chip/Chip.d.ts +4 -0
  117. package/lib/components/Chip/index.d.ts +3 -0
  118. package/lib/components/Chip/types.d.ts +22 -0
  119. package/lib/components/CodeBlock/CodeBlock.d.ts +16 -0
  120. package/lib/components/CodeBlock/index.d.ts +3 -0
  121. package/lib/components/CodeBlock/type.d.ts +40 -0
  122. package/lib/components/CodeBlock/types.d.ts +44 -0
  123. package/lib/components/CodeBlock/utils.d.ts +38 -0
  124. package/lib/components/ColorPicker/ColorPicker.d.ts +8 -0
  125. package/lib/components/ColorPicker/index.d.ts +2 -0
  126. package/lib/components/ColorPicker/styles.d.ts +35 -0
  127. package/lib/components/ColorPicker/types.d.ts +69 -0
  128. package/lib/components/ColorPicker/utils.d.ts +8 -0
  129. package/lib/components/ColorSwatch/ColorSwatch.d.ts +6 -0
  130. package/lib/components/ColorSwatch/index.d.ts +2 -0
  131. package/lib/components/ColorSwatch/types.d.ts +29 -0
  132. package/lib/components/Container/Container.d.ts +3 -0
  133. package/lib/components/Container/index.d.ts +2 -0
  134. package/lib/components/Container/types.d.ts +31 -0
  135. package/lib/components/ContextMenu/ContextMenu.d.ts +5 -0
  136. package/lib/components/ContextMenu/index.d.ts +2 -0
  137. package/lib/components/ContextMenu/types.d.ts +36 -0
  138. package/lib/components/CopyButton/CopyButton.d.ts +10 -0
  139. package/lib/components/CopyButton/index.d.ts +2 -0
  140. package/lib/components/CopyButton/types.d.ts +37 -0
  141. package/lib/components/DataTable/AdvancedFilterControl.d.ts +10 -0
  142. package/lib/components/DataTable/ColumnSettings.d.ts +16 -0
  143. package/lib/components/DataTable/DataTable.d.ts +5 -0
  144. package/lib/components/DataTable/hooks/useColumnSettings.d.ts +12 -0
  145. package/lib/components/DataTable/hooks/useDataTableState.d.ts +41 -0
  146. package/lib/components/DataTable/hooks/useRowSelection.d.ts +40 -0
  147. package/lib/components/DataTable/index.d.ts +1 -0
  148. package/lib/components/DataTable/types.d.ts +223 -0
  149. package/lib/components/DatePicker/DatePicker.d.ts +4 -0
  150. package/lib/components/DatePicker/index.d.ts +8 -0
  151. package/lib/components/DatePicker/types.d.ts +47 -0
  152. package/lib/components/DatePicker/utils.d.ts +30 -0
  153. package/lib/components/DatePickerInput/DatePickerInput.d.ts +4 -0
  154. package/lib/components/DatePickerInput/index.d.ts +2 -0
  155. package/lib/components/DatePickerInput/types.d.ts +41 -0
  156. package/lib/components/Dialog/Dialog.d.ts +3 -0
  157. package/lib/components/Dialog/DialogContext.d.ts +11 -0
  158. package/lib/components/Dialog/DialogRenderer.d.ts +2 -0
  159. package/lib/components/Dialog/hooks/useSimpleDialog.d.ts +25 -0
  160. package/lib/components/Dialog/index.d.ts +6 -0
  161. package/lib/components/Dialog/types.d.ts +35 -0
  162. package/lib/components/Disclaimer/Disclaimer.d.ts +11 -0
  163. package/lib/components/Disclaimer/disclaimerUtils.d.ts +21 -0
  164. package/lib/components/Disclaimer/index.d.ts +6 -0
  165. package/lib/components/Disclaimer/withDisclaimer.d.ts +13 -0
  166. package/lib/components/Divider/Divider.d.ts +2 -0
  167. package/lib/components/Divider/index.d.ts +2 -0
  168. package/lib/components/Divider/types.d.ts +22 -0
  169. package/lib/components/EmojiPicker/EmojiPicker.d.ts +6 -0
  170. package/lib/components/EmojiPicker/index.d.ts +2 -0
  171. package/lib/components/EmojiPicker/types.d.ts +29 -0
  172. package/lib/components/FileInput/FileInput.d.ts +3 -0
  173. package/lib/components/FileInput/index.d.ts +2 -0
  174. package/lib/components/FileInput/types.d.ts +82 -0
  175. package/lib/components/Flex/Flex.d.ts +38 -0
  176. package/lib/components/Flex/helpers.d.ts +13 -0
  177. package/lib/components/Flex/index.d.ts +2 -0
  178. package/lib/components/FloatingActions/FloatingActions.d.ts +29 -0
  179. package/lib/components/FloatingActions/index.d.ts +2 -0
  180. package/lib/components/Form/FormBase.d.ts +3 -0
  181. package/lib/components/Form/FormContext.d.ts +16 -0
  182. package/lib/components/Form/FormError.d.ts +3 -0
  183. package/lib/components/Form/FormField.d.ts +3 -0
  184. package/lib/components/Form/FormInput.d.ts +3 -0
  185. package/lib/components/Form/FormLabel.d.ts +3 -0
  186. package/lib/components/Form/FormSubmit.d.ts +3 -0
  187. package/lib/components/Form/OptimizedForm.d.ts +22 -0
  188. package/lib/components/Form/index.d.ts +9 -0
  189. package/lib/components/Form/types.d.ts +104 -0
  190. package/lib/components/FormLayout/FormField.d.ts +3 -0
  191. package/lib/components/FormLayout/FormGroup.d.ts +3 -0
  192. package/lib/components/FormLayout/FormLayout.d.ts +3 -0
  193. package/lib/components/FormLayout/FormSection.d.ts +3 -0
  194. package/lib/components/FormLayout/index.d.ts +5 -0
  195. package/lib/components/FormLayout/types.d.ts +31 -0
  196. package/lib/components/Forms/ContactForm.d.ts +3 -0
  197. package/lib/components/Forms/ForgotPasswordForm.d.ts +3 -0
  198. package/lib/components/Forms/LoginForm.d.ts +3 -0
  199. package/lib/components/Forms/SignupForm.d.ts +3 -0
  200. package/lib/components/Forms/index.d.ts +5 -0
  201. package/lib/components/Forms/types.d.ts +89 -0
  202. package/lib/components/Gallery/Gallery.d.ts +3 -0
  203. package/lib/components/Gallery/GalleryControls.d.ts +3 -0
  204. package/lib/components/Gallery/GalleryMetadata.d.ts +3 -0
  205. package/lib/components/Gallery/GalleryNew.d.ts +3 -0
  206. package/lib/components/Gallery/GalleryThumbnails.d.ts +3 -0
  207. package/lib/components/Gallery/index.d.ts +5 -0
  208. package/lib/components/Gallery/types.d.ts +68 -0
  209. package/lib/components/Gauge/Gauge.d.ts +41 -0
  210. package/lib/components/Gauge/index.d.ts +9 -0
  211. package/lib/components/Gauge/styles.d.ts +57 -0
  212. package/lib/components/Gauge/types.d.ts +210 -0
  213. package/lib/components/Gauge/utils.d.ts +72 -0
  214. package/lib/components/GradientText/GradientText.d.ts +46 -0
  215. package/lib/components/GradientText/index.d.ts +2 -0
  216. package/lib/components/GradientText/types.d.ts +39 -0
  217. package/lib/components/Grid/Grid.d.ts +11 -0
  218. package/lib/components/Grid/index.d.ts +2 -0
  219. package/lib/components/Grid/types.d.ts +32 -0
  220. package/lib/components/HoverCard/HoverCard.d.ts +2 -0
  221. package/lib/components/HoverCard/index.d.ts +2 -0
  222. package/lib/components/HoverCard/types.d.ts +53 -0
  223. package/lib/components/Icon/Icon.d.ts +6 -0
  224. package/lib/components/Icon/icons/actions.d.ts +2 -0
  225. package/lib/components/Icon/icons/data.d.ts +2 -0
  226. package/lib/components/Icon/icons/multimedia.d.ts +2 -0
  227. package/lib/components/Icon/icons/navigation.d.ts +2 -0
  228. package/lib/components/Icon/icons/platforms.d.ts +2 -0
  229. package/lib/components/Icon/icons/status.d.ts +2 -0
  230. package/lib/components/Icon/icons/ui.d.ts +2 -0
  231. package/lib/components/Icon/index.d.ts +2 -0
  232. package/lib/components/Icon/registry.d.ts +6 -0
  233. package/lib/components/Icon/types.d.ts +40 -0
  234. package/lib/components/IconButton/IconButton.d.ts +3 -0
  235. package/lib/components/IconButton/index.d.ts +2 -0
  236. package/lib/components/IconButton/types.d.ts +45 -0
  237. package/lib/components/Image/Image.d.ts +3 -0
  238. package/lib/components/Image/index.d.ts +2 -0
  239. package/lib/components/Image/types.d.ts +57 -0
  240. package/lib/components/Indicator/Indicator.d.ts +7 -0
  241. package/lib/components/Indicator/index.d.ts +2 -0
  242. package/lib/components/Indicator/types.d.ts +13 -0
  243. package/lib/components/Input/Input.d.ts +6 -0
  244. package/lib/components/Input/InputBase.d.ts +17 -0
  245. package/lib/components/Input/OptimizedInput.d.ts +19 -0
  246. package/lib/components/Input/PasswordInput.d.ts +3 -0
  247. package/lib/components/Input/index.d.ts +5 -0
  248. package/lib/components/Input/styles.d.ts +85 -0
  249. package/lib/components/Input/types.d.ts +120 -0
  250. package/lib/components/Input/validation/index.d.ts +14 -0
  251. package/lib/components/Input/validation/optimized.d.ts +33 -0
  252. package/lib/components/KeyCap/KeyCap.d.ts +6 -0
  253. package/lib/components/KeyCap/index.d.ts +3 -0
  254. package/lib/components/KeyCap/styles.d.ts +11 -0
  255. package/lib/components/KeyCap/types.d.ts +54 -0
  256. package/lib/components/Layout/Layout.d.ts +18 -0
  257. package/lib/components/Layout/index.d.ts +1 -0
  258. package/lib/components/Link/Link.d.ts +31 -0
  259. package/lib/components/Link/index.d.ts +2 -0
  260. package/lib/components/ListGroup/ListGroup.d.ts +19 -0
  261. package/lib/components/ListGroup/index.d.ts +2 -0
  262. package/lib/components/ListGroup/types.d.ts +26 -0
  263. package/lib/components/Loader/Loader.d.ts +8 -0
  264. package/lib/components/Loader/index.d.ts +2 -0
  265. package/lib/components/Loader/types.d.ts +18 -0
  266. package/lib/components/LoadingOverlay/LoadingOverlay.d.ts +3 -0
  267. package/lib/components/LoadingOverlay/index.d.ts +2 -0
  268. package/lib/components/LoadingOverlay/types.d.ts +16 -0
  269. package/lib/components/Lottie/Lottie.d.ts +30 -0
  270. package/lib/components/Lottie/index.d.ts +2 -0
  271. package/lib/components/Markdown/Markdown.d.ts +66 -0
  272. package/lib/components/Markdown/index.d.ts +1 -0
  273. package/lib/components/Masonry/Masonry.d.ts +7 -0
  274. package/lib/components/Masonry/index.d.ts +2 -0
  275. package/lib/components/Masonry/types.d.ts +39 -0
  276. package/lib/components/Menu/Menu.d.ts +29 -0
  277. package/lib/components/Menu/index.d.ts +2 -0
  278. package/lib/components/Menu/styles.d.ts +13 -0
  279. package/lib/components/Menu/types.d.ts +71 -0
  280. package/lib/components/MenuItemButton/MenuItemButton.d.ts +39 -0
  281. package/lib/components/MenuItemButton/index.d.ts +2 -0
  282. package/lib/components/MiniCalendar/MiniCalendar.d.ts +3 -0
  283. package/lib/components/MiniCalendar/index.d.ts +1 -0
  284. package/lib/components/MonthPicker/MonthPicker.d.ts +3 -0
  285. package/lib/components/MonthPicker/index.d.ts +2 -0
  286. package/lib/components/MonthPicker/types.d.ts +26 -0
  287. package/lib/components/MonthPickerInput/MonthPickerInput.d.ts +4 -0
  288. package/lib/components/MonthPickerInput/index.d.ts +2 -0
  289. package/lib/components/MonthPickerInput/types.d.ts +30 -0
  290. package/lib/components/Navigation/DrawerNavigator.d.ts +7 -0
  291. package/lib/components/Navigation/NavigationContainer.d.ts +11 -0
  292. package/lib/components/Navigation/NavigationContext.d.ts +11 -0
  293. package/lib/components/Navigation/Screen.d.ts +6 -0
  294. package/lib/components/Navigation/StackNavigator.d.ts +7 -0
  295. package/lib/components/Navigation/index.d.ts +6 -0
  296. package/lib/components/Navigation/types.d.ts +70 -0
  297. package/lib/components/NavigationProgress/NavigationProgress.d.ts +4 -0
  298. package/lib/components/NavigationProgress/defaults.d.ts +8 -0
  299. package/lib/components/NavigationProgress/hooks/useNavigationProgressState.d.ts +1 -0
  300. package/lib/components/NavigationProgress/index.d.ts +2 -0
  301. package/lib/components/NavigationProgress/styles/resolver.d.ts +1 -0
  302. package/lib/components/NavigationProgress/tokens.d.ts +4 -0
  303. package/lib/components/NavigationProgress/types.d.ts +30 -0
  304. package/lib/components/NumberInput/NumberInput.d.ts +5 -0
  305. package/lib/components/NumberInput/index.d.ts +2 -0
  306. package/lib/components/NumberInput/types.d.ts +76 -0
  307. package/lib/components/Overlay/Overlay.d.ts +4 -0
  308. package/lib/components/Overlay/index.d.ts +2 -0
  309. package/lib/components/Overlay/types.d.ts +27 -0
  310. package/lib/components/Pagination/Pagination.d.ts +6 -0
  311. package/lib/components/Pagination/index.d.ts +2 -0
  312. package/lib/components/Pagination/types.d.ts +58 -0
  313. package/lib/components/PhoneInput/PhoneInput.d.ts +3 -0
  314. package/lib/components/PhoneInput/index.d.ts +2 -0
  315. package/lib/components/PhoneInput/types.d.ts +27 -0
  316. package/lib/components/PinInput/PinInput.d.ts +6 -0
  317. package/lib/components/PinInput/index.d.ts +2 -0
  318. package/lib/components/PinInput/types.d.ts +41 -0
  319. package/lib/components/PressAnimation/PressAnimation.d.ts +29 -0
  320. package/lib/components/PressAnimation/index.d.ts +2 -0
  321. package/lib/components/Progress/Progress.d.ts +11 -0
  322. package/lib/components/Progress/index.d.ts +2 -0
  323. package/lib/components/Progress/types.d.ts +48 -0
  324. package/lib/components/QRCode/QRCode.d.ts +11 -0
  325. package/lib/components/QRCode/QRCodeSVG.d.ts +6 -0
  326. package/lib/components/QRCode/core/buildMatrix.d.ts +11 -0
  327. package/lib/components/QRCode/core/encoder.d.ts +12 -0
  328. package/lib/components/QRCode/core/mask.d.ts +2 -0
  329. package/lib/components/QRCode/core/mode.d.ts +6 -0
  330. package/lib/components/QRCode/core/reedSolomon.d.ts +1 -0
  331. package/lib/components/QRCode/core/tables.d.ts +24 -0
  332. package/lib/components/QRCode/index.d.ts +3 -0
  333. package/lib/components/QRCode/optimizations.d.ts +20 -0
  334. package/lib/components/QRCode/types.d.ts +76 -0
  335. package/lib/components/Radio/Radio.d.ts +10 -0
  336. package/lib/components/Radio/index.d.ts +2 -0
  337. package/lib/components/Radio/styles.d.ts +81 -0
  338. package/lib/components/Radio/types.d.ts +79 -0
  339. package/lib/components/Rating/Rating.d.ts +2 -0
  340. package/lib/components/Rating/index.d.ts +2 -0
  341. package/lib/components/Rating/types.d.ts +35 -0
  342. package/lib/components/Reveal/Reveal.d.ts +4 -0
  343. package/lib/components/Reveal/index.d.ts +2 -0
  344. package/lib/components/Reveal/types.d.ts +53 -0
  345. package/lib/components/RichTextEditor/RichTextEditor.d.ts +3 -0
  346. package/lib/components/RichTextEditor/index.d.ts +2 -0
  347. package/lib/components/RichTextEditor/styles.d.ts +61 -0
  348. package/lib/components/RichTextEditor/types.d.ts +150 -0
  349. package/lib/components/Search/Search.d.ts +6 -0
  350. package/lib/components/Search/index.d.ts +2 -0
  351. package/lib/components/Search/test-component.d.ts +3 -0
  352. package/lib/components/Search/types.d.ts +27 -0
  353. package/lib/components/SegmentedControl/SegmentedControl.d.ts +6 -0
  354. package/lib/components/SegmentedControl/index.d.ts +2 -0
  355. package/lib/components/SegmentedControl/types.d.ts +62 -0
  356. package/lib/components/Select/Select.d.ts +6 -0
  357. package/lib/components/Select/Select.types.d.ts +31 -0
  358. package/lib/components/Select/index.d.ts +2 -0
  359. package/lib/components/Select/types.d.ts +25 -0
  360. package/lib/components/ShimmerText/ShimmerText.d.ts +33 -0
  361. package/lib/components/ShimmerText/index.d.ts +2 -0
  362. package/lib/components/ShimmerText/types.d.ts +33 -0
  363. package/lib/components/Skeleton/Skeleton.d.ts +2 -0
  364. package/lib/components/Skeleton/index.d.ts +2 -0
  365. package/lib/components/Skeleton/types.d.ts +30 -0
  366. package/lib/components/Slider/Slider.d.ts +10 -0
  367. package/lib/components/Slider/SliderCore.d.ts +57 -0
  368. package/lib/components/Slider/index.d.ts +2 -0
  369. package/lib/components/Slider/types.d.ts +133 -0
  370. package/lib/components/Space/Space.d.ts +4 -0
  371. package/lib/components/Space/index.d.ts +2 -0
  372. package/lib/components/Space/types.d.ts +17 -0
  373. package/lib/components/Spoiler/Spoiler.d.ts +5 -0
  374. package/lib/components/Spoiler/index.d.ts +2 -0
  375. package/lib/components/Spoiler/types.d.ts +40 -0
  376. package/lib/components/Spotlight/DirectSpotlightState.d.ts +41 -0
  377. package/lib/components/Spotlight/Spotlight.d.ts +19 -0
  378. package/lib/components/Spotlight/SpotlightController.d.ts +13 -0
  379. package/lib/components/Spotlight/SpotlightStore.d.ts +32 -0
  380. package/lib/components/Spotlight/SpotlightTypes.d.ts +29 -0
  381. package/lib/components/Spotlight/index.d.ts +6 -0
  382. package/lib/components/Spotlight/types.d.ts +66 -0
  383. package/lib/components/Stepper/Stepper.d.ts +12 -0
  384. package/lib/components/Stepper/index.d.ts +2 -0
  385. package/lib/components/Stepper/types.d.ts +68 -0
  386. package/lib/components/Switch/Switch.d.ts +6 -0
  387. package/lib/components/Switch/index.d.ts +2 -0
  388. package/lib/components/Switch/styles.d.ts +85 -0
  389. package/lib/components/Switch/types.d.ts +54 -0
  390. package/lib/components/Table/Table.d.ts +115 -0
  391. package/lib/components/Table/index.d.ts +1 -0
  392. package/lib/components/TableOfContents/TableOfContents.d.ts +3 -0
  393. package/lib/components/TableOfContents/index.d.ts +2 -0
  394. package/lib/components/TableOfContents/types.d.ts +77 -0
  395. package/lib/components/Tabs/Tabs.d.ts +3 -0
  396. package/lib/components/Tabs/index.d.ts +2 -0
  397. package/lib/components/Tabs/types.d.ts +182 -0
  398. package/lib/components/Text/Text.d.ts +51 -0
  399. package/lib/components/Text/aliases.d.ts +22 -0
  400. package/lib/components/Text/index.d.ts +2 -0
  401. package/lib/components/TextArea/TextArea.d.ts +6 -0
  402. package/lib/components/TextArea/index.d.ts +2 -0
  403. package/lib/components/TextArea/meta/index.d.ts +97 -0
  404. package/lib/components/TextArea/styles.d.ts +95 -0
  405. package/lib/components/TextArea/types.d.ts +33 -0
  406. package/lib/components/TimePicker/TimePicker.d.ts +3 -0
  407. package/lib/components/TimePicker/index.d.ts +2 -0
  408. package/lib/components/TimePicker/types.d.ts +32 -0
  409. package/lib/components/TimePickerInput/index.d.ts +2 -0
  410. package/lib/components/Timeline/Timeline.d.ts +13 -0
  411. package/lib/components/Timeline/index.d.ts +2 -0
  412. package/lib/components/Timeline/types.d.ts +53 -0
  413. package/lib/components/Title/Title.d.ts +10 -0
  414. package/lib/components/Title/index.d.ts +2 -0
  415. package/lib/components/Title/types.d.ts +55 -0
  416. package/lib/components/Toast/Toast.d.ts +8 -0
  417. package/lib/components/Toast/ToastProvider.d.ts +88 -0
  418. package/lib/components/Toast/index.d.ts +3 -0
  419. package/lib/components/Toast/types.d.ts +78 -0
  420. package/lib/components/Toggle/Toggle.d.ts +10 -0
  421. package/lib/components/Toggle/ToggleBar.d.ts +42 -0
  422. package/lib/components/Toggle/index.d.ts +4 -0
  423. package/lib/components/Toggle/types.d.ts +68 -0
  424. package/lib/components/Tooltip/Tooltip.d.ts +2 -0
  425. package/lib/components/Tooltip/index.d.ts +2 -0
  426. package/lib/components/Tooltip/types.d.ts +44 -0
  427. package/lib/components/Tree/Tree.d.ts +5 -0
  428. package/lib/components/Tree/index.d.ts +2 -0
  429. package/lib/components/Tree/types.d.ts +65 -0
  430. package/lib/components/Video/NativeVideoPlayer.d.ts +33 -0
  431. package/lib/components/Video/Video.d.ts +3 -0
  432. package/lib/components/Video/VideoControls.d.ts +17 -0
  433. package/lib/components/Video/VideoTimeline.d.ts +12 -0
  434. package/lib/components/Video/YouTubePlayer.d.ts +44 -0
  435. package/lib/components/Video/index.d.ts +2 -0
  436. package/lib/components/Video/types.d.ts +145 -0
  437. package/lib/components/Waveform/Waveform.d.ts +3 -0
  438. package/lib/components/Waveform/WaveformSkeleton.d.ts +9 -0
  439. package/lib/components/Waveform/index.d.ts +4 -0
  440. package/lib/components/Waveform/styles.d.ts +53 -0
  441. package/lib/components/Waveform/types.d.ts +124 -0
  442. package/lib/components/Waveform/utils.d.ts +95 -0
  443. package/lib/components/YearPicker/YearPicker.d.ts +3 -0
  444. package/lib/components/YearPicker/index.d.ts +2 -0
  445. package/lib/components/YearPicker/types.d.ts +24 -0
  446. package/lib/components/YearPickerInput/YearPickerInput.d.ts +4 -0
  447. package/lib/components/YearPickerInput/index.d.ts +2 -0
  448. package/lib/components/YearPickerInput/types.d.ts +26 -0
  449. package/lib/components/_internal/FieldHeader.d.ts +21 -0
  450. package/lib/components/index.d.ts +164 -0
  451. package/lib/components/optimized.d.ts +74 -0
  452. package/lib/components/types.d.ts +57 -0
  453. package/lib/contexts/TitleRegistryContext.d.ts +20 -0
  454. package/lib/contexts/index.d.ts +1 -0
  455. package/lib/core/accessibility/advancedHooks.d.ts +82 -0
  456. package/lib/core/accessibility/constants.d.ts +85 -0
  457. package/lib/core/accessibility/context.d.ts +5 -0
  458. package/lib/core/accessibility/hooks.d.ts +33 -0
  459. package/lib/core/accessibility/index.d.ts +6 -0
  460. package/lib/core/accessibility/types.d.ts +35 -0
  461. package/lib/core/accessibility/utils.d.ts +56 -0
  462. package/lib/core/animations/index.d.ts +2 -0
  463. package/lib/core/animations/transitions.d.ts +31 -0
  464. package/lib/core/components/ClearButton.d.ts +15 -0
  465. package/lib/core/components/InputContainer.d.ts +19 -0
  466. package/lib/core/design-tokens.d.ts +292 -0
  467. package/lib/core/factory/factory.d.ts +33 -0
  468. package/lib/core/factory/index.d.ts +4 -0
  469. package/lib/core/factory/polymorphicFactory.d.ts +38 -0
  470. package/lib/core/haptics/HapticsProvider.d.ts +14 -0
  471. package/lib/core/hooks/useDropdownPositioning.d.ts +61 -0
  472. package/lib/core/hooks/usePopoverPositioning.d.ts +33 -0
  473. package/lib/core/i18n/I18nContext.d.ts +8 -0
  474. package/lib/core/i18n/index.d.ts +2 -0
  475. package/lib/core/i18n/types.d.ts +22 -0
  476. package/lib/core/index.d.ts +15 -0
  477. package/lib/core/interactive-states.d.ts +41 -0
  478. package/lib/core/motion/ReducedMotionProvider.d.ts +10 -0
  479. package/lib/core/motion/motionTokens.d.ts +12 -0
  480. package/lib/core/providers/DirectionProvider.d.ts +88 -0
  481. package/lib/core/providers/OverlayProvider.d.ts +40 -0
  482. package/lib/core/providers/OverlayRenderer.d.ts +7 -0
  483. package/lib/core/providers/index.d.ts +5 -0
  484. package/lib/core/responsive/index.d.ts +22 -0
  485. package/lib/core/sound/context.d.ts +21 -0
  486. package/lib/core/sound/hooks.d.ts +214 -0
  487. package/lib/core/sound/index.d.ts +5 -0
  488. package/lib/core/sound/mockContext.d.ts +21 -0
  489. package/lib/core/sound/sounds.d.ts +17 -0
  490. package/lib/core/sound/types.d.ts +79 -0
  491. package/lib/core/style-factory.d.ts +23 -0
  492. package/lib/core/theme/CSSVariables.d.ts +9 -0
  493. package/lib/core/theme/PlatformBlocksProvider.d.ts +52 -0
  494. package/lib/core/theme/ThemeModeProvider.d.ts +42 -0
  495. package/lib/core/theme/ThemeProvider.d.ts +19 -0
  496. package/lib/core/theme/breakpoints.d.ts +34 -0
  497. package/lib/core/theme/darkTheme.d.ts +2 -0
  498. package/lib/core/theme/defaultTheme.d.ts +2 -0
  499. package/lib/core/theme/index.d.ts +12 -0
  500. package/lib/core/theme/radius.d.ts +132 -0
  501. package/lib/core/theme/shadow.d.ts +119 -0
  502. package/lib/core/theme/sizes.d.ts +185 -0
  503. package/lib/core/theme/types.d.ts +190 -0
  504. package/lib/core/theme/unified-sizing.d.ts +65 -0
  505. package/lib/core/theme/useColorScheme.d.ts +6 -0
  506. package/lib/core/theme/utils.d.ts +9 -0
  507. package/lib/core/unified-styles.d.ts +12 -0
  508. package/lib/core/utils/UniversalCSS.d.ts +14 -0
  509. package/lib/core/utils/debounce.d.ts +16 -0
  510. package/lib/core/utils/hash.d.ts +4 -0
  511. package/lib/core/utils/index.d.ts +38 -0
  512. package/lib/core/utils/layout.d.ts +44 -0
  513. package/lib/core/utils/performance.d.ts +30 -0
  514. package/lib/core/utils/positioning-enhanced.d.ts +88 -0
  515. package/lib/core/utils/rtl.d.ts +174 -0
  516. package/lib/core/utils/shadow.d.ts +13 -0
  517. package/lib/core/utils/spacing.d.ts +56 -0
  518. package/lib/core/utils/universal.d.ts +47 -0
  519. package/lib/core/utils/universalSimple.d.ts +37 -0
  520. package/lib/core/utils/withUniversalProps.d.ts +26 -0
  521. package/lib/esm/index.js +35209 -0
  522. package/lib/esm/index.js.map +1 -0
  523. package/lib/hooks/index.d.ts +6 -0
  524. package/lib/hooks/useClipboard.d.ts +20 -0
  525. package/lib/hooks/useHaptics.d.ts +22 -0
  526. package/lib/hooks/useHotkeys.d.ts +42 -0
  527. package/lib/hooks/useMaskedInput.d.ts +35 -0
  528. package/lib/hooks/useScrollSpy.d.ts +38 -0
  529. package/lib/hooks/useTitleRegistration.d.ts +14 -0
  530. package/lib/index.d.ts +220 -0
  531. package/lib/utils/index.d.ts +1 -0
  532. package/lib/utils/mask.d.ts +138 -0
  533. package/package.json +148 -0
@@ -0,0 +1,65 @@
1
+ import { SizeValue } from '../theme/types';
2
+ import { PlatformBlocksTheme } from '../theme/types';
3
+ /**
4
+ * Unified sizing system for all UI components
5
+ * This ensures consistent spacing, heights, and typography across the library
6
+ */
7
+ export interface ComponentSizeConfig {
8
+ fontSize: number;
9
+ padding: number;
10
+ height: number;
11
+ iconSize: number;
12
+ borderRadius: number;
13
+ }
14
+ export declare const COMPONENT_SIZES: Record<SizeValue, ComponentSizeConfig>;
15
+ /**
16
+ * Get unified size configuration for any component
17
+ */
18
+ export declare function getComponentSize(size?: SizeValue): ComponentSizeConfig;
19
+ /**
20
+ * Create consistent interactive element styles (buttons, inputs, etc.)
21
+ */
22
+ export declare function createInteractiveStyles(theme: PlatformBlocksTheme, size?: SizeValue, variant?: 'filled' | 'outline' | 'ghost', state?: 'default' | 'hover' | 'focus' | 'disabled'): {
23
+ opacity: number;
24
+ minHeight: number;
25
+ paddingHorizontal: number;
26
+ paddingVertical: number;
27
+ borderRadius: number;
28
+ fontSize: number;
29
+ borderWidth: number;
30
+ } | {
31
+ opacity: number;
32
+ minHeight: number;
33
+ paddingHorizontal: number;
34
+ paddingVertical: number;
35
+ borderRadius: number;
36
+ fontSize: number;
37
+ borderWidth: number;
38
+ } | {
39
+ boxShadow?: string | undefined;
40
+ borderColor: string;
41
+ minHeight: number;
42
+ paddingHorizontal: number;
43
+ paddingVertical: number;
44
+ borderRadius: number;
45
+ fontSize: number;
46
+ borderWidth: number;
47
+ } | {
48
+ opacity: number;
49
+ backgroundColor: string;
50
+ color: string;
51
+ minHeight: number;
52
+ paddingHorizontal: number;
53
+ paddingVertical: number;
54
+ borderRadius: number;
55
+ fontSize: number;
56
+ borderWidth: number;
57
+ };
58
+ /**
59
+ * Consistent icon sizing within components
60
+ */
61
+ export declare function getIconSize(componentSize?: SizeValue, context?: 'default' | 'small' | 'large'): number;
62
+ /**
63
+ * Consistent spacing for component sections (left/right sections, gaps, etc.)
64
+ */
65
+ export declare function getSectionSpacing(size?: SizeValue): number;
@@ -0,0 +1,6 @@
1
+ export type ColorScheme = 'light' | 'dark';
2
+ /**
3
+ * Hook that detects and responds to OS color scheme changes
4
+ * Works on web and React Native
5
+ */
6
+ export declare function useColorScheme(): ColorScheme;
@@ -0,0 +1,9 @@
1
+ import { PlatformBlocksTheme, PlatformBlocksThemeOverride } from './types';
2
+ /**
3
+ * Deep merges a theme override with the default theme
4
+ */
5
+ export declare function mergeTheme(defaultTheme: PlatformBlocksTheme, themeOverride?: PlatformBlocksThemeOverride): PlatformBlocksTheme;
6
+ /**
7
+ * Creates a theme object with proper type checking
8
+ */
9
+ export declare function createTheme(themeOverride: PlatformBlocksThemeOverride): PlatformBlocksThemeOverride;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Core styling utilities for Platform Blocks UI
3
+ *
4
+ * This module provides unified styling utilities to ensure consistency
5
+ * across all components in the library.
6
+ */
7
+ export { DESIGN_TOKENS, createTransition, getResponsiveValue } from './design-tokens';
8
+ export { COMPONENT_SIZES as UNIFIED_COMPONENT_SIZES, getComponentSize as getUnifiedComponentSize, createInteractiveStyles as createUnifiedInteractiveStyles, getIconSize as getUnifiedIconSize, getSectionSpacing as getUnifiedSectionSpacing } from './theme/unified-sizing';
9
+ export { createFocusStyles, createHoverStyles, createPressedStyles, createDisabledStyles, createInteractiveStateStyles, createTransitionStyles, type InteractiveStateConfig } from './interactive-states';
10
+ export { createComponentStyles, type StyleFactoryConfig } from './style-factory';
11
+ export { ClearButton, type ClearButtonProps } from './components/ClearButton';
12
+ export { InputContainer, type InputContainerProps } from './components/InputContainer';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Universal CSS styles for Platform Blocks universal props
3
+ * Optimized for React Native (Expo) with web compatibility
4
+ */
5
+ /**
6
+ * Generates global CSS for universal props functionality
7
+ * This creates the CSS that makes lightHidden/darkHidden work on web
8
+ */
9
+ export declare function generateUniversalCSS(): string;
10
+ /**
11
+ * Component that injects global CSS for universal props
12
+ * Web-only component - React Native uses inline styles instead
13
+ */
14
+ export declare function UniversalCSS(): null;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Debounce utility for performance optimization
3
+ */
4
+ export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number, immediate?: boolean): (...args: Parameters<T>) => void;
5
+ /**
6
+ * Throttle utility to limit function execution rate
7
+ */
8
+ export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
9
+ /**
10
+ * Performance monitoring utilities
11
+ */
12
+ export declare function measurePerformance<T>(name: string, fn: () => T): T;
13
+ /**
14
+ * Async version of performance measurement
15
+ */
16
+ export declare function measureAsyncPerformance<T>(name: string, fn: () => Promise<T>): Promise<T>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Simple non-cryptographic stable hash (FNV-1a 32-bit) returning base36 string
3
+ */
4
+ export declare function fastHash(input: string): string;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Converts pixel values to rem units
3
+ */
4
+ export declare function rem(value: number | string): string;
5
+ export { SpacingProps, BaseSystemProps, getSpacingStyles, extractSpacingProps } from './spacing';
6
+ export { UniversalProps, ResponsiveProps, UniversalSystemProps, getUniversalClasses, extractUniversalProps, shouldHideComponent, shouldHideForBreakpoint, useUniversalStyles } from './universal';
7
+ export { withUniversalProps, useUniversalProps } from './withUniversalProps';
8
+ export { LayoutProps, getLayoutStyles, extractLayoutProps } from './layout';
9
+ export { extractShadowProps, getShadowStyles } from './shadow';
10
+ export { flipDirection, flipHorizontal, getLogicalProperty, transformRTLStyle, flipAlignment, shouldMirrorIcon, getIconMirrorTransform, swapStartEnd, getWritingDirection, getDefaultTextAlign, mirrorPlacement, reverseArray, DEFAULT_MIRRORABLE_ICONS, } from './rtl';
11
+ export { debounce, throttle, measurePerformance, measureAsyncPerformance } from './debounce';
12
+ export { INPUT_PERFORMANCE_CONFIG, PERFORMANCE_THRESHOLDS, buildInputComponents } from './performance';
13
+ export { calculateOverlayPosition, calculateOverlayPositionEnhanced, getViewport, measureElement, pointInRect, getScrollPosition, clearOverlayPositionCache } from './positioning-enhanced';
14
+ export type { Rect, Viewport, PositionResult, PlacementType, PositioningOptions } from './positioning-enhanced';
15
+ /**
16
+ * Converts values to px
17
+ */
18
+ export declare function px(value: string | number): number;
19
+ /**
20
+ * Gets a size value from theme or returns the value if it's a string
21
+ */
22
+ export declare function getSize(size: string | number | undefined, prefix: string, theme?: any): string | undefined;
23
+ /**
24
+ * Gets font size value
25
+ */
26
+ export declare function getFontSize(size: string | undefined): string | undefined;
27
+ /**
28
+ * Gets radius value
29
+ */
30
+ export declare function getRadius(radius: string | number | undefined): string | undefined;
31
+ /**
32
+ * Gets shadow value
33
+ */
34
+ export declare function getShadow(shadow: string | undefined): string | undefined;
35
+ /**
36
+ * Gets color value from theme
37
+ */
38
+ export declare function getColor(color: string | undefined, shade?: number | string): string | undefined;
@@ -0,0 +1,44 @@
1
+ import { ViewStyle, DimensionValue } from 'react-native';
2
+ export interface LayoutProps {
3
+ /** Makes the component fill the full width of its parent */
4
+ fullWidth?: boolean;
5
+ /** Sets a specific width (shorthand for width) */
6
+ w?: DimensionValue;
7
+ /** Sets a specific width */
8
+ width?: DimensionValue;
9
+ /** Sets a specific height */
10
+ height?: DimensionValue;
11
+ /** Sets the maximum width */
12
+ maxWidth?: DimensionValue;
13
+ /** Sets the minimum width */
14
+ minWidth?: DimensionValue;
15
+ /** Sets the maximum height */
16
+ maxHeight?: DimensionValue;
17
+ /** Sets the minimum height */
18
+ minHeight?: DimensionValue;
19
+ }
20
+ /**
21
+ * Generates layout styles based on provided layout properties.
22
+ *
23
+ * @param props - The layout properties object
24
+ * @param props.fullWidth - When true, sets width to 100%
25
+ * @param props.w - Shorthand width property (overrides fullWidth)
26
+ * @param props.width - Specific width value (overrides fullWidth and w)
27
+ * @param props.height - Height value
28
+ * @param props.maxWidth - Maximum width constraint
29
+ * @param props.minWidth - Minimum width constraint
30
+ * @param props.maxHeight - Maximum height constraint
31
+ * @param props.minHeight - Minimum height constraint
32
+ *
33
+ * @returns A partial ViewStyle object containing the computed layout styles
34
+ *
35
+ * @remarks
36
+ * Property precedence for width: width > w > fullWidth
37
+ * The function processes width properties in order of specificity, with more specific
38
+ * properties overriding more general ones.
39
+ */
40
+ export declare function getLayoutStyles(props: LayoutProps): Partial<ViewStyle>;
41
+ export declare function extractLayoutProps<T extends LayoutProps>(props: T): {
42
+ layoutProps: LayoutProps;
43
+ otherProps: Omit<T, keyof LayoutProps>;
44
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Performance configuration constants
3
+ */
4
+ export declare const INPUT_PERFORMANCE_CONFIG: {
5
+ readonly defaultValidationDebounce: 300;
6
+ readonly batchFormUpdates: true;
7
+ readonly lazyLoadThreshold: 10;
8
+ readonly enableVirtualScrolling: true;
9
+ readonly virtualScrollThreshold: 50;
10
+ readonly memoizeInputStyles: true;
11
+ readonly shallowCompareProps: true;
12
+ readonly treeShakeValidators: true;
13
+ readonly splitFormChunks: true;
14
+ };
15
+ export declare const PERFORMANCE_THRESHOLDS: {
16
+ readonly maxInputRenderTime: 16;
17
+ readonly maxValidationTime: 100;
18
+ readonly maxFormSubmissionTime: 1000;
19
+ readonly maxFormFields: 100;
20
+ readonly maxValidationRules: 20;
21
+ };
22
+ /**
23
+ * Production build configuration for input components
24
+ */
25
+ export declare const buildInputComponents: () => {
26
+ core: string[];
27
+ optional: string[];
28
+ advanced: string[];
29
+ validation: string[];
30
+ };
@@ -0,0 +1,88 @@
1
+ export declare const clearOverlayPositionCache: () => void;
2
+ export interface Rect {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ export interface Viewport {
9
+ width: number;
10
+ height: number;
11
+ padding: number;
12
+ }
13
+ export interface PositionResult {
14
+ x: number;
15
+ y: number;
16
+ placement: PlacementType;
17
+ maxWidth?: number;
18
+ maxHeight?: number;
19
+ /** Indicates if the popover was flipped to stay in bounds */
20
+ flipped: boolean;
21
+ /** Indicates if the popover was shifted to stay in bounds */
22
+ shifted: boolean;
23
+ /** Final calculated dimensions that fit in viewport */
24
+ finalWidth: number;
25
+ finalHeight: number;
26
+ }
27
+ export type PlacementType = 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
28
+ export interface PositioningOptions {
29
+ placement?: PlacementType;
30
+ offset?: number;
31
+ viewport?: Viewport;
32
+ strategy?: 'absolute' | 'fixed';
33
+ /** Enable flipping to opposite side when popover would go off-screen */
34
+ flip?: boolean;
35
+ /** Enable shifting within bounds when popover would go off-screen */
36
+ shift?: boolean;
37
+ /** Minimum distance from viewport edges */
38
+ boundary?: number;
39
+ /** Fallback placements to try if primary placement doesn't fit */
40
+ fallbackPlacements?: PlacementType[];
41
+ }
42
+ /**
43
+ * Enhanced overlay positioning that prevents off-screen rendering with intelligent caching
44
+ */
45
+ export declare function calculateOverlayPositionEnhanced(anchor: Rect, overlay: {
46
+ width: number;
47
+ height: number;
48
+ }, options?: PositioningOptions): PositionResult;
49
+ /**
50
+ * Get current viewport dimensions
51
+ */
52
+ export declare function getViewport(): Viewport;
53
+ /**
54
+ * Measure element dimensions and position
55
+ */
56
+ export declare function measureElement(ref: any): Promise<Rect>;
57
+ /**
58
+ * Legacy overlay positioning function (simplified interface)
59
+ *
60
+ * @deprecated Use calculateOverlayPositionEnhanced for better positioning with flip/shift support
61
+ */
62
+ export declare function calculateOverlayPosition(anchor: Rect, overlay: {
63
+ width: number;
64
+ height: number;
65
+ }, options?: {
66
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
67
+ offset?: number;
68
+ viewport?: Viewport;
69
+ strategy?: 'absolute' | 'fixed';
70
+ }): Omit<PositionResult, 'flipped' | 'shifted' | 'finalWidth' | 'finalHeight'>;
71
+ /**
72
+ * Alias for backward compatibility
73
+ */
74
+ export { calculateOverlayPosition as calculateOverlayPositionLegacy };
75
+ /**
76
+ * Check if a point is inside a rectangle
77
+ */
78
+ export declare function pointInRect(point: {
79
+ x: number;
80
+ y: number;
81
+ }, rect: Rect): boolean;
82
+ /**
83
+ * Get scroll position for web compatibility
84
+ */
85
+ export declare function getScrollPosition(): {
86
+ x: number;
87
+ y: number;
88
+ };
@@ -0,0 +1,174 @@
1
+ /**
2
+ * RTL Utility Functions
3
+ *
4
+ * Helper functions for handling Right-to-Left (RTL) layouts and styling.
5
+ * These utilities help components adapt to RTL direction automatically.
6
+ */
7
+ import { ViewStyle, TextStyle, ImageStyle } from 'react-native';
8
+ /**
9
+ * Type for flex direction values
10
+ */
11
+ type FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
12
+ /**
13
+ * Type for alignment values
14
+ */
15
+ type Alignment = 'left' | 'right' | 'center' | 'flex-start' | 'flex-end';
16
+ /**
17
+ * Flip horizontal flex direction based on RTL state
18
+ *
19
+ * @param direction - The flex direction to potentially flip
20
+ * @param isRTL - Whether the current direction is RTL
21
+ * @returns The flipped direction if RTL and horizontal, otherwise original
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * const { isRTL } = useDirection();
26
+ * const flexDirection = flipDirection('row', isRTL); // 'row-reverse' in RTL
27
+ * ```
28
+ */
29
+ export declare function flipDirection(direction: FlexDirection, isRTL: boolean): FlexDirection;
30
+ /**
31
+ * Flip horizontal value (useful for transforms, positions)
32
+ *
33
+ * @param value - The numeric value to flip
34
+ * @param isRTL - Whether the current direction is RTL
35
+ * @returns Negative value if RTL, positive if LTR
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * const translateX = flipHorizontal(100, isRTL); // -100 in RTL
40
+ * ```
41
+ */
42
+ export declare function flipHorizontal(value: number, isRTL: boolean): number;
43
+ /**
44
+ * Get physical property name from logical property
45
+ *
46
+ * @param prop - Logical property name ('start' or 'end')
47
+ * @param isRTL - Whether the current direction is RTL
48
+ * @returns Physical property name ('left' or 'right')
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * const side = getLogicalProperty('start', isRTL); // 'right' in RTL, 'left' in LTR
53
+ * ```
54
+ */
55
+ export declare function getLogicalProperty(prop: 'start' | 'end', isRTL: boolean): 'left' | 'right';
56
+ /**
57
+ * Swap left/right values in a style object for RTL
58
+ *
59
+ * @param style - Style object to transform
60
+ * @param isRTL - Whether the current direction is RTL
61
+ * @returns Transformed style object
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * const style = transformRTLStyle({ marginLeft: 10, marginRight: 20 }, true);
66
+ * // Returns: { marginLeft: 20, marginRight: 10 }
67
+ * ```
68
+ */
69
+ export declare function transformRTLStyle<T extends ViewStyle | TextStyle | ImageStyle>(style: T, isRTL: boolean): T;
70
+ /**
71
+ * Flip text alignment for RTL
72
+ *
73
+ * @param align - The alignment to flip
74
+ * @param isRTL - Whether the current direction is RTL
75
+ * @returns Flipped alignment
76
+ */
77
+ export declare function flipAlignment(align: Alignment, isRTL: boolean): Alignment;
78
+ /**
79
+ * List of icon names that should be mirrored in RTL
80
+ * These are directional icons that point left or right
81
+ */
82
+ declare const DEFAULT_MIRRORABLE_ICONS: string[];
83
+ /**
84
+ * Check if an icon should be mirrored in RTL
85
+ *
86
+ * @param iconName - The name of the icon
87
+ * @param isRTL - Whether the current direction is RTL
88
+ * @param customMirrorableIcons - Optional custom list of mirrorable icons
89
+ * @returns Whether the icon should be mirrored
90
+ *
91
+ * @example
92
+ * ```tsx
93
+ * const shouldMirror = shouldMirrorIcon('chevron-right', isRTL);
94
+ * const transform = shouldMirror ? [{ scaleX: -1 }] : undefined;
95
+ * ```
96
+ */
97
+ export declare function shouldMirrorIcon(iconName: string, isRTL: boolean, customMirrorableIcons?: string[]): boolean;
98
+ /**
99
+ * Get transform style for mirroring an icon
100
+ *
101
+ * @param iconName - The name of the icon
102
+ * @param isRTL - Whether the current direction is RTL
103
+ * @param customMirrorableIcons - Optional custom list of mirrorable icons
104
+ * @returns Transform array for horizontal flip or undefined
105
+ *
106
+ * @example
107
+ * ```tsx
108
+ * const transform = getIconMirrorTransform('chevron-right', isRTL);
109
+ * <Icon style={{ transform }} />
110
+ * ```
111
+ */
112
+ export declare function getIconMirrorTransform(iconName: string, isRTL: boolean, customMirrorableIcons?: string[]): {
113
+ scaleX: number;
114
+ }[] | undefined;
115
+ /**
116
+ * Swap start and end values in an object
117
+ * Useful for converting logical property values
118
+ *
119
+ * @example
120
+ * ```tsx
121
+ * const spacing = { start: 10, end: 20 };
122
+ * const swapped = swapStartEnd(spacing, isRTL);
123
+ * // Returns: { start: 20, end: 10 } in RTL
124
+ * ```
125
+ */
126
+ export declare function swapStartEnd<T extends Record<string, any>>(obj: T, isRTL: boolean): T;
127
+ /**
128
+ * Get text writing direction for TextInput
129
+ *
130
+ * @param isRTL - Whether the current direction is RTL
131
+ * @returns 'rtl' or 'ltr'
132
+ */
133
+ export declare function getWritingDirection(isRTL: boolean): 'rtl' | 'ltr';
134
+ /**
135
+ * Get default text alignment based on direction
136
+ *
137
+ * @param isRTL - Whether the current direction is RTL
138
+ * @returns 'right' in RTL, 'left' in LTR
139
+ */
140
+ export declare function getDefaultTextAlign(isRTL: boolean): 'left' | 'right';
141
+ /**
142
+ * Mirror a placement string (e.g., for tooltips, popovers)
143
+ *
144
+ * @param placement - Placement string (e.g., 'left', 'right', 'top-start')
145
+ * @param isRTL - Whether the current direction is RTL
146
+ * @returns Mirrored placement
147
+ *
148
+ * @example
149
+ * ```tsx
150
+ * const placement = mirrorPlacement('left-start', isRTL);
151
+ * // Returns 'right-start' in RTL
152
+ * ```
153
+ */
154
+ export declare function mirrorPlacement(placement: string, isRTL: boolean): string;
155
+ /**
156
+ * Reverse an array if RTL
157
+ * Useful for reversing breadcrumbs, pagination, etc.
158
+ *
159
+ * @param array - Array to potentially reverse
160
+ * @param isRTL - Whether the current direction is RTL
161
+ * @returns Reversed array if RTL, original if LTR
162
+ *
163
+ * @example
164
+ * ```tsx
165
+ * const items = [1, 2, 3];
166
+ * const displayed = reverseArray(items, isRTL);
167
+ * // Returns [3, 2, 1] in RTL
168
+ * ```
169
+ */
170
+ export declare function reverseArray<T>(array: T[], isRTL: boolean): T[];
171
+ /**
172
+ * Export the default list of mirrorable icons for customization
173
+ */
174
+ export { DEFAULT_MIRRORABLE_ICONS };
@@ -0,0 +1,13 @@
1
+ import { ShadowProps, COMPONENT_SHADOW_DEFAULTS } from '../theme/shadow';
2
+ import { PlatformBlocksTheme } from '../theme/types';
3
+ /**
4
+ * Helper to extract shadow props from component props
5
+ */
6
+ export declare function extractShadowProps<T extends ShadowProps>(props: T): {
7
+ shadowProps: ShadowProps;
8
+ otherProps: Omit<T, keyof ShadowProps>;
9
+ };
10
+ /**
11
+ * Utility function to generate shadow styles from props
12
+ */
13
+ export declare function getShadowStyles(shadowProps: ShadowProps, theme: PlatformBlocksTheme, componentType?: keyof typeof COMPONENT_SHADOW_DEFAULTS): Record<string, any>;
@@ -0,0 +1,56 @@
1
+ import { SpacingValue } from '../theme/types';
2
+ import { UniversalSystemProps } from './universal';
3
+ /** Re-export SpacingValue from theme types */
4
+ export type { SpacingValue } from '../theme/types';
5
+ /** Base system props that include universal props */
6
+ export interface BaseSystemProps extends UniversalSystemProps {
7
+ }
8
+ /** Enhanced spacing prop types with CSS value support */
9
+ export interface SpacingProps extends BaseSystemProps {
10
+ /** All margins */
11
+ m?: SpacingValue;
12
+ /** Horizontal margins (left + right) */
13
+ mx?: SpacingValue;
14
+ /** Vertical margins (top + bottom) */
15
+ my?: SpacingValue;
16
+ /** Margin top */
17
+ mt?: SpacingValue;
18
+ /** Margin right */
19
+ mr?: SpacingValue;
20
+ /** Margin bottom */
21
+ mb?: SpacingValue;
22
+ /** Margin left */
23
+ ml?: SpacingValue;
24
+ /** All padding */
25
+ p?: SpacingValue;
26
+ /** Horizontal padding (left + right) */
27
+ px?: SpacingValue;
28
+ /** Vertical padding (top + bottom) */
29
+ py?: SpacingValue;
30
+ /** Padding top */
31
+ pt?: SpacingValue;
32
+ /** Padding right */
33
+ pr?: SpacingValue;
34
+ /** Padding bottom */
35
+ pb?: SpacingValue;
36
+ /** Padding left */
37
+ pl?: SpacingValue;
38
+ }
39
+ /**
40
+ * Enhanced utility function to generate spacing styles from props
41
+ * Now supports RTL-aware spacing using logical properties on web and swapped values on native
42
+ *
43
+ * @param props - The spacing props to convert to styles
44
+ * @param isRTL - Whether the current direction is RTL (optional, defaults to false for backwards compatibility)
45
+ * @returns A record of CSS style properties
46
+ */
47
+ export declare function getSpacingStyles(props: SpacingProps, isRTL?: boolean): Record<string, number | string | undefined>;
48
+ /**
49
+ * Helper to extract spacing props from component props
50
+ * @param props - The component props to extract spacing props from
51
+ * @returns An object containing separated spacing props and other props
52
+ */
53
+ export declare function extractSpacingProps<T extends SpacingProps>(props: T): {
54
+ spacingProps: SpacingProps;
55
+ otherProps: Omit<T, keyof SpacingProps>;
56
+ };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Universal props system for Platform Blocks components
3
+ * Provides props that can be applied to all components in the library
4
+ * Optimized for React Native (Expo) with web compatibility
5
+ */
6
+ import { ColorScheme } from '../theme/useColorScheme';
7
+ export interface UniversalProps {
8
+ /** Determines whether component should be hidden in light color scheme */
9
+ lightHidden?: boolean;
10
+ /** Determines whether component should be hidden in dark color scheme */
11
+ darkHidden?: boolean;
12
+ }
13
+ export interface ResponsiveProps {
14
+ /** Hide component above this breakpoint */
15
+ hiddenFrom?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
16
+ /** Show component only above this breakpoint */
17
+ visibleFrom?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
18
+ }
19
+ export interface UniversalSystemProps extends UniversalProps, ResponsiveProps {
20
+ }
21
+ /**
22
+ * Generates CSS class names based on universal props
23
+ */
24
+ export declare function getUniversalClasses(props: UniversalSystemProps): string[];
25
+ /**
26
+ * Extracts universal props from component props
27
+ */
28
+ export declare function extractUniversalProps<T extends UniversalSystemProps>(props: T): {
29
+ universalProps: UniversalSystemProps;
30
+ otherProps: Omit<T, keyof UniversalSystemProps>;
31
+ };
32
+ /**
33
+ * Determines if a component should be hidden based on responsive breakpoints
34
+ */
35
+ export declare function shouldHideForBreakpoint(universalProps: ResponsiveProps): boolean;
36
+ /**
37
+ * Determines if a component should be hidden based on current color scheme
38
+ * This is the primary method for React Native
39
+ */
40
+ export declare function shouldHideComponent(universalProps: UniversalSystemProps, colorScheme: ColorScheme): boolean;
41
+ /**
42
+ * Hook to get universal styles for React Native components
43
+ * Returns style objects instead of classes
44
+ */
45
+ export declare function useUniversalStyles(universalProps: UniversalSystemProps, colorScheme: ColorScheme): {
46
+ display?: 'none' | 'flex';
47
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Simple universal props system optimized for React Native (Expo)
3
+ * Provides lightHidden/darkHidden functionality with React Native compatibility
4
+ */
5
+ export type ColorScheme = 'light' | 'dark';
6
+ export interface UniversalProps {
7
+ /** Hide component in light color scheme */
8
+ lightHidden?: boolean;
9
+ /** Hide component in dark color scheme */
10
+ darkHidden?: boolean;
11
+ }
12
+ export interface ResponsiveProps {
13
+ /** Hide component above this screen width (pixels) */
14
+ hiddenFrom?: number;
15
+ /** Show component only above this screen width (pixels) */
16
+ visibleFrom?: number;
17
+ }
18
+ export interface UniversalSystemProps extends UniversalProps, ResponsiveProps {
19
+ }
20
+ /**
21
+ * Determines if component should be hidden based on universal props
22
+ * Primary function for React Native - returns true if component should not render
23
+ */
24
+ export declare function shouldHideComponent(props: UniversalSystemProps, colorScheme: ColorScheme): boolean;
25
+ /**
26
+ * Simple hook to check if component should render
27
+ */
28
+ export declare function useUniversalProps(props: UniversalSystemProps, colorScheme: ColorScheme): {
29
+ shouldRender: boolean;
30
+ };
31
+ /**
32
+ * Extract universal props from component props
33
+ */
34
+ export declare function extractUniversalProps<T extends UniversalSystemProps>(props: T): {
35
+ universalProps: UniversalSystemProps;
36
+ componentProps: Omit<T, keyof UniversalSystemProps>;
37
+ };