@flipdish/ui-library 0.58.1 → 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 (567) 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/Badge/index.cjs +15 -59
  4. package/dist/components/atoms/Badge/index.cjs.map +1 -1
  5. package/dist/components/atoms/Badge/index.d.ts +22 -98
  6. package/dist/components/atoms/Badge/index.d.ts.map +1 -1
  7. package/dist/components/atoms/Badge/index.js +15 -59
  8. package/dist/components/atoms/Badge/index.js.map +1 -1
  9. package/dist/components/atoms/Badges/Badge/Badge.cjs +71 -0
  10. package/dist/components/atoms/Badges/Badge/Badge.cjs.map +1 -0
  11. package/dist/components/atoms/Badges/Badge/Badge.d.ts +99 -0
  12. package/dist/components/atoms/Badges/Badge/Badge.d.ts.map +1 -0
  13. package/dist/components/atoms/Badges/Badge/Badge.js +63 -0
  14. package/dist/components/atoms/Badges/Badge/Badge.js.map +1 -0
  15. package/dist/components/atoms/{Badge → Badges/Badge}/Badge.styles.cjs +1 -1
  16. package/dist/components/atoms/Badges/Badge/Badge.styles.cjs.map +1 -0
  17. package/dist/components/atoms/{Badge → Badges/Badge}/Badge.styles.d.ts +1 -1
  18. package/dist/components/atoms/Badges/Badge/Badge.styles.d.ts.map +1 -0
  19. package/dist/components/atoms/{Badge → Badges/Badge}/Badge.styles.js +1 -1
  20. package/dist/components/atoms/Badges/Badge/Badge.styles.js.map +1 -0
  21. package/dist/components/atoms/Badges/Badge/badge.types.cjs.map +1 -0
  22. package/dist/components/atoms/Badges/Badge/badge.types.d.ts.map +1 -0
  23. package/dist/components/atoms/Badges/Badge/badge.types.js.map +1 -0
  24. package/dist/components/atoms/{Badge → Badges/Badge/utilities}/badge.utils.d.ts +2 -2
  25. package/dist/components/atoms/Badges/Badge/utilities/badge.utils.d.ts.map +1 -0
  26. package/dist/components/atoms/Badges/BadgeGroup/BadgeGroup.cjs +116 -0
  27. package/dist/components/atoms/Badges/BadgeGroup/BadgeGroup.cjs.map +1 -0
  28. package/dist/components/atoms/Badges/BadgeGroup/BadgeGroup.d.ts +38 -0
  29. package/dist/components/atoms/Badges/BadgeGroup/BadgeGroup.d.ts.map +1 -0
  30. package/dist/components/atoms/Badges/BadgeGroup/BadgeGroup.js +114 -0
  31. package/dist/components/atoms/Badges/BadgeGroup/BadgeGroup.js.map +1 -0
  32. package/dist/components/atoms/Badges/index.cjs +16 -0
  33. package/dist/components/atoms/Badges/index.cjs.map +1 -0
  34. package/dist/components/atoms/Badges/index.d.ts +16 -0
  35. package/dist/components/atoms/Badges/index.d.ts.map +1 -0
  36. package/dist/components/atoms/Badges/index.js +3 -0
  37. package/dist/components/atoms/Badges/index.js.map +1 -0
  38. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.cjs +1 -1
  39. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.js +1 -1
  40. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.cjs.map +1 -0
  41. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.d.ts.map +1 -0
  42. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreBadgeLink.js.map +1 -0
  43. package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.cjs → components/AppStoreButtonsOutline.cjs} +1 -1
  44. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.cjs.map +1 -0
  45. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.d.ts.map +1 -0
  46. package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.js → components/AppStoreButtonsOutline.js} +1 -1
  47. package/dist/components/atoms/BrandButtons/AppStoreButton/components/AppStoreButtonsOutline.js.map +1 -0
  48. package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.cjs +1 -1
  49. package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.js +1 -1
  50. package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.cjs.map +1 -0
  51. package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.d.ts.map +1 -0
  52. package/dist/components/atoms/BrandButtons/SocialButton/components/SocialLogos.js.map +1 -0
  53. package/dist/components/atoms/BrandButtons/index.cjs +1 -1
  54. package/dist/components/atoms/BrandButtons/index.d.ts +1 -1
  55. package/dist/components/atoms/BrandButtons/index.d.ts.map +1 -1
  56. package/dist/components/atoms/BrandButtons/index.js +1 -1
  57. package/dist/components/atoms/Button/index.cjs +6 -163
  58. package/dist/components/atoms/Button/index.cjs.map +1 -1
  59. package/dist/components/atoms/Button/index.d.ts +14 -117
  60. package/dist/components/atoms/Button/index.d.ts.map +1 -1
  61. package/dist/components/atoms/Button/index.js +6 -163
  62. package/dist/components/atoms/Button/index.js.map +1 -1
  63. package/dist/components/atoms/Buttons/Button/Button.cjs +168 -0
  64. package/dist/components/atoms/Buttons/Button/Button.cjs.map +1 -0
  65. package/dist/components/atoms/Buttons/Button/Button.d.ts +116 -0
  66. package/dist/components/atoms/Buttons/Button/Button.d.ts.map +1 -0
  67. package/dist/components/atoms/Buttons/Button/Button.js +165 -0
  68. package/dist/components/atoms/Buttons/Button/Button.js.map +1 -0
  69. package/dist/components/atoms/{Button → Buttons/Button}/Button.styles.d.ts +1 -1
  70. package/dist/components/atoms/Buttons/Button/Button.styles.d.ts.map +1 -0
  71. package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.cjs +1 -1
  72. package/dist/components/atoms/Buttons/Button/components/ButtonIcon.cjs.map +1 -0
  73. package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.d.ts +1 -1
  74. package/dist/components/atoms/Buttons/Button/components/ButtonIcon.d.ts.map +1 -0
  75. package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonIcon.js +1 -1
  76. package/dist/components/atoms/Buttons/Button/components/ButtonIcon.js.map +1 -0
  77. package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.cjs.map +1 -0
  78. package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.d.ts.map +1 -0
  79. package/dist/components/atoms/Buttons/Button/components/ButtonSpinner.js.map +1 -0
  80. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.cjs +61 -0
  81. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.cjs.map +1 -0
  82. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts +27 -0
  83. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts.map +1 -0
  84. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.js +59 -0
  85. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.js.map +1 -0
  86. package/dist/components/atoms/Buttons/CloseButton/CloseButton.cjs +31 -0
  87. package/dist/components/atoms/Buttons/CloseButton/CloseButton.cjs.map +1 -0
  88. package/dist/components/atoms/Buttons/CloseButton/CloseButton.d.ts +19 -0
  89. package/dist/components/atoms/Buttons/CloseButton/CloseButton.d.ts.map +1 -0
  90. package/dist/components/atoms/Buttons/CloseButton/CloseButton.js +29 -0
  91. package/dist/components/atoms/Buttons/CloseButton/CloseButton.js.map +1 -0
  92. package/dist/components/atoms/Buttons/CopyButton/CopyButton.cjs +27 -0
  93. package/dist/components/atoms/Buttons/CopyButton/CopyButton.cjs.map +1 -0
  94. package/dist/components/atoms/Buttons/CopyButton/CopyButton.d.ts +28 -0
  95. package/dist/components/atoms/Buttons/CopyButton/CopyButton.d.ts.map +1 -0
  96. package/dist/components/atoms/Buttons/CopyButton/CopyButton.js +25 -0
  97. package/dist/components/atoms/Buttons/CopyButton/CopyButton.js.map +1 -0
  98. package/dist/components/atoms/Buttons/IconButton/IconButton.cjs +59 -0
  99. package/dist/components/atoms/Buttons/IconButton/IconButton.cjs.map +1 -0
  100. package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts +65 -0
  101. package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts.map +1 -0
  102. package/dist/components/atoms/Buttons/IconButton/IconButton.js +56 -0
  103. package/dist/components/atoms/Buttons/IconButton/IconButton.js.map +1 -0
  104. package/dist/components/atoms/Buttons/index.cjs +14 -0
  105. package/dist/components/atoms/Buttons/index.cjs.map +1 -0
  106. package/dist/components/atoms/Buttons/index.d.ts +18 -0
  107. package/dist/components/atoms/Buttons/index.d.ts.map +1 -0
  108. package/dist/components/atoms/Buttons/index.js +5 -0
  109. package/dist/components/atoms/Buttons/index.js.map +1 -0
  110. package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs +1 -1
  111. package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js +1 -1
  112. package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.cjs.map +1 -0
  113. package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.d.ts.map +1 -0
  114. package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.js.map +1 -0
  115. package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs +2 -2
  116. package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
  117. package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.js +1 -1
  118. package/dist/components/atoms/Checkboxes/index.cjs +1 -1
  119. package/dist/components/atoms/Checkboxes/index.d.ts +2 -2
  120. package/dist/components/atoms/Checkboxes/index.d.ts.map +1 -1
  121. package/dist/components/atoms/Checkboxes/index.js +1 -1
  122. package/dist/components/atoms/CloseButton/index.cjs +3 -26
  123. package/dist/components/atoms/CloseButton/index.cjs.map +1 -1
  124. package/dist/components/atoms/CloseButton/index.d.ts +5 -18
  125. package/dist/components/atoms/CloseButton/index.d.ts.map +1 -1
  126. package/dist/components/atoms/CloseButton/index.js +3 -26
  127. package/dist/components/atoms/CloseButton/index.js.map +1 -1
  128. package/dist/components/atoms/CopyButton/index.cjs +3 -21
  129. package/dist/components/atoms/CopyButton/index.cjs.map +1 -1
  130. package/dist/components/atoms/CopyButton/index.d.ts +5 -27
  131. package/dist/components/atoms/CopyButton/index.d.ts.map +1 -1
  132. package/dist/components/atoms/CopyButton/index.js +3 -21
  133. package/dist/components/atoms/CopyButton/index.js.map +1 -1
  134. package/dist/components/atoms/Input/index.cjs +13 -84
  135. package/dist/components/atoms/Input/index.cjs.map +1 -1
  136. package/dist/components/atoms/Input/index.d.ts +20 -70
  137. package/dist/components/atoms/Input/index.d.ts.map +1 -1
  138. package/dist/components/atoms/Input/index.js +11 -82
  139. package/dist/components/atoms/Input/index.js.map +1 -1
  140. package/dist/components/atoms/Inputs/Input/Input.cjs +89 -0
  141. package/dist/components/atoms/Inputs/Input/Input.cjs.map +1 -0
  142. package/dist/components/atoms/Inputs/Input/Input.d.ts +74 -0
  143. package/dist/components/atoms/Inputs/Input/Input.d.ts.map +1 -0
  144. package/dist/components/atoms/Inputs/Input/Input.js +85 -0
  145. package/dist/components/atoms/Inputs/Input/Input.js.map +1 -0
  146. package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs +60 -0
  147. package/dist/components/atoms/Inputs/SearchInput/SearchInput.cjs.map +1 -0
  148. package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts +47 -0
  149. package/dist/components/atoms/Inputs/SearchInput/SearchInput.d.ts.map +1 -0
  150. package/dist/components/atoms/Inputs/SearchInput/SearchInput.js +58 -0
  151. package/dist/components/atoms/Inputs/SearchInput/SearchInput.js.map +1 -0
  152. package/dist/components/atoms/Inputs/TextArea/TextArea.cjs +41 -0
  153. package/dist/components/atoms/Inputs/TextArea/TextArea.cjs.map +1 -0
  154. package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts +51 -0
  155. package/dist/components/atoms/Inputs/TextArea/TextArea.d.ts.map +1 -0
  156. package/dist/components/atoms/Inputs/TextArea/TextArea.js +38 -0
  157. package/dist/components/atoms/Inputs/TextArea/TextArea.js.map +1 -0
  158. package/dist/components/atoms/Inputs/components/HintText.cjs.map +1 -0
  159. package/dist/components/atoms/Inputs/components/HintText.d.ts.map +1 -0
  160. package/dist/components/atoms/Inputs/components/HintText.js.map +1 -0
  161. package/dist/components/atoms/Inputs/components/Label.cjs.map +1 -0
  162. package/dist/components/atoms/Inputs/components/Label.d.ts.map +1 -0
  163. package/dist/components/atoms/Inputs/components/Label.js.map +1 -0
  164. package/dist/components/atoms/Inputs/index.cjs +19 -0
  165. package/dist/components/atoms/Inputs/index.cjs.map +1 -0
  166. package/dist/components/atoms/Inputs/index.d.ts +19 -0
  167. package/dist/components/atoms/Inputs/index.d.ts.map +1 -0
  168. package/dist/components/atoms/Inputs/index.js +6 -0
  169. package/dist/components/atoms/Inputs/index.js.map +1 -0
  170. package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs +1 -1
  171. package/dist/components/atoms/Radios/RadioButton/RadioButton.js +1 -1
  172. package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.cjs.map +1 -0
  173. package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.d.ts.map +1 -0
  174. package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.js.map +1 -0
  175. package/dist/components/atoms/Radios/index.cjs +2 -2
  176. package/dist/components/atoms/Radios/index.d.ts +2 -2
  177. package/dist/components/atoms/Radios/index.d.ts.map +1 -1
  178. package/dist/components/atoms/Radios/index.js +1 -1
  179. package/dist/components/atoms/SearchInput/index.cjs +3 -52
  180. package/dist/components/atoms/SearchInput/index.cjs.map +1 -1
  181. package/dist/components/atoms/SearchInput/index.d.ts +5 -43
  182. package/dist/components/atoms/SearchInput/index.d.ts.map +1 -1
  183. package/dist/components/atoms/SearchInput/index.js +3 -52
  184. package/dist/components/atoms/SearchInput/index.js.map +1 -1
  185. package/dist/components/atoms/Slider/index.cjs +3 -3
  186. package/dist/components/atoms/Slider/index.cjs.map +1 -1
  187. package/dist/components/atoms/Slider/index.js +1 -1
  188. package/dist/components/atoms/UtilityButton/index.cjs +6 -51
  189. package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
  190. package/dist/components/atoms/UtilityButton/index.d.ts +12 -54
  191. package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
  192. package/dist/components/atoms/UtilityButton/index.js +6 -51
  193. package/dist/components/atoms/UtilityButton/index.js.map +1 -1
  194. package/dist/components/atoms/VerificationCodeInput/index.cjs +96 -0
  195. package/dist/components/atoms/VerificationCodeInput/index.cjs.map +1 -0
  196. package/dist/components/atoms/VerificationCodeInput/index.d.ts +70 -0
  197. package/dist/components/atoms/VerificationCodeInput/index.d.ts.map +1 -0
  198. package/dist/components/atoms/VerificationCodeInput/index.js +93 -0
  199. package/dist/components/atoms/VerificationCodeInput/index.js.map +1 -0
  200. package/dist/components/forms/fields/FormInput/index.cjs +2 -2
  201. package/dist/components/forms/fields/FormInput/index.d.ts +1 -1
  202. package/dist/components/forms/fields/FormInput/index.d.ts.map +1 -1
  203. package/dist/components/forms/fields/FormInput/index.js +1 -1
  204. package/dist/components/forms/fields/FormRadioCardGroup/index.cjs +5 -5
  205. package/dist/components/forms/fields/FormRadioCardGroup/index.cjs.map +1 -1
  206. package/dist/components/forms/fields/FormRadioCardGroup/index.d.ts +3 -3
  207. package/dist/components/forms/fields/FormRadioCardGroup/index.d.ts.map +1 -1
  208. package/dist/components/forms/fields/FormRadioCardGroup/index.js +4 -4
  209. package/dist/components/forms/fields/FormRadioGroup/index.cjs +2 -2
  210. package/dist/components/forms/fields/FormRadioGroup/index.cjs.map +1 -1
  211. package/dist/components/forms/fields/FormRadioGroup/index.js +1 -1
  212. package/dist/components/forms/fields/FormSlider/index.cjs +2 -2
  213. package/dist/components/forms/fields/FormSlider/index.cjs.map +1 -1
  214. package/dist/components/forms/fields/FormSlider/index.js +1 -1
  215. package/dist/components/forms/fields/FormTextArea/index.cjs +2 -2
  216. package/dist/components/forms/fields/FormTextArea/index.d.ts +2 -2
  217. package/dist/components/forms/fields/FormTextArea/index.d.ts.map +1 -1
  218. package/dist/components/forms/fields/FormTextArea/index.js +1 -1
  219. package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.cjs +2 -2
  220. package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.cjs.map +1 -1
  221. package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.js +1 -1
  222. package/dist/components/molecules/ActivityFeed/index.cjs +2 -2
  223. package/dist/components/molecules/ActivityFeed/index.cjs.map +1 -1
  224. package/dist/components/molecules/ActivityFeed/index.d.ts +1 -1
  225. package/dist/components/molecules/ActivityFeed/index.d.ts.map +1 -1
  226. package/dist/components/molecules/ActivityFeed/index.js +1 -1
  227. package/dist/components/molecules/BadgeGroup/index.cjs +3 -110
  228. package/dist/components/molecules/BadgeGroup/index.cjs.map +1 -1
  229. package/dist/components/molecules/BadgeGroup/index.d.ts +5 -37
  230. package/dist/components/molecules/BadgeGroup/index.d.ts.map +1 -1
  231. package/dist/components/molecules/BadgeGroup/index.js +3 -110
  232. package/dist/components/molecules/BadgeGroup/index.js.map +1 -1
  233. package/dist/components/molecules/Paginations/Pagination/Pagination.cjs +2 -2
  234. package/dist/components/molecules/Paginations/Pagination/Pagination.cjs.map +1 -1
  235. package/dist/components/molecules/Paginations/Pagination/Pagination.js +1 -1
  236. package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.cjs +37 -0
  237. package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.cjs.map +1 -0
  238. package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.d.ts +33 -0
  239. package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.d.ts.map +1 -0
  240. package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.js +35 -0
  241. package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.js.map +1 -0
  242. package/dist/components/molecules/{RadioGroup → RadioCards/RadioCardAvatar}/hooks/useCommitOnPress.cjs +1 -1
  243. package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.cjs.map +1 -0
  244. package/dist/components/molecules/{RadioGroup → RadioCards/RadioCardAvatar}/hooks/useCommitOnPress.d.ts +6 -6
  245. package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.d.ts.map +1 -0
  246. package/dist/components/molecules/{RadioGroup → RadioCards/RadioCardAvatar}/hooks/useCommitOnPress.js +1 -1
  247. package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.js.map +1 -0
  248. package/dist/components/molecules/{RadioGroup/components/RadioGroupRadioButton.cjs → RadioCards/RadioCardBullet/RadioCardBullet.cjs} +3 -3
  249. package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.cjs.map +1 -0
  250. package/dist/components/molecules/{RadioGroup/components/RadioGroupRadioButton.d.ts → RadioCards/RadioCardBullet/RadioCardBullet.d.ts} +5 -5
  251. package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.d.ts.map +1 -0
  252. package/dist/components/molecules/{RadioGroup/components/RadioGroupRadioButton.js → RadioCards/RadioCardBullet/RadioCardBullet.js} +3 -3
  253. package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.js.map +1 -0
  254. package/dist/components/molecules/{RadioGroup/components/RadioGroupCheckbox.cjs → RadioCards/RadioCardCheck/RadioCardCheck.cjs} +4 -4
  255. package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.cjs.map +1 -0
  256. package/dist/components/molecules/{RadioGroup/components/RadioGroupCheckbox.d.ts → RadioCards/RadioCardCheck/RadioCardCheck.d.ts} +6 -7
  257. package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.d.ts.map +1 -0
  258. package/dist/components/molecules/{RadioGroup/components/RadioGroupCheckbox.js → RadioCards/RadioCardCheck/RadioCardCheck.js} +4 -4
  259. package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.js.map +1 -0
  260. package/dist/components/molecules/{RadioGroup/components/RadioGroupIconSimple.cjs → RadioCards/RadioCardIcon/RadioCardIcon.cjs} +3 -3
  261. package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.cjs.map +1 -0
  262. package/dist/components/molecules/{RadioGroup/components/RadioGroupIconSimple.d.ts → RadioCards/RadioCardIcon/RadioCardIcon.d.ts} +5 -6
  263. package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.d.ts.map +1 -0
  264. package/dist/components/molecules/{RadioGroup/components/RadioGroupIconSimple.js → RadioCards/RadioCardIcon/RadioCardIcon.js} +3 -3
  265. package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.js.map +1 -0
  266. package/dist/components/molecules/{RadioGroup/components/RadioGroupIconCard.cjs → RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.cjs} +5 -5
  267. package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.cjs.map +1 -0
  268. package/dist/components/molecules/{RadioGroup/components/RadioGroupIconCard.d.ts → RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.d.ts} +3 -3
  269. package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.d.ts.map +1 -0
  270. package/dist/components/molecules/{RadioGroup/components/RadioGroupIconCard.js → RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.js} +4 -4
  271. package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.js.map +1 -0
  272. package/dist/components/molecules/{RadioGroup/components/RadioGroupPaymentIcon.cjs → RadioCards/RadioCardPayment/RadioCardPayment.cjs} +3 -3
  273. package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.cjs.map +1 -0
  274. package/dist/components/molecules/{RadioGroup/components/RadioGroupPaymentIcon.d.ts → RadioCards/RadioCardPayment/RadioCardPayment.d.ts} +3 -3
  275. package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.d.ts.map +1 -0
  276. package/dist/components/molecules/{RadioGroup/components/RadioGroupPaymentIcon.js → RadioCards/RadioCardPayment/RadioCardPayment.js} +3 -3
  277. package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.js.map +1 -0
  278. package/dist/components/molecules/{RadioGroup → RadioCards}/hooks/useOptionIds.cjs.map +1 -1
  279. package/dist/components/molecules/{RadioGroup → RadioCards}/hooks/useOptionIds.d.ts.map +1 -1
  280. package/dist/components/molecules/{RadioGroup → RadioCards}/hooks/useOptionIds.js.map +1 -1
  281. package/dist/components/molecules/RadioCards/index.cjs +18 -0
  282. package/dist/components/molecules/RadioCards/index.cjs.map +1 -0
  283. package/dist/components/molecules/RadioCards/index.d.ts +23 -0
  284. package/dist/components/molecules/RadioCards/index.d.ts.map +1 -0
  285. package/dist/components/molecules/RadioCards/index.js +7 -0
  286. package/dist/components/molecules/RadioCards/index.js.map +1 -0
  287. package/dist/components/molecules/{RadioGroup/radioGroup.types.d.ts → RadioCards/radioCards.types.d.ts} +12 -10
  288. package/dist/components/molecules/RadioCards/radioCards.types.d.ts.map +1 -0
  289. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs +2 -7
  290. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs.map +1 -1
  291. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.d.ts +2 -7
  292. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.d.ts.map +1 -1
  293. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.js +2 -7
  294. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.js.map +1 -1
  295. package/dist/components/molecules/RadioGroup/index.cjs +26 -14
  296. package/dist/components/molecules/RadioGroup/index.cjs.map +1 -1
  297. package/dist/components/molecules/RadioGroup/index.d.ts +25 -8
  298. package/dist/components/molecules/RadioGroup/index.d.ts.map +1 -1
  299. package/dist/components/molecules/RadioGroup/index.js +23 -7
  300. package/dist/components/molecules/RadioGroup/index.js.map +1 -1
  301. package/dist/components/molecules/Select/index.d.ts +1 -1
  302. package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs +3 -3
  303. package/dist/components/molecules/Selects/MultiSelect/MultiSelect.cjs.map +1 -1
  304. package/dist/components/molecules/Selects/MultiSelect/MultiSelect.js +1 -1
  305. package/dist/components/molecules/Selects/Select/Select.cjs +4 -4
  306. package/dist/components/molecules/Selects/Select/Select.cjs.map +1 -1
  307. package/dist/components/molecules/Selects/Select/Select.d.ts +1 -1
  308. package/dist/components/molecules/Selects/Select/Select.d.ts.map +1 -1
  309. package/dist/components/molecules/Selects/Select/Select.js +3 -3
  310. package/dist/components/molecules/Selects/Select/{Combobox.cjs → components/Combobox.cjs} +8 -8
  311. package/dist/components/molecules/Selects/Select/components/Combobox.cjs.map +1 -0
  312. package/dist/components/molecules/Selects/Select/{Combobox.d.ts → components/Combobox.d.ts} +1 -1
  313. package/dist/components/molecules/Selects/Select/components/Combobox.d.ts.map +1 -0
  314. package/dist/components/molecules/Selects/Select/{Combobox.js → components/Combobox.js} +6 -6
  315. package/dist/components/molecules/Selects/Select/components/Combobox.js.map +1 -0
  316. package/dist/components/molecules/Selects/Select/{Popover.cjs → components/Popover.cjs} +1 -1
  317. package/dist/components/molecules/Selects/Select/components/Popover.cjs.map +1 -0
  318. package/dist/components/molecules/Selects/Select/components/Popover.d.ts.map +1 -0
  319. package/dist/components/molecules/Selects/Select/{Popover.js → components/Popover.js} +1 -1
  320. package/dist/components/molecules/Selects/Select/components/Popover.js.map +1 -0
  321. package/dist/components/molecules/Tabs/index.cjs +2 -2
  322. package/dist/components/molecules/Tabs/index.cjs.map +1 -1
  323. package/dist/components/molecules/Tabs/index.js +1 -1
  324. package/dist/components/molecules/Tags/Tag/Tag.cjs +3 -3
  325. package/dist/components/molecules/Tags/Tag/Tag.js +3 -3
  326. package/dist/components/molecules/Tags/Tag/{TagAvatar.cjs → components/TagAvatar.cjs} +1 -1
  327. package/dist/components/molecules/Tags/Tag/components/TagAvatar.cjs.map +1 -0
  328. package/dist/components/molecules/Tags/Tag/components/TagAvatar.d.ts.map +1 -0
  329. package/dist/components/molecules/Tags/Tag/{TagAvatar.js → components/TagAvatar.js} +1 -1
  330. package/dist/components/molecules/Tags/Tag/components/TagAvatar.js.map +1 -0
  331. package/dist/components/molecules/Tags/Tag/{TagCheckbox.cjs → components/TagCheckbox.cjs} +1 -1
  332. package/dist/components/molecules/Tags/Tag/components/TagCheckbox.cjs.map +1 -0
  333. package/dist/components/molecules/Tags/Tag/{TagCheckbox.d.ts → components/TagCheckbox.d.ts} +1 -1
  334. package/dist/components/molecules/Tags/Tag/components/TagCheckbox.d.ts.map +1 -0
  335. package/dist/components/molecules/Tags/Tag/{TagCheckbox.js → components/TagCheckbox.js} +1 -1
  336. package/dist/components/molecules/Tags/Tag/components/TagCheckbox.js.map +1 -0
  337. package/dist/components/molecules/Tags/Tag/{TagCloseX.cjs → components/TagCloseX.cjs} +1 -1
  338. package/dist/components/molecules/Tags/Tag/components/TagCloseX.cjs.map +1 -0
  339. package/dist/components/molecules/Tags/Tag/{TagCloseX.d.ts → components/TagCloseX.d.ts} +1 -1
  340. package/dist/components/molecules/Tags/Tag/components/TagCloseX.d.ts.map +1 -0
  341. package/dist/components/molecules/Tags/Tag/{TagCloseX.js → components/TagCloseX.js} +1 -1
  342. package/dist/components/molecules/Tags/Tag/components/TagCloseX.js.map +1 -0
  343. package/dist/components/molecules/Tags/index.cjs +2 -2
  344. package/dist/components/molecules/Tags/index.d.ts +1 -1
  345. package/dist/components/molecules/Tags/index.d.ts.map +1 -1
  346. package/dist/components/molecules/Tags/index.js +1 -1
  347. package/dist/components/molecules/TextArea/index.cjs +5 -30
  348. package/dist/components/molecules/TextArea/index.cjs.map +1 -1
  349. package/dist/components/molecules/TextArea/index.d.ts +7 -47
  350. package/dist/components/molecules/TextArea/index.d.ts.map +1 -1
  351. package/dist/components/molecules/TextArea/index.js +5 -30
  352. package/dist/components/molecules/TextArea/index.js.map +1 -1
  353. package/dist/components/molecules/VerificationCodeInput/index.cjs +5 -89
  354. package/dist/components/molecules/VerificationCodeInput/index.cjs.map +1 -1
  355. package/dist/components/molecules/VerificationCodeInput/index.d.ts +9 -69
  356. package/dist/components/molecules/VerificationCodeInput/index.d.ts.map +1 -1
  357. package/dist/components/molecules/VerificationCodeInput/index.js +5 -89
  358. package/dist/components/molecules/VerificationCodeInput/index.js.map +1 -1
  359. package/dist/components/organisms/Calendar/components/CalendarHeader.cjs +2 -2
  360. package/dist/components/organisms/Calendar/components/CalendarHeader.cjs.map +1 -1
  361. package/dist/components/organisms/Calendar/components/CalendarHeader.js +1 -1
  362. package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs +2 -2
  363. package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs.map +1 -1
  364. package/dist/components/organisms/ColorPicker/components/ColorPickerField.js +1 -1
  365. package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs +3 -3
  366. package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs.map +1 -1
  367. package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js +2 -2
  368. package/dist/components/organisms/DatePickers/DatePicker/{Calendar.cjs → components/Calendar.cjs} +2 -2
  369. package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.cjs.map +1 -0
  370. package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.d.ts.map +1 -0
  371. package/dist/components/organisms/DatePickers/DatePicker/{Calendar.js → components/Calendar.js} +2 -2
  372. package/dist/components/organisms/DatePickers/DatePicker/components/Calendar.js.map +1 -0
  373. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +2 -2
  374. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
  375. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +1 -1
  376. package/dist/components/organisms/DatePickers/components/InputDate.cjs +1 -1
  377. package/dist/components/organisms/DatePickers/components/InputDate.js +1 -1
  378. package/dist/components/organisms/HeaderNavigation/components/NavItem.cjs +2 -2
  379. package/dist/components/organisms/HeaderNavigation/components/NavItem.cjs.map +1 -1
  380. package/dist/components/organisms/HeaderNavigation/components/NavItem.js +1 -1
  381. package/dist/components/organisms/HeaderNavigation/index.cjs +2 -2
  382. package/dist/components/organisms/HeaderNavigation/index.cjs.map +1 -1
  383. package/dist/components/organisms/HeaderNavigation/index.js +1 -1
  384. package/dist/components/organisms/PageHeader/components/PageHeaderTabNav.cjs +2 -2
  385. package/dist/components/organisms/PageHeader/components/PageHeaderTabNav.cjs.map +1 -1
  386. package/dist/components/organisms/PageHeader/components/PageHeaderTabNav.js +1 -1
  387. package/dist/components/organisms/SidebarNavigation/components/NavItem.cjs +2 -2
  388. package/dist/components/organisms/SidebarNavigation/components/NavItem.cjs.map +1 -1
  389. package/dist/components/organisms/SidebarNavigation/components/NavItem.js +1 -1
  390. package/dist/components/organisms/Table/index.cjs +2 -2
  391. package/dist/components/organisms/Table/index.cjs.map +1 -1
  392. package/dist/components/organisms/Table/index.js +1 -1
  393. package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs +2 -2
  394. package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs.map +1 -1
  395. package/dist/components/organisms/TextEditor/components/TextEditorExtensions.js +1 -1
  396. package/dist/components/organisms/TextEditor/index.cjs +3 -3
  397. package/dist/components/organisms/TextEditor/index.cjs.map +1 -1
  398. package/dist/components/organisms/TextEditor/index.d.ts +1 -1
  399. package/dist/components/organisms/TextEditor/index.d.ts.map +1 -1
  400. package/dist/components/organisms/TextEditor/index.js +1 -1
  401. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.cjs +35 -8
  402. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.cjs.map +1 -1
  403. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.d.ts +5 -5
  404. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.d.ts.map +1 -1
  405. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.js +36 -9
  406. package/dist/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.js.map +1 -1
  407. package/dist/native/components/atoms/Badge/index.d.ts +20 -97
  408. package/dist/native/components/atoms/Badge/index.d.ts.map +1 -1
  409. package/dist/native/components/atoms/Badge/index.js +17 -62
  410. package/dist/native/components/atoms/Badge/index.js.map +1 -1
  411. package/dist/native/components/atoms/Badges/Badge/Badge.d.ts +98 -0
  412. package/dist/native/components/atoms/Badges/Badge/Badge.d.ts.map +1 -0
  413. package/dist/native/components/atoms/Badges/Badge/Badge.js +66 -0
  414. package/dist/native/components/atoms/Badges/Badge/Badge.js.map +1 -0
  415. package/dist/native/components/atoms/{Badge → Badges/Badge}/Badge.styles.d.ts +1 -1
  416. package/dist/native/components/atoms/Badges/Badge/Badge.styles.d.ts.map +1 -0
  417. package/dist/native/components/atoms/{Badge → Badges/Badge}/Badge.styles.js +1 -1
  418. package/dist/native/components/atoms/Badges/Badge/Badge.styles.js.map +1 -0
  419. package/dist/native/components/atoms/Badges/Badge/badge.types.d.ts.map +1 -0
  420. package/dist/native/components/atoms/Badges/Badge/badge.types.js.map +1 -0
  421. package/dist/native/components/atoms/{Badge → Badges/Badge/utilities}/badge.utils.d.ts +2 -2
  422. package/dist/native/components/atoms/Badges/Badge/utilities/badge.utils.d.ts.map +1 -0
  423. package/dist/native/components/atoms/{Badge → Badges/Badge/utilities}/badge.utils.js +1 -1
  424. package/dist/native/components/atoms/Badges/Badge/utilities/badge.utils.js.map +1 -0
  425. package/dist/native/components/atoms/Badges/index.d.ts +5 -0
  426. package/dist/native/components/atoms/Badges/index.d.ts.map +1 -0
  427. package/dist/native/components/atoms/Badges/index.js +2 -0
  428. package/dist/native/components/atoms/Badges/index.js.map +1 -0
  429. package/dist/native/components/atoms/Button/index.d.ts +14 -65
  430. package/dist/native/components/atoms/Button/index.d.ts.map +1 -1
  431. package/dist/native/components/atoms/Button/index.js +6 -145
  432. package/dist/native/components/atoms/Button/index.js.map +1 -1
  433. package/dist/native/components/atoms/Buttons/Button/Button.d.ts +66 -0
  434. package/dist/native/components/atoms/Buttons/Button/Button.d.ts.map +1 -0
  435. package/dist/native/components/atoms/Buttons/Button/Button.js +149 -0
  436. package/dist/native/components/atoms/Buttons/Button/Button.js.map +1 -0
  437. package/dist/native/components/atoms/{Button → Buttons/Button}/Button.styles.d.ts +1 -1
  438. package/dist/native/components/atoms/Buttons/Button/Button.styles.d.ts.map +1 -0
  439. package/dist/native/components/atoms/{Button → Buttons/Button}/Button.styles.js +1 -1
  440. package/dist/native/components/atoms/Buttons/Button/Button.styles.js.map +1 -0
  441. package/dist/native/components/atoms/Buttons/index.d.ts +4 -0
  442. package/dist/native/components/atoms/Buttons/index.d.ts.map +1 -0
  443. package/dist/native/components/atoms/Buttons/index.js +2 -0
  444. package/dist/native/components/atoms/Buttons/index.js.map +1 -0
  445. package/dist/native/components/atoms/Inputs/index.d.ts +12 -0
  446. package/dist/native/components/atoms/VerificationCodeInput/index.d.ts +12 -0
  447. package/dist/native/components/molecules/RadioCards/index.d.ts +12 -0
  448. package/package.json +1 -1
  449. package/dist/components/atoms/Badge/Badge.styles.cjs.map +0 -1
  450. package/dist/components/atoms/Badge/Badge.styles.d.ts.map +0 -1
  451. package/dist/components/atoms/Badge/Badge.styles.js.map +0 -1
  452. package/dist/components/atoms/Badge/badge.types.cjs.map +0 -1
  453. package/dist/components/atoms/Badge/badge.types.d.ts.map +0 -1
  454. package/dist/components/atoms/Badge/badge.types.js.map +0 -1
  455. package/dist/components/atoms/Badge/badge.utils.d.ts.map +0 -1
  456. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.cjs.map +0 -1
  457. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.d.ts.map +0 -1
  458. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.js.map +0 -1
  459. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.cjs.map +0 -1
  460. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.d.ts.map +0 -1
  461. package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.js.map +0 -1
  462. package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.cjs.map +0 -1
  463. package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.d.ts.map +0 -1
  464. package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.js.map +0 -1
  465. package/dist/components/atoms/Button/Button.styles.d.ts.map +0 -1
  466. package/dist/components/atoms/Button/components/ButtonIcon.cjs.map +0 -1
  467. package/dist/components/atoms/Button/components/ButtonIcon.d.ts.map +0 -1
  468. package/dist/components/atoms/Button/components/ButtonIcon.js.map +0 -1
  469. package/dist/components/atoms/Button/components/ButtonSpinner.cjs.map +0 -1
  470. package/dist/components/atoms/Button/components/ButtonSpinner.d.ts.map +0 -1
  471. package/dist/components/atoms/Button/components/ButtonSpinner.js.map +0 -1
  472. package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.cjs.map +0 -1
  473. package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.d.ts.map +0 -1
  474. package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.js.map +0 -1
  475. package/dist/components/atoms/Input/components/HintText.cjs.map +0 -1
  476. package/dist/components/atoms/Input/components/HintText.d.ts.map +0 -1
  477. package/dist/components/atoms/Input/components/HintText.js.map +0 -1
  478. package/dist/components/atoms/Input/components/Label.cjs.map +0 -1
  479. package/dist/components/atoms/Input/components/Label.d.ts.map +0 -1
  480. package/dist/components/atoms/Input/components/Label.js.map +0 -1
  481. package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.cjs.map +0 -1
  482. package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.d.ts.map +0 -1
  483. package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.js.map +0 -1
  484. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.cjs +0 -39
  485. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.cjs.map +0 -1
  486. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.d.ts +0 -32
  487. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.d.ts.map +0 -1
  488. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.js +0 -37
  489. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.js.map +0 -1
  490. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.cjs.map +0 -1
  491. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.d.ts.map +0 -1
  492. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.js.map +0 -1
  493. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.cjs.map +0 -1
  494. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.d.ts.map +0 -1
  495. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.js.map +0 -1
  496. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.cjs.map +0 -1
  497. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.d.ts.map +0 -1
  498. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.js.map +0 -1
  499. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.cjs.map +0 -1
  500. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.d.ts.map +0 -1
  501. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.js.map +0 -1
  502. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.cjs.map +0 -1
  503. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.d.ts.map +0 -1
  504. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.js.map +0 -1
  505. package/dist/components/molecules/RadioGroup/hooks/useCommitOnPress.cjs.map +0 -1
  506. package/dist/components/molecules/RadioGroup/hooks/useCommitOnPress.d.ts.map +0 -1
  507. package/dist/components/molecules/RadioGroup/hooks/useCommitOnPress.js.map +0 -1
  508. package/dist/components/molecules/RadioGroup/radioGroup.types.d.ts.map +0 -1
  509. package/dist/components/molecules/Selects/Select/Combobox.cjs.map +0 -1
  510. package/dist/components/molecules/Selects/Select/Combobox.d.ts.map +0 -1
  511. package/dist/components/molecules/Selects/Select/Combobox.js.map +0 -1
  512. package/dist/components/molecules/Selects/Select/Popover.cjs.map +0 -1
  513. package/dist/components/molecules/Selects/Select/Popover.d.ts.map +0 -1
  514. package/dist/components/molecules/Selects/Select/Popover.js.map +0 -1
  515. package/dist/components/molecules/Tags/Tag/TagAvatar.cjs.map +0 -1
  516. package/dist/components/molecules/Tags/Tag/TagAvatar.d.ts.map +0 -1
  517. package/dist/components/molecules/Tags/Tag/TagAvatar.js.map +0 -1
  518. package/dist/components/molecules/Tags/Tag/TagCheckbox.cjs.map +0 -1
  519. package/dist/components/molecules/Tags/Tag/TagCheckbox.d.ts.map +0 -1
  520. package/dist/components/molecules/Tags/Tag/TagCheckbox.js.map +0 -1
  521. package/dist/components/molecules/Tags/Tag/TagCloseX.cjs.map +0 -1
  522. package/dist/components/molecules/Tags/Tag/TagCloseX.d.ts.map +0 -1
  523. package/dist/components/molecules/Tags/Tag/TagCloseX.js.map +0 -1
  524. package/dist/components/organisms/DatePickers/DatePicker/Calendar.cjs.map +0 -1
  525. package/dist/components/organisms/DatePickers/DatePicker/Calendar.d.ts.map +0 -1
  526. package/dist/components/organisms/DatePickers/DatePicker/Calendar.js.map +0 -1
  527. package/dist/native/components/atoms/Badge/Badge.styles.d.ts.map +0 -1
  528. package/dist/native/components/atoms/Badge/Badge.styles.js.map +0 -1
  529. package/dist/native/components/atoms/Badge/badge.types.d.ts.map +0 -1
  530. package/dist/native/components/atoms/Badge/badge.types.js.map +0 -1
  531. package/dist/native/components/atoms/Badge/badge.utils.d.ts.map +0 -1
  532. package/dist/native/components/atoms/Badge/badge.utils.js.map +0 -1
  533. package/dist/native/components/atoms/Button/Button.styles.d.ts.map +0 -1
  534. package/dist/native/components/atoms/Button/Button.styles.js.map +0 -1
  535. /package/dist/components/atoms/{Badge → Badges/Badge}/badge.types.cjs +0 -0
  536. /package/dist/components/atoms/{Badge → Badges/Badge}/badge.types.d.ts +0 -0
  537. /package/dist/components/atoms/{Badge → Badges/Badge}/badge.types.js +0 -0
  538. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.cjs → components/AppStoreBadgeLink.cjs} +0 -0
  539. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.d.ts → components/AppStoreBadgeLink.d.ts} +0 -0
  540. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreBadgeLink.js → components/AppStoreBadgeLink.js} +0 -0
  541. /package/dist/components/atoms/BrandButtons/AppStoreButton/{AppStoreButtonsOutline.d.ts → components/AppStoreButtonsOutline.d.ts} +0 -0
  542. /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.cjs → components/SocialLogos.cjs} +0 -0
  543. /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.d.ts → components/SocialLogos.d.ts} +0 -0
  544. /package/dist/components/atoms/BrandButtons/SocialButton/{SocialLogos.js → components/SocialLogos.js} +0 -0
  545. /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.cjs +0 -0
  546. /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.d.ts +0 -0
  547. /package/dist/components/atoms/{Button → Buttons/Button}/components/ButtonSpinner.js +0 -0
  548. /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.cjs → components/CheckboxBase.cjs} +0 -0
  549. /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.d.ts → components/CheckboxBase.d.ts} +0 -0
  550. /package/dist/components/atoms/Checkboxes/Checkbox/{CheckboxBase.js → components/CheckboxBase.js} +0 -0
  551. /package/dist/components/atoms/{Input → Inputs}/components/HintText.cjs +0 -0
  552. /package/dist/components/atoms/{Input → Inputs}/components/HintText.d.ts +0 -0
  553. /package/dist/components/atoms/{Input → Inputs}/components/HintText.js +0 -0
  554. /package/dist/components/atoms/{Input → Inputs}/components/Label.cjs +0 -0
  555. /package/dist/components/atoms/{Input → Inputs}/components/Label.d.ts +0 -0
  556. /package/dist/components/atoms/{Input → Inputs}/components/Label.js +0 -0
  557. /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.cjs → components/RadioButtonBase.cjs} +0 -0
  558. /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.d.ts → components/RadioButtonBase.d.ts} +0 -0
  559. /package/dist/components/atoms/Radios/RadioButton/{RadioButtonBase.js → components/RadioButtonBase.js} +0 -0
  560. /package/dist/components/molecules/{RadioGroup → RadioCards}/hooks/useOptionIds.cjs +0 -0
  561. /package/dist/components/molecules/{RadioGroup → RadioCards}/hooks/useOptionIds.d.ts +0 -0
  562. /package/dist/components/molecules/{RadioGroup → RadioCards}/hooks/useOptionIds.js +0 -0
  563. /package/dist/components/molecules/Selects/Select/{Popover.d.ts → components/Popover.d.ts} +0 -0
  564. /package/dist/components/molecules/Tags/Tag/{TagAvatar.d.ts → components/TagAvatar.d.ts} +0 -0
  565. /package/dist/components/organisms/DatePickers/DatePicker/{Calendar.d.ts → components/Calendar.d.ts} +0 -0
  566. /package/dist/native/components/atoms/{Badge → Badges/Badge}/badge.types.d.ts +0 -0
  567. /package/dist/native/components/atoms/{Badge → Badges/Badge}/badge.types.js +0 -0
