react-native-terra-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/README.md +70 -0
  2. package/lib/module/components/avatar/Avatar.js +121 -0
  3. package/lib/module/components/avatar/Avatar.js.map +1 -0
  4. package/lib/module/components/avatar/index.js +4 -0
  5. package/lib/module/components/avatar/index.js.map +1 -0
  6. package/lib/module/components/avatar/types.js +4 -0
  7. package/lib/module/components/avatar/types.js.map +1 -0
  8. package/lib/module/components/box/Box.js +49 -0
  9. package/lib/module/components/box/Box.js.map +1 -0
  10. package/lib/module/components/box/index.js +4 -0
  11. package/lib/module/components/box/index.js.map +1 -0
  12. package/lib/module/components/box/utils.js +95 -0
  13. package/lib/module/components/box/utils.js.map +1 -0
  14. package/lib/module/components/button/Button.js +281 -0
  15. package/lib/module/components/button/Button.js.map +1 -0
  16. package/lib/module/components/button/index.js +4 -0
  17. package/lib/module/components/button/index.js.map +1 -0
  18. package/lib/module/components/header/Header.js +25 -0
  19. package/lib/module/components/header/Header.js.map +1 -0
  20. package/lib/module/components/header/header-buttons.js +65 -0
  21. package/lib/module/components/header/header-buttons.js.map +1 -0
  22. package/lib/module/components/header/index.js +7 -0
  23. package/lib/module/components/header/index.js.map +1 -0
  24. package/lib/module/components/header/variants/LargeTitleHeader/index.js +335 -0
  25. package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -0
  26. package/lib/module/components/header/variants/TitleHeader/index.js +184 -0
  27. package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -0
  28. package/lib/module/components/icon/Icon.js +53 -0
  29. package/lib/module/components/icon/Icon.js.map +1 -0
  30. package/lib/module/components/icon/index.js +4 -0
  31. package/lib/module/components/icon/index.js.map +1 -0
  32. package/lib/module/components/icon/utils.js +188 -0
  33. package/lib/module/components/icon/utils.js.map +1 -0
  34. package/lib/module/components/index.js +16 -0
  35. package/lib/module/components/index.js.map +1 -0
  36. package/lib/module/components/page-indicator/PageIndicator.js +49 -0
  37. package/lib/module/components/page-indicator/PageIndicator.js.map +1 -0
  38. package/lib/module/components/page-indicator/PageIndicatorRoot.js +24 -0
  39. package/lib/module/components/page-indicator/PageIndicatorRoot.js.map +1 -0
  40. package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js +24 -0
  41. package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js.map +1 -0
  42. package/lib/module/components/page-indicator/hooks/use-page-indicator-core.js +20 -0
  43. package/lib/module/components/page-indicator/hooks/use-page-indicator-core.js.map +1 -0
  44. package/lib/module/components/page-indicator/hooks/use-page-indicator-progress.js +68 -0
  45. package/lib/module/components/page-indicator/hooks/use-page-indicator-progress.js.map +1 -0
  46. package/lib/module/components/page-indicator/index.js +5 -0
  47. package/lib/module/components/page-indicator/index.js.map +1 -0
  48. package/lib/module/components/page-indicator/utils.js +127 -0
  49. package/lib/module/components/page-indicator/utils.js.map +1 -0
  50. package/lib/module/components/page-indicator/variants/DotIndicator/InactiveDot.js +50 -0
  51. package/lib/module/components/page-indicator/variants/DotIndicator/InactiveDot.js.map +1 -0
  52. package/lib/module/components/page-indicator/variants/DotIndicator/LoadingOrbit.js +165 -0
  53. package/lib/module/components/page-indicator/variants/DotIndicator/LoadingOrbit.js.map +1 -0
  54. package/lib/module/components/page-indicator/variants/DotIndicator/TravelingPill.js +60 -0
  55. package/lib/module/components/page-indicator/variants/DotIndicator/TravelingPill.js.map +1 -0
  56. package/lib/module/components/page-indicator/variants/DotIndicator/index.js +87 -0
  57. package/lib/module/components/page-indicator/variants/DotIndicator/index.js.map +1 -0
  58. package/lib/module/components/page-indicator/variants/DotIndicator/utils.js +28 -0
  59. package/lib/module/components/page-indicator/variants/DotIndicator/utils.js.map +1 -0
  60. package/lib/module/components/page-indicator/variants/PillIndicator/PillIndicatorDot.js +53 -0
  61. package/lib/module/components/page-indicator/variants/PillIndicator/PillIndicatorDot.js.map +1 -0
  62. package/lib/module/components/page-indicator/variants/PillIndicator/index.js +76 -0
  63. package/lib/module/components/page-indicator/variants/PillIndicator/index.js.map +1 -0
  64. package/lib/module/components/page-indicator/variants/PillIndicator/utils.js +47 -0
  65. package/lib/module/components/page-indicator/variants/PillIndicator/utils.js.map +1 -0
  66. package/lib/module/components/portal/PortalContext.js +20 -0
  67. package/lib/module/components/portal/PortalContext.js.map +1 -0
  68. package/lib/module/components/portal/PortalHost.js +23 -0
  69. package/lib/module/components/portal/PortalHost.js.map +1 -0
  70. package/lib/module/components/portal/PortalProvider.js +40 -0
  71. package/lib/module/components/portal/PortalProvider.js.map +1 -0
  72. package/lib/module/components/portal/index.js +6 -0
  73. package/lib/module/components/portal/index.js.map +1 -0
  74. package/lib/module/components/screen/Screen.js +100 -0
  75. package/lib/module/components/screen/Screen.js.map +1 -0
  76. package/lib/module/components/screen/ScreenContext.js +66 -0
  77. package/lib/module/components/screen/ScreenContext.js.map +1 -0
  78. package/lib/module/components/screen/ScreenFlatList.js +75 -0
  79. package/lib/module/components/screen/ScreenFlatList.js.map +1 -0
  80. package/lib/module/components/screen/ScreenScrollView.js +82 -0
  81. package/lib/module/components/screen/ScreenScrollView.js.map +1 -0
  82. package/lib/module/components/screen/index.js +7 -0
  83. package/lib/module/components/screen/index.js.map +1 -0
  84. package/lib/module/components/screen/utils.js +13 -0
  85. package/lib/module/components/screen/utils.js.map +1 -0
  86. package/lib/module/components/slot/Slot.js +38 -0
  87. package/lib/module/components/slot/Slot.js.map +1 -0
  88. package/lib/module/components/slot/index.js +10 -0
  89. package/lib/module/components/slot/index.js.map +1 -0
  90. package/lib/module/components/slot/utils.js +55 -0
  91. package/lib/module/components/slot/utils.js.map +1 -0
  92. package/lib/module/components/spinner/Spinner.js +132 -0
  93. package/lib/module/components/spinner/Spinner.js.map +1 -0
  94. package/lib/module/components/spinner/index.js +4 -0
  95. package/lib/module/components/spinner/index.js.map +1 -0
  96. package/lib/module/components/surface/Surface.js +74 -0
  97. package/lib/module/components/surface/Surface.js.map +1 -0
  98. package/lib/module/components/surface/index.js +4 -0
  99. package/lib/module/components/surface/index.js.map +1 -0
  100. package/lib/module/components/text/Text.js +67 -0
  101. package/lib/module/components/text/Text.js.map +1 -0
  102. package/lib/module/components/text/index.js +4 -0
  103. package/lib/module/components/text/index.js.map +1 -0
  104. package/lib/module/components/toast/Toast.js +350 -0
  105. package/lib/module/components/toast/Toast.js.map +1 -0
  106. package/lib/module/components/toast/ToastProvider.js +272 -0
  107. package/lib/module/components/toast/ToastProvider.js.map +1 -0
  108. package/lib/module/components/toast/index.js +5 -0
  109. package/lib/module/components/toast/index.js.map +1 -0
  110. package/lib/module/components/toast/parts/ToastAnimatedItem.js +168 -0
  111. package/lib/module/components/toast/parts/ToastAnimatedItem.js.map +1 -0
  112. package/lib/module/components/toast/types.js +4 -0
  113. package/lib/module/components/toast/types.js.map +1 -0
  114. package/lib/module/components/toast/utils/controller.js +19 -0
  115. package/lib/module/components/toast/utils/controller.js.map +1 -0
  116. package/lib/module/context/ThemeProvider.js +66 -0
  117. package/lib/module/context/ThemeProvider.js.map +1 -0
  118. package/lib/module/context/index.js +4 -0
  119. package/lib/module/context/index.js.map +1 -0
  120. package/lib/module/index.js +8 -0
  121. package/lib/module/index.js.map +1 -0
  122. package/lib/module/package.json +1 -0
  123. package/lib/module/theme/configure.js +152 -0
  124. package/lib/module/theme/configure.js.map +1 -0
  125. package/lib/module/theme/index.js +22 -0
  126. package/lib/module/theme/index.js.map +1 -0
  127. package/lib/module/theme/runtime.js +25 -0
  128. package/lib/module/theme/runtime.js.map +1 -0
  129. package/lib/module/theme/theme.js +121 -0
  130. package/lib/module/theme/theme.js.map +1 -0
  131. package/lib/module/theme/tokens/dark.js +109 -0
  132. package/lib/module/theme/tokens/dark.js.map +1 -0
  133. package/lib/module/theme/tokens/light.js +115 -0
  134. package/lib/module/theme/tokens/light.js.map +1 -0
  135. package/lib/module/theme/tokens/primitives.js +228 -0
  136. package/lib/module/theme/tokens/primitives.js.map +1 -0
  137. package/lib/module/theme/types.js +4 -0
  138. package/lib/module/theme/types.js.map +1 -0
  139. package/lib/module/types.js +2 -0
  140. package/lib/module/types.js.map +1 -0
  141. package/lib/module/utils/accent-utils.js +52 -0
  142. package/lib/module/utils/accent-utils.js.map +1 -0
  143. package/lib/module/utils/color-utils.js +53 -0
  144. package/lib/module/utils/color-utils.js.map +1 -0
  145. package/lib/module/utils/deep-merge.js +28 -0
  146. package/lib/module/utils/deep-merge.js.map +1 -0
  147. package/lib/module/utils/resolve-theme-color.js +20 -0
  148. package/lib/module/utils/resolve-theme-color.js.map +1 -0
  149. package/lib/module/utils/typography.js +13 -0
  150. package/lib/module/utils/typography.js.map +1 -0
  151. package/lib/module/utils/unflatten.js +35 -0
  152. package/lib/module/utils/unflatten.js.map +1 -0
  153. package/lib/typescript/package.json +1 -0
  154. package/lib/typescript/src/components/avatar/Avatar.d.ts +3 -0
  155. package/lib/typescript/src/components/avatar/Avatar.d.ts.map +1 -0
  156. package/lib/typescript/src/components/avatar/index.d.ts +3 -0
  157. package/lib/typescript/src/components/avatar/index.d.ts.map +1 -0
  158. package/lib/typescript/src/components/avatar/types.d.ts +30 -0
  159. package/lib/typescript/src/components/avatar/types.d.ts.map +1 -0
  160. package/lib/typescript/src/components/box/Box.d.ts +12 -0
  161. package/lib/typescript/src/components/box/Box.d.ts.map +1 -0
  162. package/lib/typescript/src/components/box/index.d.ts +4 -0
  163. package/lib/typescript/src/components/box/index.d.ts.map +1 -0
  164. package/lib/typescript/src/components/box/utils.d.ts +39 -0
  165. package/lib/typescript/src/components/box/utils.d.ts.map +1 -0
  166. package/lib/typescript/src/components/button/Button.d.ts +46 -0
  167. package/lib/typescript/src/components/button/Button.d.ts.map +1 -0
  168. package/lib/typescript/src/components/button/index.d.ts +3 -0
  169. package/lib/typescript/src/components/button/index.d.ts.map +1 -0
  170. package/lib/typescript/src/components/header/Header.d.ts +22 -0
  171. package/lib/typescript/src/components/header/Header.d.ts.map +1 -0
  172. package/lib/typescript/src/components/header/header-buttons.d.ts +16 -0
  173. package/lib/typescript/src/components/header/header-buttons.d.ts.map +1 -0
  174. package/lib/typescript/src/components/header/index.d.ts +7 -0
  175. package/lib/typescript/src/components/header/index.d.ts.map +1 -0
  176. package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +25 -0
  177. package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -0
  178. package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +28 -0
  179. package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -0
  180. package/lib/typescript/src/components/icon/Icon.d.ts +22 -0
  181. package/lib/typescript/src/components/icon/Icon.d.ts.map +1 -0
  182. package/lib/typescript/src/components/icon/index.d.ts +3 -0
  183. package/lib/typescript/src/components/icon/index.d.ts.map +1 -0
  184. package/lib/typescript/src/components/icon/utils.d.ts +4 -0
  185. package/lib/typescript/src/components/icon/utils.d.ts.map +1 -0
  186. package/lib/typescript/src/components/index.d.ts +14 -0
  187. package/lib/typescript/src/components/index.d.ts.map +1 -0
  188. package/lib/typescript/src/components/page-indicator/PageIndicator.d.ts +48 -0
  189. package/lib/typescript/src/components/page-indicator/PageIndicator.d.ts.map +1 -0
  190. package/lib/typescript/src/components/page-indicator/PageIndicatorRoot.d.ts +13 -0
  191. package/lib/typescript/src/components/page-indicator/PageIndicatorRoot.d.ts.map +1 -0
  192. package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-colors.d.ts +14 -0
  193. package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-colors.d.ts.map +1 -0
  194. package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-core.d.ts +11 -0
  195. package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-core.d.ts.map +1 -0
  196. package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-progress.d.ts +19 -0
  197. package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-progress.d.ts.map +1 -0
  198. package/lib/typescript/src/components/page-indicator/index.d.ts +4 -0
  199. package/lib/typescript/src/components/page-indicator/index.d.ts.map +1 -0
  200. package/lib/typescript/src/components/page-indicator/utils.d.ts +36 -0
  201. package/lib/typescript/src/components/page-indicator/utils.d.ts.map +1 -0
  202. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/InactiveDot.d.ts +14 -0
  203. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/InactiveDot.d.ts.map +1 -0
  204. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.d.ts +11 -0
  205. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.d.ts.map +1 -0
  206. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/TravelingPill.d.ts +15 -0
  207. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/TravelingPill.d.ts.map +1 -0
  208. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/index.d.ts +32 -0
  209. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/index.d.ts.map +1 -0
  210. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/utils.d.ts +14 -0
  211. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/utils.d.ts.map +1 -0
  212. package/lib/typescript/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.d.ts +16 -0
  213. package/lib/typescript/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.d.ts.map +1 -0
  214. package/lib/typescript/src/components/page-indicator/variants/PillIndicator/index.d.ts +28 -0
  215. package/lib/typescript/src/components/page-indicator/variants/PillIndicator/index.d.ts.map +1 -0
  216. package/lib/typescript/src/components/page-indicator/variants/PillIndicator/utils.d.ts +21 -0
  217. package/lib/typescript/src/components/page-indicator/variants/PillIndicator/utils.d.ts.map +1 -0
  218. package/lib/typescript/src/components/portal/PortalContext.d.ts +19 -0
  219. package/lib/typescript/src/components/portal/PortalContext.d.ts.map +1 -0
  220. package/lib/typescript/src/components/portal/PortalHost.d.ts +7 -0
  221. package/lib/typescript/src/components/portal/PortalHost.d.ts.map +1 -0
  222. package/lib/typescript/src/components/portal/PortalProvider.d.ts +11 -0
  223. package/lib/typescript/src/components/portal/PortalProvider.d.ts.map +1 -0
  224. package/lib/typescript/src/components/portal/index.d.ts +6 -0
  225. package/lib/typescript/src/components/portal/index.d.ts.map +1 -0
  226. package/lib/typescript/src/components/screen/Screen.d.ts +53 -0
  227. package/lib/typescript/src/components/screen/Screen.d.ts.map +1 -0
  228. package/lib/typescript/src/components/screen/ScreenContext.d.ts +64 -0
  229. package/lib/typescript/src/components/screen/ScreenContext.d.ts.map +1 -0
  230. package/lib/typescript/src/components/screen/ScreenFlatList.d.ts +26 -0
  231. package/lib/typescript/src/components/screen/ScreenFlatList.d.ts.map +1 -0
  232. package/lib/typescript/src/components/screen/ScreenScrollView.d.ts +36 -0
  233. package/lib/typescript/src/components/screen/ScreenScrollView.d.ts.map +1 -0
  234. package/lib/typescript/src/components/screen/index.d.ts +9 -0
  235. package/lib/typescript/src/components/screen/index.d.ts.map +1 -0
  236. package/lib/typescript/src/components/screen/utils.d.ts +10 -0
  237. package/lib/typescript/src/components/screen/utils.d.ts.map +1 -0
  238. package/lib/typescript/src/components/slot/Slot.d.ts +17 -0
  239. package/lib/typescript/src/components/slot/Slot.d.ts.map +1 -0
  240. package/lib/typescript/src/components/slot/index.d.ts +8 -0
  241. package/lib/typescript/src/components/slot/index.d.ts.map +1 -0
  242. package/lib/typescript/src/components/slot/utils.d.ts +17 -0
  243. package/lib/typescript/src/components/slot/utils.d.ts.map +1 -0
  244. package/lib/typescript/src/components/spinner/Spinner.d.ts +18 -0
  245. package/lib/typescript/src/components/spinner/Spinner.d.ts.map +1 -0
  246. package/lib/typescript/src/components/spinner/index.d.ts +3 -0
  247. package/lib/typescript/src/components/spinner/index.d.ts.map +1 -0
  248. package/lib/typescript/src/components/surface/Surface.d.ts +31 -0
  249. package/lib/typescript/src/components/surface/Surface.d.ts.map +1 -0
  250. package/lib/typescript/src/components/surface/index.d.ts +3 -0
  251. package/lib/typescript/src/components/surface/index.d.ts.map +1 -0
  252. package/lib/typescript/src/components/text/Text.d.ts +23 -0
  253. package/lib/typescript/src/components/text/Text.d.ts.map +1 -0
  254. package/lib/typescript/src/components/text/index.d.ts +3 -0
  255. package/lib/typescript/src/components/text/index.d.ts.map +1 -0
  256. package/lib/typescript/src/components/toast/Toast.d.ts +71 -0
  257. package/lib/typescript/src/components/toast/Toast.d.ts.map +1 -0
  258. package/lib/typescript/src/components/toast/ToastProvider.d.ts +4 -0
  259. package/lib/typescript/src/components/toast/ToastProvider.d.ts.map +1 -0
  260. package/lib/typescript/src/components/toast/index.d.ts +5 -0
  261. package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
  262. package/lib/typescript/src/components/toast/parts/ToastAnimatedItem.d.ts +18 -0
  263. package/lib/typescript/src/components/toast/parts/ToastAnimatedItem.d.ts.map +1 -0
  264. package/lib/typescript/src/components/toast/types.d.ts +62 -0
  265. package/lib/typescript/src/components/toast/types.d.ts.map +1 -0
  266. package/lib/typescript/src/components/toast/utils/controller.d.ts +5 -0
  267. package/lib/typescript/src/components/toast/utils/controller.d.ts.map +1 -0
  268. package/lib/typescript/src/context/ThemeProvider.d.ts +29 -0
  269. package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -0
  270. package/lib/typescript/src/context/index.d.ts +3 -0
  271. package/lib/typescript/src/context/index.d.ts.map +1 -0
  272. package/lib/typescript/src/index.d.ts +4 -0
  273. package/lib/typescript/src/index.d.ts.map +1 -0
  274. package/lib/typescript/src/theme/configure.d.ts +47 -0
  275. package/lib/typescript/src/theme/configure.d.ts.map +1 -0
  276. package/lib/typescript/src/theme/index.d.ts +11 -0
  277. package/lib/typescript/src/theme/index.d.ts.map +1 -0
  278. package/lib/typescript/src/theme/runtime.d.ts +7 -0
  279. package/lib/typescript/src/theme/runtime.d.ts.map +1 -0
  280. package/lib/typescript/src/theme/theme.d.ts +22 -0
  281. package/lib/typescript/src/theme/theme.d.ts.map +1 -0
  282. package/lib/typescript/src/theme/tokens/dark.d.ts +100 -0
  283. package/lib/typescript/src/theme/tokens/dark.d.ts.map +1 -0
  284. package/lib/typescript/src/theme/tokens/light.d.ts +106 -0
  285. package/lib/typescript/src/theme/tokens/light.d.ts.map +1 -0
  286. package/lib/typescript/src/theme/tokens/primitives.d.ts +212 -0
  287. package/lib/typescript/src/theme/tokens/primitives.d.ts.map +1 -0
  288. package/lib/typescript/src/theme/types.d.ts +273 -0
  289. package/lib/typescript/src/theme/types.d.ts.map +1 -0
  290. package/lib/typescript/src/types.d.ts +4 -0
  291. package/lib/typescript/src/types.d.ts.map +1 -0
  292. package/lib/typescript/src/utils/accent-utils.d.ts +4 -0
  293. package/lib/typescript/src/utils/accent-utils.d.ts.map +1 -0
  294. package/lib/typescript/src/utils/color-utils.d.ts +11 -0
  295. package/lib/typescript/src/utils/color-utils.d.ts.map +1 -0
  296. package/lib/typescript/src/utils/deep-merge.d.ts +11 -0
  297. package/lib/typescript/src/utils/deep-merge.d.ts.map +1 -0
  298. package/lib/typescript/src/utils/resolve-theme-color.d.ts +12 -0
  299. package/lib/typescript/src/utils/resolve-theme-color.d.ts.map +1 -0
  300. package/lib/typescript/src/utils/typography.d.ts +6 -0
  301. package/lib/typescript/src/utils/typography.d.ts.map +1 -0
  302. package/lib/typescript/src/utils/unflatten.d.ts +12 -0
  303. package/lib/typescript/src/utils/unflatten.d.ts.map +1 -0
  304. package/package.json +137 -0
  305. package/src/components/avatar/Avatar.tsx +146 -0
  306. package/src/components/avatar/index.ts +8 -0
  307. package/src/components/avatar/types.ts +35 -0
  308. package/src/components/box/Box.tsx +59 -0
  309. package/src/components/box/index.ts +8 -0
  310. package/src/components/box/utils.ts +181 -0
  311. package/src/components/button/Button.tsx +313 -0
  312. package/src/components/button/index.ts +8 -0
  313. package/src/components/header/Header.ts +22 -0
  314. package/src/components/header/header-buttons.tsx +103 -0
  315. package/src/components/header/index.ts +11 -0
  316. package/src/components/header/variants/LargeTitleHeader/index.tsx +390 -0
  317. package/src/components/header/variants/TitleHeader/index.tsx +194 -0
  318. package/src/components/icon/Icon.tsx +74 -0
  319. package/src/components/icon/index.ts +2 -0
  320. package/src/components/icon/utils.tsx +147 -0
  321. package/src/components/index.ts +13 -0
  322. package/src/components/page-indicator/PageIndicator.tsx +100 -0
  323. package/src/components/page-indicator/PageIndicatorRoot.tsx +41 -0
  324. package/src/components/page-indicator/hooks/use-page-indicator-colors.ts +65 -0
  325. package/src/components/page-indicator/hooks/use-page-indicator-core.ts +34 -0
  326. package/src/components/page-indicator/hooks/use-page-indicator-progress.ts +122 -0
  327. package/src/components/page-indicator/index.ts +13 -0
  328. package/src/components/page-indicator/utils.ts +208 -0
  329. package/src/components/page-indicator/variants/DotIndicator/InactiveDot.tsx +70 -0
  330. package/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.tsx +201 -0
  331. package/src/components/page-indicator/variants/DotIndicator/TravelingPill.tsx +80 -0
  332. package/src/components/page-indicator/variants/DotIndicator/index.tsx +145 -0
  333. package/src/components/page-indicator/variants/DotIndicator/utils.ts +28 -0
  334. package/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.tsx +107 -0
  335. package/src/components/page-indicator/variants/PillIndicator/index.tsx +149 -0
  336. package/src/components/page-indicator/variants/PillIndicator/utils.ts +63 -0
  337. package/src/components/portal/PortalContext.tsx +27 -0
  338. package/src/components/portal/PortalHost.tsx +20 -0
  339. package/src/components/portal/PortalProvider.tsx +44 -0
  340. package/src/components/portal/index.ts +5 -0
  341. package/src/components/screen/Screen.tsx +163 -0
  342. package/src/components/screen/ScreenContext.tsx +144 -0
  343. package/src/components/screen/ScreenFlatList.tsx +121 -0
  344. package/src/components/screen/ScreenScrollView.tsx +130 -0
  345. package/src/components/screen/index.ts +8 -0
  346. package/src/components/screen/utils.ts +17 -0
  347. package/src/components/slot/Slot.tsx +56 -0
  348. package/src/components/slot/index.ts +8 -0
  349. package/src/components/slot/utils.ts +61 -0
  350. package/src/components/spinner/Spinner.tsx +153 -0
  351. package/src/components/spinner/index.ts +2 -0
  352. package/src/components/surface/Surface.tsx +100 -0
  353. package/src/components/surface/index.ts +2 -0
  354. package/src/components/text/Text.tsx +115 -0
  355. package/src/components/text/index.ts +2 -0
  356. package/src/components/toast/Toast.tsx +477 -0
  357. package/src/components/toast/ToastProvider.tsx +403 -0
  358. package/src/components/toast/index.ts +26 -0
  359. package/src/components/toast/parts/ToastAnimatedItem.tsx +184 -0
  360. package/src/components/toast/types.ts +75 -0
  361. package/src/components/toast/utils/controller.ts +23 -0
  362. package/src/context/ThemeProvider.tsx +97 -0
  363. package/src/context/index.ts +2 -0
  364. package/src/index.tsx +6 -0
  365. package/src/theme/configure.ts +215 -0
  366. package/src/theme/index.ts +72 -0
  367. package/src/theme/runtime.ts +27 -0
  368. package/src/theme/theme.ts +152 -0
  369. package/src/theme/tokens/dark.ts +117 -0
  370. package/src/theme/tokens/light.ts +123 -0
  371. package/src/theme/tokens/primitives.ts +232 -0
  372. package/src/theme/types.ts +384 -0
  373. package/src/types.ts +1 -0
  374. package/src/utils/accent-utils.ts +58 -0
  375. package/src/utils/color-utils.ts +51 -0
  376. package/src/utils/deep-merge.ts +36 -0
  377. package/src/utils/resolve-theme-color.ts +27 -0
  378. package/src/utils/typography.ts +15 -0
  379. package/src/utils/unflatten.ts +36 -0
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+
3
+ import { useId } from 'react';
4
+ import { Text, View } from 'react-native';
5
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
+ import Svg, { Defs, Rect, Stop, LinearGradient as SvgLinearGradient } from 'react-native-svg';
7
+ import { StyleSheet, useUnistyles } from 'react-native-unistyles';
8
+ import { resolveThemeColor } from '#utils/resolve-theme-color';
9
+ import { FONT_WEIGHT_VALUE } from '#utils/typography';
10
+ import { HeaderDismissButton } from "../../header-buttons.js";
11
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
12
+ /**
13
+ * Compact title bar (leading slot · title · trailing slot) with a top safe-area
14
+ * inset. The inline counterpart to `Header.LargeTitle`; use it for screens that
15
+ * don't need a collapsing large title.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <Screen.Header>
20
+ * <Header.Title title="Stats" RightComponent={<Button>Edit</Button>} />
21
+ * </Screen.Header>
22
+ * ```
23
+ */
24
+ export function TitleHeader({
25
+ title,
26
+ LeftComponent,
27
+ RightComponent,
28
+ dismissAction = 'none',
29
+ navigation,
30
+ onDismiss,
31
+ titleAlignment = 'center',
32
+ bg = 'surface.default'
33
+ }) {
34
+ const {
35
+ theme
36
+ } = useUnistyles();
37
+ const {
38
+ top
39
+ } = useSafeAreaInsets();
40
+ const gradientId = useId();
41
+ const bgColor = resolveThemeColor(bg, theme);
42
+ const isTransparent = bgColor === 'transparent';
43
+ const gradientColor = isTransparent ? theme.color['surface.default'] : bgColor;
44
+ styles.useVariants({
45
+ titleAlignment
46
+ });
47
+ const leading = dismissAction === 'back' ? /*#__PURE__*/_jsxs(_Fragment, {
48
+ children: [/*#__PURE__*/_jsx(HeaderDismissButton, {
49
+ dismissAction: dismissAction,
50
+ navigation: navigation,
51
+ onDismiss: onDismiss
52
+ }), LeftComponent]
53
+ }) : LeftComponent;
54
+ const trailing = dismissAction === 'close' ? /*#__PURE__*/_jsxs(_Fragment, {
55
+ children: [RightComponent, /*#__PURE__*/_jsx(HeaderDismissButton, {
56
+ dismissAction: dismissAction,
57
+ navigation: navigation,
58
+ onDismiss: onDismiss
59
+ })]
60
+ }) : RightComponent;
61
+ return /*#__PURE__*/_jsxs(View, {
62
+ style: styles.safeArea,
63
+ children: [/*#__PURE__*/_jsx(View, {
64
+ style: {
65
+ height: top,
66
+ backgroundColor: isTransparent ? 'transparent' : bgColor
67
+ }
68
+ }), /*#__PURE__*/_jsxs(View, {
69
+ style: styles.bar,
70
+ children: [/*#__PURE__*/_jsx(View, {
71
+ style: styles.gradient,
72
+ pointerEvents: "none",
73
+ children: /*#__PURE__*/_jsxs(Svg, {
74
+ height: "100%",
75
+ width: "100%",
76
+ children: [/*#__PURE__*/_jsx(Defs, {
77
+ children: /*#__PURE__*/_jsxs(SvgLinearGradient, {
78
+ id: gradientId,
79
+ x1: "0",
80
+ y1: "0.4",
81
+ x2: "0",
82
+ y2: "1",
83
+ children: [/*#__PURE__*/_jsx(Stop, {
84
+ offset: "0",
85
+ stopColor: gradientColor,
86
+ stopOpacity: "0.9"
87
+ }), /*#__PURE__*/_jsx(Stop, {
88
+ offset: "0.9",
89
+ stopColor: gradientColor,
90
+ stopOpacity: "0.1"
91
+ })]
92
+ })
93
+ }), /*#__PURE__*/_jsx(Rect, {
94
+ width: "100%",
95
+ height: "100%",
96
+ fill: `url(#${gradientId})`
97
+ })]
98
+ })
99
+ }), leading != null && /*#__PURE__*/_jsx(View, {
100
+ style: styles.slot,
101
+ children: leading
102
+ }), /*#__PURE__*/_jsx(View, {
103
+ style: styles.titleContainer,
104
+ pointerEvents: "none",
105
+ children: !!title && /*#__PURE__*/_jsx(Text, {
106
+ style: styles.title,
107
+ children: title
108
+ })
109
+ }), trailing != null && /*#__PURE__*/_jsx(View, {
110
+ style: styles.slotEnd,
111
+ children: trailing
112
+ })]
113
+ })]
114
+ });
115
+ }
116
+ const styles = StyleSheet.create(theme => ({
117
+ safeArea: {
118
+ position: 'absolute',
119
+ top: 0,
120
+ left: 0,
121
+ right: 0,
122
+ zIndex: 1000
123
+ },
124
+ gradient: {
125
+ position: 'absolute',
126
+ top: 0,
127
+ left: 0,
128
+ right: 0,
129
+ bottom: 0
130
+ },
131
+ bar: {
132
+ height: theme.layout.header.height,
133
+ flexDirection: 'row',
134
+ alignItems: 'center',
135
+ justifyContent: 'space-between',
136
+ paddingHorizontal: theme.layout.screen.margin.x,
137
+ gap: theme.spacing['3']
138
+ },
139
+ slot: {
140
+ flexDirection: 'row',
141
+ alignItems: 'center',
142
+ gap: theme.spacing['2']
143
+ },
144
+ slotEnd: {
145
+ flexDirection: 'row',
146
+ alignItems: 'center',
147
+ justifyContent: 'flex-end',
148
+ gap: theme.spacing['2']
149
+ },
150
+ titleContainer: {
151
+ variants: {
152
+ titleAlignment: {
153
+ center: {
154
+ position: 'absolute',
155
+ left: 0,
156
+ right: 0,
157
+ alignItems: 'center'
158
+ },
159
+ left: {
160
+ flex: 1,
161
+ alignItems: 'flex-start'
162
+ }
163
+ }
164
+ }
165
+ },
166
+ title: {
167
+ fontSize: theme.typography.variants['title-md'].fontSize,
168
+ lineHeight: theme.typography.variants['title-md'].lineHeight,
169
+ letterSpacing: theme.typography.variants['title-md'].letterSpacing,
170
+ fontWeight: FONT_WEIGHT_VALUE[theme.typography.variants['title-md'].fontWeight],
171
+ color: theme.color['text.default'] ?? '',
172
+ variants: {
173
+ titleAlignment: {
174
+ center: {
175
+ textAlign: 'center'
176
+ },
177
+ left: {
178
+ textAlign: 'left'
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }));
184
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useId","Text","View","useSafeAreaInsets","Svg","Defs","Rect","Stop","LinearGradient","SvgLinearGradient","StyleSheet","useUnistyles","resolveThemeColor","FONT_WEIGHT_VALUE","HeaderDismissButton","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","TitleHeader","title","LeftComponent","RightComponent","dismissAction","navigation","onDismiss","titleAlignment","bg","theme","top","gradientId","bgColor","isTransparent","gradientColor","color","styles","useVariants","leading","children","trailing","style","safeArea","height","backgroundColor","bar","gradient","pointerEvents","width","id","x1","y1","x2","y2","offset","stopColor","stopOpacity","fill","slot","titleContainer","slotEnd","create","position","left","right","zIndex","bottom","layout","header","flexDirection","alignItems","justifyContent","paddingHorizontal","screen","margin","x","gap","spacing","variants","center","flex","fontSize","typography","lineHeight","letterSpacing","fontWeight","textAlign"],"sourceRoot":"../../../../../../src","sources":["components/header/variants/TitleHeader/index.tsx"],"mappings":";;AAAA,SAAyBA,KAAK,QAAQ,OAAO;AAC7C,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,SAASC,iBAAiB,QAAQ,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D,cAAc,EAAE;QACdoD,MAAM,EAAE;UAAEO,SAAS,EAAE;QAAS,CAAC;QAC/BvB,IAAI,EAAE;UAAEuB,SAAS,EAAE;QAAO;MAC5B;IACF;EACF;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import { useUnistyles } from 'react-native-unistyles';
6
+ import { getIcon } from '#theme/configure';
7
+ import { resolveThemeColor } from '#utils/resolve-theme-color';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ /**
10
+ * Renders an icon from the Terra UI icon registry (`configureTerraUI({ icons })`
11
+ * plus built-in semantic names like `navigation.back`).
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Icon name="navigation.close" size={24} color="text.default" />
16
+ * ```
17
+ */
18
+ export const Icon = /*#__PURE__*/forwardRef(function Icon({
19
+ name,
20
+ size = 20,
21
+ color = 'text.default',
22
+ strokeWidth,
23
+ style,
24
+ ...rest
25
+ }, ref) {
26
+ const {
27
+ theme
28
+ } = useUnistyles();
29
+ const IconComponent = getIcon(name);
30
+ if (!IconComponent) {
31
+ if (__DEV__) {
32
+ console.warn(`[react-native-terra-ui] Unknown icon "${name}".`);
33
+ }
34
+ return null;
35
+ }
36
+ const resolvedColor = resolveThemeColor(color, theme) ?? theme.color['text.default'] ?? '';
37
+ return /*#__PURE__*/_jsx(View, {
38
+ ref: ref,
39
+ style: [{
40
+ width: size,
41
+ height: size,
42
+ alignItems: 'center',
43
+ justifyContent: 'center'
44
+ }, style],
45
+ ...rest,
46
+ children: /*#__PURE__*/_jsx(IconComponent, {
47
+ color: resolvedColor,
48
+ size: size,
49
+ strokeWidth: strokeWidth
50
+ })
51
+ });
52
+ });
53
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","useUnistyles","getIcon","resolveThemeColor","jsx","_jsx","Icon","name","size","color","strokeWidth","style","rest","ref","theme","IconComponent","__DEV__","console","warn","resolvedColor","width","height","alignItems","justifyContent","children"],"sourceRoot":"../../../../src","sources":["components/icon/Icon.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AAEnD,SAASC,YAAY,QAAQ,wBAAwB;AAErD,SAASC,OAAO,QAAQ,kBAAkB;AAE1C,SAASC,iBAAiB,QAAQ,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,IAAI,gBAAGP,UAAU,CAC5B,SAASO,IAAIA,CACX;EAAEC,IAAI;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK,GAAG,cAAc;EAAEC,WAAW;EAAEC,KAAK;EAAE,GAAGC;AAAK,CAAC,EACxEC,GAAG,EACH;EACA,MAAM;IAAEC;EAAM,CAAC,GAAGb,YAAY,CAAC,CAAC;EAChC,MAAMc,aAAa,GAAGb,OAAO,CAACK,IAAI,CAAC;EAEnC,IAAI,CAACQ,aAAa,EAAE;IAClB,IAAIC,OAAO,EAAE;MACXC,OAAO,CAACC,IAAI,CAAC,yCAAyCX,IAAI,IAAI,CAAC;IACjE;IACA,OAAO,IAAI;EACb;EAEA,MAAMY,aAAa,GACjBhB,iBAAiB,CAACM,KAAK,EAAEK,KAAK,CAAC,IAC9BA,KAAK,CAACL,KAAK,CACV,cAAc,CACf,IACD,EAAE;EAEJ,oBACEJ,IAAA,CAACL,IAAI;IACHa,GAAG,EAAEA,GAAI;IACTF,KAAK,EAAE,CACL;MACES,KAAK,EAAEZ,IAAI;MACXa,MAAM,EAAEb,IAAI;MACZc,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC,EACDZ,KAAK,CACL;IAAA,GACEC,IAAI;IAAAY,QAAA,eAERnB,IAAA,CAACU,aAAa;MACZN,KAAK,EAAEU,aAAc;MACrBX,IAAI,EAAEA,IAAK;MACXE,WAAW,EAAEA;IAAY,CAC1B;EAAC,CACE,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { Icon } from "./Icon.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Icon"],"sourceRoot":"../../../../src","sources":["components/icon/index.ts"],"mappings":";;AACA,SAASA,IAAI,QAAQ,WAAQ","ignoreList":[]}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+
3
+ import Svg, { Circle, Path } from 'react-native-svg';
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ const DEFAULT_SIZE = 20;
6
+ const DEFAULT_COLOR = '#000000';
7
+ const DEFAULT_STROKE_WIDTH = 2;
8
+ const resolveIconProps = ({
9
+ size = DEFAULT_SIZE,
10
+ color = DEFAULT_COLOR,
11
+ strokeWidth = DEFAULT_STROKE_WIDTH
12
+ }) => ({
13
+ color,
14
+ size,
15
+ strokeWidth
16
+ });
17
+ const strokeProps = (color, strokeWidth) => ({
18
+ stroke: color,
19
+ strokeWidth,
20
+ strokeLinecap: 'round',
21
+ strokeLinejoin: 'round'
22
+ });
23
+ const SvgIcon = ({
24
+ size,
25
+ children
26
+ }) => /*#__PURE__*/_jsx(Svg, {
27
+ width: size,
28
+ height: size,
29
+ viewBox: "0 0 24 24",
30
+ fill: "none",
31
+ children: children
32
+ });
33
+ const PathIcon = ({
34
+ d,
35
+ ...props
36
+ }) => {
37
+ const {
38
+ color,
39
+ size,
40
+ strokeWidth
41
+ } = resolveIconProps(props);
42
+ return /*#__PURE__*/_jsx(SvgIcon, {
43
+ size: size,
44
+ children: /*#__PURE__*/_jsx(Path, {
45
+ d: d,
46
+ ...strokeProps(color, strokeWidth)
47
+ })
48
+ });
49
+ };
50
+
51
+ // Lucide chevron geometry scaled 20% from the 24×24 viewBox center (45° arms unchanged).
52
+ const NAV_CENTER = 12;
53
+ const NAV_CHEVRON_OPEN = 3 * 1.2;
54
+ const NAV_CHEVRON_ARM = 6 * 1.2;
55
+ const BackIcon = props => /*#__PURE__*/_jsx(PathIcon, {
56
+ d: `M${NAV_CENTER + NAV_CHEVRON_OPEN} ${NAV_CENTER + NAV_CHEVRON_ARM}L${NAV_CENTER - NAV_CHEVRON_OPEN} ${NAV_CENTER} ${NAV_CENTER + NAV_CHEVRON_OPEN} ${NAV_CENTER - NAV_CHEVRON_ARM}`,
57
+ ...props
58
+ });
59
+ const ForwardIcon = props => /*#__PURE__*/_jsx(PathIcon, {
60
+ d: `M${NAV_CENTER - NAV_CHEVRON_OPEN} ${NAV_CENTER + NAV_CHEVRON_ARM}L${NAV_CENTER + NAV_CHEVRON_OPEN} ${NAV_CENTER} ${NAV_CENTER - NAV_CHEVRON_OPEN} ${NAV_CENTER - NAV_CHEVRON_ARM}`,
61
+ ...props
62
+ });
63
+ const CloseIcon = props => /*#__PURE__*/_jsx(PathIcon, {
64
+ d: "M18 6L6 18M6 6l12 12",
65
+ ...props
66
+ });
67
+ const InfoIcon = props => {
68
+ const {
69
+ color,
70
+ size,
71
+ strokeWidth
72
+ } = resolveIconProps(props);
73
+ const stroke = strokeProps(color, strokeWidth);
74
+ return /*#__PURE__*/_jsxs(SvgIcon, {
75
+ size: size,
76
+ children: [/*#__PURE__*/_jsx(Circle, {
77
+ cx: 12,
78
+ cy: 12,
79
+ r: 10,
80
+ ...stroke
81
+ }), /*#__PURE__*/_jsx(Path, {
82
+ d: "M12 16v-4",
83
+ ...stroke
84
+ }), /*#__PURE__*/_jsx(Path, {
85
+ d: "M12 8h.01",
86
+ ...stroke
87
+ })]
88
+ });
89
+ };
90
+ const SuccessIcon = props => {
91
+ const {
92
+ color,
93
+ size,
94
+ strokeWidth
95
+ } = resolveIconProps(props);
96
+ const stroke = strokeProps(color, strokeWidth);
97
+ return /*#__PURE__*/_jsxs(SvgIcon, {
98
+ size: size,
99
+ children: [/*#__PURE__*/_jsx(Circle, {
100
+ cx: 12,
101
+ cy: 12,
102
+ r: 10,
103
+ ...stroke
104
+ }), /*#__PURE__*/_jsx(Path, {
105
+ d: "m9 12 2 2 4-4",
106
+ ...stroke
107
+ })]
108
+ });
109
+ };
110
+ const WarningIcon = props => {
111
+ const {
112
+ color,
113
+ size,
114
+ strokeWidth
115
+ } = resolveIconProps(props);
116
+ const stroke = strokeProps(color, strokeWidth);
117
+ return /*#__PURE__*/_jsxs(SvgIcon, {
118
+ size: size,
119
+ children: [/*#__PURE__*/_jsx(Path, {
120
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
121
+ ...stroke
122
+ }), /*#__PURE__*/_jsx(Path, {
123
+ d: "M12 9v4",
124
+ ...stroke
125
+ }), /*#__PURE__*/_jsx(Path, {
126
+ d: "M12 17h.01",
127
+ ...stroke
128
+ })]
129
+ });
130
+ };
131
+ const DangerIcon = props => {
132
+ const {
133
+ color,
134
+ size,
135
+ strokeWidth
136
+ } = resolveIconProps(props);
137
+ const stroke = strokeProps(color, strokeWidth);
138
+ return /*#__PURE__*/_jsxs(SvgIcon, {
139
+ size: size,
140
+ children: [/*#__PURE__*/_jsx(Circle, {
141
+ cx: 12,
142
+ cy: 12,
143
+ r: 10,
144
+ ...stroke
145
+ }), /*#__PURE__*/_jsx(Path, {
146
+ d: "M12 8v4",
147
+ ...stroke
148
+ }), /*#__PURE__*/_jsx(Path, {
149
+ d: "M12 16h.01",
150
+ ...stroke
151
+ })]
152
+ });
153
+ };
154
+ export const PersonIcon = props => {
155
+ const {
156
+ color,
157
+ size,
158
+ strokeWidth
159
+ } = resolveIconProps(props);
160
+ const stroke = strokeProps(color, strokeWidth);
161
+ const iconSize = size * 0.55;
162
+ return /*#__PURE__*/_jsxs(Svg, {
163
+ width: iconSize,
164
+ height: iconSize,
165
+ viewBox: "0 0 24 24",
166
+ fill: "none",
167
+ children: [/*#__PURE__*/_jsx(Circle, {
168
+ cx: 12,
169
+ cy: 8,
170
+ r: 4,
171
+ ...stroke
172
+ }), /*#__PURE__*/_jsx(Path, {
173
+ d: "M4 20c0-4 3.582-7 8-7s8 3 8 7",
174
+ ...stroke
175
+ })]
176
+ });
177
+ };
178
+ export const defaultIcons = {
179
+ 'navigation.back': BackIcon,
180
+ 'navigation.forward': ForwardIcon,
181
+ 'navigation.close': CloseIcon,
182
+ 'status.info': InfoIcon,
183
+ 'status.success': SuccessIcon,
184
+ 'status.warning': WarningIcon,
185
+ 'status.danger': DangerIcon,
186
+ person: PersonIcon
187
+ };
188
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Svg","Circle","Path","jsx","_jsx","jsxs","_jsxs","DEFAULT_SIZE","DEFAULT_COLOR","DEFAULT_STROKE_WIDTH","resolveIconProps","size","color","strokeWidth","strokeProps","stroke","strokeLinecap","strokeLinejoin","SvgIcon","children","width","height","viewBox","fill","PathIcon","d","props","NAV_CENTER","NAV_CHEVRON_OPEN","NAV_CHEVRON_ARM","BackIcon","ForwardIcon","CloseIcon","InfoIcon","cx","cy","r","SuccessIcon","WarningIcon","DangerIcon","PersonIcon","iconSize","defaultIcons","person"],"sourceRoot":"../../../../src","sources":["components/icon/utils.tsx"],"mappings":";;AAAA,OAAOA,GAAG,IAAIC,MAAM,EAAEC,IAAI,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQrD,MAAMC,YAAY,GAAG,EAAE;AACvB,MAAMC,aAAa,GAAG,SAAS;AAC/B,MAAMC,oBAAoB,GAAG,CAAC;AAE9B,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,IAAI,GAAGJ,YAAY;EACnBK,KAAK,GAAGJ,aAAa;EACrBK,WAAW,GAAGJ;AACA,CAAC,MAAM;EAAEG,KAAK;EAAED,IAAI;EAAEE;AAAY,CAAC,CAAC;AAEpD,MAAMC,WAAW,GAAGA,CAACF,KAAa,EAAEC,WAAmB,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AAA,GAAKV;IAAM,CAAG,CAAC;EAAA,CAC5B,CAAC;AAEd,CAAC;AAED,OAAO,MAAMyB,UAA8B,GAAId,KAAK,IAAK;EACvD,MAAM;IAAEd,KAAK;IAAED,IAAI;IAAEE;EAAY,CAAC,GAAGH,gBAAgB,CAACgB,KAAK,CAAC;EAC5D,MAAMX,MAAM,GAAGD,WAAW,CAACF,KAAK,EAAEC,WAAW,CAAC;EAC9C,MAAM4B,QAAQ,GAAG9B,IAAI,GAAG,IAAI;EAE5B,oBACEL,KAAA,CAACN,GAAG;IAACoB,KAAK,EAAEqB,QAAS;IAACpB,MAAM,EAAEoB,QAAS;IAACnB,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAJ,QAAA,gBACrEf,IAAA,CAACH,MAAM;MAACiC,EAAE,EAAE,EAAG;MAACC,EAAE,EAAE,CAAE;MAACC,CAAC,EAAE,CAAE;MAAA,GAAKrB;IAAM,CAAG,CAAC,eAC3CX,IAAA,CAACF,IAAI;MAACuB,CAAC,EAAC,+BAA+B;MAAA,GAAKV;IAAM,CAAG,CAAC;EAAA,CACnD,CAAC;AAEV,CAAC;AAED,OAAO,MAAM2B,YAA+D,GAAG;EAC7E,iBAAiB,EAAEZ,QAAQ;EAC3B,oBAAoB,EAAEC,WAAW;EACjC,kBAAkB,EAAEC,SAAS;EAC7B,aAAa,EAAEC,QAAQ;EACvB,gBAAgB,EAAEI,WAAW;EAC7B,gBAAgB,EAAEC,WAAW;EAC7B,eAAe,EAAEC,UAAU;EAC3BI,MAAM,EAAEH;AACV,CAAC","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ export * from "./avatar/index.js";
4
+ export * from "./box/index.js";
5
+ export * from "./button/index.js";
6
+ export * from "./header/index.js";
7
+ export * from "./icon/index.js";
8
+ export * from "./page-indicator/index.js";
9
+ export * from "./portal/index.js";
10
+ export * from "./screen/index.js";
11
+ export * from "./slot/index.js";
12
+ export * from "./spinner/index.js";
13
+ export * from "./surface/index.js";
14
+ export * from "./text/index.js";
15
+ export * from "./toast/index.js";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,mBAAU;AACxB,cAAc,gBAAO;AACrB,cAAc,mBAAU;AACxB,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,2BAAkB;AAChC,cAAc,mBAAU;AACxB,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,oBAAW;AACzB,cAAc,oBAAW;AACzB,cAAc,iBAAQ;AACtB,cAAc,kBAAS","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ import { DEFAULT_PAGE_INDICATOR_MAX_VISIBLE } from "./utils.js";
4
+ import { DotIndicator } from "./variants/DotIndicator/index.js";
5
+ import { PillIndicator } from "./variants/PillIndicator/index.js";
6
+
7
+ /** Pill indicator — active page widens into a pill. Default when `variant` is omitted. */
8
+
9
+ /** Dot indicator — traveling dot with optional loading ring on the active page. */
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ export function PageIndicator(props) {
12
+ const {
13
+ count,
14
+ current,
15
+ duration,
16
+ activeColor,
17
+ inactiveColor,
18
+ vertical,
19
+ maxVisible = DEFAULT_PAGE_INDICATOR_MAX_VISIBLE,
20
+ style
21
+ } = props;
22
+ if (props.variant === 'dot') {
23
+ return /*#__PURE__*/_jsx(DotIndicator, {
24
+ count: count,
25
+ current: current,
26
+ duration: duration,
27
+ activeColor: activeColor,
28
+ inactiveColor: inactiveColor,
29
+ loading: props.loading,
30
+ loadingColor: props.loadingColor,
31
+ vertical: vertical,
32
+ maxVisible: maxVisible,
33
+ style: style
34
+ });
35
+ }
36
+ return /*#__PURE__*/_jsx(PillIndicator, {
37
+ count: count,
38
+ current: current,
39
+ duration: duration,
40
+ activeColor: activeColor,
41
+ inactiveColor: inactiveColor,
42
+ vertical: vertical,
43
+ maxVisible: maxVisible,
44
+ style: style
45
+ });
46
+ }
47
+ export { DotIndicator } from "./variants/DotIndicator/index.js";
48
+ export { PillIndicator } from "./variants/PillIndicator/index.js";
49
+ //# sourceMappingURL=PageIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_PAGE_INDICATOR_MAX_VISIBLE","DotIndicator","PillIndicator","jsx","_jsx","PageIndicator","props","count","current","duration","activeColor","inactiveColor","vertical","maxVisible","style","variant","loading","loadingColor"],"sourceRoot":"../../../../src","sources":["components/page-indicator/PageIndicator.tsx"],"mappings":";;AAKA,SAASA,kCAAkC,QAAQ,YAAS;AAC5D,SAASC,YAAY,QAAQ,kCAAyB;AACtD,SAASC,aAAa,QAAQ,mCAA0B;;AA4BxD;;AAOA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAWA,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAM;IACJC,KAAK;IACLC,OAAO;IACPC,QAAQ;IACRC,WAAW;IACXC,aAAa;IACbC,QAAQ;IACRC,UAAU,GAAGb,kCAAkC;IAC/Cc;EACF,CAAC,GAAGR,KAAK;EAET,IAAIA,KAAK,CAACS,OAAO,KAAK,KAAK,EAAE;IAC3B,oBACEX,IAAA,CAACH,YAAY;MACXM,KAAK,EAAEA,KAAM;MACbC,OAAO,EAAEA,OAAQ;MACjBC,QAAQ,EAAEA,QAAS;MACnBC,WAAW,EAAEA,WAAY;MACzBC,aAAa,EAAEA,aAAc;MAC7BK,OAAO,EAAEV,KAAK,CAACU,OAAQ;MACvBC,YAAY,EAAEX,KAAK,CAACW,YAAa;MACjCL,QAAQ,EAAEA,QAAS;MACnBC,UAAU,EAAEA,UAAW;MACvBC,KAAK,EAAEA;IAAM,CACd,CAAC;EAEN;EAEA,oBACEV,IAAA,CAACF,aAAa;IACZK,KAAK,EAAEA,KAAM;IACbC,OAAO,EAAEA,OAAQ;IACjBC,QAAQ,EAAEA,QAAS;IACnBC,WAAW,EAAEA,WAAY;IACzBC,aAAa,EAAEA,aAAc;IAC7BC,QAAQ,EAAEA,QAAS;IACnBC,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAEA;EAAM,CACd,CAAC;AAEN;AAGA,SAASb,YAAY,QAAQ,kCAAyB;AAEtD,SAASC,aAAa,QAAQ,mCAA0B","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ import { View } from 'react-native';
4
+ import { pageIndicatorViewportClipStyle } from "./utils.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ /** Non-interactive root with optional overflow clipping. */
7
+ export function PageIndicatorRoot({
8
+ children,
9
+ crossSize,
10
+ overflows,
11
+ style,
12
+ vertical,
13
+ viewportMainSize
14
+ }) {
15
+ return /*#__PURE__*/_jsx(View, {
16
+ pointerEvents: "none",
17
+ style: style,
18
+ children: overflows ? /*#__PURE__*/_jsx(View, {
19
+ style: pageIndicatorViewportClipStyle(vertical, viewportMainSize, crossSize),
20
+ children: children
21
+ }) : children
22
+ });
23
+ }
24
+ //# sourceMappingURL=PageIndicatorRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","pageIndicatorViewportClipStyle","jsx","_jsx","PageIndicatorRoot","children","crossSize","overflows","style","vertical","viewportMainSize","pointerEvents"],"sourceRoot":"../../../../src","sources":["components/page-indicator/PageIndicatorRoot.tsx"],"mappings":";;AACA,SAAyBA,IAAI,QAAwB,cAAc;AAEnE,SAASC,8BAA8B,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAWzD;AACA,OAAO,SAASC,iBAAiBA,CAAC;EAChCC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC;AACsB,CAAC,EAAE;EACzB,oBACEP,IAAA,CAACH,IAAI;IAACW,aAAa,EAAC,MAAM;IAACH,KAAK,EAAEA,KAAM;IAAAH,QAAA,EACrCE,SAAS,gBACRJ,IAAA,CAACH,IAAI;MACHQ,KAAK,EAAEP,8BAA8B,CACnCQ,QAAQ,EACRC,gBAAgB,EAChBJ,SACF,CAAE;MAAAD,QAAA,EAEDA;IAAQ,CACL,CAAC,GAEPA;EACD,CACG,CAAC;AAEX","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ import { useMemo } from 'react';
4
+ import { useUnistyles } from 'react-native-unistyles';
5
+ import { resolveThemeColor } from '#utils/resolve-theme-color';
6
+
7
+ /** Resolved color strings for Reanimated and SVG (worklets cannot use theme tokens). */
8
+
9
+ const DEFAULT_COLOR_TOKENS = {
10
+ activeColor: 'text.default',
11
+ inactiveColor: 'text.disabled',
12
+ loadingColor: 'text.disabled'
13
+ };
14
+ export function usePageIndicatorColors(colors = {}) {
15
+ const {
16
+ theme
17
+ } = useUnistyles();
18
+ return useMemo(() => ({
19
+ activeColor: resolveThemeColor(colors.activeColor ?? DEFAULT_COLOR_TOKENS.activeColor, theme) ?? theme.color['text.default'] ?? '',
20
+ inactiveColor: resolveThemeColor(colors.inactiveColor ?? DEFAULT_COLOR_TOKENS.inactiveColor, theme) ?? theme.color['text.disabled'] ?? '',
21
+ loadingColor: resolveThemeColor(colors.loadingColor ?? DEFAULT_COLOR_TOKENS.loadingColor, theme) ?? theme.color['text.disabled'] ?? ''
22
+ }), [colors.activeColor, colors.inactiveColor, colors.loadingColor, theme]);
23
+ }
24
+ //# sourceMappingURL=use-page-indicator-colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMemo","useUnistyles","resolveThemeColor","DEFAULT_COLOR_TOKENS","activeColor","inactiveColor","loadingColor","usePageIndicatorColors","colors","theme","color"],"sourceRoot":"../../../../../src","sources":["components/page-indicator/hooks/use-page-indicator-colors.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,YAAY,QAAQ,wBAAwB;AAIrD,SAASC,iBAAiB,QAAQ,4BAA4B;;AAE9D;;AAaA,MAAMC,oBAAuD,GAAG;EAC9DC,WAAW,EAAE,cAAc;EAC3BC,aAAa,EAAE,eAAe;EAC9BC,YAAY,EAAE;AAChB,CAAC;AAED,OAAO,SAASC,sBAAsBA,CACpCC,MAA+B,GAAG,CAAC,CAAC,EACpB;EAChB,MAAM;IAAEC;EAAM,CAAC,GAAGR,YAAY,CAAC,CAAC;EAEhC,OAAOD,OAAO,CACZ,OAAO;IACLI,WAAW,EACTF,iBAAiB,CACfM,MAAM,CAACJ,WAAW,IAAID,oBAAoB,CAACC,WAAW,EACtDK,KACF,CAAC,IACAA,KAAK,CAACC,KAAK,CACV,cAAc,CACf,IACD,EAAE;IACJL,aAAa,EACXH,iBAAiB,CACfM,MAAM,CAACH,aAAa,IAAIF,oBAAoB,CAACE,aAAa,EAC1DI,KACF,CAAC,IACAA,KAAK,CAACC,KAAK,CACV,eAAe,CAChB,IACD,EAAE;IACJJ,YAAY,EACVJ,iBAAiB,CACfM,MAAM,CAACF,YAAY,IAAIH,oBAAoB,CAACG,YAAY,EACxDG,KACF,CAAC,IACAA,KAAK,CAACC,KAAK,CACV,eAAe,CAChB,IACD;EACJ,CAAC,CAAC,EACF,CAACF,MAAM,CAACJ,WAAW,EAAEI,MAAM,CAACH,aAAa,EAAEG,MAAM,CAACF,YAAY,EAAEG,KAAK,CACvE,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ import { isPageIndicatorSharedValue } from "../utils.js";
4
+ import { usePageIndicatorColors } from "./use-page-indicator-colors.js";
5
+ import { usePageIndicatorProgress } from "./use-page-indicator-progress.js";
6
+ export function usePageIndicatorCore(count, current, variant, duration, colors) {
7
+ const scrollLinked = isPageIndicatorSharedValue(current);
8
+ const resolvedColors = usePageIndicatorColors(colors);
9
+ const {
10
+ progress,
11
+ pillJump
12
+ } = usePageIndicatorProgress(count, scrollLinked ? current : undefined, scrollLinked ? undefined : current, variant, duration);
13
+ return {
14
+ colors: resolvedColors,
15
+ pillJump,
16
+ progress,
17
+ scrollLinked
18
+ };
19
+ }
20
+ //# sourceMappingURL=use-page-indicator-core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isPageIndicatorSharedValue","usePageIndicatorColors","usePageIndicatorProgress","usePageIndicatorCore","count","current","variant","duration","colors","scrollLinked","resolvedColors","progress","pillJump","undefined"],"sourceRoot":"../../../../../src","sources":["components/page-indicator/hooks/use-page-indicator-core.ts"],"mappings":";;AACA,SAASA,0BAA0B,QAAQ,aAAU;AACrD,SAEEC,sBAAsB,QACjB,gCAA6B;AACpC,SAASC,wBAAwB,QAAQ,kCAA+B;AAIxE,OAAO,SAASC,oBAAoBA,CAClCC,KAAa,EACbC,OAAqC,EACrCC,OAA6B,EAC7BC,QAAgB,EAChBC,MAA+B,EAC/B;EACA,MAAMC,YAAY,GAAGT,0BAA0B,CAACK,OAAO,CAAC;EACxD,MAAMK,cAAc,GAAGT,sBAAsB,CAACO,MAAM,CAAC;EACrD,MAAM;IAAEG,QAAQ;IAAEC;EAAS,CAAC,GAAGV,wBAAwB,CACrDE,KAAK,EACLK,YAAY,GAAGJ,OAAO,GAAGQ,SAAS,EAClCJ,YAAY,GAAGI,SAAS,GAAGR,OAAO,EAClCC,OAAO,EACPC,QACF,CAAC;EAED,OAAO;IACLC,MAAM,EAAEE,cAAc;IACtBE,QAAQ;IACRD,QAAQ;IACRF;EACF,CAAC;AACH","ignoreList":[]}