blend-native 0.0.1-beta.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 (555) hide show
  1. package/README.md +404 -0
  2. package/lib/commonjs/a11y/announcement.js +42 -0
  3. package/lib/commonjs/a11y/announcement.js.map +1 -0
  4. package/lib/commonjs/a11y/useLiveRegion.js +37 -0
  5. package/lib/commonjs/a11y/useLiveRegion.js.map +1 -0
  6. package/lib/commonjs/adapters/cssStringAdapter.js +363 -0
  7. package/lib/commonjs/adapters/cssStringAdapter.js.map +1 -0
  8. package/lib/commonjs/adapters/optionalGradient.js +33 -0
  9. package/lib/commonjs/adapters/optionalGradient.js.map +1 -0
  10. package/lib/commonjs/adapters/surfaceStyle.js +159 -0
  11. package/lib/commonjs/adapters/surfaceStyle.js.map +1 -0
  12. package/lib/commonjs/components/Alert/Alert.js +130 -0
  13. package/lib/commonjs/components/Alert/Alert.js.map +1 -0
  14. package/lib/commonjs/components/Alert/AlertActions.js +74 -0
  15. package/lib/commonjs/components/Alert/AlertActions.js.map +1 -0
  16. package/lib/commonjs/components/Alert/AlertClose.js +48 -0
  17. package/lib/commonjs/components/Alert/AlertClose.js.map +1 -0
  18. package/lib/commonjs/components/Alert/AlertText.js +49 -0
  19. package/lib/commonjs/components/Alert/AlertText.js.map +1 -0
  20. package/lib/commonjs/components/Alert/alert.tokens.js +6 -0
  21. package/lib/commonjs/components/Alert/alert.tokens.js.map +1 -0
  22. package/lib/commonjs/components/Alert/alert.types.js +6 -0
  23. package/lib/commonjs/components/Alert/alert.types.js.map +1 -0
  24. package/lib/commonjs/components/Alert/alert.utils.js +80 -0
  25. package/lib/commonjs/components/Alert/alert.utils.js.map +1 -0
  26. package/lib/commonjs/components/Alert/index.js +51 -0
  27. package/lib/commonjs/components/Alert/index.js.map +1 -0
  28. package/lib/commonjs/components/Button/Button.js +125 -0
  29. package/lib/commonjs/components/Button/Button.js.map +1 -0
  30. package/lib/commonjs/components/Button/button.types.js +6 -0
  31. package/lib/commonjs/components/Button/button.types.js.map +1 -0
  32. package/lib/commonjs/components/Button/button.utils.js +129 -0
  33. package/lib/commonjs/components/Button/button.utils.js.map +1 -0
  34. package/lib/commonjs/components/Button/index.js +57 -0
  35. package/lib/commonjs/components/Button/index.js.map +1 -0
  36. package/lib/commonjs/components/Skeleton/Skeleton.js +154 -0
  37. package/lib/commonjs/components/Skeleton/Skeleton.js.map +1 -0
  38. package/lib/commonjs/components/Skeleton/index.js +20 -0
  39. package/lib/commonjs/components/Skeleton/index.js.map +1 -0
  40. package/lib/commonjs/components/Skeleton/skeleton.types.js +6 -0
  41. package/lib/commonjs/components/Skeleton/skeleton.types.js.map +1 -0
  42. package/lib/commonjs/components/Skeleton/skeleton.utils.js +45 -0
  43. package/lib/commonjs/components/Skeleton/skeleton.utils.js.map +1 -0
  44. package/lib/commonjs/components/Tag/Tag.js +161 -0
  45. package/lib/commonjs/components/Tag/Tag.js.map +1 -0
  46. package/lib/commonjs/components/Tag/index.js +33 -0
  47. package/lib/commonjs/components/Tag/index.js.map +1 -0
  48. package/lib/commonjs/components/Tag/tag.types.js +6 -0
  49. package/lib/commonjs/components/Tag/tag.types.js.map +1 -0
  50. package/lib/commonjs/components/Tag/tag.utils.js +69 -0
  51. package/lib/commonjs/components/Tag/tag.utils.js.map +1 -0
  52. package/lib/commonjs/components/TextInput/TextInput.js +138 -0
  53. package/lib/commonjs/components/TextInput/TextInput.js.map +1 -0
  54. package/lib/commonjs/components/TextInput/index.js +14 -0
  55. package/lib/commonjs/components/TextInput/index.js.map +1 -0
  56. package/lib/commonjs/components/TextInput/textInput.types.js +6 -0
  57. package/lib/commonjs/components/TextInput/textInput.types.js.map +1 -0
  58. package/lib/commonjs/components/TextInput/textInput.utils.js +40 -0
  59. package/lib/commonjs/components/TextInput/textInput.utils.js.map +1 -0
  60. package/lib/commonjs/components/shared/field/FieldFooter.js +51 -0
  61. package/lib/commonjs/components/shared/field/FieldFooter.js.map +1 -0
  62. package/lib/commonjs/components/shared/field/FieldLabels.js +67 -0
  63. package/lib/commonjs/components/shared/field/FieldLabels.js.map +1 -0
  64. package/lib/commonjs/components/shared/field/fieldState.js +37 -0
  65. package/lib/commonjs/components/shared/field/fieldState.js.map +1 -0
  66. package/lib/commonjs/components/shared/group.js +73 -0
  67. package/lib/commonjs/components/shared/group.js.map +1 -0
  68. package/lib/commonjs/index.js +256 -0
  69. package/lib/commonjs/index.js.map +1 -0
  70. package/lib/commonjs/motion/motion.js +128 -0
  71. package/lib/commonjs/motion/motion.js.map +1 -0
  72. package/lib/commonjs/motion/useReduceMotion.js +37 -0
  73. package/lib/commonjs/motion/useReduceMotion.js.map +1 -0
  74. package/lib/commonjs/overlay/portal.js +110 -0
  75. package/lib/commonjs/overlay/portal.js.map +1 -0
  76. package/lib/commonjs/overlay/positioning.js +122 -0
  77. package/lib/commonjs/overlay/positioning.js.map +1 -0
  78. package/lib/commonjs/overlay/safeAreaInsets.js +30 -0
  79. package/lib/commonjs/overlay/safeAreaInsets.js.map +1 -0
  80. package/lib/commonjs/overlay/sheet/BottomSheet.js +196 -0
  81. package/lib/commonjs/overlay/sheet/BottomSheet.js.map +1 -0
  82. package/lib/commonjs/overlay/sheet/sheetMath.js +60 -0
  83. package/lib/commonjs/overlay/sheet/sheetMath.js.map +1 -0
  84. package/lib/commonjs/overlay/toast/ToastOutlet.js +106 -0
  85. package/lib/commonjs/overlay/toast/ToastOutlet.js.map +1 -0
  86. package/lib/commonjs/overlay/toast/toastStore.js +76 -0
  87. package/lib/commonjs/overlay/toast/toastStore.js.map +1 -0
  88. package/lib/commonjs/overlay/useAnchoredPosition.js +85 -0
  89. package/lib/commonjs/overlay/useAnchoredPosition.js.map +1 -0
  90. package/lib/commonjs/package.json +1 -0
  91. package/lib/commonjs/primitives/Block.js +112 -0
  92. package/lib/commonjs/primitives/Block.js.map +1 -0
  93. package/lib/commonjs/primitives/Pressable.js +348 -0
  94. package/lib/commonjs/primitives/Pressable.js.map +1 -0
  95. package/lib/commonjs/primitives/PrimitiveInput.js +66 -0
  96. package/lib/commonjs/primitives/PrimitiveInput.js.map +1 -0
  97. package/lib/commonjs/primitives/Separator.js +55 -0
  98. package/lib/commonjs/primitives/Separator.js.map +1 -0
  99. package/lib/commonjs/primitives/Slot.js +78 -0
  100. package/lib/commonjs/primitives/Slot.js.map +1 -0
  101. package/lib/commonjs/primitives/Text.js +73 -0
  102. package/lib/commonjs/primitives/Text.js.map +1 -0
  103. package/lib/commonjs/primitives/pressFeedback.js +53 -0
  104. package/lib/commonjs/primitives/pressFeedback.js.map +1 -0
  105. package/lib/commonjs/primitives/textStyle.js +27 -0
  106. package/lib/commonjs/primitives/textStyle.js.map +1 -0
  107. package/lib/commonjs/primitives/tintSlot.js +45 -0
  108. package/lib/commonjs/primitives/tintSlot.js.map +1 -0
  109. package/lib/commonjs/primitives/touchTarget.js +64 -0
  110. package/lib/commonjs/primitives/touchTarget.js.map +1 -0
  111. package/lib/commonjs/theme/BlendNativeProvider.js +90 -0
  112. package/lib/commonjs/theme/BlendNativeProvider.js.map +1 -0
  113. package/lib/commonjs/theme/breakpoint.js +36 -0
  114. package/lib/commonjs/theme/breakpoint.js.map +1 -0
  115. package/lib/commonjs/theme/fonts.js +58 -0
  116. package/lib/commonjs/theme/fonts.js.map +1 -0
  117. package/lib/commonjs/theme/nativeTokenRegistry.js +44 -0
  118. package/lib/commonjs/theme/nativeTokenRegistry.js.map +1 -0
  119. package/lib/commonjs/theme/systemTheme.js +35 -0
  120. package/lib/commonjs/theme/systemTheme.js.map +1 -0
  121. package/lib/commonjs/theme/useNativeBreakpoint.js +33 -0
  122. package/lib/commonjs/theme/useNativeBreakpoint.js.map +1 -0
  123. package/lib/commonjs/theme/useNativeTokens.js +71 -0
  124. package/lib/commonjs/theme/useNativeTokens.js.map +1 -0
  125. package/lib/module/a11y/announcement.js +38 -0
  126. package/lib/module/a11y/announcement.js.map +1 -0
  127. package/lib/module/a11y/useLiveRegion.js +33 -0
  128. package/lib/module/a11y/useLiveRegion.js.map +1 -0
  129. package/lib/module/adapters/cssStringAdapter.js +352 -0
  130. package/lib/module/adapters/cssStringAdapter.js.map +1 -0
  131. package/lib/module/adapters/optionalGradient.js +29 -0
  132. package/lib/module/adapters/optionalGradient.js.map +1 -0
  133. package/lib/module/adapters/surfaceStyle.js +155 -0
  134. package/lib/module/adapters/surfaceStyle.js.map +1 -0
  135. package/lib/module/components/Alert/Alert.js +126 -0
  136. package/lib/module/components/Alert/Alert.js.map +1 -0
  137. package/lib/module/components/Alert/AlertActions.js +70 -0
  138. package/lib/module/components/Alert/AlertActions.js.map +1 -0
  139. package/lib/module/components/Alert/AlertClose.js +44 -0
  140. package/lib/module/components/Alert/AlertClose.js.map +1 -0
  141. package/lib/module/components/Alert/AlertText.js +45 -0
  142. package/lib/module/components/Alert/AlertText.js.map +1 -0
  143. package/lib/module/components/Alert/alert.tokens.js +4 -0
  144. package/lib/module/components/Alert/alert.tokens.js.map +1 -0
  145. package/lib/module/components/Alert/alert.types.js +4 -0
  146. package/lib/module/components/Alert/alert.types.js.map +1 -0
  147. package/lib/module/components/Alert/alert.utils.js +72 -0
  148. package/lib/module/components/Alert/alert.utils.js.map +1 -0
  149. package/lib/module/components/Alert/index.js +6 -0
  150. package/lib/module/components/Alert/index.js.map +1 -0
  151. package/lib/module/components/Button/Button.js +121 -0
  152. package/lib/module/components/Button/Button.js.map +1 -0
  153. package/lib/module/components/Button/button.types.js +4 -0
  154. package/lib/module/components/Button/button.types.js.map +1 -0
  155. package/lib/module/components/Button/button.utils.js +120 -0
  156. package/lib/module/components/Button/button.utils.js.map +1 -0
  157. package/lib/module/components/Button/index.js +5 -0
  158. package/lib/module/components/Button/index.js.map +1 -0
  159. package/lib/module/components/Skeleton/Skeleton.js +149 -0
  160. package/lib/module/components/Skeleton/Skeleton.js.map +1 -0
  161. package/lib/module/components/Skeleton/index.js +4 -0
  162. package/lib/module/components/Skeleton/index.js.map +1 -0
  163. package/lib/module/components/Skeleton/skeleton.types.js +4 -0
  164. package/lib/module/components/Skeleton/skeleton.types.js.map +1 -0
  165. package/lib/module/components/Skeleton/skeleton.utils.js +40 -0
  166. package/lib/module/components/Skeleton/skeleton.utils.js.map +1 -0
  167. package/lib/module/components/Tag/Tag.js +157 -0
  168. package/lib/module/components/Tag/Tag.js.map +1 -0
  169. package/lib/module/components/Tag/index.js +5 -0
  170. package/lib/module/components/Tag/index.js.map +1 -0
  171. package/lib/module/components/Tag/tag.types.js +4 -0
  172. package/lib/module/components/Tag/tag.types.js.map +1 -0
  173. package/lib/module/components/Tag/tag.utils.js +64 -0
  174. package/lib/module/components/Tag/tag.utils.js.map +1 -0
  175. package/lib/module/components/TextInput/TextInput.js +134 -0
  176. package/lib/module/components/TextInput/TextInput.js.map +1 -0
  177. package/lib/module/components/TextInput/index.js +4 -0
  178. package/lib/module/components/TextInput/index.js.map +1 -0
  179. package/lib/module/components/TextInput/textInput.types.js +4 -0
  180. package/lib/module/components/TextInput/textInput.types.js.map +1 -0
  181. package/lib/module/components/TextInput/textInput.utils.js +36 -0
  182. package/lib/module/components/TextInput/textInput.utils.js.map +1 -0
  183. package/lib/module/components/shared/field/FieldFooter.js +47 -0
  184. package/lib/module/components/shared/field/FieldFooter.js.map +1 -0
  185. package/lib/module/components/shared/field/FieldLabels.js +63 -0
  186. package/lib/module/components/shared/field/FieldLabels.js.map +1 -0
  187. package/lib/module/components/shared/field/fieldState.js +33 -0
  188. package/lib/module/components/shared/field/fieldState.js.map +1 -0
  189. package/lib/module/components/shared/group.js +68 -0
  190. package/lib/module/components/shared/group.js.map +1 -0
  191. package/lib/module/index.js +80 -0
  192. package/lib/module/index.js.map +1 -0
  193. package/lib/module/motion/motion.js +123 -0
  194. package/lib/module/motion/motion.js.map +1 -0
  195. package/lib/module/motion/useReduceMotion.js +33 -0
  196. package/lib/module/motion/useReduceMotion.js.map +1 -0
  197. package/lib/module/overlay/portal.js +104 -0
  198. package/lib/module/overlay/portal.js.map +1 -0
  199. package/lib/module/overlay/positioning.js +118 -0
  200. package/lib/module/overlay/positioning.js.map +1 -0
  201. package/lib/module/overlay/safeAreaInsets.js +27 -0
  202. package/lib/module/overlay/safeAreaInsets.js.map +1 -0
  203. package/lib/module/overlay/sheet/BottomSheet.js +190 -0
  204. package/lib/module/overlay/sheet/BottomSheet.js.map +1 -0
  205. package/lib/module/overlay/sheet/sheetMath.js +53 -0
  206. package/lib/module/overlay/sheet/sheetMath.js.map +1 -0
  207. package/lib/module/overlay/toast/ToastOutlet.js +101 -0
  208. package/lib/module/overlay/toast/ToastOutlet.js.map +1 -0
  209. package/lib/module/overlay/toast/toastStore.js +66 -0
  210. package/lib/module/overlay/toast/toastStore.js.map +1 -0
  211. package/lib/module/overlay/useAnchoredPosition.js +82 -0
  212. package/lib/module/overlay/useAnchoredPosition.js.map +1 -0
  213. package/lib/module/package.json +1 -0
  214. package/lib/module/primitives/Block.js +107 -0
  215. package/lib/module/primitives/Block.js.map +1 -0
  216. package/lib/module/primitives/Pressable.js +339 -0
  217. package/lib/module/primitives/Pressable.js.map +1 -0
  218. package/lib/module/primitives/PrimitiveInput.js +62 -0
  219. package/lib/module/primitives/PrimitiveInput.js.map +1 -0
  220. package/lib/module/primitives/Separator.js +50 -0
  221. package/lib/module/primitives/Separator.js.map +1 -0
  222. package/lib/module/primitives/Slot.js +69 -0
  223. package/lib/module/primitives/Slot.js.map +1 -0
  224. package/lib/module/primitives/Text.js +68 -0
  225. package/lib/module/primitives/Text.js.map +1 -0
  226. package/lib/module/primitives/pressFeedback.js +48 -0
  227. package/lib/module/primitives/pressFeedback.js.map +1 -0
  228. package/lib/module/primitives/textStyle.js +23 -0
  229. package/lib/module/primitives/textStyle.js.map +1 -0
  230. package/lib/module/primitives/tintSlot.js +42 -0
  231. package/lib/module/primitives/tintSlot.js.map +1 -0
  232. package/lib/module/primitives/touchTarget.js +58 -0
  233. package/lib/module/primitives/touchTarget.js.map +1 -0
  234. package/lib/module/theme/BlendNativeProvider.js +78 -0
  235. package/lib/module/theme/BlendNativeProvider.js.map +1 -0
  236. package/lib/module/theme/breakpoint.js +33 -0
  237. package/lib/module/theme/breakpoint.js.map +1 -0
  238. package/lib/module/theme/fonts.js +55 -0
  239. package/lib/module/theme/fonts.js.map +1 -0
  240. package/lib/module/theme/nativeTokenRegistry.js +40 -0
  241. package/lib/module/theme/nativeTokenRegistry.js.map +1 -0
  242. package/lib/module/theme/systemTheme.js +31 -0
  243. package/lib/module/theme/systemTheme.js.map +1 -0
  244. package/lib/module/theme/useNativeBreakpoint.js +24 -0
  245. package/lib/module/theme/useNativeBreakpoint.js.map +1 -0
  246. package/lib/module/theme/useNativeTokens.js +67 -0
  247. package/lib/module/theme/useNativeTokens.js.map +1 -0
  248. package/lib/typescript/commonjs/a11y/announcement.d.ts +26 -0
  249. package/lib/typescript/commonjs/a11y/announcement.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/a11y/useLiveRegion.d.ts +17 -0
  251. package/lib/typescript/commonjs/a11y/useLiveRegion.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/adapters/cssStringAdapter.d.ts +119 -0
  253. package/lib/typescript/commonjs/adapters/cssStringAdapter.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/adapters/optionalGradient.d.ts +32 -0
  255. package/lib/typescript/commonjs/adapters/optionalGradient.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/adapters/surfaceStyle.d.ts +75 -0
  257. package/lib/typescript/commonjs/adapters/surfaceStyle.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/components/Alert/Alert.d.ts +14 -0
  259. package/lib/typescript/commonjs/components/Alert/Alert.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/components/Alert/AlertActions.d.ts +13 -0
  261. package/lib/typescript/commonjs/components/Alert/AlertActions.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/components/Alert/AlertClose.d.ts +22 -0
  263. package/lib/typescript/commonjs/components/Alert/AlertClose.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/components/Alert/AlertText.d.ts +19 -0
  265. package/lib/typescript/commonjs/components/Alert/AlertText.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/components/Alert/alert.tokens.d.ts +17 -0
  267. package/lib/typescript/commonjs/components/Alert/alert.tokens.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/components/Alert/alert.types.d.ts +70 -0
  269. package/lib/typescript/commonjs/components/Alert/alert.types.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/components/Alert/alert.utils.d.ts +58 -0
  271. package/lib/typescript/commonjs/components/Alert/alert.utils.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/components/Alert/index.d.ts +7 -0
  273. package/lib/typescript/commonjs/components/Alert/index.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/components/Button/Button.d.ts +22 -0
  275. package/lib/typescript/commonjs/components/Button/Button.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/components/Button/button.types.d.ts +37 -0
  277. package/lib/typescript/commonjs/components/Button/button.types.d.ts.map +1 -0
  278. package/lib/typescript/commonjs/components/Button/button.utils.d.ts +98 -0
  279. package/lib/typescript/commonjs/components/Button/button.utils.d.ts.map +1 -0
  280. package/lib/typescript/commonjs/components/Button/index.d.ts +5 -0
  281. package/lib/typescript/commonjs/components/Button/index.d.ts.map +1 -0
  282. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +7 -0
  283. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/components/Skeleton/index.d.ts +3 -0
  285. package/lib/typescript/commonjs/components/Skeleton/index.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/components/Skeleton/skeleton.types.d.ts +25 -0
  287. package/lib/typescript/commonjs/components/Skeleton/skeleton.types.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/components/Skeleton/skeleton.utils.d.ts +21 -0
  289. package/lib/typescript/commonjs/components/Skeleton/skeleton.utils.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/components/Tag/Tag.d.ts +21 -0
  291. package/lib/typescript/commonjs/components/Tag/Tag.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/components/Tag/index.d.ts +4 -0
  293. package/lib/typescript/commonjs/components/Tag/index.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/components/Tag/tag.types.d.ts +56 -0
  295. package/lib/typescript/commonjs/components/Tag/tag.types.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/components/Tag/tag.utils.d.ts +41 -0
  297. package/lib/typescript/commonjs/components/Tag/tag.utils.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/components/TextInput/TextInput.d.ts +33 -0
  299. package/lib/typescript/commonjs/components/TextInput/TextInput.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/components/TextInput/index.d.ts +3 -0
  301. package/lib/typescript/commonjs/components/TextInput/index.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/components/TextInput/textInput.types.d.ts +45 -0
  303. package/lib/typescript/commonjs/components/TextInput/textInput.types.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/components/TextInput/textInput.utils.d.ts +35 -0
  305. package/lib/typescript/commonjs/components/TextInput/textInput.utils.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/components/shared/field/FieldFooter.d.ts +22 -0
  307. package/lib/typescript/commonjs/components/shared/field/FieldFooter.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/components/shared/field/FieldLabels.d.ts +27 -0
  309. package/lib/typescript/commonjs/components/shared/field/FieldLabels.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/components/shared/field/fieldState.d.ts +23 -0
  311. package/lib/typescript/commonjs/components/shared/field/fieldState.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/components/shared/group.d.ts +50 -0
  313. package/lib/typescript/commonjs/components/shared/group.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/index.d.ts +74 -0
  315. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/motion/motion.d.ts +121 -0
  317. package/lib/typescript/commonjs/motion/motion.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/motion/useReduceMotion.d.ts +14 -0
  319. package/lib/typescript/commonjs/motion/useReduceMotion.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/overlay/portal.d.ts +20 -0
  321. package/lib/typescript/commonjs/overlay/portal.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/overlay/positioning.d.ts +65 -0
  323. package/lib/typescript/commonjs/overlay/positioning.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/overlay/safeAreaInsets.d.ts +19 -0
  325. package/lib/typescript/commonjs/overlay/safeAreaInsets.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/overlay/sheet/BottomSheet.d.ts +56 -0
  327. package/lib/typescript/commonjs/overlay/sheet/BottomSheet.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/overlay/sheet/sheetMath.d.ts +32 -0
  329. package/lib/typescript/commonjs/overlay/sheet/sheetMath.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/overlay/toast/ToastOutlet.d.ts +17 -0
  331. package/lib/typescript/commonjs/overlay/toast/ToastOutlet.d.ts.map +1 -0
  332. package/lib/typescript/commonjs/overlay/toast/toastStore.d.ts +45 -0
  333. package/lib/typescript/commonjs/overlay/toast/toastStore.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/overlay/useAnchoredPosition.d.ts +40 -0
  335. package/lib/typescript/commonjs/overlay/useAnchoredPosition.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/package.json +1 -0
  337. package/lib/typescript/commonjs/primitives/Block.d.ts +37 -0
  338. package/lib/typescript/commonjs/primitives/Block.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/primitives/Pressable.d.ts +135 -0
  340. package/lib/typescript/commonjs/primitives/Pressable.d.ts.map +1 -0
  341. package/lib/typescript/commonjs/primitives/PrimitiveInput.d.ts +42 -0
  342. package/lib/typescript/commonjs/primitives/PrimitiveInput.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/primitives/Separator.d.ts +28 -0
  344. package/lib/typescript/commonjs/primitives/Separator.d.ts.map +1 -0
  345. package/lib/typescript/commonjs/primitives/Slot.d.ts +48 -0
  346. package/lib/typescript/commonjs/primitives/Slot.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/primitives/Text.d.ts +50 -0
  348. package/lib/typescript/commonjs/primitives/Text.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/primitives/pressFeedback.d.ts +39 -0
  350. package/lib/typescript/commonjs/primitives/pressFeedback.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/primitives/textStyle.d.ts +13 -0
  352. package/lib/typescript/commonjs/primitives/textStyle.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/primitives/tintSlot.d.ts +10 -0
  354. package/lib/typescript/commonjs/primitives/tintSlot.d.ts.map +1 -0
  355. package/lib/typescript/commonjs/primitives/touchTarget.d.ts +43 -0
  356. package/lib/typescript/commonjs/primitives/touchTarget.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/theme/BlendNativeProvider.d.ts +69 -0
  358. package/lib/typescript/commonjs/theme/BlendNativeProvider.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/theme/breakpoint.d.ts +27 -0
  360. package/lib/typescript/commonjs/theme/breakpoint.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/theme/fonts.d.ts +34 -0
  362. package/lib/typescript/commonjs/theme/fonts.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/theme/nativeTokenRegistry.d.ts +34 -0
  364. package/lib/typescript/commonjs/theme/nativeTokenRegistry.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/theme/systemTheme.d.ts +25 -0
  366. package/lib/typescript/commonjs/theme/systemTheme.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/theme/useNativeBreakpoint.d.ts +17 -0
  368. package/lib/typescript/commonjs/theme/useNativeBreakpoint.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/theme/useNativeTokens.d.ts +4 -0
  370. package/lib/typescript/commonjs/theme/useNativeTokens.d.ts.map +1 -0
  371. package/lib/typescript/module/a11y/announcement.d.ts +26 -0
  372. package/lib/typescript/module/a11y/announcement.d.ts.map +1 -0
  373. package/lib/typescript/module/a11y/useLiveRegion.d.ts +17 -0
  374. package/lib/typescript/module/a11y/useLiveRegion.d.ts.map +1 -0
  375. package/lib/typescript/module/adapters/cssStringAdapter.d.ts +119 -0
  376. package/lib/typescript/module/adapters/cssStringAdapter.d.ts.map +1 -0
  377. package/lib/typescript/module/adapters/optionalGradient.d.ts +32 -0
  378. package/lib/typescript/module/adapters/optionalGradient.d.ts.map +1 -0
  379. package/lib/typescript/module/adapters/surfaceStyle.d.ts +75 -0
  380. package/lib/typescript/module/adapters/surfaceStyle.d.ts.map +1 -0
  381. package/lib/typescript/module/components/Alert/Alert.d.ts +14 -0
  382. package/lib/typescript/module/components/Alert/Alert.d.ts.map +1 -0
  383. package/lib/typescript/module/components/Alert/AlertActions.d.ts +13 -0
  384. package/lib/typescript/module/components/Alert/AlertActions.d.ts.map +1 -0
  385. package/lib/typescript/module/components/Alert/AlertClose.d.ts +22 -0
  386. package/lib/typescript/module/components/Alert/AlertClose.d.ts.map +1 -0
  387. package/lib/typescript/module/components/Alert/AlertText.d.ts +19 -0
  388. package/lib/typescript/module/components/Alert/AlertText.d.ts.map +1 -0
  389. package/lib/typescript/module/components/Alert/alert.tokens.d.ts +17 -0
  390. package/lib/typescript/module/components/Alert/alert.tokens.d.ts.map +1 -0
  391. package/lib/typescript/module/components/Alert/alert.types.d.ts +70 -0
  392. package/lib/typescript/module/components/Alert/alert.types.d.ts.map +1 -0
  393. package/lib/typescript/module/components/Alert/alert.utils.d.ts +58 -0
  394. package/lib/typescript/module/components/Alert/alert.utils.d.ts.map +1 -0
  395. package/lib/typescript/module/components/Alert/index.d.ts +7 -0
  396. package/lib/typescript/module/components/Alert/index.d.ts.map +1 -0
  397. package/lib/typescript/module/components/Button/Button.d.ts +22 -0
  398. package/lib/typescript/module/components/Button/Button.d.ts.map +1 -0
  399. package/lib/typescript/module/components/Button/button.types.d.ts +37 -0
  400. package/lib/typescript/module/components/Button/button.types.d.ts.map +1 -0
  401. package/lib/typescript/module/components/Button/button.utils.d.ts +98 -0
  402. package/lib/typescript/module/components/Button/button.utils.d.ts.map +1 -0
  403. package/lib/typescript/module/components/Button/index.d.ts +5 -0
  404. package/lib/typescript/module/components/Button/index.d.ts.map +1 -0
  405. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +7 -0
  406. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts.map +1 -0
  407. package/lib/typescript/module/components/Skeleton/index.d.ts +3 -0
  408. package/lib/typescript/module/components/Skeleton/index.d.ts.map +1 -0
  409. package/lib/typescript/module/components/Skeleton/skeleton.types.d.ts +25 -0
  410. package/lib/typescript/module/components/Skeleton/skeleton.types.d.ts.map +1 -0
  411. package/lib/typescript/module/components/Skeleton/skeleton.utils.d.ts +21 -0
  412. package/lib/typescript/module/components/Skeleton/skeleton.utils.d.ts.map +1 -0
  413. package/lib/typescript/module/components/Tag/Tag.d.ts +21 -0
  414. package/lib/typescript/module/components/Tag/Tag.d.ts.map +1 -0
  415. package/lib/typescript/module/components/Tag/index.d.ts +4 -0
  416. package/lib/typescript/module/components/Tag/index.d.ts.map +1 -0
  417. package/lib/typescript/module/components/Tag/tag.types.d.ts +56 -0
  418. package/lib/typescript/module/components/Tag/tag.types.d.ts.map +1 -0
  419. package/lib/typescript/module/components/Tag/tag.utils.d.ts +41 -0
  420. package/lib/typescript/module/components/Tag/tag.utils.d.ts.map +1 -0
  421. package/lib/typescript/module/components/TextInput/TextInput.d.ts +33 -0
  422. package/lib/typescript/module/components/TextInput/TextInput.d.ts.map +1 -0
  423. package/lib/typescript/module/components/TextInput/index.d.ts +3 -0
  424. package/lib/typescript/module/components/TextInput/index.d.ts.map +1 -0
  425. package/lib/typescript/module/components/TextInput/textInput.types.d.ts +45 -0
  426. package/lib/typescript/module/components/TextInput/textInput.types.d.ts.map +1 -0
  427. package/lib/typescript/module/components/TextInput/textInput.utils.d.ts +35 -0
  428. package/lib/typescript/module/components/TextInput/textInput.utils.d.ts.map +1 -0
  429. package/lib/typescript/module/components/shared/field/FieldFooter.d.ts +22 -0
  430. package/lib/typescript/module/components/shared/field/FieldFooter.d.ts.map +1 -0
  431. package/lib/typescript/module/components/shared/field/FieldLabels.d.ts +27 -0
  432. package/lib/typescript/module/components/shared/field/FieldLabels.d.ts.map +1 -0
  433. package/lib/typescript/module/components/shared/field/fieldState.d.ts +23 -0
  434. package/lib/typescript/module/components/shared/field/fieldState.d.ts.map +1 -0
  435. package/lib/typescript/module/components/shared/group.d.ts +50 -0
  436. package/lib/typescript/module/components/shared/group.d.ts.map +1 -0
  437. package/lib/typescript/module/index.d.ts +74 -0
  438. package/lib/typescript/module/index.d.ts.map +1 -0
  439. package/lib/typescript/module/motion/motion.d.ts +121 -0
  440. package/lib/typescript/module/motion/motion.d.ts.map +1 -0
  441. package/lib/typescript/module/motion/useReduceMotion.d.ts +14 -0
  442. package/lib/typescript/module/motion/useReduceMotion.d.ts.map +1 -0
  443. package/lib/typescript/module/overlay/portal.d.ts +20 -0
  444. package/lib/typescript/module/overlay/portal.d.ts.map +1 -0
  445. package/lib/typescript/module/overlay/positioning.d.ts +65 -0
  446. package/lib/typescript/module/overlay/positioning.d.ts.map +1 -0
  447. package/lib/typescript/module/overlay/safeAreaInsets.d.ts +19 -0
  448. package/lib/typescript/module/overlay/safeAreaInsets.d.ts.map +1 -0
  449. package/lib/typescript/module/overlay/sheet/BottomSheet.d.ts +56 -0
  450. package/lib/typescript/module/overlay/sheet/BottomSheet.d.ts.map +1 -0
  451. package/lib/typescript/module/overlay/sheet/sheetMath.d.ts +32 -0
  452. package/lib/typescript/module/overlay/sheet/sheetMath.d.ts.map +1 -0
  453. package/lib/typescript/module/overlay/toast/ToastOutlet.d.ts +17 -0
  454. package/lib/typescript/module/overlay/toast/ToastOutlet.d.ts.map +1 -0
  455. package/lib/typescript/module/overlay/toast/toastStore.d.ts +45 -0
  456. package/lib/typescript/module/overlay/toast/toastStore.d.ts.map +1 -0
  457. package/lib/typescript/module/overlay/useAnchoredPosition.d.ts +40 -0
  458. package/lib/typescript/module/overlay/useAnchoredPosition.d.ts.map +1 -0
  459. package/lib/typescript/module/package.json +1 -0
  460. package/lib/typescript/module/primitives/Block.d.ts +37 -0
  461. package/lib/typescript/module/primitives/Block.d.ts.map +1 -0
  462. package/lib/typescript/module/primitives/Pressable.d.ts +135 -0
  463. package/lib/typescript/module/primitives/Pressable.d.ts.map +1 -0
  464. package/lib/typescript/module/primitives/PrimitiveInput.d.ts +42 -0
  465. package/lib/typescript/module/primitives/PrimitiveInput.d.ts.map +1 -0
  466. package/lib/typescript/module/primitives/Separator.d.ts +28 -0
  467. package/lib/typescript/module/primitives/Separator.d.ts.map +1 -0
  468. package/lib/typescript/module/primitives/Slot.d.ts +48 -0
  469. package/lib/typescript/module/primitives/Slot.d.ts.map +1 -0
  470. package/lib/typescript/module/primitives/Text.d.ts +50 -0
  471. package/lib/typescript/module/primitives/Text.d.ts.map +1 -0
  472. package/lib/typescript/module/primitives/pressFeedback.d.ts +39 -0
  473. package/lib/typescript/module/primitives/pressFeedback.d.ts.map +1 -0
  474. package/lib/typescript/module/primitives/textStyle.d.ts +13 -0
  475. package/lib/typescript/module/primitives/textStyle.d.ts.map +1 -0
  476. package/lib/typescript/module/primitives/tintSlot.d.ts +10 -0
  477. package/lib/typescript/module/primitives/tintSlot.d.ts.map +1 -0
  478. package/lib/typescript/module/primitives/touchTarget.d.ts +43 -0
  479. package/lib/typescript/module/primitives/touchTarget.d.ts.map +1 -0
  480. package/lib/typescript/module/theme/BlendNativeProvider.d.ts +69 -0
  481. package/lib/typescript/module/theme/BlendNativeProvider.d.ts.map +1 -0
  482. package/lib/typescript/module/theme/breakpoint.d.ts +27 -0
  483. package/lib/typescript/module/theme/breakpoint.d.ts.map +1 -0
  484. package/lib/typescript/module/theme/fonts.d.ts +34 -0
  485. package/lib/typescript/module/theme/fonts.d.ts.map +1 -0
  486. package/lib/typescript/module/theme/nativeTokenRegistry.d.ts +34 -0
  487. package/lib/typescript/module/theme/nativeTokenRegistry.d.ts.map +1 -0
  488. package/lib/typescript/module/theme/systemTheme.d.ts +25 -0
  489. package/lib/typescript/module/theme/systemTheme.d.ts.map +1 -0
  490. package/lib/typescript/module/theme/useNativeBreakpoint.d.ts +17 -0
  491. package/lib/typescript/module/theme/useNativeBreakpoint.d.ts.map +1 -0
  492. package/lib/typescript/module/theme/useNativeTokens.d.ts +4 -0
  493. package/lib/typescript/module/theme/useNativeTokens.d.ts.map +1 -0
  494. package/package.json +137 -0
  495. package/src/a11y/announcement.ts +41 -0
  496. package/src/a11y/useLiveRegion.ts +36 -0
  497. package/src/adapters/cssStringAdapter.ts +403 -0
  498. package/src/adapters/optionalGradient.ts +39 -0
  499. package/src/adapters/surfaceStyle.ts +209 -0
  500. package/src/components/Alert/Alert.tsx +167 -0
  501. package/src/components/Alert/AlertActions.tsx +98 -0
  502. package/src/components/Alert/AlertClose.tsx +53 -0
  503. package/src/components/Alert/AlertText.tsx +58 -0
  504. package/src/components/Alert/alert.tokens.ts +24 -0
  505. package/src/components/Alert/alert.types.ts +81 -0
  506. package/src/components/Alert/alert.utils.ts +94 -0
  507. package/src/components/Alert/index.ts +21 -0
  508. package/src/components/Button/Button.tsx +180 -0
  509. package/src/components/Button/button.types.ts +44 -0
  510. package/src/components/Button/button.utils.ts +213 -0
  511. package/src/components/Button/index.ts +12 -0
  512. package/src/components/Skeleton/Skeleton.tsx +196 -0
  513. package/src/components/Skeleton/index.ts +2 -0
  514. package/src/components/Skeleton/skeleton.types.ts +28 -0
  515. package/src/components/Skeleton/skeleton.utils.ts +56 -0
  516. package/src/components/Tag/Tag.tsx +204 -0
  517. package/src/components/Tag/index.ts +7 -0
  518. package/src/components/Tag/tag.types.ts +63 -0
  519. package/src/components/Tag/tag.utils.ts +82 -0
  520. package/src/components/TextInput/TextInput.tsx +165 -0
  521. package/src/components/TextInput/index.ts +2 -0
  522. package/src/components/TextInput/textInput.types.ts +54 -0
  523. package/src/components/TextInput/textInput.utils.ts +68 -0
  524. package/src/components/shared/field/FieldFooter.tsx +66 -0
  525. package/src/components/shared/field/FieldLabels.tsx +86 -0
  526. package/src/components/shared/field/fieldState.ts +39 -0
  527. package/src/components/shared/group.ts +72 -0
  528. package/src/index.ts +144 -0
  529. package/src/motion/motion.ts +115 -0
  530. package/src/motion/useReduceMotion.ts +36 -0
  531. package/src/overlay/portal.tsx +122 -0
  532. package/src/overlay/positioning.ts +196 -0
  533. package/src/overlay/safeAreaInsets.ts +36 -0
  534. package/src/overlay/sheet/BottomSheet.tsx +276 -0
  535. package/src/overlay/sheet/sheetMath.ts +58 -0
  536. package/src/overlay/toast/ToastOutlet.tsx +127 -0
  537. package/src/overlay/toast/toastStore.ts +96 -0
  538. package/src/overlay/useAnchoredPosition.ts +92 -0
  539. package/src/primitives/Block.tsx +129 -0
  540. package/src/primitives/Pressable.tsx +528 -0
  541. package/src/primitives/PrimitiveInput.tsx +87 -0
  542. package/src/primitives/Separator.tsx +65 -0
  543. package/src/primitives/Slot.tsx +94 -0
  544. package/src/primitives/Text.tsx +98 -0
  545. package/src/primitives/pressFeedback.ts +78 -0
  546. package/src/primitives/textStyle.ts +24 -0
  547. package/src/primitives/tintSlot.ts +44 -0
  548. package/src/primitives/touchTarget.ts +72 -0
  549. package/src/theme/BlendNativeProvider.tsx +147 -0
  550. package/src/theme/breakpoint.ts +38 -0
  551. package/src/theme/fonts.ts +63 -0
  552. package/src/theme/nativeTokenRegistry.ts +57 -0
  553. package/src/theme/systemTheme.ts +34 -0
  554. package/src/theme/useNativeBreakpoint.ts +27 -0
  555. package/src/theme/useNativeTokens.ts +99 -0
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Tag", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Tag.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "getAccessibleName", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _tagUtils.getAccessibleName;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "getTagAccessibilityState", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _tagUtils.getTagAccessibilityState;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "getTagBorderRadius", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _tagUtils.getTagBorderRadius;
28
+ }
29
+ });
30
+ var _Tag = _interopRequireDefault(require("./Tag.js"));
31
+ var _tagUtils = require("./tag.utils.js");
32
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Tag","_interopRequireDefault","require","_tagUtils","e","__esModule","default"],"sourceRoot":"../../../../src","sources":["components/Tag/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAIoB,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=tag.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Tag/tag.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAccessibleName = getAccessibleName;
7
+ exports.getTagAccessibilityState = getTagAccessibilityState;
8
+ exports.getTagBorderRadius = getTagBorderRadius;
9
+ var _group = require("../shared/group.js");
10
+ /**
11
+ * Native Tag style helpers.
12
+ *
13
+ * Ported from `packages/blend/lib/components/TagV2/utils.ts`. Both functions
14
+ * below are pure string/logic helpers with no DOM dependency, so they are
15
+ * reproduced verbatim in behaviour — keeping web and native visually and
16
+ * semantically identical is the whole point.
17
+ *
18
+ * Web's third helper, `createKeyboardHandler` (Enter/Space → click), has no
19
+ * native counterpart: RN's `Pressable` handles activation itself, including
20
+ * for switch-control and keyboard users.
21
+ */
22
+
23
+ /**
24
+ * Resolve the border radius for a tag, collapsing the joined edges when the
25
+ * tag sits inside a group.
26
+ *
27
+ * Mirrors `getTagBorderRadius` in web `utils.ts`. The collapsing itself lives
28
+ * in `shared/group` because Button needs exactly the same algorithm.
29
+ */
30
+ function getTagBorderRadius(size, subType, tagGroupPosition, tokens) {
31
+ return (0, _group.getGroupedBorderRadius)(tokens.borderRadius[size][subType], tagGroupPosition);
32
+ }
33
+
34
+ /**
35
+ * Build the accessible name for a tag.
36
+ *
37
+ * Mirrors `getAccessibleName` in web `utils.ts`: non-interactive tags get no
38
+ * explicit name (the text content is announced instead), and interactive
39
+ * tags fold their toggle state into the label.
40
+ */
41
+ function getAccessibleName(text, isInteractive, pressed) {
42
+ if (!isInteractive) {
43
+ return undefined;
44
+ }
45
+ let accessibleName = text;
46
+ if (pressed !== undefined) {
47
+ if (pressed === true) {
48
+ accessibleName = `${text}, pressed`;
49
+ } else if (pressed === 'mixed') {
50
+ accessibleName = `${text}, mixed state`;
51
+ }
52
+ }
53
+ return accessibleName;
54
+ }
55
+
56
+ /**
57
+ * Resolve the accessibility state for a tag.
58
+ *
59
+ * `'mixed'` has no RN equivalent — RN's `selected` is a boolean — so it is
60
+ * reported as unselected and carried in the accessible name instead, which
61
+ * is what `getAccessibleName` already appends.
62
+ */
63
+ function getTagAccessibilityState(isInteractive, pressed) {
64
+ if (!isInteractive || pressed === undefined) return undefined;
65
+ return {
66
+ selected: pressed === true
67
+ };
68
+ }
69
+ //# sourceMappingURL=tag.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_group","require","getTagBorderRadius","size","subType","tagGroupPosition","tokens","getGroupedBorderRadius","borderRadius","getAccessibleName","text","isInteractive","pressed","undefined","accessibleName","getTagAccessibilityState","selected"],"sourceRoot":"../../../../src","sources":["components/Tag/tag.utils.ts"],"mappings":";;;;;;;;AAKA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAC9BC,IAAe,EACfC,OAAqB,EACrBC,gBAA2C,EAC3CC,MAAuB,EACjB;EACN,OAAO,IAAAC,6BAAsB,EACzBD,MAAM,CAACE,YAAY,CAACL,IAAI,CAAC,CAACC,OAAO,CAAC,EAClCC,gBACJ,CAAC;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,iBAAiBA,CAC7BC,IAAY,EACZC,aAAsB,EACtBC,OAAsC,EACpB;EAClB,IAAI,CAACD,aAAa,EAAE;IAChB,OAAOE,SAAS;EACpB;EAEA,IAAIC,cAAc,GAAGJ,IAAI;EAEzB,IAAIE,OAAO,KAAKC,SAAS,EAAE;IACvB,IAAID,OAAO,KAAK,IAAI,EAAE;MAClBE,cAAc,GAAG,GAAGJ,IAAI,WAAW;IACvC,CAAC,MAAM,IAAIE,OAAO,KAAK,OAAO,EAAE;MAC5BE,cAAc,GAAG,GAAGJ,IAAI,eAAe;IAC3C;EACJ;EAEA,OAAOI,cAAc;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,wBAAwBA,CACpCJ,aAAsB,EACtBC,OAAsC,EACL;EACjC,IAAI,CAACD,aAAa,IAAIC,OAAO,KAAKC,SAAS,EAAE,OAAOA,SAAS;EAC7D,OAAO;IAAEG,QAAQ,EAAEJ,OAAO,KAAK;EAAK,CAAC;AACzC","ignoreList":[]}
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ var _node = require("@juspay/blend-design-system/node");
9
+ var _useNativeTokens = require("../../theme/useNativeTokens.js");
10
+ var _Block = require("../../primitives/Block.js");
11
+ var _PrimitiveInput = require("../../primitives/PrimitiveInput.js");
12
+ var _Slot = require("../../primitives/Slot.js");
13
+ var _FieldLabels = require("../shared/field/FieldLabels.js");
14
+ var _FieldFooter = require("../shared/field/FieldFooter.js");
15
+ var _fieldState = require("../shared/field/fieldState.js");
16
+ var _textInputUtils = require("./textInput.utils.js");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ /**
19
+ * TextInput — React Native implementation of web's `TextInputV2`, and the
20
+ * reference consumer of the shared field chrome (`FieldLabels`,
21
+ * `FieldFooter`, `PrimitiveInput`) the rest of the InputsV2 family will
22
+ * reuse.
23
+ *
24
+ * Anatomy matches web: a column of label row, bordered field row (left
25
+ * slot / input / right slot), and footer — all resolved from the
26
+ * `TEXT_INPUTV2` token slot. Focus is component state re-resolving the
27
+ * container against the FOCUS tokens, replacing web's `_focus` pseudo
28
+ * object; the spread-only focus ring has no RN equivalent and is dropped.
29
+ */
30
+ const TextInput = /*#__PURE__*/(0, _react.forwardRef)(function TextInput({
31
+ value,
32
+ onChangeText,
33
+ label,
34
+ subLabel,
35
+ size = _node.InputSizeV2.SM,
36
+ error,
37
+ hintText,
38
+ required = false,
39
+ disabled = false,
40
+ leftSlot,
41
+ rightSlot,
42
+ testID,
43
+ accessibilityLabel,
44
+ style,
45
+ inputRef,
46
+ onFocus,
47
+ onBlur,
48
+ ...rest
49
+ }, ref) {
50
+ const tokens = (0, _useNativeTokens.useNativeTokens)('TEXT_INPUTV2');
51
+ const [focused, setFocused] = (0, _react.useState)(false);
52
+
53
+ // Labels/footer track error+disabled; the container also tracks focus.
54
+ const fieldState = (0, _fieldState.getFieldState)(error, disabled);
55
+ const visualState = (0, _fieldState.getFieldVisualState)(error, disabled, focused);
56
+ const styles = (0, _react.useMemo)(() => (0, _textInputUtils.getTextInputNativeStyles)(tokens, size, visualState), [tokens, size, visualState]);
57
+
58
+ // Event types come from RN's own prop signatures — they changed shape
59
+ // across RN versions (FocusEvent/BlurEvent), so deriving keeps us
60
+ // correct on every supported peer.
61
+ const handleFocus = (0, _react.useCallback)(event => {
62
+ setFocused(true);
63
+ onFocus?.(event);
64
+ }, [onFocus]);
65
+ const handleBlur = (0, _react.useCallback)(event => {
66
+ setFocused(false);
67
+ onBlur?.(event);
68
+ }, [onBlur]);
69
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Block.Block, {
70
+ ref: ref,
71
+ gap: styles.gap,
72
+ style: style,
73
+ testID: testID,
74
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FieldLabels.FieldLabels, {
75
+ label: label,
76
+ sublabel: subLabel,
77
+ required: required,
78
+ size: size,
79
+ state: fieldState,
80
+ tokens: tokens.topContainer,
81
+ testID: testID ? `${testID}-labels` : undefined
82
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Block.Block, {
83
+ flexDirection: "row",
84
+ alignItems: "center",
85
+ width: "100%",
86
+ testID: testID ? `${testID}-container` : undefined,
87
+ border: styles.container.border,
88
+ backgroundColor: styles.container.backgroundColor,
89
+ borderRadius: styles.container.borderRadius,
90
+ gap: styles.container.gap,
91
+ paddingTop: styles.container.paddingTop,
92
+ paddingRight: styles.container.paddingRight,
93
+ paddingBottom: styles.container.paddingBottom,
94
+ paddingLeft: styles.container.paddingLeft,
95
+ children: [leftSlot?.slot ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Slot.Slot, {
96
+ maxHeight: leftSlot.maxHeight
97
+ // Decorative next to the labelled input, matching
98
+ // web's aria-hidden on input slots.
99
+ ,
100
+ hidden: true,
101
+ testID: testID ? `${testID}-left-slot` : undefined,
102
+ children: leftSlot.slot
103
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_PrimitiveInput.PrimitiveInput, {
104
+ ref: inputRef,
105
+ value: value,
106
+ onChangeText: onChangeText,
107
+ editable: !disabled,
108
+ fontSize: styles.text.fontSize,
109
+ fontWeight: styles.text.fontWeight,
110
+ lineHeight: styles.text.lineHeight,
111
+ color: styles.text.color,
112
+ placeholderColor: styles.placeholderColor,
113
+ onFocus: handleFocus,
114
+ onBlur: handleBlur,
115
+ accessibilityLabel: accessibilityLabel ?? label,
116
+ accessibilityState: {
117
+ disabled
118
+ },
119
+ testID: testID ? `${testID}-input` : undefined,
120
+ ...rest
121
+ }), rightSlot?.slot ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Slot.Slot, {
122
+ maxHeight: rightSlot.maxHeight,
123
+ hidden: true,
124
+ testID: testID ? `${testID}-right-slot` : undefined,
125
+ children: rightSlot.slot
126
+ }) : null]
127
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FieldFooter.FieldFooter, {
128
+ error: error,
129
+ hintText: hintText,
130
+ size: size,
131
+ tokens: tokens.bottomContainer,
132
+ testID: testID ? `${testID}-footer` : undefined
133
+ })]
134
+ });
135
+ });
136
+ TextInput.displayName = 'TextInput';
137
+ var _default = exports.default = TextInput;
138
+ //# sourceMappingURL=TextInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_node","_useNativeTokens","_Block","_PrimitiveInput","_Slot","_FieldLabels","_FieldFooter","_fieldState","_textInputUtils","_jsxRuntime","TextInput","forwardRef","value","onChangeText","label","subLabel","size","InputSizeV2","SM","error","hintText","required","disabled","leftSlot","rightSlot","testID","accessibilityLabel","style","inputRef","onFocus","onBlur","rest","ref","tokens","useNativeTokens","focused","setFocused","useState","fieldState","getFieldState","visualState","getFieldVisualState","styles","useMemo","getTextInputNativeStyles","handleFocus","useCallback","event","handleBlur","jsxs","Block","gap","children","jsx","FieldLabels","sublabel","state","topContainer","undefined","flexDirection","alignItems","width","border","container","backgroundColor","borderRadius","paddingTop","paddingRight","paddingBottom","paddingLeft","slot","Slot","maxHeight","hidden","PrimitiveInput","editable","fontSize","text","fontWeight","lineHeight","color","placeholderColor","accessibilityState","FieldFooter","bottomContainer","displayName","_default","exports","default"],"sourceRoot":"../../../../src","sources":["components/TextInput/TextInput.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAIA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AAA4D,IAAAU,WAAA,GAAAV,OAAA;AAG5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMW,SAAS,gBAAG,IAAAC,iBAAU,EAA+B,SAASD,SAASA,CACzE;EACIE,KAAK;EACLC,YAAY;EACZC,KAAK;EACLC,QAAQ;EACRC,IAAI,GAAGC,iBAAW,CAACC,EAAE;EACrBC,KAAK;EACLC,QAAQ;EACRC,QAAQ,GAAG,KAAK;EAChBC,QAAQ,GAAG,KAAK;EAChBC,QAAQ;EACRC,SAAS;EACTC,MAAM;EACNC,kBAAkB;EAClBC,KAAK;EACLC,QAAQ;EACRC,OAAO;EACPC,MAAM;EACN,GAAGC;AACP,CAAC,EACDC,GAAG,EACL;EACE,MAAMC,MAAM,GAAG,IAAAC,gCAAe,EAAwB,cAAc,CAAC;EACrE,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;;EAE7C;EACA,MAAMC,UAAU,GAAG,IAAAC,yBAAa,EAACpB,KAAK,EAAEG,QAAQ,CAAC;EACjD,MAAMkB,WAAW,GAAG,IAAAC,+BAAmB,EAACtB,KAAK,EAAEG,QAAQ,EAAEa,OAAO,CAAC;EAEjE,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BtB,kBAAkB,EAAEA,kBAAkB,IAAIZ,KAAM;QAChDoE,kBAAkB,EAAE;UAAE5D;QAAS,CAAE;QACjCG,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,QAAQ,GAAGiC,SAAU;QAAA,GAC3C3B;MAAI,CACX,CAAC,EAEDP,SAAS,EAAE8C,IAAI,gBACZ,IAAA7D,WAAA,CAAA4C,GAAA,EAACjD,KAAA,CAAAmE,IAAI;QACDC,SAAS,EAAEhD,SAAS,CAACgD,SAAU;QAC/BC,MAAM;QACNhD,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,aAAa,GAAGiC,SAAU;QAAAN,QAAA,EAEnD5B,SAAS,CAAC8C;MAAI,CACb,CAAC,GACP,IAAI;IAAA,CACL,CAAC,eAER,IAAA7D,WAAA,CAAA4C,GAAA,EAAC/C,YAAA,CAAA6E,WAAW;MACRhE,KAAK,EAAEA,KAAM;MACbC,QAAQ,EAAEA,QAAS;MACnBJ,IAAI,EAAEA,IAAK;MACXiB,MAAM,EAAEA,MAAM,CAACmD,eAAgB;MAC/B3D,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,SAAS,GAAGiC;IAAU,CACnD,CAAC;EAAA,CACC,CAAC;AAEhB,CAAC,CAAC;AAEFhD,SAAS,CAAC2E,WAAW,GAAG,WAAW;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEpB9E,SAAS","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "TextInput", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _TextInput.default;
10
+ }
11
+ });
12
+ var _TextInput = _interopRequireDefault(require("./TextInput.js"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_TextInput","_interopRequireDefault","require","e","__esModule","default"],"sourceRoot":"../../../../src","sources":["components/TextInput/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAkD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=textInput.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/TextInput/textInput.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getTextInputNativeStyles = getTextInputNativeStyles;
7
+ /**
8
+ * Native TextInputV2 style resolver.
9
+ *
10
+ * Reimplements the inline resolution `TextInputV2.tsx` performs for RN. Web
11
+ * expresses hover/focus through styled-components pseudo-state objects; on
12
+ * native the field re-resolves against the current visual state (focus
13
+ * tracked in component state), so this returns plain token strings for one
14
+ * state at a time — the pattern `getButtonNativeStyles` set.
15
+ */
16
+
17
+ function getTextInputNativeStyles(tokens, size, visualState) {
18
+ const container = tokens.inputContainer;
19
+ return {
20
+ gap: String(tokens.gap),
21
+ container: {
22
+ border: String(container.border[visualState]),
23
+ backgroundColor: String(container.backgroundColor[visualState]),
24
+ borderRadius: String(container.borderRadius[size]),
25
+ gap: String(container.gap),
26
+ paddingTop: String(container.padding.top[size]),
27
+ paddingRight: String(container.padding.right[size]),
28
+ paddingBottom: String(container.padding.bottom[size]),
29
+ paddingLeft: String(container.padding.left[size])
30
+ },
31
+ text: {
32
+ fontSize: String(container.inputText.fontSize[size]),
33
+ fontWeight: String(container.inputText.fontWeight[size]),
34
+ lineHeight: String(container.inputText.lineHeight[size]),
35
+ color: String(container.inputText.color[visualState])
36
+ },
37
+ placeholderColor: String(container.placeholder.color[visualState])
38
+ };
39
+ }
40
+ //# sourceMappingURL=textInput.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getTextInputNativeStyles","tokens","size","visualState","container","inputContainer","gap","String","border","backgroundColor","borderRadius","paddingTop","padding","top","paddingRight","right","paddingBottom","bottom","paddingLeft","left","text","fontSize","inputText","fontWeight","lineHeight","color","placeholderColor","placeholder"],"sourceRoot":"../../../../src","sources":["components/TextInput/textInput.utils.ts"],"mappings":";;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BO,SAASA,wBAAwBA,CACpCC,MAA6B,EAC7BC,IAAiB,EACjBC,WAAyB,EACJ;EACrB,MAAMC,SAAS,GAAGH,MAAM,CAACI,cAAc;EAEvC,OAAO;IACHC,GAAG,EAAEC,MAAM,CAACN,MAAM,CAACK,GAAG,CAAC;IACvBF,SAAS,EAAE;MACPI,MAAM,EAAED,MAAM,CAACH,SAAS,CAACI,MAAM,CAACL,WAAW,CAAC,CAAC;MAC7CM,eAAe,EAAEF,MAAM,CAACH,SAAS,CAACK,eAAe,CAACN,WAAW,CAAC,CAAC;MAC/DO,YAAY,EAAEH,MAAM,CAACH,SAAS,CAACM,YAAY,CAACR,IAAI,CAAC,CAAC;MAClDI,GAAG,EAAEC,MAAM,CAACH,SAAS,CAACE,GAAG,CAAC;MAC1BK,UAAU,EAAEJ,MAAM,CAACH,SAAS,CAACQ,OAAO,CAACC,GAAG,CAACX,IAAI,CAAC,CAAC;MAC/CY,YAAY,EAAEP,MAAM,CAACH,SAAS,CAACQ,OAAO,CAACG,KAAK,CAACb,IAAI,CAAC,CAAC;MACnDc,aAAa,EAAET,MAAM,CAACH,SAAS,CAACQ,OAAO,CAACK,MAAM,CAACf,IAAI,CAAC,CAAC;MACrDgB,WAAW,EAAEX,MAAM,CAACH,SAAS,CAACQ,OAAO,CAACO,IAAI,CAACjB,IAAI,CAAC;IACpD,CAAC;IACDkB,IAAI,EAAE;MACFC,QAAQ,EAAEd,MAAM,CAACH,SAAS,CAACkB,SAAS,CAACD,QAAQ,CAACnB,IAAI,CAAC,CAAC;MACpDqB,UAAU,EAAEhB,MAAM,CAACH,SAAS,CAACkB,SAAS,CAACC,UAAU,CAACrB,IAAI,CAAC,CAAC;MACxDsB,UAAU,EAAEjB,MAAM,CAACH,SAAS,CAACkB,SAAS,CAACE,UAAU,CAACtB,IAAI,CAAC,CAAC;MACxDuB,KAAK,EAAElB,MAAM,CAACH,SAAS,CAACkB,SAAS,CAACG,KAAK,CAACtB,WAAW,CAAC;IACxD,CAAC;IACDuB,gBAAgB,EAAEnB,MAAM,CAACH,SAAS,CAACuB,WAAW,CAACF,KAAK,CAACtB,WAAW,CAAC;EACrE,CAAC;AACL","ignoreList":[]}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FieldFooter = FieldFooter;
7
+ var _node = require("@juspay/blend-design-system/node");
8
+ var _Block = require("../../../primitives/Block.js");
9
+ var _Text = require("../../../primitives/Text.js");
10
+ var _useLiveRegion = require("../../../a11y/useLiveRegion.js");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * Footer under a field: the error message when erroring, else the hint.
14
+ *
15
+ * Ports web's `InputFooterV2` against the same `bottomContainer` token
16
+ * shape. Web marks the error `role="alert"` + `aria-live="polite"`; the
17
+ * native split is the Alert pattern — `accessibilityLiveRegion` for
18
+ * Android, an imperative announcement for iOS.
19
+ */
20
+
21
+ function FieldFooter({
22
+ error,
23
+ hintText,
24
+ size = _node.InputSizeV2.SM,
25
+ tokens,
26
+ testID
27
+ }) {
28
+ const showError = Boolean(error?.show && error.message);
29
+ (0, _useLiveRegion.useLiveRegionAnnounce)(showError ? error?.message : undefined, showError);
30
+ if (!showError && !hintText) return null;
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Block.Block, {
32
+ width: "100%",
33
+ testID: testID,
34
+ children: showError ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
35
+ accessibilityLiveRegion: "polite",
36
+ color: String(tokens.errorMessage.color),
37
+ fontSize: tokens.errorMessage.fontSize[size],
38
+ fontWeight: tokens.errorMessage.fontWeight[size],
39
+ lineHeight: tokens.errorMessage.lineHeight[size],
40
+ children: error?.message
41
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
42
+ color: String(tokens.hintText.color.default),
43
+ fontSize: tokens.hintText.fontSize[size],
44
+ fontWeight: tokens.hintText.fontWeight[size],
45
+ lineHeight: tokens.hintText.lineHeight[size],
46
+ children: hintText
47
+ })
48
+ });
49
+ }
50
+ FieldFooter.displayName = 'FieldFooter';
51
+ //# sourceMappingURL=FieldFooter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_node","require","_Block","_Text","_useLiveRegion","_jsxRuntime","FieldFooter","error","hintText","size","InputSizeV2","SM","tokens","testID","showError","Boolean","show","message","useLiveRegionAnnounce","undefined","jsx","Block","width","children","Text","accessibilityLiveRegion","color","String","errorMessage","fontSize","fontWeight","lineHeight","default","displayName"],"sourceRoot":"../../../../../src","sources":["components/shared/field/FieldFooter.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAAmE,IAAAI,WAAA,GAAAJ,OAAA;AAGnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,SAASK,WAAWA,CAAC;EACxBC,KAAK;EACLC,QAAQ;EACRC,IAAI,GAAGC,iBAAW,CAACC,EAAE;EACrBC,MAAM;EACNC;AACc,CAAC,EAAE;EACjB,MAAMC,SAAS,GAAGC,OAAO,CAACR,KAAK,EAAES,IAAI,IAAIT,KAAK,CAACU,OAAO,CAAC;EAEvD,IAAAC,oCAAqB,EAACJ,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ineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FieldLabels = FieldLabels;
7
+ var _node = require("@juspay/blend-design-system/node");
8
+ var _Block = require("../../../primitives/Block.js");
9
+ var _Text = require("../../../primitives/Text.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ /**
12
+ * Label row above a field: label, required marker, sublabel.
13
+ *
14
+ * Ports web's `InputLabelsV2` against the same `topContainer` token shape,
15
+ * with two deliberate omissions:
16
+ *
17
+ * - `helpIconText` — web wraps a help icon in `Tooltip`; native has no
18
+ * tooltip yet, so the prop does not exist rather than silently doing
19
+ * nothing (the `skeleton` precedent).
20
+ * - `as="label"`/`htmlFor` — no DOM. The field component instead puts the
21
+ * label text into the input's `accessibilityLabel`.
22
+ */
23
+
24
+ function FieldLabels({
25
+ label,
26
+ sublabel,
27
+ required = false,
28
+ size = _node.InputSizeV2.SM,
29
+ state = _node.InputStateV2.DEFAULT,
30
+ tokens,
31
+ testID
32
+ }) {
33
+ if (!label) return null;
34
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Block.Block, {
35
+ flexDirection: "row",
36
+ alignItems: "center",
37
+ gap: 4,
38
+ width: "100%",
39
+ testID: testID,
40
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
41
+ fontWeight: tokens.label.fontWeight[size],
42
+ fontSize: tokens.label.fontSize[size],
43
+ color: String(tokens.label.color[state]),
44
+ lineHeight: tokens.label.lineHeight[size],
45
+ children: label
46
+ }), required ?
47
+ /*#__PURE__*/
48
+ // Web renders <sup aria-hidden>*</sup>; the accessible
49
+ // "required" semantics live on the input's a11y props, so
50
+ // the marker stays visual-only here too.
51
+ (0, _jsxRuntime.jsx)(_Text.Text, {
52
+ color: String(tokens.required.color),
53
+ fontSize: tokens.label.fontSize[size],
54
+ accessibilityElementsHidden: true,
55
+ importantForAccessibility: "no-hide-descendants",
56
+ children: "*"
57
+ }) : null, sublabel ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Text.Text, {
58
+ fontWeight: tokens.subLabel.fontWeight[size],
59
+ fontSize: tokens.subLabel.fontSize[size],
60
+ color: String(tokens.subLabel.color[state]),
61
+ lineHeight: tokens.subLabel.lineHeight[size],
62
+ children: ["(", sublabel, ")"]
63
+ }) : null]
64
+ });
65
+ }
66
+ FieldLabels.displayName = 'FieldLabels';
67
+ //# sourceMappingURL=FieldLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_node","require","_Block","_Text","_jsxRuntime","FieldLabels","label","sublabel","required","size","InputSizeV2","SM","state","InputStateV2","DEFAULT","tokens","testID","jsxs","Block","flexDirection","alignItems","gap","width","children","jsx","Text","fontWeight","fontSize","color","String","lineHeight","accessibilityElementsHidden","importantForAccessibility","subLabel","displayName"],"sourceRoot":"../../../../../src","sources":["components/shared/field/FieldLabels.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAA+C,IAAAG,WAAA,GAAAH,OAAA;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYO,SAASI,WAAWA,CAAC;EACxBC,KAAK;EACLC,QAAQ;EACRC,QAAQ,GAAG,KAAK;EAChBC,IAAI,GAAGC,iBAAW,CAACC,EAAE;EACrBC,KAAK,GAAGC,kBAAY,CAACC,OAAO;EAC5BC,MAAM;EACNC;AACc,CAAC,EAAE;EACjB,IAAI,CAACV,KAAK,EAAE,OAAO,IAAI;EAEvB,oBACI,IAAAF,WAAA,CAAAa,IAAA,EAACf,MAAA,CAAAgB,KAAK;IACFC,aAAa,EAAC,KAAK;IACnBC,UAAU,EAAC,QAAQ;IACnBC,GAAG,EAAE,CAAE;IACPC,KAAK,EAAC,MAAM;IACZN,MAAM,EAAEA,MAAO;IAAAO,QAAA,gBAEf,IAAAnB,WAAA,CAAAoB,GAAA,EAACrB,KAAA,CAAAsB,IAAI;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0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getFieldState = getFieldState;
7
+ exports.getFieldVisualState = getFieldVisualState;
8
+ var _node = require("@juspay/blend-design-system/node");
9
+ /**
10
+ * Input state derivation, shared by every field component.
11
+ *
12
+ * Mirrors web's `getInputState` (`InputsV2/TextInputV2/utils.ts`) and the
13
+ * per-variant resolution `TextInputV2.tsx` performs inline: error always
14
+ * wins, then disabled, and focus applies only when nothing stronger does.
15
+ * `HOVER` exists in the enum but has no touch counterpart.
16
+ *
17
+ * Pure and RN-free so the whole truth table unit-tests under vitest.
18
+ */
19
+
20
+ /** The state driving label/footer colours — web's `getInputState`. */
21
+ function getFieldState(error, disabled) {
22
+ if (error?.show) return _node.InputStateV2.ERROR;
23
+ if (disabled) return _node.InputStateV2.DISABLED;
24
+ return _node.InputStateV2.DEFAULT;
25
+ }
26
+
27
+ /**
28
+ * The state driving the input container's border/background/text, which
29
+ * unlike the label state also reflects focus.
30
+ */
31
+ function getFieldVisualState(error, disabled, focused) {
32
+ if (error?.show) return _node.InputStateV2.ERROR;
33
+ if (disabled) return _node.InputStateV2.DISABLED;
34
+ if (focused) return _node.InputStateV2.FOCUS;
35
+ return _node.InputStateV2.DEFAULT;
36
+ }
37
+ //# sourceMappingURL=fieldState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_node","require","getFieldState","error","disabled","show","InputStateV2","ERROR","DISABLED","DEFAULT","getFieldVisualState","focused","FOCUS"],"sourceRoot":"../../../../../src","sources":["components/shared/field/fieldState.ts"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACO,SAASC,aAAaA,CACzBC,KAAiB,EACjBC,QAAkB,EACN;EACZ,IAAID,KAAK,EAAEE,IAAI,EAAE,OAAOC,kBAAY,CAACC,KAAK;EAC1C,IAAIH,QAAQ,EAAE,OAAOE,kBAAY,CAACE,QAAQ;EAC1C,OAAOF,kBAAY,CAACG,OAAO;AAC/B;;AAEA;AACA;AACA;AACA;AACO,SAASC,mBAAmBA,CAC/BP,KAAiB,EACjBC,QAA6B,EAC7BO,OAAgB,EACJ;EACZ,IAAIR,KAAK,EAAEE,IAAI,EAAE,OAAOC,kBAAY,CAACC,KAAK;EAC1C,IAAIH,QAAQ,EAAE,OAAOE,kBAAY,CAACE,QAAQ;EAC1C,IAAIG,OAAO,EAAE,OAAOL,kBAAY,CAACM,KAAK;EACtC,OAAON,kBAAY,CAACG,OAAO;AAC/B","ignoreList":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getGroupedBorderRadius = getGroupedBorderRadius;
7
+ exports.getGroupedBorderWidths = getGroupedBorderWidths;
8
+ /**
9
+ * Shared styling for grouped controls (button groups, tag groups).
10
+ *
11
+ * Members join edge to edge, so each keeps its radius only on the outward
12
+ * corners, and interior members drop the borders they would otherwise double
13
+ * up with their neighbour. Web implements the radius half identically in
14
+ * `ButtonV2/utils.ts` and `TagV2/utils.ts`, and the border half in
15
+ * `ButtonV2/utils.ts` (`getButtonBorderStyles`).
16
+ *
17
+ * Mirrors `components/shared/` in the web package, which holds cross-component
18
+ * internals rather than components.
19
+ */
20
+
21
+ /** Where a control sits within its group. `undefined` means ungrouped. */
22
+
23
+ /** Every corner squared — the interior members of a group. */
24
+ const ALL_SQUARE = '0px 0px 0px 0px';
25
+
26
+ /**
27
+ * Collapse a control's border radius for its position in a group.
28
+ *
29
+ * Returns a CSS string — either the untouched radius or a four-corner
30
+ * shorthand in CSS order (top-left, top-right, bottom-right, bottom-left).
31
+ * `parseBorderRadius` handles both forms.
32
+ *
33
+ * ```
34
+ * getGroupedBorderRadius('10px', undefined) -> '10px'
35
+ * getGroupedBorderRadius('10px', 'left') -> '10px 0 0 10px'
36
+ * getGroupedBorderRadius('10px', 'right') -> '0 10px 10px 0'
37
+ * getGroupedBorderRadius('10px', 'center') -> '0px 0px 0px 0px'
38
+ * ```
39
+ */
40
+ function getGroupedBorderRadius(radius, position) {
41
+ const value = String(radius);
42
+ if (position === undefined) return value;
43
+ if (position === 'left') return `${value} 0 0 ${value}`;
44
+ if (position === 'right') return `0 ${value} ${value} 0`;
45
+ return ALL_SQUARE;
46
+ }
47
+
48
+ /**
49
+ * Border widths to overlay for a control's position in a group.
50
+ *
51
+ * Interior (`center`) members drop their left and right borders so a shared
52
+ * edge is one line wide rather than two. Web does this in
53
+ * `getButtonBorderStyles`, which sets `borderLeft`/`borderRight` to `'none'`
54
+ * for the centre position and leaves the end caps fully bordered.
55
+ *
56
+ * Returned as a `ViewStyle` fragment to spread *after* the resolved surface,
57
+ * so `borderWidth: 1` still applies to the remaining sides.
58
+ *
59
+ * ```
60
+ * getGroupedBorderWidths(undefined) -> {}
61
+ * getGroupedBorderWidths('left') -> {}
62
+ * getGroupedBorderWidths('right') -> {}
63
+ * getGroupedBorderWidths('center') -> { borderLeftWidth: 0, borderRightWidth: 0 }
64
+ * ```
65
+ */
66
+ function getGroupedBorderWidths(position) {
67
+ if (position !== 'center') return {};
68
+ return {
69
+ borderLeftWidth: 0,
70
+ borderRightWidth: 0
71
+ };
72
+ }
73
+ //# sourceMappingURL=group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ALL_SQUARE","getGroupedBorderRadius","radius","position","value","String","undefined","getGroupedBorderWidths","borderLeftWidth","borderRightWidth"],"sourceRoot":"../../../../src","sources":["components/shared/group.ts"],"mappings":";;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAGA;AACA,MAAMA,UAAU,GAAG,iBAAiB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CAClCC,MAAuB,EACvBC,QAAmC,EAC7B;EACN,MAAMC,KAAK,GAAGC,MAAM,CAACH,MAAM,CAAC;EAE5B,IAAIC,QAAQ,KAAKG,SAAS,EAAE,OAAOF,KAAK;EACxC,IAAID,QAAQ,KAAK,MAAM,EAAE,OAAO,GAAGC,KAAK,QAAQA,KAAK,EAAE;EACvD,IAAID,QAAQ,KAAK,OAAO,EAAE,OAAO,KAAKC,KAAK,IAAIA,KAAK,IAAI;EAExD,OAAOJ,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,sBAAsBA,CAClCJ,QAAmC,EACoB;EACvD,IAAIA,QAAQ,KAAK,QAAQ,EAAE,OAAO,CAAC,CAAC;EACpC,OAAO;IAAEK,eAAe,EAAE,CAAC;IAAEC,gBAAgB,EAAE;EAAE,CAAC;AACtD","ignoreList":[]}