@flipdish/ui-library 0.59.0 → 0.60.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 (364) hide show
  1. package/README.md +3 -3
  2. package/dist/components/atoms/AppStoreButton/index.d.ts.map +1 -1
  3. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.cjs +1 -1
  4. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.js +1 -1
  5. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.cjs.map +1 -0
  6. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.d.ts.map +1 -0
  7. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.js.map +1 -0
  8. package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.cjs → components/AppStoreButtonsOutline.cjs} +1 -1
  9. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.cjs.map +1 -0
  10. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.d.ts.map +1 -0
  11. package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.js → components/AppStoreButtonsOutline.js} +1 -1
  12. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.js.map +1 -0
  13. package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.cjs +1 -1
  14. package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.js +1 -1
  15. package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.cjs.map +1 -0
  16. package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.d.ts.map +1 -0
  17. package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.js.map +1 -0
  18. package/dist/components/atoms/BrandButtons/index.cjs +1 -1
  19. package/dist/components/atoms/BrandButtons/index.d.ts +1 -1
  20. package/dist/components/atoms/BrandButtons/index.d.ts.map +1 -1
  21. package/dist/components/atoms/BrandButtons/index.js +1 -1
  22. package/dist/components/atoms/Button/index.cjs +6 -163
  23. package/dist/components/atoms/Button/index.cjs.map +1 -1
  24. package/dist/components/atoms/Button/index.d.ts +14 -117
  25. package/dist/components/atoms/Button/index.d.ts.map +1 -1
  26. package/dist/components/atoms/Button/index.js +6 -163
  27. package/dist/components/atoms/Button/index.js.map +1 -1
  28. package/dist/components/atoms/Buttons/Button/Button.cjs +168 -0
  29. package/dist/components/atoms/Buttons/Button/Button.cjs.map +1 -0
  30. package/dist/components/atoms/Buttons/Button/Button.d.ts +116 -0
  31. package/dist/components/atoms/Buttons/Button/Button.d.ts.map +1 -0
  32. package/dist/components/atoms/Buttons/Button/Button.js +165 -0
  33. package/dist/components/atoms/Buttons/Button/Button.js.map +1 -0
  34. package/dist/{native/components/atoms → components/atoms/Buttons}/Button/Button.styles.d.ts +1 -1
  35. package/dist/components/atoms/Buttons/Button/Button.styles.d.ts.map +1 -0
  36. package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.cjs +1 -1
  37. package/dist/components/atoms/Buttons/Button/components/ButtonIcon.cjs.map +1 -0
  38. package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.d.ts +1 -1
  39. package/dist/components/atoms/Buttons/Button/components/ButtonIcon.d.ts.map +1 -0
  40. package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.js +1 -1
  41. package/dist/components/atoms/Buttons/Button/components/ButtonIcon.js.map +1 -0
  42. package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.cjs.map +1 -0
  43. package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.d.ts.map +1 -0
  44. package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.js.map +1 -0
  45. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.cjs +61 -0
  46. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.cjs.map +1 -0
  47. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts +27 -0
  48. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts.map +1 -0
  49. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.js +59 -0
  50. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.js.map +1 -0
  51. package/dist/components/atoms/Buttons/CloseButton/CloseButton.cjs +31 -0
  52. package/dist/components/atoms/Buttons/CloseButton/CloseButton.cjs.map +1 -0
  53. package/dist/components/atoms/Buttons/CloseButton/CloseButton.d.ts +19 -0
  54. package/dist/components/atoms/Buttons/CloseButton/CloseButton.d.ts.map +1 -0
  55. package/dist/components/atoms/Buttons/CloseButton/CloseButton.js +29 -0
  56. package/dist/components/atoms/Buttons/CloseButton/CloseButton.js.map +1 -0
  57. package/dist/components/atoms/Buttons/CopyButton/CopyButton.cjs +27 -0
  58. package/dist/components/atoms/Buttons/CopyButton/CopyButton.cjs.map +1 -0
  59. package/dist/components/atoms/Buttons/CopyButton/CopyButton.d.ts +28 -0
  60. package/dist/components/atoms/Buttons/CopyButton/CopyButton.d.ts.map +1 -0
  61. package/dist/components/atoms/Buttons/CopyButton/CopyButton.js +25 -0
  62. package/dist/components/atoms/Buttons/CopyButton/CopyButton.js.map +1 -0
  63. package/dist/components/atoms/Buttons/IconButton/IconButton.cjs +59 -0
  64. package/dist/components/atoms/Buttons/IconButton/IconButton.cjs.map +1 -0
  65. package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts +65 -0
  66. package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts.map +1 -0
  67. package/dist/components/atoms/Buttons/IconButton/IconButton.js +56 -0
  68. package/dist/components/atoms/Buttons/IconButton/IconButton.js.map +1 -0
  69. package/dist/components/atoms/Buttons/index.cjs +14 -0
  70. package/dist/components/atoms/Buttons/index.cjs.map +1 -0
  71. package/dist/components/atoms/Buttons/index.d.ts +18 -0
  72. package/dist/components/atoms/Buttons/index.d.ts.map +1 -0
  73. package/dist/components/atoms/Buttons/index.js +5 -0
  74. package/dist/components/atoms/Buttons/index.js.map +1 -0
  75. package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs +1 -1
  76. package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js +1 -1
  77. package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.cjs.map +1 -0
  78. package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.d.ts.map +1 -0
  79. package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.js.map +1 -0
  80. package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs +2 -2
  81. package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
  82. package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.js +1 -1
  83. package/dist/components/atoms/Checkboxes/index.cjs +1 -1
  84. package/dist/components/atoms/Checkboxes/index.d.ts +2 -2
  85. package/dist/components/atoms/Checkboxes/index.d.ts.map +1 -1
  86. package/dist/components/atoms/Checkboxes/index.js +1 -1
  87. package/dist/components/atoms/CloseButton/index.cjs +3 -26
  88. package/dist/components/atoms/CloseButton/index.cjs.map +1 -1
  89. package/dist/components/atoms/CloseButton/index.d.ts +5 -18
  90. package/dist/components/atoms/CloseButton/index.d.ts.map +1 -1
  91. package/dist/components/atoms/CloseButton/index.js +3 -26
  92. package/dist/components/atoms/CloseButton/index.js.map +1 -1
  93. package/dist/components/atoms/CopyButton/index.cjs +3 -21
  94. package/dist/components/atoms/CopyButton/index.cjs.map +1 -1
  95. package/dist/components/atoms/CopyButton/index.d.ts +5 -27
  96. package/dist/components/atoms/CopyButton/index.d.ts.map +1 -1
  97. package/dist/components/atoms/CopyButton/index.js +3 -21
  98. package/dist/components/atoms/CopyButton/index.js.map +1 -1
  99. package/dist/components/atoms/Input/index.cjs +13 -84
  100. package/dist/components/atoms/Input/index.cjs.map +1 -1
  101. package/dist/components/atoms/Input/index.d.ts +20 -70
  102. package/dist/components/atoms/Input/index.d.ts.map +1 -1
  103. package/dist/components/atoms/Input/index.js +11 -82
  104. package/dist/components/atoms/Input/index.js.map +1 -1
  105. package/dist/components/atoms/Inputs/Input/Input.cjs +89 -0
  106. package/dist/components/atoms/Inputs/Input/Input.cjs.map +1 -0
  107. package/dist/components/atoms/Inputs/Input/Input.d.ts +74 -0
  108. package/dist/components/atoms/Inputs/Input/Input.d.ts.map +1 -0
  109. package/dist/components/atoms/Inputs/Input/Input.js +85 -0
  110. package/dist/components/atoms/Inputs/Input/Input.js.map +1 -0
  111. package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs +60 -0
  112. package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs.map +1 -0
  113. package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts +47 -0
  114. package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts.map +1 -0
  115. package/dist/components/atoms/Inputs/SearchInput/SearchInput.js +58 -0
  116. package/dist/components/atoms/Inputs/SearchInput/SearchInput.js.map +1 -0
  117. package/dist/components/atoms/Inputs/TextArea/TextArea.cjs +41 -0
  118. package/dist/components/atoms/Inputs/TextArea/TextArea.cjs.map +1 -0
  119. package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts +51 -0
  120. package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts.map +1 -0
  121. package/dist/components/atoms/Inputs/TextArea/TextArea.js +38 -0
  122. package/dist/components/atoms/Inputs/TextArea/TextArea.js.map +1 -0
  123. package/dist/components/atoms/Inputs/components/HintText.cjs.map +1 -0
  124. package/dist/components/atoms/Inputs/components/HintText.d.ts.map +1 -0
  125. package/dist/components/atoms/Inputs/components/HintText.js.map +1 -0
  126. package/dist/components/atoms/Inputs/components/Label.cjs.map +1 -0
  127. package/dist/components/atoms/Inputs/components/Label.d.ts.map +1 -0
  128. package/dist/components/atoms/Inputs/components/Label.js.map +1 -0
  129. package/dist/components/atoms/Inputs/index.cjs +19 -0
  130. package/dist/components/atoms/Inputs/index.cjs.map +1 -0
  131. package/dist/components/atoms/Inputs/index.d.ts +19 -0
  132. package/dist/components/atoms/Inputs/index.d.ts.map +1 -0
  133. package/dist/components/atoms/Inputs/index.js +6 -0
  134. package/dist/components/atoms/Inputs/index.js.map +1 -0
  135. package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs +1 -1
  136. package/dist/components/atoms/Radios/RadioButton/RadioButton.js +1 -1
  137. package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.cjs.map +1 -0
  138. package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.d.ts.map +1 -0
  139. package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.js.map +1 -0
  140. package/dist/components/atoms/Radios/index.cjs +2 -2
  141. package/dist/components/atoms/Radios/index.d.ts +2 -2
  142. package/dist/components/atoms/Radios/index.d.ts.map +1 -1
  143. package/dist/components/atoms/Radios/index.js +1 -1
  144. package/dist/components/atoms/SearchInput/index.cjs +3 -52
  145. package/dist/components/atoms/SearchInput/index.cjs.map +1 -1
  146. package/dist/components/atoms/SearchInput/index.d.ts +5 -43
  147. package/dist/components/atoms/SearchInput/index.d.ts.map +1 -1
  148. package/dist/components/atoms/SearchInput/index.js +3 -52
  149. package/dist/components/atoms/SearchInput/index.js.map +1 -1
  150. package/dist/components/atoms/Slider/index.cjs +3 -3
  151. package/dist/components/atoms/Slider/index.cjs.map +1 -1
  152. package/dist/components/atoms/Slider/index.js +1 -1
  153. package/dist/components/atoms/UtilityButton/index.cjs +6 -51
  154. package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
  155. package/dist/components/atoms/UtilityButton/index.d.ts +12 -54
  156. package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
  157. package/dist/components/atoms/UtilityButton/index.js +6 -51
  158. package/dist/components/atoms/UtilityButton/index.js.map +1 -1
  159. package/dist/components/atoms/VerificationCodeInput/index.cjs +96 -0
  160. package/dist/components/atoms/VerificationCodeInput/index.cjs.map +1 -0
  161. package/dist/components/atoms/VerificationCodeInput/index.d.ts +70 -0
  162. package/dist/components/atoms/VerificationCodeInput/index.d.ts.map +1 -0
  163. package/dist/components/atoms/VerificationCodeInput/index.js +93 -0
  164. package/dist/components/atoms/VerificationCodeInput/index.js.map +1 -0
  165. package/dist/components/forms/fields/FormInput/index.cjs +2 -2
  166. package/dist/components/forms/fields/FormInput/index.d.ts +1 -1
  167. package/dist/components/forms/fields/FormInput/index.d.ts.map +1 -1
  168. package/dist/components/forms/fields/FormInput/index.js +1 -1
  169. package/dist/components/forms/fields/FormRadioCardGroup/index.cjs +2 -2
  170. package/dist/components/forms/fields/FormRadioCardGroup/index.cjs.map +1 -1
  171. package/dist/components/forms/fields/FormRadioCardGroup/index.js +1 -1
  172. package/dist/components/forms/fields/FormRadioGroup/index.cjs +2 -2
  173. package/dist/components/forms/fields/FormRadioGroup/index.cjs.map +1 -1
  174. package/dist/components/forms/fields/FormRadioGroup/index.js +1 -1
  175. package/dist/components/forms/fields/FormSlider/index.cjs +2 -2
  176. package/dist/components/forms/fields/FormSlider/index.cjs.map +1 -1
  177. package/dist/components/forms/fields/FormSlider/index.js +1 -1
  178. package/dist/components/forms/fields/FormTextArea/index.cjs +2 -2
  179. package/dist/components/forms/fields/FormTextArea/index.d.ts +2 -2
  180. package/dist/components/forms/fields/FormTextArea/index.d.ts.map +1 -1
  181. package/dist/components/forms/fields/FormTextArea/index.js +1 -1
  182. package/dist/components/molecules/Paginations/Pagination/Pagination.cjs +2 -2
  183. package/dist/components/molecules/Paginations/Pagination/Pagination.cjs.map +1 -1
  184. package/dist/components/molecules/Paginations/Pagination/Pagination.js +1 -1
  185. package/dist/components/molecules/Select/index.d.ts +1 -1
  186. package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs +3 -3
  187. package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs.map +1 -1
  188. package/dist/components/molecules/Selects/MultiSelect/MultiSelect.js +1 -1
  189. package/dist/components/molecules/Selects/Select/Select.cjs +4 -4
  190. package/dist/components/molecules/Selects/Select/Select.cjs.map +1 -1
  191. package/dist/components/molecules/Selects/Select/Select.d.ts +1 -1
  192. package/dist/components/molecules/Selects/Select/Select.d.ts.map +1 -1
  193. package/dist/components/molecules/Selects/Select/Select.js +3 -3
  194. package/dist/components/molecules/Selects/Select/{Combobox.cjs → components/Combobox.cjs} +8 -8
  195. package/dist/components/molecules/Selects/Select/components/Combobox.cjs.map +1 -0
  196. package/dist/components/molecules/Selects/Select/{Combobox.d.ts → components/Combobox.d.ts} +1 -1
  197. package/dist/components/molecules/Selects/Select/components/Combobox.d.ts.map +1 -0
  198. package/dist/components/molecules/Selects/Select/{Combobox.js → components/Combobox.js} +6 -6
  199. package/dist/components/molecules/Selects/Select/components/Combobox.js.map +1 -0
  200. package/dist/components/molecules/Selects/Select/{Popover.cjs → components/Popover.cjs} +1 -1
  201. package/dist/components/molecules/Selects/Select/components/Popover.cjs.map +1 -0
  202. package/dist/components/molecules/Selects/Select/components/Popover.d.ts.map +1 -0
  203. package/dist/components/molecules/Selects/Select/{Popover.js → components/Popover.js} +1 -1
  204. package/dist/components/molecules/Selects/Select/components/Popover.js.map +1 -0
  205. package/dist/components/molecules/Tags/Tag/Tag.cjs +3 -3
  206. package/dist/components/molecules/Tags/Tag/Tag.js +3 -3
  207. package/dist/components/molecules/Tags/Tag/{TagAvatar.cjs → components/TagAvatar.cjs} +1 -1
  208. package/dist/components/molecules/Tags/Tag/components/TagAvatar.cjs.map +1 -0
  209. package/dist/components/molecules/Tags/Tag/components/TagAvatar.d.ts.map +1 -0
  210. package/dist/components/molecules/Tags/Tag/{TagAvatar.js → components/TagAvatar.js} +1 -1
  211. package/dist/components/molecules/Tags/Tag/components/TagAvatar.js.map +1 -0
  212. package/dist/components/molecules/Tags/Tag/{TagCheckbox.cjs → components/TagCheckbox.cjs} +1 -1
  213. package/dist/components/molecules/Tags/Tag/components/TagCheckbox.cjs.map +1 -0
  214. package/dist/components/molecules/Tags/Tag/{TagCheckbox.d.ts → components/TagCheckbox.d.ts} +1 -1
  215. package/dist/components/molecules/Tags/Tag/components/TagCheckbox.d.ts.map +1 -0
  216. package/dist/components/molecules/Tags/Tag/{TagCheckbox.js → components/TagCheckbox.js} +1 -1
  217. package/dist/components/molecules/Tags/Tag/components/TagCheckbox.js.map +1 -0
  218. package/dist/components/molecules/Tags/Tag/{TagCloseX.cjs → components/TagCloseX.cjs} +1 -1
  219. package/dist/components/molecules/Tags/Tag/components/TagCloseX.cjs.map +1 -0
  220. package/dist/components/molecules/Tags/Tag/{TagCloseX.d.ts → components/TagCloseX.d.ts} +1 -1
  221. package/dist/components/molecules/Tags/Tag/components/TagCloseX.d.ts.map +1 -0
  222. package/dist/components/molecules/Tags/Tag/{TagCloseX.js → components/TagCloseX.js} +1 -1
  223. package/dist/components/molecules/Tags/Tag/components/TagCloseX.js.map +1 -0
  224. package/dist/components/molecules/Tags/index.cjs +2 -2
  225. package/dist/components/molecules/Tags/index.d.ts +1 -1
  226. package/dist/components/molecules/Tags/index.d.ts.map +1 -1
  227. package/dist/components/molecules/Tags/index.js +1 -1
  228. package/dist/components/molecules/TextArea/index.cjs +5 -30
  229. package/dist/components/molecules/TextArea/index.cjs.map +1 -1
  230. package/dist/components/molecules/TextArea/index.d.ts +7 -47
  231. package/dist/components/molecules/TextArea/index.d.ts.map +1 -1
  232. package/dist/components/molecules/TextArea/index.js +5 -30
  233. package/dist/components/molecules/TextArea/index.js.map +1 -1
  234. package/dist/components/molecules/VerificationCodeInput/index.cjs +5 -89
  235. package/dist/components/molecules/VerificationCodeInput/index.cjs.map +1 -1
  236. package/dist/components/molecules/VerificationCodeInput/index.d.ts +9 -69
  237. package/dist/components/molecules/VerificationCodeInput/index.d.ts.map +1 -1
  238. package/dist/components/molecules/VerificationCodeInput/index.js +5 -89
  239. package/dist/components/molecules/VerificationCodeInput/index.js.map +1 -1
  240. package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs +2 -2
  241. package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs.map +1 -1
  242. package/dist/components/organisms/ColorPicker/components/ColorPickerField.js +1 -1
  243. package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs +3 -3
  244. package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs.map +1 -1
  245. package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js +2 -2
  246. package/dist/components/organisms/DatePickers/DatePicker/{Calendar.cjs → components/Calendar.cjs} +2 -2
  247. package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.cjs.map +1 -0
  248. package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.d.ts.map +1 -0
  249. package/dist/components/organisms/DatePickers/DatePicker/{Calendar.js → components/Calendar.js} +2 -2
  250. package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.js.map +1 -0
  251. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +2 -2
  252. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
  253. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +1 -1
  254. package/dist/components/organisms/DatePickers/components/InputDate.cjs +1 -1
  255. package/dist/components/organisms/DatePickers/components/InputDate.js +1 -1
  256. package/dist/components/organisms/HeaderNavigation/index.cjs +2 -2
  257. package/dist/components/organisms/HeaderNavigation/index.cjs.map +1 -1
  258. package/dist/components/organisms/HeaderNavigation/index.js +1 -1
  259. package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs +2 -2
  260. package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs.map +1 -1
  261. package/dist/components/organisms/TextEditor/components/TextEditorExtensions.js +1 -1
  262. package/dist/components/organisms/TextEditor/index.cjs +3 -3
  263. package/dist/components/organisms/TextEditor/index.cjs.map +1 -1
  264. package/dist/components/organisms/TextEditor/index.d.ts +1 -1
  265. package/dist/components/organisms/TextEditor/index.d.ts.map +1 -1
  266. package/dist/components/organisms/TextEditor/index.js +1 -1
  267. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.cjs +35 -8
  268. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.cjs.map +1 -1
  269. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.d.ts +5 -5
  270. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.d.ts.map +1 -1
  271. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.js +36 -9
  272. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.js.map +1 -1
  273. package/dist/native/components/atoms/Button/index.d.ts +14 -65
  274. package/dist/native/components/atoms/Button/index.d.ts.map +1 -1
  275. package/dist/native/components/atoms/Button/index.js +6 -145
  276. package/dist/native/components/atoms/Button/index.js.map +1 -1
  277. package/dist/native/components/atoms/Buttons/Button/Button.d.ts +66 -0
  278. package/dist/native/components/atoms/Buttons/Button/Button.d.ts.map +1 -0
  279. package/dist/native/components/atoms/Buttons/Button/Button.js +149 -0
  280. package/dist/native/components/atoms/Buttons/Button/Button.js.map +1 -0
  281. package/dist/{components/atoms → native/components/atoms/Buttons}/Button/Button.styles.d.ts +1 -1
  282. package/dist/native/components/atoms/Buttons/Button/Button.styles.d.ts.map +1 -0
  283. package/dist/native/components/atoms/{Button → Buttons/Button}/Button.styles.js +1 -1
  284. package/dist/native/components/atoms/Buttons/Button/Button.styles.js.map +1 -0
  285. package/dist/native/components/atoms/Buttons/index.d.ts +4 -0
  286. package/dist/native/components/atoms/Buttons/index.d.ts.map +1 -0
  287. package/dist/native/components/atoms/Buttons/index.js +2 -0
  288. package/dist/native/components/atoms/Buttons/index.js.map +1 -0
  289. package/dist/native/components/atoms/Inputs/index.d.ts +12 -0
  290. package/dist/native/components/atoms/VerificationCodeInput/index.d.ts +12 -0
  291. package/package.json +1 -1
  292. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.cjs.map +0 -1
  293. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.d.ts.map +0 -1
  294. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.js.map +0 -1
  295. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.cjs.map +0 -1
  296. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.d.ts.map +0 -1
  297. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.js.map +0 -1
  298. package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.cjs.map +0 -1
  299. package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.d.ts.map +0 -1
  300. package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.js.map +0 -1
  301. package/dist/components/atoms/Button/Button.styles.d.ts.map +0 -1
  302. package/dist/components/atoms/Button/components/ButtonIcon.cjs.map +0 -1
  303. package/dist/components/atoms/Button/components/ButtonIcon.d.ts.map +0 -1
  304. package/dist/components/atoms/Button/components/ButtonIcon.js.map +0 -1
  305. package/dist/components/atoms/Button/components/ButtonSpinner.cjs.map +0 -1
  306. package/dist/components/atoms/Button/components/ButtonSpinner.d.ts.map +0 -1
  307. package/dist/components/atoms/Button/components/ButtonSpinner.js.map +0 -1
  308. package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.cjs.map +0 -1
  309. package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.d.ts.map +0 -1
  310. package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.js.map +0 -1
  311. package/dist/components/atoms/Input/components/HintText.cjs.map +0 -1
  312. package/dist/components/atoms/Input/components/HintText.d.ts.map +0 -1
  313. package/dist/components/atoms/Input/components/HintText.js.map +0 -1
  314. package/dist/components/atoms/Input/components/Label.cjs.map +0 -1
  315. package/dist/components/atoms/Input/components/Label.d.ts.map +0 -1
  316. package/dist/components/atoms/Input/components/Label.js.map +0 -1
  317. package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.cjs.map +0 -1
  318. package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.d.ts.map +0 -1
  319. package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.js.map +0 -1
  320. package/dist/components/molecules/Selects/Select/Combobox.cjs.map +0 -1
  321. package/dist/components/molecules/Selects/Select/Combobox.d.ts.map +0 -1
  322. package/dist/components/molecules/Selects/Select/Combobox.js.map +0 -1
  323. package/dist/components/molecules/Selects/Select/Popover.cjs.map +0 -1
  324. package/dist/components/molecules/Selects/Select/Popover.d.ts.map +0 -1
  325. package/dist/components/molecules/Selects/Select/Popover.js.map +0 -1
  326. package/dist/components/molecules/Tags/Tag/TagAvatar.cjs.map +0 -1
  327. package/dist/components/molecules/Tags/Tag/TagAvatar.d.ts.map +0 -1
  328. package/dist/components/molecules/Tags/Tag/TagAvatar.js.map +0 -1
  329. package/dist/components/molecules/Tags/Tag/TagCheckbox.cjs.map +0 -1
  330. package/dist/components/molecules/Tags/Tag/TagCheckbox.d.ts.map +0 -1
  331. package/dist/components/molecules/Tags/Tag/TagCheckbox.js.map +0 -1
  332. package/dist/components/molecules/Tags/Tag/TagCloseX.cjs.map +0 -1
  333. package/dist/components/molecules/Tags/Tag/TagCloseX.d.ts.map +0 -1
  334. package/dist/components/molecules/Tags/Tag/TagCloseX.js.map +0 -1
  335. package/dist/components/organisms/DatePickers/DatePicker/Calendar.cjs.map +0 -1
  336. package/dist/components/organisms/DatePickers/DatePicker/Calendar.d.ts.map +0 -1
  337. package/dist/components/organisms/DatePickers/DatePicker/Calendar.js.map +0 -1
  338. package/dist/native/components/atoms/Button/Button.styles.d.ts.map +0 -1
  339. package/dist/native/components/atoms/Button/Button.styles.js.map +0 -1
  340. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.cjs → components/AppStoreBadgeLink.cjs} +0 -0
  341. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.d.ts → components/AppStoreBadgeLink.d.ts} +0 -0
  342. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.js → components/AppStoreBadgeLink.js} +0 -0
  343. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.d.ts → components/AppStoreButtonsOutline.d.ts} +0 -0
  344. /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.cjs → components/SocialLogos.cjs} +0 -0
  345. /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.d.ts → components/SocialLogos.d.ts} +0 -0
  346. /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.js → components/SocialLogos.js} +0 -0
  347. /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.cjs +0 -0
  348. /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.d.ts +0 -0
  349. /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.js +0 -0
  350. /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.cjs → components/CheckboxBase.cjs} +0 -0
  351. /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.d.ts → components/CheckboxBase.d.ts} +0 -0
  352. /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.js → components/CheckboxBase.js} +0 -0
  353. /package/dist/components/atoms/{Input → Inputs}/components/HintText.cjs +0 -0
  354. /package/dist/components/atoms/{Input → Inputs}/components/HintText.d.ts +0 -0
  355. /package/dist/components/atoms/{Input → Inputs}/components/HintText.js +0 -0
  356. /package/dist/components/atoms/{Input → Inputs}/components/Label.cjs +0 -0
  357. /package/dist/components/atoms/{Input → Inputs}/components/Label.d.ts +0 -0
  358. /package/dist/components/atoms/{Input → Inputs}/components/Label.js +0 -0
  359. /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.cjs → components/RadioButtonBase.cjs} +0 -0
  360. /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.d.ts → components/RadioButtonBase.d.ts} +0 -0
  361. /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.js → components/RadioButtonBase.js} +0 -0
  362. /package/dist/components/molecules/Selects/Select/{Popover.d.ts → components/Popover.d.ts} +0 -0
  363. /package/dist/components/molecules/Tags/Tag/{TagAvatar.d.ts → components/TagAvatar.d.ts} +0 -0
  364. /package/dist/components/organisms/DatePickers/DatePicker/{Calendar.d.ts → components/Calendar.d.ts} +0 -0