@@ -8,26 +8,31 @@ var React = require('react');
8
8
  * clear. A `value` changed elsewhere, by Back or a reset, replaces the draft; the box's own commits coming back from the owner
9
9
  * leave it alone, so typing carries on while a router applies a navigation as a transition.
10
10
  *
11
- * @param options The committed value, what the draft starts as, where to send commits, and the pause to wait for.
11
+ * @param options The committed value, what the draft starts as, where to send commits, and the pause to wait for, if any.
12
12
  * @returns The draft to show, with `change` for every keystroke, `submit` to commit at once and `clear` to commit an empty search.
13
13
  */
14
14
  const useDebouncedSearch = ({ value, initialValue, onChange, delay }) => {
15
- const [draft, setDraft] = React.useState(initialValue ?? value);
15
+ const [draft, setDraft] = React.useState(initialValue ?? value ?? '');
16
16
  // The last `value` reconciled, so only a change to it is acted on and the initial draft is never overwritten.
17
17
  const committed = React.useRef(value);
18
18
  // What has been sent and not yet seen come back; an array, since two commits can be in flight at once.
19
19
  const sent = React.useRef([]);
20
20
  const send = (next) => {
21
- sent.current.push(next);
21
+ // Tracked only while a commit can trail newer typing: an owner holding the value, behind a delay. Without a delay the field
22
+ // shows `value` itself, so an outside change simply replaces the draft.
23
+ if (value !== undefined && delay !== undefined)
24
+ sent.current.push(next);
22
25
  onChange(next);
23
26
  };
24
- const commit = useDebouncedCallback.useDebouncedCallback(send, delay);
27
+ const commit = useDebouncedCallback.useDebouncedCallback(send, delay ?? 0);
25
28
  // An effect, not the render body: a render React discards would still have moved the refs and dropped a pending commit.
26
29
  // Layout timing so a reset lands before the old draft is painted.
27
30
  React.useLayoutEffect(() => {
28
31
  if (value === committed.current)
29
32
  return;
30
33
  committed.current = value;
34
+ if (value === undefined)
35
+ return;
31
36
  const acknowledged = sent.current.indexOf(value);
32
37
  if (acknowledged >= 0) {
33
38
  // The box's own commit: the draft already shows it, or something newer typed since.
@@ -39,15 +44,37 @@ const useDebouncedSearch = ({ value, initialValue, onChange, delay }) => {
39
44
  sent.current = [];
40
45
  setDraft(value);
41
46
  }, [value, commit]);
47
+ // Turning the delay off commits what is still pending now, so no older draft reaches the owner after the changes sent at once.
48
+ React.useEffect(() => {
49
+ if (delay === undefined)
50
+ commit.flush();
51
+ }, [delay, commit]);
52
+ // Without a delay, an owner holding the value decides what the field shows, so the draft takes only what it accepts: an edit
53
+ // it rejects never resurfaces when a delay is turned on later.
54
+ const isOwnerLed = delay === undefined && value !== undefined;
55
+ // The owner takes over as the delay is turned off, so a draft it rejected while the delay was on goes too.
56
+ React.useLayoutEffect(() => {
57
+ if (delay === undefined && value !== undefined)
58
+ setDraft(value);
59
+ }, [delay, value]);
42
60
  const change = (next) => {
43
- setDraft(next);
44
- commit(next);
61
+ if (!isOwnerLed)
62
+ setDraft(next);
63
+ if (delay !== undefined) {
64
+ commit(next);
65
+ return;
66
+ }
67
+ commit.cancel();
68
+ send(next);
45
69
  };
46
70
  const submit = () => commit.flush();
47
71
  const clear = () => {
48
72
  commit.cancel();
49
- setDraft('');
50
- send('');
73
+ if (!isOwnerLed)
74
+ setDraft('');
75
+ // Without a delay the field's own change to an empty value, which comes just before, has already been sent.
76
+ if (delay !== undefined)
77
+ send('');
51
78
  };
52
79
  return { draft, change, submit, clear };
53
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useDebouncedSearch.cjs","sources":["../../../../src/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.ts"],"sourcesContent":[null],"names":["useState","useRef","useDebouncedCallback","useLayoutEffect"],"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,GAAGA,cAAQ,CAAS,YAAY,IAAI,KAAK,CAAC;;AAEjE,IAAA,MAAM,SAAS,GAAGC,YAAM,CAAS,KAAK,CAAC;;AAEvC,IAAA,MAAM,IAAI,GAAGA,YAAM,CAAW,EAAE,CAAC;AACjC,IAAA,MAAM,IAAI,GAAG,CAAC,IAAY,KAAI;AAC5B,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QACvB,QAAQ,CAAC,IAAI,CAAC;AAChB,IAAA,CAAC;IACD,MAAM,MAAM,GAAGC,yCAAoB,CAAC,IAAI,EAAE,KAAK,CAAC;;;IAIhDC,qBAAe,CAAC,MAAK;AACnB,QAAA,IAAI,KAAK,KAAK,SAAS,CAAC,OAAO;YAAE;AACjC,QAAA,SAAS,CAAC,OAAO,GAAG,KAAK;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;AAEnB,IAAA,MAAM,MAAM,GAAG,CAAC,IAAY,KAAI;QAC9B,QAAQ,CAAC,IAAI,CAAC;QACd,MAAM,CAAC,IAAI,CAAC;AACd,IAAA,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE;IACnC,MAAM,KAAK,GAAG,MAAK;QACjB,MAAM,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,EAAE,CAAC;QACZ,IAAI,CAAC,EAAE,CAAC;AACV,IAAA,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;AACzC;;"}
1
+ {"version":3,"file":"useDebouncedSearch.cjs","sources":["../../../../src/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.ts"],"sourcesContent":[null],"names":["useState","useRef","useDebouncedCallback","useLayoutEffect","useEffect"],"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,GAAGA,cAAQ,CAAS,YAAY,IAAI,KAAK,IAAI,EAAE,CAAC;;AAEvE,IAAA,MAAM,SAAS,GAAGC,YAAM,CAAC,KAAK,CAAC;;AAE/B,IAAA,MAAM,IAAI,GAAGA,YAAM,CAAW,EAAE,CAAC;AACjC,IAAA,MAAM,IAAI,GAAG,CAAC,IAAY,KAAI;;;AAG5B,QAAA,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;AAAE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AI,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,19 +1,19 @@
1
1
  interface UseDebouncedSearchOptions {
2
- /** The committed value the owner holds, such as the search in the URL. */
3
- value: string;
2
+ /** The committed value the owner holds, such as the search in the URL. Without it the box owns its value. */
3
+ value?: string;
4
4
  /** What the draft shows before the user types when that is not `value`, such as an uncontrolled field's `defaultValue`. */
5
5
  initialValue?: string;
6
6
  /** Receives the draft once typing pauses, on submit, and on clear. */
7
7
  onChange: (value: string) => void;
8
- /** How long typing must pause before the draft is committed, in milliseconds. */
9
- delay: number;
8
+ /** How long typing must pause before the draft is committed, in milliseconds. Without it every change is committed at once. */
9
+ delay?: number;
10
10
  }
11
11
  /**
12
12
  * Keeps a search box's own draft so typing stays instant, and commits it to the owner once typing pauses, on submit, or on
13
13
  * clear. A `value` changed elsewhere, by Back or a reset, replaces the draft; the box's own commits coming back from the owner
14
14
  * leave it alone, so typing carries on while a router applies a navigation as a transition.
15
15
  *
16
- * @param options The committed value, what the draft starts as, where to send commits, and the pause to wait for.
16
+ * @param options The committed value, what the draft starts as, where to send commits, and the pause to wait for, if any.
17
17
  * @returns The draft to show, with `change` for every keystroke, `submit` to commit at once and `clear` to commit an empty search.
18
18
  */
19
19
  export declare const useDebouncedSearch: ({ value, initialValue, onChange, delay }: UseDebouncedSearchOptions) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useDebouncedSearch.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.ts"],"names":[],"mappings":"AAGA,UAAU,yBAAyB;IACjC,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,2HAA2H;IAC3H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,0CAA0C,yBAAyB;;mBA6B9E,MAAM;;;CAY7B,CAAC"}
1
+ {"version":3,"file":"useDebouncedSearch.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__internal__/useDebouncedSearch/useDebouncedSearch.ts"],"names":[],"mappings":"AAGA,UAAU,yBAAyB;IACjC,6GAA6G;IAC7G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2HAA2H;IAC3H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+HAA+H;IAC/H,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,0CAA0C,yBAAyB;;mBA8C9E,MAAM;;;CAkB7B,CAAC"}
@@ -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,QAAQ,CAAC,GAAG,QAAQ,CAAS,YAAY,IAAI,KAAK,CAAC;;AAEjE,IAAA,MAAM,SAAS,GAAG,MAAM,CAAS,KAAK,CAAC;;AAEvC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAW,EAAE,CAAC;AACjC,IAAA,MAAM,IAAI,GAAG,CAAC,IAAY,KAAI;AAC5B,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QACvB,QAAQ,CAAC,IAAI,CAAC;AAChB,IAAA,CAAC;IACD,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC;;;IAIhD,eAAe,CAAC,MAAK;AACnB,QAAA,IAAI,KAAK,KAAK,SAAS,CAAC,OAAO;YAAE;AACjC,QAAA,SAAS,CAAC,OAAO,GAAG,KAAK;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;AAEnB,IAAA,MAAM,MAAM,GAAG,CAAC,IAAY,KAAI;QAC9B,QAAQ,CAAC,IAAI,CAAC;QACd,MAAM,CAAC,IAAI,CAAC;AACd,IAAA,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE;IACnC,MAAM,KAAK,GAAG,MAAK;QACjB,MAAM,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,EAAE,CAAC;QACZ,IAAI,CAAC,EAAE,CAAC;AACV,IAAA,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,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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AQ,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,98 +1,21 @@
1
- import { type FC, type ReactNode } from 'react';
2
- import { type PressableProps } from 'react-native';
3
- import { styles } from './Badge.styles';
4
- import type { BadgeTypes, BadgeTypeToColorMap, Sizes } from './badge.types';
5
- export type { BadgeColors } from './badge.types';
6
- type IconComponent = FC<{
7
- size?: number;
8
- color?: string;
9
- strokeWidth?: number;
10
- }>;
11
- /** The colours a badge accepts for a given `type`; `modern` is neutral, so it only takes `gray`. */
12
- export type BadgeColor<T extends BadgeTypes> = BadgeTypeToColorMap<typeof styles.types.standard>[T];
13
- export interface BadgeProps<T extends BadgeTypes> {
14
- /** Selects the shape: a fully rounded `pill-color`, a square-cornered `color`, or a neutral `modern`. */
15
- type?: T;
16
- /** Sets the padding and text size. */
17
- size?: Sizes;
18
- /** Sets the fill, text and border colours; the options available depend on `type`. */
19
- color?: BadgeColor<T>;
20
- /** Label shown inside the badge. */
21
- children: ReactNode;
22
- /** Layout classes merged onto the root `View`, such as margins. Colour goes through `color`. */
23
- className?: string;
24
- /** Overrides the generated `testID` (defaults to `fd-badge`). */
25
- 'data-testid'?: string;
26
- }
27
- /**
28
- * React Native `Badge` — a compact label for statuses, categories, counts and tags, drawn as a
29
- * `View` holding a `Text`. All variants and sizes match web.
30
- *
31
- * - The ring becomes a `border` on every variant, since `ring-inset` is unverified under `react-native-css`.
32
- * - Label and icon colours are light-mode hex values, not tokens: `Text` ignores `className` under the
33
- * current `react-native-css` preview and an icon has no `currentColor` to inherit (see `Badge.styles.ts`).
34
- * - `BadgeWithFlag` is not available yet because `Flag` has no React Native implementation.
35
- * - `className` accepts layout classes only; transitions have no equivalent.
36
- *
37
- * @summary compact status, category, or count label (React Native)
38
- */
39
- export declare const Badge: <T extends BadgeTypes>({ type, size, color, children, className, "data-testid": dataTestId, }: BadgeProps<T>) => import("react").JSX.Element;
40
- interface BadgeWithDotProps<T extends BadgeTypes> {
41
- type?: T;
42
- size?: Sizes;
43
- color?: BadgeTypeToColorMap<typeof styles.types.addon>[T];
44
- className?: string;
45
- children: ReactNode;
46
- /** Overrides the generated `testID` (defaults to `fd-badge`); the `Dot` derives `--dot` from it. */
47
- 'data-testid'?: string;
48
- }
49
- /** `Badge` variant with a coloured status dot before the label. */
50
- export declare const BadgeWithDot: <T extends BadgeTypes>({ size, color, type, className, children, "data-testid": dataTestId, }: BadgeWithDotProps<T>) => import("react").JSX.Element;
51
- interface BadgeWithIconProps<T extends BadgeTypes> {
52
- type?: T;
53
- size?: Sizes;
54
- color?: BadgeTypeToColorMap<typeof styles.types.addon>[T];
55
- iconLeading?: IconComponent;
56
- iconTrailing?: IconComponent;
57
- children: ReactNode;
58
- className?: string;
59
- /** Overrides the generated `testID` (defaults to `fd-badge`); the leading/trailing icon derives `--icon` from it. */
60
- 'data-testid'?: string;
61
- }
62
- /** `Badge` variant with a leading or trailing icon beside the label. */
63
- export declare const BadgeWithIcon: <T extends BadgeTypes>({ size, color, type, iconLeading: IconLeading, iconTrailing: IconTrailing, children, className, "data-testid": dataTestId, }: BadgeWithIconProps<T>) => import("react").JSX.Element;
64
- interface BadgeWithImageProps<T extends BadgeTypes> {
65
- type?: T;
66
- size?: Sizes;
67
- /** URL of the image shown before the label. */
68
- imgSrc: string;
69
- color?: BadgeColor<T>;
70
- children: ReactNode;
71
- }
72
- /** `Badge` variant with a small round image before the label. */
73
- export declare const BadgeWithImage: <T extends BadgeTypes>({ size, color, type, imgSrc, children, }: BadgeWithImageProps<T>) => import("react").JSX.Element;
74
- interface BadgeWithButtonProps<T extends BadgeTypes> {
75
- type?: T;
76
- size?: Sizes;
77
- /** Icon shown in the trailing button; defaults to a close `X`. */
78
- icon?: IconComponent;
79
- color?: BadgeColor<T>;
80
- children: ReactNode;
81
- /** The accessible name of the button. */
82
- buttonLabel?: string;
83
- /** Called when the trailing button is pressed. */
84
- onButtonClick?: PressableProps['onPress'];
85
- /** Overrides the generated `testID` (defaults to `fd-badge`); the dismiss button derives `--close-button` from it. */
86
- 'data-testid'?: string;
87
- }
88
- /** `Badge` variant with a trailing icon button, typically to dismiss or remove the tag. */
89
- export declare const BadgeWithButton: <T extends BadgeTypes>({ size, color, type, icon: Icon, buttonLabel, onButtonClick, children, "data-testid": dataTestId, }: BadgeWithButtonProps<T>) => import("react").JSX.Element;
90
- interface BadgeIconProps<T extends BadgeTypes> {
91
- type?: T;
92
- size?: Sizes;
93
- icon: IconComponent;
94
- color?: BadgeColor<T>;
95
- }
96
- /** Icon-only `Badge` with no label text. */
97
- export declare const BadgeIcon: <T extends BadgeTypes>({ size, color, type, icon: Icon, }: BadgeIconProps<T>) => import("react").JSX.Element;
1
+ import { type BadgeColor as BadgeColorNext, type BadgeColors as BadgeColorsNext, BadgeIcon as BadgeIconNext, Badge as BadgeNext, type BadgeProps as BadgePropsNext, BadgeWithButton as BadgeWithButtonNext, BadgeWithDot as BadgeWithDotNext, BadgeWithIcon as BadgeWithIconNext, BadgeWithImage as BadgeWithImageNext } from '@flipdish/ui-library/components/atoms/Badges';
2
+ import type { BadgeTypes } from '../Badges/Badge/badge.types';
3
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
4
+ export declare const Badge: typeof BadgeNext;
5
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
6
+ export declare const BadgeWithDot: typeof BadgeWithDotNext;
7
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
8
+ export declare const BadgeWithIcon: typeof BadgeWithIconNext;
9
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
10
+ export declare const BadgeWithImage: typeof BadgeWithImageNext;
11
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
12
+ export declare const BadgeWithButton: typeof BadgeWithButtonNext;
13
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
14
+ export declare const BadgeIcon: typeof BadgeIconNext;
15
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
16
+ export type BadgeColors = BadgeColorsNext;
17
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
18
+ export type BadgeColor<T extends BadgeTypes> = BadgeColorNext<T>;
19
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
20
+ export type BadgeProps<T extends BadgeTypes> = BadgePropsNext<T>;
98
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Badge/index.native.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAoB,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAg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aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,aAAa,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAC1C,sHAAsH;IACtH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2FAA2F;AAC3F,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,UAAU,EAAE,qGASnD,oBAAoB,CAAC,CAAC,CAAC,gCAuBzB,CAAC;AAEF,UAAU,cAAc,CAAC,CAAC,SAAS,UAAU;IAC3C,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CACvB;AAED,4CAA4C;AAC5C,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,UAAU,EAAE,oCAK7C,cAAc,CAAC,CAAC,CAAC,gCAQnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Badge/index.native.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,UAAU,IAAI,cAAc,EACjC,KAAK,WAAW,IAAI,eAAe,EACnC,SAAS,IAAI,aAAa,EAC1B,KAAK,IAAI,SAAS,EAClB,KAAK,UAAU,IAAI,cAAc,EACjC,eAAe,IAAI,mBAAmB,EACtC,YAAY,IAAI,gBAAgB,EAChC,aAAa,IAAI,iBAAiB,EAClC,cAAc,IAAI,kBAAkB,EACrC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,yGAAyG;AACzG,eAAO,MAAM,KAAK,EAAE,OAAO,SAAqB,CAAC;AACjD,yGAAyG;AACzG,eAAO,MAAM,YAAY,EAAE,OAAO,gBAAmC,CAAC;AACtE,yGAAyG;AACzG,eAAO,MAAM,aAAa,EAAE,OAAO,iBAAqC,CAAC;AACzE,yGAAyG;AACzG,eAAO,MAAM,cAAc,EAAE,OAAO,kBAAuC,CAAC;AAC5E,yGAAyG;AACzG,eAAO,MAAM,eAAe,EAAE,OAAO,mBAAyC,CAAC;AAC/E,yGAAyG;AACzG,eAAO,MAAM,SAAS,EAAE,OAAO,aAA6B,CAAC;AAC7D,yGAAyG;AACzG,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAC1C,yGAAyG;AACzG,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AACjE,yGAAyG;AACzG,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC"}
@@ -1,66 +1,21 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { X } from '@flipdish/ui-icons';
3
- import { Dot } from '../Dot/index.js';
4
- import { cx } from '../../../utilities/cx/index.js';
5
- import { useResolvedTestId, joinTestId } from '../../../utilities/testIdUtils/index.js';
6
- import { useState } from 'react';
7
- import { View, Pressable, Image, Text } from 'react-native';
8
- import { styles } from './Badge.styles.js';
9
- import { layoutClasses, resolveNativeTone } from './badge.utils.js';
1
+ import { Badge as Badge$1, BadgeIcon as BadgeIcon$1, BadgeWithButton as BadgeWithButton$1, BadgeWithDot as BadgeWithDot$1, BadgeWithIcon as BadgeWithIcon$1, BadgeWithImage as BadgeWithImage$1 } from '../Badges/Badge/Badge.js';
10
2
 
11
- /** Root classes shared by every labelled variant: shape, fill, border and the layout half of the size. */
12
- const rootClass = (type, sizeClasses, tone, className) => cx(styles.native.common[type], 'border', tone.bg, tone.border, layoutClasses(sizeClasses), className);
13
- const Label = ({ size, color, children }) => (jsx(Text, { style: { color, fontWeight: '500', ...styles.native.text[size] }, children: children }));
14
- /**
15
- * React Native `Badge` — a compact label for statuses, categories, counts and tags, drawn as a
16
- * `View` holding a `Text`. All variants and sizes match web.
17
- *
18
- * - The ring becomes a `border` on every variant, since `ring-inset` is unverified under `react-native-css`.
19
- * - Label and icon colours are light-mode hex values, not tokens: `Text` ignores `className` under the
20
- * current `react-native-css` preview and an icon has no `currentColor` to inherit (see `Badge.styles.ts`).
21
- * - `BadgeWithFlag` is not available yet because `Flag` has no React Native implementation.
22
- * - `className` accepts layout classes only; transitions have no equivalent.
23
- *
24
- * @summary compact status, category, or count label (React Native)
25
- */
26
- const Badge = ({ type = 'pill-color', size = 'md', color = 'gray', children, className, 'data-testid': dataTestId, }) => {
27
- const badgeTestId = useResolvedTestId({ testId: dataTestId, segment: 'badge', rootName: 'badge' });
28
- const tone = resolveNativeTone('standard', type, color);
29
- return (jsx(View, { testID: badgeTestId, className: rootClass(type, styles.sizes.label[type][size], tone, className), children: jsx(Label, { size: size, color: tone.text, children: children }) }));
30
- };
31
- /** `Badge` variant with a coloured status dot before the label. */
32
- const BadgeWithDot = ({ size = 'md', color = 'gray', type = 'pill-color', className, children, 'data-testid': dataTestId, }) => {
33
- const badgeTestId = useResolvedTestId({ testId: dataTestId, segment: 'badge', rootName: 'badge' });
34
- const tone = resolveNativeTone('addon', type, color);
35
- const dotColor = styles.types.addon[type].styles[color].dotColor;
36
- return (jsxs(View, { testID: badgeTestId, className: rootClass(type, styles.sizes.dot[type][size], tone, className), children: [jsx(Dot, { color: dotColor, size: "sm", "data-testid": joinTestId(badgeTestId, 'dot') }), jsx(Label, { size: size, color: tone.text, children: children })] }));
37
- };
38
- /** `Badge` variant with a leading or trailing icon beside the label. */
39
- const BadgeWithIcon = ({ size = 'md', color = 'gray', type = 'pill-color', iconLeading: IconLeading, iconTrailing: IconTrailing, children, className, 'data-testid': dataTestId, }) => {
40
- const badgeTestId = useResolvedTestId({ testId: dataTestId, segment: 'badge', rootName: 'badge' });
41
- const tone = resolveNativeTone('addon', type, color);
42
- const placement = IconLeading ? 'leading' : 'trailing';
43
- const iconProps = { size: styles.native.iconSize, color: tone.addon, strokeWidth: styles.native.iconStrokeWidth };
44
- return (jsxs(View, { testID: badgeTestId, className: rootClass(type, styles.sizes.icon[type][size][placement], tone, className), children: [IconLeading && (jsx(View, { testID: joinTestId(badgeTestId, 'icon'), children: jsx(IconLeading, { ...iconProps }) })), jsx(Label, { size: size, color: tone.text, children: children }), IconTrailing && (jsx(View, { testID: joinTestId(badgeTestId, 'icon'), children: jsx(IconTrailing, { ...iconProps }) }))] }));
45
- };
46
- /** `Badge` variant with a small round image before the label. */
47
- const BadgeWithImage = ({ size = 'md', color = 'gray', type = 'pill-color', imgSrc, children, }) => {
48
- const tone = resolveNativeTone('standard', type, color);
49
- const { imageSize } = styles.native;
50
- return (jsxs(View, { className: rootClass(type, styles.sizes.media[type][size], tone), children: [jsx(Image, { source: { uri: imgSrc }, accessibilityLabel: "Badge image", style: { width: imageSize, height: imageSize, borderRadius: imageSize / 2 } }), jsx(Label, { size: size, color: tone.text, children: children })] }));
51
- };
52
- /** `Badge` variant with a trailing icon button, typically to dismiss or remove the tag. */
53
- const BadgeWithButton = ({ size = 'md', color = 'gray', type = 'pill-color', icon: Icon = X, buttonLabel, onButtonClick, children, 'data-testid': dataTestId, }) => {
54
- const badgeTestId = useResolvedTestId({ testId: dataTestId, segment: 'badge', rootName: 'badge' });
55
- const [pressed, setPressed] = useState(false);
56
- const tone = resolveNativeTone('standard', type, color);
57
- return (jsxs(View, { testID: badgeTestId, className: rootClass(type, styles.sizes.button[type][size], tone), children: [jsx(Label, { size: size, color: tone.text, children: children }), jsx(Pressable, { testID: joinTestId(badgeTestId, 'close-button'), accessibilityRole: "button", accessibilityLabel: buttonLabel, onPress: onButtonClick, onPressIn: () => setPressed(true), onPressOut: () => setPressed(false), className: cx('items-center justify-center p-0.5', type === 'pill-color' ? 'rounded-full' : 'rounded-[3px]', pressed && tone.buttonPressedBg), children: jsx(Icon, { size: styles.native.iconSize, color: pressed ? tone.buttonPressed : tone.button, strokeWidth: styles.native.iconStrokeWidth }) })] }));
58
- };
59
- /** Icon-only `Badge` with no label text. */
60
- const BadgeIcon = ({ size = 'md', color = 'gray', type = 'pill-color', icon: Icon, }) => {
61
- const tone = resolveNativeTone('standard', type, color);
62
- return (jsx(View, { className: cx(styles.native.common[type], 'border', tone.bg, tone.border, layoutClasses(styles.sizes.iconOnly[type][size])), children: jsx(Icon, { size: styles.native.iconSize, color: tone.addon, strokeWidth: styles.native.iconStrokeWidth }) }));
63
- };
3
+ // Deprecated path, kept so existing imports keep working until the next major: `Badge` and its variants now live in
4
+ // `atoms/Badges`. A re-export file is banned elsewhere; this one is a temporary deprecation path, and without it this
5
+ // path would resolve to the "not available on React Native" stub.
6
+ // `typeof` keeps the declarations pointing at the new module: the variants' props are private, so an inferred type cannot name them.
7
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
8
+ const Badge = Badge$1;
9
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
10
+ const BadgeWithDot = BadgeWithDot$1;
11
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
12
+ const BadgeWithIcon = BadgeWithIcon$1;
13
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
14
+ const BadgeWithImage = BadgeWithImage$1;
15
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
16
+ const BadgeWithButton = BadgeWithButton$1;
17
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Badges`. Removed in the next major. */
18
+ const BadgeIcon = BadgeIcon$1;
64
19
 
65
20
  export { Badge, BadgeIcon, BadgeWithButton, BadgeWithDot, BadgeWithIcon, BadgeWithImage };
66
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Badge/index.native.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","Close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AA,EAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAA,QAAA,EAC/HA,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,EAAA,CAAI,EAAA,CAChG;AAEX;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Badge/index.native.tsx"],"sourcesContent":[null],"names":["BadgeNext","BadgeWithDotNext","BadgeWithIconNext","BadgeWithImageNext","BadgeWithButtonNext","BadgeIconNext"],"mappings":";;AAAA;AACA;AACA;AACA;AAeA;AACO,MAAM,KAAK,GAAqBA;AACvC;AACO,MAAM,YAAY,GAA4BC;AACrD;AACO,MAAM,aAAa,GAA6BC;AACvD;AACO,MAAM,cAAc,GAA8BC;AACzD;AACO,MAAM,eAAe,GAA+BC;AAC3D;AACO,MAAM,SAAS,GAAyBC;;"}
@@ -0,0 +1,98 @@
1
+ import { type FC, type ReactNode } from 'react';
2
+ import { type PressableProps } from 'react-native';
3
+ import { styles } from './Badge.styles';
4
+ import type { BadgeTypes, BadgeTypeToColorMap, Sizes } from './badge.types';
5
+ type IconComponent = FC<{
6
+ size?: number;
7
+ color?: string;
8
+ strokeWidth?: number;
9
+ }>;
10
+ /** The colours a badge accepts for a given `type`; `modern` is neutral, so it only takes `gray`. */
11
+ export type BadgeColor<T extends BadgeTypes> = BadgeTypeToColorMap<typeof styles.types.standard>[T];
12
+ export interface BadgeProps<T extends BadgeTypes> {
13
+ /** Selects the shape: a fully rounded `pill-color`, a square-cornered `color`, or a neutral `modern`. */
14
+ type?: T;
15
+ /** Sets the padding and text size. */
16
+ size?: Sizes;
17
+ /** Sets the fill, text and border colours; the options available depend on `type`. */
18
+ color?: BadgeColor<T>;
19
+ /** Label shown inside the badge. */
20
+ children: ReactNode;
21
+ /** Layout classes merged onto the root `View`, such as margins. Colour goes through `color`. */
22
+ className?: string;
23
+ /** Overrides the generated `testID` (defaults to `fd-badge`). */
24
+ 'data-testid'?: string;
25
+ }
26
+ /**
27
+ * React Native `Badge` — a compact label for statuses, categories, counts and tags, drawn as a
28
+ * `View` holding a `Text`. All variants and sizes match web.
29
+ *
30
+ * - The ring becomes a `border` on every variant, since `ring-inset` is unverified under `react-native-css`.
31
+ * - Label and icon colours are light-mode hex values, not tokens: `Text` ignores `className` under the
32
+ * current `react-native-css` preview and an icon has no `currentColor` to inherit (see `Badge.styles.ts`).
33
+ * - `BadgeWithFlag` is not available yet because `Flag` has no React Native implementation.
34
+ * - `className` accepts layout classes only; transitions have no equivalent.
35
+ *
36
+ * @summary compact status, category, or count label (React Native)
37
+ */
38
+ export declare const Badge: <T extends BadgeTypes>({ type, size, color, children, className, "data-testid": dataTestId, }: BadgeProps<T>) => import("react").JSX.Element;
39
+ interface BadgeWithDotProps<T extends BadgeTypes> {
40
+ type?: T;
41
+ size?: Sizes;
42
+ color?: BadgeTypeToColorMap<typeof styles.types.addon>[T];
43
+ className?: string;
44
+ children: ReactNode;
45
+ /** Overrides the generated `testID` (defaults to `fd-badge`); the `Dot` derives `--dot` from it. */
46
+ 'data-testid'?: string;
47
+ }
48
+ /** `Badge` variant with a coloured status dot before the label. */
49
+ export declare const BadgeWithDot: <T extends BadgeTypes>({ size, color, type, className, children, "data-testid": dataTestId, }: BadgeWithDotProps<T>) => import("react").JSX.Element;
50
+ interface BadgeWithIconProps<T extends BadgeTypes> {
51
+ type?: T;
52
+ size?: Sizes;
53
+ color?: BadgeTypeToColorMap<typeof styles.types.addon>[T];
54
+ iconLeading?: IconComponent;
55
+ iconTrailing?: IconComponent;
56
+ children: ReactNode;
57
+ className?: string;
58
+ /** Overrides the generated `testID` (defaults to `fd-badge`); the leading/trailing icon derives `--icon` from it. */
59
+ 'data-testid'?: string;
60
+ }
61
+ /** `Badge` variant with a leading or trailing icon beside the label. */
62
+ export declare const BadgeWithIcon: <T extends BadgeTypes>({ size, color, type, iconLeading: IconLeading, iconTrailing: IconTrailing, children, className, "data-testid": dataTestId, }: BadgeWithIconProps<T>) => import("react").JSX.Element;
63
+ interface BadgeWithImageProps<T extends BadgeTypes> {
64
+ type?: T;
65
+ size?: Sizes;
66
+ /** URL of the image shown before the label. */
67
+ imgSrc: string;
68
+ color?: BadgeColor<T>;
69
+ children: ReactNode;
70
+ }
71
+ /** `Badge` variant with a small round image before the label. */
72
+ export declare const BadgeWithImage: <T extends BadgeTypes>({ size, color, type, imgSrc, children, }: BadgeWithImageProps<T>) => import("react").JSX.Element;
73
+ interface BadgeWithButtonProps<T extends BadgeTypes> {
74
+ type?: T;
75
+ size?: Sizes;
76
+ /** Icon shown in the trailing button; defaults to a close `X`. */
77
+ icon?: IconComponent;
78
+ color?: BadgeColor<T>;
79
+ children: ReactNode;
80
+ /** The accessible name of the button. */
81
+ buttonLabel?: string;
82
+ /** Called when the trailing button is pressed. */
83
+ onButtonClick?: PressableProps['onPress'];
84
+ /** Overrides the generated `testID` (defaults to `fd-badge`); the dismiss button derives `--close-button` from it. */
85
+ 'data-testid'?: string;
86
+ }
87
+ /** `Badge` variant with a trailing icon button, typically to dismiss or remove the tag. */
88
+ export declare const BadgeWithButton: <T extends BadgeTypes>({ size, color, type, icon: Icon, buttonLabel, onButtonClick, children, "data-testid": dataTestId, }: BadgeWithButtonProps<T>) => import("react").JSX.Element;
89
+ interface BadgeIconProps<T extends BadgeTypes> {
90
+ type?: T;
91
+ size?: Sizes;
92
+ icon: IconComponent;
93
+ color?: BadgeColor<T>;
94
+ }
95
+ /** Icon-only `Badge` with no label text. */
96
+ export declare const BadgeIcon: <T extends BadgeTypes>({ size, color, type, icon: Icon, }: BadgeIconProps<T>) => import("react").JSX.Element;
97
+ export {};
98
+ //# sourceMappingURL=Badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Badges/Badge/Badge.native.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAoB,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG5E,KAAK,aAAa,GAAG,EAAE,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjF,oGAAoG;AACpG,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI,mBAAmB,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpG,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,UAAU;IAC9C,yGAAyG;IACzG,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,sCAAsC;IACtC,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,sFAAsF;IACtF,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAUD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,UAAU,EAAE,wEAOz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