@@ -1,31 +1,36 @@
1
1
  import { useDebouncedCallback } from '@flipdish/ui-library/hooks/useDebouncedCallback';
2
- import { useState, useRef, useLayoutEffect } from 'react';
2
+ import { useState, useRef, useLayoutEffect, useEffect } from 'react';
3
3
 
4
4
  /**
5
5
  * Keeps a search box's own draft so typing stays instant, and commits it to the owner once typing pauses, on submit, or on
6
6
  * clear. A `value` changed elsewhere, by Back or a reset, replaces the draft; the box's own commits coming back from the owner
7
7
  * leave it alone, so typing carries on while a router applies a navigation as a transition.
8
8
  *
9
- * @param options The committed value, what the draft starts as, where to send commits, and the pause to wait for.
9
+ * @param options The committed value, what the draft starts as, where to send commits, and the pause to wait for, if any.
10
10
  * @returns The draft to show, with `change` for every keystroke, `submit` to commit at once and `clear` to commit an empty search.
11
11
  */
12
12
  const useDebouncedSearch = ({ value, initialValue, onChange, delay }) => {
13
- const [draft, setDraft] = useState(initialValue ?? value);
13
+ const [draft, setDraft] = useState(initialValue ?? value ?? '');
14
14
  // The last `value` reconciled, so only a change to it is acted on and the initial draft is never overwritten.
15
15
  const committed = useRef(value);
16
16
  // What has been sent and not yet seen come back; an array, since two commits can be in flight at once.
17
17
  const sent = useRef([]);
18
18
  const send = (next) => {
19
- sent.current.push(next);
19
+ // Tracked only while a commit can trail newer typing: an owner holding the value, behind a delay. Without a delay the field
20
+ // shows `value` itself, so an outside change simply replaces the draft.
21
+ if (value !== undefined && delay !== undefined)
22
+ sent.current.push(next);
20
23
  onChange(next);
21
24
  };
22
- const commit = useDebouncedCallback(send, delay);
25
+ const commit = useDebouncedCallback(send, delay ?? 0);
23
26
  // An effect, not the render body: a render React discards would still have moved the refs and dropped a pending commit.
24
27
  // Layout timing so a reset lands before the old draft is painted.
25
28
  useLayoutEffect(() => {
26
29
  if (value === committed.current)
27
30
  return;
28
31
  committed.current = value;
32
+ if (value === undefined)
33
+ return;
29
34
  const acknowledged = sent.current.indexOf(value);
30
35
  if (acknowledged >= 0) {
31
36
  // The box's own commit: the draft already shows it, or something newer typed since.
@@ -37,15 +42,37 @@ const useDebouncedSearch = ({ value, initialValue, onChange, delay }) => {
37
42
  sent.current = [];
38
43
  setDraft(value);
39
44
  }, [value, commit]);
45
+ // Turning the delay off commits what is still pending now, so no older draft reaches the owner after the changes sent at once.
46
+ useEffect(() => {
47
+ if (delay === undefined)
48
+ commit.flush();
49
+ }, [delay, commit]);
50
+ // Without a delay, an owner holding the value decides what the field shows, so the draft takes only what it accepts: an edit
51
+ // it rejects never resurfaces when a delay is turned on later.
52
+ const isOwnerLed = delay === undefined && value !== undefined;
53
+ // The owner takes over as the delay is turned off, so a draft it rejected while the delay was on goes too.
54
+ useLayoutEffect(() => {
55
+ if (delay === undefined && value !== undefined)
56
+ setDraft(value);
57
+ }, [delay, value]);
40
58
  const change = (next) => {
41
- setDraft(next);
42
- commit(next);
59
+ if (!isOwnerLed)
60
+ setDraft(next);
61
+ if (delay !== undefined) {
62
+ commit(next);
63
+ return;
64
+ }
65
+ commit.cancel();
66
+ send(next);
43
67
  };
44
68
  const submit = () => commit.flush();
45
69
  const clear = () => {
46
70
  commit.cancel();
47
- setDraft('');
48
- send('');
71
+ if (!isOwnerLed)
72
+ setDraft('');
73
+ // Without a delay the field's own change to an empty value, which comes just before, has already been sent.
74
+ if (delay !== undefined)
75
+ send('');
49
76
  };
50
77
  return { draft, change, submit, clear };
51
78
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useDebouncedSearch.js","sources":["../../../../src/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAcA;;;;;;;AAOG;AACI,MAAM,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAA6B,KAAI;AACxG,IAAA,MAAM,CAAC,KAAK,EAAE,QAA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AAE,MAAM,EAAE,KAAK,EAAE;AACzC;;"}
1
+ {"version":3,"file":"useDebouncedSearch.js","sources":["../../../../src/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAcA;;;;;;;AAOG;AACI,MAAM,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAA6B,KAAI;AACxG,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,YAAY,IAAI,KAAK,IAAI,EAAE,CAAC;;AAEvE,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;;AAE/B,IAAA,MAAM,IAAI,GAAG,MAAM,CAAW,EAAE,CAAC;AACjC,IAAA,MAAM,IAAI,GAAG,CAAC,IAAY,KAAI;;;AAG5B,QAAA,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;AAAE,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QACvE,QAAQ,CAAC,IAAI,CAAC;AAChB,IAAA,CAAC;IACD,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC;;;IAIrD,eAAe,CAAC,MAAK;AACnB,QAAA,IAAI,KAAK,KAAK,SAAS,CAAC,OAAO;YAAE;AACjC,QAAA,SAAS,CAAC,OAAO,GAAG,KAAK;QACzB,IAAI,KAAK,KAAK,SAAS;YAAE;QACzB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;AAChD,QAAA,IAAI,YAAY,IAAI,CAAC,EAAE;;YAErB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,YAAY,GAAG,CAAC,CAAC;YACxC;QACF;;QAEA,MAAM,CAAC,MAAM,EAAE;AACf,QAAA,IAAI,CAAC,OAAO,GAAG,EAAE;QACjB,QAAQ,CAAC,KAAK,CAAC;AACjB,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;;IAGnB,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,KAAK,SAAS;YAAE,MAAM,CAAC,KAAK,EAAE;AACzC,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;;;IAInB,MAAM,UAAU,GAAG,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;;IAG7D,eAAe,CAAC,MAAK;AACnB,QAAA,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YAAE,QAAQ,CAAC,KAAK,CAAC;AACjE,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAElB,IAAA,MAAM,MAAM,GAAG,CAAC,IAAY,KAAI;AAC9B,QAAA,IAAI,CAAC,UAAU;YAAE,QAAQ,CAAC,IAAI,CAAC;AAC/B,QAAA,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,MAAM,CAAC,IAAI,CAAC;YACZ;QACF;QACA,MAAM,CAAC,MAAM,EAAE;QACf,IAAI,CAAC,IAAI,CAAC;AACZ,IAAA,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE;IACnC,MAAM,KAAK,GAAG,MAAK;QACjB,MAAM,CAAC,MAAM,EAAE;AACf,QAAA,IAAI,CAAC,UAAU;YAAE,QAAQ,CAAC,EAAE,CAAC;;QAE7B,IAAI,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,EAAE,CAAC;AACnC,IAAA,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;AACzC;;"}
@@ -1,66 +1,15 @@
1
- import { type FC, type ReactElement, type ReactNode } from 'react';
2
- import { type PressableProps } from 'react-native';
3
- import { styles } from './Button.styles';
4
- type IconProp = FC<{
5
- className?: string;
6
- size?: number;
7
- color?: string;
8
- }> | ReactNode;
9
- export type ButtonSize = keyof typeof styles.sizes;
10
- export type ButtonColor = keyof typeof styles.colors;
11
- interface CommonProps {
12
- /** Disables the button and shows a disabled state */
13
- isDisabled?: boolean;
14
- /** Shows a loading spinner and disables the button */
15
- isLoading?: boolean;
16
- /** Shows a check in place of the button's icons, to confirm the action finished; `isLoading` takes precedence. */
17
- isSuccess?: boolean;
18
- /** The size variant of the button */
19
- size?: ButtonSize;
20
- /** The color variant of the button */
21
- color?: ButtonColor;
22
- /** Icon component or element to show before the text */
23
- iconLeading?: IconProp;
24
- /** Icon component or element to show after the text */
25
- iconTrailing?: IconProp;
26
- /** Removes horizontal padding from the text content */
27
- noTextPadding?: boolean;
28
- /** When true, keeps the text visible during loading state */
29
- showTextWhileLoading?: boolean;
30
- /** Overrides the generated `testID` (defaults to `fd-button`). */
31
- 'data-testid'?: string;
32
- /**
33
- * Web-style accessible name. Accepted as an alias of `accessibilityLabel` so shared
34
- * stories (and cross-platform call sites) can pass `aria-label` on both platforms.
35
- */
36
- 'aria-label'?: string;
37
- children?: ReactNode;
38
- className?: string;
39
- }
40
- type PressBits = Pick<PressableProps, 'onPress' | 'hitSlop' | 'accessibilityLabel' | 'accessibilityHint'>;
41
- /** Props for the button variant (non-link) */
42
- export type ButtonProps = CommonProps & PressBits;
43
- /** Props for the link variant — pass `href` to open a URL via `Linking.openURL` */
44
- export type LinkProps = CommonProps & PressBits & {
45
- href: string;
46
- };
47
- export type Props = ButtonProps | LinkProps;
48
- /**
49
- * React Native `Button` — mirrors the web prop surface (sizes, colors, icons, loading,
50
- * `href`) with platform adaptations:
51
- *
52
- * - `Pressable` instead of react-aria-components `Button` / `Link`
53
- * - pressed styles instead of `hover:`
54
- * - `ActivityIndicator` instead of the web SVG spinner
55
- * - `href` opens via `Linking.openURL` (disabled/loading skips navigation)
56
- * - no `before:` inset border gradient; no InputGroup nesting selectors
57
- * - label colour/size via `style` on `Text` (NativeWind Text `className` bug — see Avatar)
58
- *
59
- * @summary action trigger or URL control (React Native)
60
- */
61
- export declare const Button: {
62
- (props: LinkProps): ReactElement;
63
- (props: ButtonProps): ReactElement;
64
- };
65
- export {};
1
+ import { Button as ButtonNext, type ButtonProps as ButtonPropsNext } from '@flipdish/ui-library/components/atoms/Buttons';
2
+ import type { ButtonColor as ButtonColorNext, ButtonSize as ButtonSizeNext, LinkProps as LinkPropsNext, Props as PropsNext } from '../Buttons/Button/Button';
3
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
4
+ export declare const Button: typeof ButtonNext;
5
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
6
+ export type ButtonProps = ButtonPropsNext;
7
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
8
+ export type LinkProps = LinkPropsNext;
9
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
10
+ export type Props = PropsNext;
11
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
12
+ export type ButtonSize = ButtonSizeNext;
13
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
14
+ export type ButtonColor = ButtonColorNext;
66
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Button/index.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAyC,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;AAEtG,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,KAAK,QAAQ,GAAG,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CA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CAAC,KAAK,EAAE,SAAS,GAAG,YAAY,CAAC;IACjC,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;CAwGpC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Button/index.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAE1H,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,UAAU,IAAI,cAAc,EAC5B,SAAS,IAAI,aAAa,EAC1B,KAAK,IAAI,SAAS,EACnB,MAAM,iCAAiC,CAAC;AAEzC,0GAA0G;AAC1G,eAAO,MAAM,MAAM,EAAE,OAAO,UAAuB,CAAC;AACpD,0GAA0G;AAC1G,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAC1C,gHAAgH;AAChH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC;AACtC,gHAAgH;AAChH,MAAM,MAAM,KAAK,GAAG,SAAS,CAAC;AAC9B,gHAAgH;AAChH,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,gHAAgH;AAChH,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC"}
@@ -1,149 +1,10 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Check } from '@flipdish/ui-icons';
3
- import { cx } from '../../../utilities/cx/index.js';
4
- import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
5
- import { useState, isValidElement } from 'react';
6
- import { Pressable, View, ActivityIndicator, Text, Linking } from 'react-native';
7
- import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
8
- import { styles } from './Button.styles.js';
1
+ import { Button as Button$1 } from '../Buttons/Button/Button.js';
9
2
 
10
- const LINK_COLORS = ['link-gray', 'link-color', 'link-destructive'];
11
- /**
12
- * Icon pixel sizes — web uses `size-4` (16) for `xs` and `size-5` (20) otherwise.
13
- * RN icon components take a numeric `size`, not a className.
14
- */
15
- const ICON_PIXEL_SIZE = {
16
- xs: 16,
17
- sm: 20,
18
- md: 20,
19
- lg: 20,
20
- xl: 20,
21
- };
22
- /**
23
- * Label typography via plain `style` rather than `className` on `Text`.
24
- *
25
- * Same workaround as Avatar: `className` on `Text` silently fails under the current
26
- * `react-native-css` preview, while `style` works. Mirrors web `text-sm` (xs–md) /
27
- * `text-md` (lg–xl) + `font-semibold`. Revisit once upstream Text className works.
28
- */
29
- const LABEL_TEXT_SIZE = {
30
- xs: { fontSize: 14, lineHeight: 20 },
31
- sm: { fontSize: 14, lineHeight: 20 },
32
- md: { fontSize: 14, lineHeight: 20 },
33
- lg: { fontSize: 16, lineHeight: 24 },
34
- xl: { fontSize: 16, lineHeight: 24 },
35
- };
36
- /**
37
- * Light-mode hex approximations of semantic text tokens for the Text `style` workaround.
38
- * Hardcoded like Avatar — className can't resolve tokens on Text yet, and the consuming
39
- * app does not support dark mode elsewhere yet.
40
- */
41
- const LABEL_TEXT_COLOR = {
42
- primary: '#ffffff',
43
- secondary: '#404040', // text-secondary → neutral-700
44
- tertiary: '#525252', // text-tertiary → neutral-600
45
- 'link-color': '#085eb1', // text-brand-secondary → brand-700
46
- 'link-gray': '#525252', // text-tertiary
47
- 'primary-destructive': '#ffffff',
48
- 'secondary-destructive': '#dc2626', // text-error-primary → red-600
49
- 'tertiary-destructive': '#dc2626',
50
- 'link-destructive': '#dc2626',
51
- };
52
- const LABEL_TEXT_COLOR_PRESSED = {
53
- secondary: '#262626', // text-secondary_hover → neutral-800
54
- tertiary: '#404040', // text-tertiary_hover → neutral-700
55
- 'link-color': '#074c8f', // text-brand-secondary_hover → brand-800
56
- 'link-gray': '#404040',
57
- 'secondary-destructive': '#b91c1c', // text-error-primary_hover → red-700
58
- 'tertiary-destructive': '#b91c1c',
59
- 'link-destructive': '#b91c1c',
60
- };
61
- /** Icon tint — mirrors web `*:data-icon:text-…` (light-mode hex). */
62
- const ICON_COLOR = {
63
- primary: 'rgba(255,255,255,0.6)',
64
- secondary: '#a3a3a3', // fg-quaternary → neutral-400
65
- tertiary: '#a3a3a3',
66
- 'link-color': '#1c8bf3', // fg-brand-secondary → brand-500
67
- 'link-gray': '#a3a3a3',
68
- 'primary-destructive': 'rgba(255,255,255,0.6)',
69
- 'secondary-destructive': '#f04438', // approximate fg-error-secondary
70
- 'tertiary-destructive': '#f04438',
71
- 'link-destructive': '#f04438',
72
- };
73
- const ICON_COLOR_PRESSED = {
74
- primary: 'rgba(255,255,255,0.7)',
75
- secondary: '#737373', // fg-quaternary_hover → neutral-500
76
- tertiary: '#737373',
77
- 'link-color': '#0b75d7', // fg-brand-secondary_hover → brand-600
78
- 'link-gray': '#737373',
79
- 'primary-destructive': 'rgba(255,255,255,0.7)',
80
- 'secondary-destructive': '#d92d20',
81
- 'tertiary-destructive': '#d92d20',
82
- 'link-destructive': '#d92d20',
83
- };
84
- const renderIcon = (icon, size, color, className) => {
85
- if (isValidElement(icon))
86
- return icon;
87
- if (isReactComponent(icon)) {
88
- const Icon = icon;
89
- return jsx(Icon, { className: className, size: ICON_PIXEL_SIZE[size], color: color });
90
- }
91
- return null;
92
- };
93
- /**
94
- * React Native `Button` — mirrors the web prop surface (sizes, colors, icons, loading,
95
- * `href`) with platform adaptations:
96
- *
97
- * - `Pressable` instead of react-aria-components `Button` / `Link`
98
- * - pressed styles instead of `hover:`
99
- * - `ActivityIndicator` instead of the web SVG spinner
100
- * - `href` opens via `Linking.openURL` (disabled/loading skips navigation)
101
- * - no `before:` inset border gradient; no InputGroup nesting selectors
102
- * - label colour/size via `style` on `Text` (NativeWind Text `className` bug — see Avatar)
103
- *
104
- * @summary action trigger or URL control (React Native)
105
- */
106
- const Button = ({ size = 'sm', color = 'primary', children, className, noTextPadding: noTextPaddingProp, iconLeading: IconLeading, iconTrailing: IconTrailing, isDisabled, isLoading, isSuccess, showTextWhileLoading, 'data-testid': dataTestId, 'aria-label': ariaLabel, onPress, hitSlop, accessibilityLabel, accessibilityHint, ...props }) => {
107
- const href = 'href' in props ? props.href : undefined;
108
- const resolvedAccessibilityLabel = accessibilityLabel ?? ariaLabel;
109
- const buttonTestId = useResolvedTestId({ testId: dataTestId, segment: 'button', rootName: 'button' });
110
- const [pressed, setPressed] = useState(false);
111
- const hasChildren = children !== null && children !== undefined;
112
- const isIcon = Boolean((IconLeading || IconTrailing) && !hasChildren);
113
- const isLinkType = LINK_COLORS.includes(color);
114
- const noTextPadding = isLinkType || noTextPaddingProp;
115
- const disabled = Boolean(isDisabled || isLoading);
116
- const iconColor = (pressed && ICON_COLOR_PRESSED[color]) || ICON_COLOR[color];
117
- const labelColor = (pressed && LABEL_TEXT_COLOR_PRESSED[color]) || LABEL_TEXT_COLOR[color];
118
- // Match web: hide non-spinner content with opacity-0 (keeps layout + a11y name) unless
119
- // showTextWhileLoading — then only icons are omitted and the label stays visible.
120
- const dimNonSpinner = Boolean(isLoading && !showTextWhileLoading);
121
- const omitIconsWhileLoading = Boolean(isLoading && showTextWhileLoading);
122
- const handlePress = (event) => {
123
- if (disabled)
124
- return;
125
- onPress?.(event);
126
- if (href) {
127
- // `openURL` rejects when no app can handle the URL — swallow it so it doesn't
128
- // surface as an unhandled promise rejection (no established error path to route to).
129
- Linking.openURL(href).catch(() => { });
130
- }
131
- };
132
- const showSuccess = Boolean(isSuccess && !isLoading);
133
- const leadingIcon = !omitIconsWhileLoading ? renderIcon(showSuccess ? Check : IconLeading, size, iconColor, styles.common.icon) : null;
134
- const trailingIcon = !omitIconsWhileLoading && !showSuccess ? renderIcon(IconTrailing, size, iconColor, styles.common.icon) : null;
135
- return (jsxs(Pressable, { testID: buttonTestId, disabled: disabled, onPress: handlePress, onPressIn: () => setPressed(true), onPressOut: () => setPressed(false), hitSlop: hitSlop, accessibilityRole: href ? 'link' : 'button', accessibilityLabel: resolvedAccessibilityLabel, accessibilityHint: accessibilityHint, accessibilityState: { disabled, busy: Boolean(isLoading) }, className: cx(styles.common.root, isLinkType ? styles.sizes[size].linkRoot : styles.sizes[size].root,
136
- // Merged (not swapped) so icon-only keeps `rounded-lg`/`gap-*` from `root` —
137
- // `cx` (tailwind-merge) resolves the padding conflict, keeping this override.
138
- isIcon && !isLinkType && styles.sizes[size].iconOnly, styles.colors[color].root, pressed && !disabled && styles.colors[color].pressed, isLoading && styles.colors[color].loading, disabled && 'opacity-50', className), children: [leadingIcon ? jsx(View, { style: dimNonSpinner ? { opacity: 0 } : undefined, children: leadingIcon }) : null, isLoading && (jsx(View, { className: cx(styles.common.icon, dimNonSpinner && 'absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2'), children: jsx(ActivityIndicator, { size: "small", color: labelColor }) })), hasChildren && (jsx(Text, { style: {
139
- color: labelColor,
140
- fontWeight: '600',
141
- ...LABEL_TEXT_SIZE[size],
142
- ...(dimNonSpinner ? { opacity: 0 } : null),
143
- ...(isLinkType ? { textDecorationLine: 'underline' } : null),
144
- ...(!noTextPadding ? { paddingHorizontal: 2 } : null),
145
- }, children: children })), trailingIcon ? jsx(View, { style: dimNonSpinner ? { opacity: 0 } : undefined, children: trailingIcon }) : null] }));
146
- };
3
+ // Deprecated path, kept so existing imports keep working until the next major: `Button` now lives in `atoms/Buttons`.
4
+ // A re-export file is banned elsewhere; this one is a temporary deprecation path, and without it this path would
5
+ // resolve to the "not available on React Native" stub.
6
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
7
+ const Button = Button$1;
147
8
 
148
9
  export { Button };
149
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Button/index.native.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;AAqDA,MAAM,WAAW,GAAkB,CAAC,WAAW,EAAE,YAAY,EAAE,kBAAkB,CAAC;AAElF;;;AAGG;AACH,MAAM,eAAe,GAA+B;AAClD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE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file":"index.js","sources":["../../../../../../src/components/atoms/Button/index.native.tsx"],"sourcesContent":[null],"names":["ButtonNext"],"mappings":";;AAAA;AACA;AACA;AAUA;AACO,MAAM,MAAM,GAAsBA;;"}
@@ -0,0 +1,66 @@
1
+ import { type FC, type ReactElement, type ReactNode } from 'react';
2
+ import { type PressableProps } from 'react-native';
3
+ import { styles } from './Button.styles';
4
+ type IconProp = FC<{
5
+ className?: string;
6
+ size?: number;
7
+ color?: string;
8
+ }> | ReactNode;
9
+ export type ButtonSize = keyof typeof styles.sizes;
10
+ export type ButtonColor = keyof typeof styles.colors;
11
+ interface CommonProps {
12
+ /** Disables the button and shows a disabled state */
13
+ isDisabled?: boolean;
14
+ /** Shows a loading spinner and disables the button */
15
+ isLoading?: boolean;
16
+ /** Shows a check in place of the button's icons, to confirm the action finished; `isLoading` takes precedence. */
17
+ isSuccess?: boolean;
18
+ /** The size variant of the button */
19
+ size?: ButtonSize;
20
+ /** The color variant of the button */
21
+ color?: ButtonColor;
22
+ /** Icon component or element to show before the text */
23
+ iconLeading?: IconProp;
24
+ /** Icon component or element to show after the text */
25
+ iconTrailing?: IconProp;
26
+ /** Removes horizontal padding from the text content */
27
+ noTextPadding?: boolean;
28
+ /** When true, keeps the text visible during loading state */
29
+ showTextWhileLoading?: boolean;
30
+ /** Overrides the generated `testID` (defaults to `fd-button`). */
31
+ 'data-testid'?: string;
32
+ /**
33
+ * Web-style accessible name. Accepted as an alias of `accessibilityLabel` so shared
34
+ * stories (and cross-platform call sites) can pass `aria-label` on both platforms.
35
+ */
36
+ 'aria-label'?: string;
37
+ children?: ReactNode;
38
+ className?: string;
39
+ }
40
+ type PressBits = Pick<PressableProps, 'onPress' | 'hitSlop' | 'accessibilityLabel' | 'accessibilityHint'>;
41
+ /** Props for the button variant (non-link) */
42
+ export type ButtonProps = CommonProps & PressBits;
43
+ /** Props for the link variant — pass `href` to open a URL via `Linking.openURL` */
44
+ export type LinkProps = CommonProps & PressBits & {
45
+ href: string;
46
+ };
47
+ export type Props = ButtonProps | LinkProps;
48
+ /**
49
+ * React Native `Button` — mirrors the web prop surface (sizes, colors, icons, loading,
50
+ * `href`) with platform adaptations:
51
+ *
52
+ * - `Pressable` instead of react-aria-components `Button` / `Link`
53
+ * - pressed styles instead of `hover:`
54
+ * - `ActivityIndicator` instead of the web SVG spinner
55
+ * - `href` opens via `Linking.openURL` (disabled/loading skips navigation)
56
+ * - no `before:` inset border gradient; no InputGroup nesting selectors
57
+ * - label colour/size via `style` on `Text` (NativeWind Text `className` bug — see Avatar)
58
+ *
59
+ * @summary action trigger or URL control (React Native)
60
+ */
61
+ export declare const Button: {
62
+ (props: LinkProps): ReactElement;
63
+ (props: ButtonProps): ReactElement;
64
+ };
65
+ export {};
66
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Buttons/Button/Button.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAyC,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;AAEtG,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,KAAK,QAAQ,GAAG,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAC;AAEtF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC;AAErD,UAAU,WAAW;IACnB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kHAAkH;IAClH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,uDAAuD;IACvD,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,uDAAuD;IACvD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,SAAS,GAAG,oBAAoB,GAAG,mBAAmB,CAAC,CAAC;AAE1G,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAElD,mFAAmF;AACnF,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;AA4F5C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,EAAE;IACnB,CAAC,KAAK,EAAE,SAAS,GAAG,YAAY,CAAC;IACjC,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;CAwGpC,CAAC"}
@@ -0,0 +1,149 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Check } from '@flipdish/ui-icons';
3
+ import { cx } from '../../../../utilities/cx/index.js';
4
+ import { useResolvedTestId } from '../../../../utilities/testIdUtils/index.js';
5
+ import { useState, isValidElement } from 'react';
6
+ import { Pressable, View, ActivityIndicator, Text, Linking } from 'react-native';
7
+ import { isReactComponent } from '../../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
8
+ import { styles } from './Button.styles.js';
9
+
10
+ const LINK_COLORS = ['link-gray', 'link-color', 'link-destructive'];
11
+ /**
12
+ * Icon pixel sizes — web uses `size-4` (16) for `xs` and `size-5` (20) otherwise.
13
+ * RN icon components take a numeric `size`, not a className.
14
+ */
15
+ const ICON_PIXEL_SIZE = {
16
+ xs: 16,
17
+ sm: 20,
18
+ md: 20,
19
+ lg: 20,
20
+ xl: 20,
21
+ };
22
+ /**
23
+ * Label typography via plain `style` rather than `className` on `Text`.
24
+ *
25
+ * Same workaround as Avatar: `className` on `Text` silently fails under the current
26
+ * `react-native-css` preview, while `style` works. Mirrors web `text-sm` (xs–md) /
27
+ * `text-md` (lg–xl) + `font-semibold`. Revisit once upstream Text className works.
28
+ */
29
+ const LABEL_TEXT_SIZE = {
30
+ xs: { fontSize: 14, lineHeight: 20 },
31
+ sm: { fontSize: 14, lineHeight: 20 },
32
+ md: { fontSize: 14, lineHeight: 20 },
33
+ lg: { fontSize: 16, lineHeight: 24 },
34
+ xl: { fontSize: 16, lineHeight: 24 },
35
+ };
36
+ /**
37
+ * Light-mode hex approximations of semantic text tokens for the Text `style` workaround.
38
+ * Hardcoded like Avatar — className can't resolve tokens on Text yet, and the consuming
39
+ * app does not support dark mode elsewhere yet.
40
+ */
41
+ const LABEL_TEXT_COLOR = {
42
+ primary: '#ffffff',
43
+ secondary: '#404040', // text-secondary → neutral-700
44
+ tertiary: '#525252', // text-tertiary → neutral-600
45
+ 'link-color': '#085eb1', // text-brand-secondary → brand-700
46
+ 'link-gray': '#525252', // text-tertiary
47
+ 'primary-destructive': '#ffffff',
48
+ 'secondary-destructive': '#dc2626', // text-error-primary → red-600
49
+ 'tertiary-destructive': '#dc2626',
50
+ 'link-destructive': '#dc2626',
51
+ };
52
+ const LABEL_TEXT_COLOR_PRESSED = {
53
+ secondary: '#262626', // text-secondary_hover → neutral-800
54
+ tertiary: '#404040', // text-tertiary_hover → neutral-700
55
+ 'link-color': '#074c8f', // text-brand-secondary_hover → brand-800
56
+ 'link-gray': '#404040',
57
+ 'secondary-destructive': '#b91c1c', // text-error-primary_hover → red-700
58
+ 'tertiary-destructive': '#b91c1c',
59
+ 'link-destructive': '#b91c1c',
60
+ };
61
+ /** Icon tint — mirrors web `*:data-icon:text-…` (light-mode hex). */
62
+ const ICON_COLOR = {
63
+ primary: 'rgba(255,255,255,0.6)',
64
+ secondary: '#a3a3a3', // fg-quaternary → neutral-400
65
+ tertiary: '#a3a3a3',
66
+ 'link-color': '#1c8bf3', // fg-brand-secondary → brand-500
67
+ 'link-gray': '#a3a3a3',
68
+ 'primary-destructive': 'rgba(255,255,255,0.6)',
69
+ 'secondary-destructive': '#f04438', // approximate fg-error-secondary
70
+ 'tertiary-destructive': '#f04438',
71
+ 'link-destructive': '#f04438',
72
+ };
73
+ const ICON_COLOR_PRESSED = {
74
+ primary: 'rgba(255,255,255,0.7)',
75
+ secondary: '#737373', // fg-quaternary_hover → neutral-500
76
+ tertiary: '#737373',
77
+ 'link-color': '#0b75d7', // fg-brand-secondary_hover → brand-600
78
+ 'link-gray': '#737373',
79
+ 'primary-destructive': 'rgba(255,255,255,0.7)',
80
+ 'secondary-destructive': '#d92d20',
81
+ 'tertiary-destructive': '#d92d20',
82
+ 'link-destructive': '#d92d20',
83
+ };
84
+ const renderIcon = (icon, size, color, className) => {
85
+ if (isValidElement(icon))
86
+ return icon;
87
+ if (isReactComponent(icon)) {
88
+ const Icon = icon;
89
+ return jsx(Icon, { className: className, size: ICON_PIXEL_SIZE[size], color: color });
90
+ }
91
+ return null;
92
+ };
93
+ /**
94
+ * React Native `Button` — mirrors the web prop surface (sizes, colors, icons, loading,
95
+ * `href`) with platform adaptations:
96
+ *
97
+ * - `Pressable` instead of react-aria-components `Button` / `Link`
98
+ * - pressed styles instead of `hover:`
99
+ * - `ActivityIndicator` instead of the web SVG spinner
100
+ * - `href` opens via `Linking.openURL` (disabled/loading skips navigation)
101
+ * - no `before:` inset border gradient; no InputGroup nesting selectors
102
+ * - label colour/size via `style` on `Text` (NativeWind Text `className` bug — see Avatar)
103
+ *
104
+ * @summary action trigger or URL control (React Native)
105
+ */
106
+ const Button = ({ size = 'sm', color = 'primary', children, className, noTextPadding: noTextPaddingProp, iconLeading: IconLeading, iconTrailing: IconTrailing, isDisabled, isLoading, isSuccess, showTextWhileLoading, 'data-testid': dataTestId, 'aria-label': ariaLabel, onPress, hitSlop, accessibilityLabel, accessibilityHint, ...props }) => {
107
+ const href = 'href' in props ? props.href : undefined;
108
+ const resolvedAccessibilityLabel = accessibilityLabel ?? ariaLabel;
109
+ const buttonTestId = useResolvedTestId({ testId: dataTestId, segment: 'button', rootName: 'button' });
110
+ const [pressed, setPressed] = useState(false);
111
+ const hasChildren = children !== null && children !== undefined;
112
+ const isIcon = Boolean((IconLeading || IconTrailing) && !hasChildren);
113
+ const isLinkType = LINK_COLORS.includes(color);
114
+ const noTextPadding = isLinkType || noTextPaddingProp;
115
+ const disabled = Boolean(isDisabled || isLoading);
116
+ const iconColor = (pressed && ICON_COLOR_PRESSED[color]) || ICON_COLOR[color];
117
+ const labelColor = (pressed && LABEL_TEXT_COLOR_PRESSED[color]) || LABEL_TEXT_COLOR[color];
118
+ // Match web: hide non-spinner content with opacity-0 (keeps layout + a11y name) unless
119
+ // showTextWhileLoading — then only icons are omitted and the label stays visible.
120
+ const dimNonSpinner = Boolean(isLoading && !showTextWhileLoading);
121
+ const omitIconsWhileLoading = Boolean(isLoading && showTextWhileLoading);
122
+ const handlePress = (event) => {
123
+ if (disabled)
124
+ return;
125
+ onPress?.(event);
126
+ if (href) {
127
+ // `openURL` rejects when no app can handle the URL — swallow it so it doesn't
128
+ // surface as an unhandled promise rejection (no established error path to route to).
129
+ Linking.openURL(href).catch(() => { });
130
+ }
131
+ };
132
+ const showSuccess = Boolean(isSuccess && !isLoading);
133
+ const leadingIcon = !omitIconsWhileLoading ? renderIcon(showSuccess ? Check : IconLeading, size, iconColor, styles.common.icon) : null;
134
+ const trailingIcon = !omitIconsWhileLoading && !showSuccess ? renderIcon(IconTrailing, size, iconColor, styles.common.icon) : null;
135
+ return (jsxs(Pressable, { testID: buttonTestId, disabled: disabled, onPress: handlePress, onPressIn: () => setPressed(true), onPressOut: () => setPressed(false), hitSlop: hitSlop, accessibilityRole: href ? 'link' : 'button', accessibilityLabel: resolvedAccessibilityLabel, accessibilityHint: accessibilityHint, accessibilityState: { disabled, busy: Boolean(isLoading) }, className: cx(styles.common.root, isLinkType ? styles.sizes[size].linkRoot : styles.sizes[size].root,
136
+ // Merged (not swapped) so icon-only keeps `rounded-lg`/`gap-*` from `root` —
137
+ // `cx` (tailwind-merge) resolves the padding conflict, keeping this override.
138
+ isIcon && !isLinkType && styles.sizes[size].iconOnly, styles.colors[color].root, pressed && !disabled && styles.colors[color].pressed, isLoading && styles.colors[color].loading, disabled && 'opacity-50', className), children: [leadingIcon ? jsx(View, { style: dimNonSpinner ? { opacity: 0 } : undefined, children: leadingIcon }) : null, isLoading && (jsx(View, { className: cx(styles.common.icon, dimNonSpinner && 'absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2'), children: jsx(ActivityIndicator, { size: "small", color: labelColor }) })), hasChildren && (jsx(Text, { style: {
139
+ color: labelColor,
140
+ fontWeight: '600',
141
+ ...LABEL_TEXT_SIZE[size],
142
+ ...(dimNonSpinner ? { opacity: 0 } : null),
143
+ ...(isLinkType ? { textDecorationLine: 'underline' } : null),
144
+ ...(!noTextPadding ? { paddingHorizontal: 2 } : null),
145
+ }, children: children })), trailingIcon ? jsx(View, { style: dimNonSpinner ? { opacity: 0 } : undefined, children: trailingIcon }) : null] }));
146
+ };
147
+
148
+ export { Button };
149
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sources":["../../../../../../../src/components/atoms/Buttons/Button/Button.native.tsx"],"s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AEA,YAAY,GAAGA,GAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,aAAa,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,SAAS,EAAA,QAAA,EAAG,YAAY,EAAA,CAAQ,GAAG,IAAI,CAAA,EAAA,CAC3F;AAEhB;;"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * React Native–safe Button class strings (NativeWind).
3
3
  *
4
- * Mirrors the web variant keys in `index.tsx` (`sizes` / `colors`) but drops
4
+ * Mirrors the web variant keys in `Button.tsx` (`sizes` / `colors`) but drops
5
5
  * web-only utilities (`before:`, `hover:`, `focus-visible:`, `in-data-input-wrapper:`,
6
6
  * `*:data-icon:`, etc.). Pressed equivalents of web `hover:` live under `pressed`.
7
7
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Buttons/Button/Button.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ElB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * React Native–safe Button class strings (NativeWind).
3
3
  *
4
- * Mirrors the web variant keys in `index.tsx` (`sizes` / `colors`) but drops
4
+ * Mirrors the web variant keys in `Button.tsx` (`sizes` / `colors`) but drops
5
5
  * web-only utilities (`before:`, `hover:`, `focus-visible:`, `in-data-input-wrapper:`,
6
6
  * `*:data-icon:`, etc.). Pressed equivalents of web `hover:` live under `pressed`.
7
7
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.styles.js","sources":["../../../../../../../src/components/atoms/Buttons/Button/Button.styles.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;AAQG;AACI,MAAM,MAAM,GAAG;AACpB,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE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