@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,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ var RadioButtonBase = require('./RadioButton/components/RadioButtonBase.cjs');
3
4
  var RadioButton = require('./RadioButton/RadioButton.cjs');
4
- var RadioButtonBase = require('./RadioButton/RadioButtonBase.cjs');
5
5
  var RadioGroup = require('./RadioGroup/RadioGroup.cjs');
6
6
 
7
7
 
8
8
 
9
- exports.RadioButton = RadioButton.RadioButton;
10
9
  exports.RadioButtonBase = RadioButtonBase.RadioButtonBase;
10
+ exports.RadioButton = RadioButton.RadioButton;
11
11
  exports.RadioGroup = RadioGroup.RadioGroup;
12
12
  //# sourceMappingURL=index.cjs.map
@@ -7,10 +7,10 @@
7
7
  * Each member's implementation, stories and docs live in its own folder (`RadioButton/RadioButton.tsx`), never as
8
8
  * `index.tsx`: the `exports` wildcard would make that folder a public path.
9
9
  */
10
+ export type { RadioButtonBaseProps } from './RadioButton/components/RadioButtonBase';
11
+ export { RadioButtonBase } from './RadioButton/components/RadioButtonBase';
10
12
  export type { RadioButtonProps } from './RadioButton/RadioButton';
11
13
  export { RadioButton } from './RadioButton/RadioButton';
12
- export type { RadioButtonBaseProps } from './RadioButton/RadioButtonBase';
13
- export { RadioButtonBase } from './RadioButton/RadioButtonBase';
14
14
  export type { RadioGroupProps } from './RadioGroup/RadioGroup';
15
15
  export { RadioGroup } from './RadioGroup/RadioGroup';
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Radios/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Radios/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,4 +1,4 @@
1
+ export { RadioButtonBase } from './RadioButton/components/RadioButtonBase.js';
1
2
  export { RadioButton } from './RadioButton/RadioButton.js';
2
- export { RadioButtonBase } from './RadioButton/RadioButtonBase.js';
3
3
  export { RadioGroup } from './RadioGroup/RadioGroup.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,58 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var uiIcons = require('@flipdish/ui-icons');
5
- var Input = require('@flipdish/ui-library/components/atoms/Input');
6
- var LoadingIndicator = require('@flipdish/ui-library/components/atoms/LoadingIndicator');
7
- var cx = require('@flipdish/ui-library/utilities/cx');
8
- var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
9
- var reactAriaComponents = require('react-aria-components');
10
- var useDebouncedSearch = require('../../../hooks/__internal__/useDebouncedSearch/useDebouncedSearch.cjs');
11
- var useHotkeyHint = require('../../../hooks/__internal__/useHotkeyHint/useHotkeyHint.cjs');
3
+ var Inputs = require('@flipdish/ui-library/components/atoms/Inputs');
12
4
 
13
- const sizes = cx.sortCx({
14
- sm: { input: 'py-2 pr-9 pl-9 text-sm', icon: 'left-3 size-4 stroke-[2.25px]', clear: 'right-2', shortcut: 'pr-1.5' },
15
- md: { input: 'py-2 pr-9 pl-10 text-md', icon: 'left-3 size-5', clear: 'right-2', shortcut: 'pr-2' },
16
- lg: { input: 'py-2.5 pr-9.5 pl-10.5 text-md', icon: 'left-3.5 size-5', clear: 'right-2.5', shortcut: 'pr-2.5' },
17
- });
18
- /**
19
- * A search box with a magnifier, a clear button once it holds text, and Escape to clear. Use it
20
- * wherever typing filters a list or table; for a field that collects a value, use `Input`.
21
- *
22
- * @summary search box that filters as you type and clears in one press
23
- */
24
- const SearchInput = ({ label, hint, placeholder, size = 'md', clearLabel = 'Clear search', isLoading = false, debounce, shortcut, className, wrapperClassName, inputClassName, ref, 'data-testid': dataTestId, ...props }) => {
25
- const inputTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'search-input', rootName: 'search-input' });
26
- const shortcutLabel = useHotkeyHint.useHotkeyHint(shortcut === true ? 'mod+k' : shortcut || null);
27
- const { onChange, onSubmit, onClear, defaultValue, ...fieldProps } = props;
28
- const draft = useDebouncedSearch.useDebouncedSearch({
29
- value: props.value ?? '',
30
- initialValue: defaultValue,
31
- onChange: (next) => onChange?.(next),
32
- delay: debounce ?? 0,
33
- });
34
- // With `debounce` the field shows its draft and commits through the hook; without it the props reach the field untouched.
35
- // The draft already starts from `defaultValue`, so the field gets only `value`, never both.
36
- const debouncedProps = {
37
- ...fieldProps,
38
- value: draft.draft,
39
- onChange: draft.change,
40
- onSubmit: (value) => {
41
- draft.submit();
42
- onSubmit?.(value);
43
- },
44
- onClear: () => {
45
- draft.clear();
46
- onClear?.();
47
- },
48
- };
49
- return (jsxRuntime.jsx(reactAriaComponents.SearchField, { "aria-label": label ? undefined : placeholder, ...(debounce === undefined ? props : debouncedProps), className: cx.cx('group/search flex h-max w-full flex-col items-start gap-1.5', className), children: ({ isInvalid, isDisabled }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label && jsxRuntime.jsx(Input.Label, { isInvalid: isInvalid, children: label }), jsxRuntime.jsxs(reactAriaComponents.Group, { isDisabled: isDisabled, isInvalid: isInvalid, className: ({ isFocusWithin }) => cx.cx('relative flex w-full items-center rounded-lg bg-primary shadow-xs ring-1 ring-primary transition-shadow duration-100 ease-linear ring-inset', isFocusWithin && !isDisabled && 'ring-2 ring-brand', isDisabled && 'cursor-not-allowed opacity-50', isInvalid && 'ring-error_subtle', isInvalid && isFocusWithin && 'ring-2 ring-error', wrapperClassName), children: [isLoading ? (
50
- // In the magnifier's slot, with its size classes, so the field does not shift; the input's `aria-busy` carries the state.
51
- jsxRuntime.jsx("span", { "aria-hidden": "true", "data-testid": testIdUtils.joinTestId(inputTestId, 'loading'), className: cx.cx('pointer-events-none absolute flex items-center justify-center', sizes[size].icon), children: jsxRuntime.jsx(LoadingIndicator.LoadingIndicator, { size: "xs" }) })) : (jsxRuntime.jsx(uiIcons.SearchLg, { "aria-hidden": "true", className: cx.cx('pointer-events-none absolute text-fg-quaternary', sizes[size].icon) })), jsxRuntime.jsx(reactAriaComponents.Input, { ref: ref, "data-testid": inputTestId, placeholder: placeholder, "aria-busy": isLoading || undefined, className: cx.cx(
52
- // The browser draws its own cancel control on a search input; the clear button below replaces it.
53
- 'm-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:hidden', sizes[size].input, inputClassName) }), jsxRuntime.jsx(reactAriaComponents.Button, { "aria-label": clearLabel, "data-testid": testIdUtils.joinTestId(inputTestId, 'clear'), className: cx.cx('absolute flex cursor-pointer items-center justify-center rounded-md p-1 text-fg-quaternary outline-focus-ring transition duration-100 ease-linear group-data-empty/search:hidden group-data-disabled/search:hidden group-data-readonly/search:hidden hover:text-fg-quaternary_hover focus-visible:outline-2', sizes[size].clear), children: jsxRuntime.jsx(uiIcons.XClose, { "aria-hidden": "true", className: "size-4 stroke-[2.25px]" }) }), shortcut && (jsxRuntime.jsx("div", { className: cx.cx('pointer-events-none absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 group-data-empty/search:md:flex', sizes[size].shortcut), children: jsxRuntime.jsx("span", { "aria-hidden": "true", className: "rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset", children: shortcutLabel }) }))] }), hint && jsxRuntime.jsx(Input.HintText, { isInvalid: isInvalid, children: hint })] })) }));
54
- };
55
- SearchInput.displayName = 'SearchInput';
5
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Inputs`. Removed in the next major. */
6
+ const SearchInput = Inputs.SearchInput;
56
7
 
57
8
  exports.SearchInput = SearchInput;
58
9
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/SearchInput/index.tsx"],"sourcesContent":[null],"names":["sortCx","useResolvedTestId","useHotkeyHint","useDebouncedSearch","_jsx","AriaSearchField","cx","_jsxs","_Fragment","Label","AriaGroup","joinTestId","LoadingIndicator","SearchLg","AriaInput","AriaButton","XClose","HintText"],"mappings":";;;;;;;;;;;;AAaA,MAAM,KAAK,GAAGA,SAAM,CAAC;AACnB,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE,+BAA+B,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACpH,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;AACnG,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,+BAA+B,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,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GAAG,EAAE,GAAG,EAAA,aAAA,EACK,WAAW,EACxB,WAAW,EAAE,WAAW,EAAA,WAAA,EACb,SAAS,IAAI,SAAS,EACjC,SAAS,EAAER,KAAE;;4BAEX,gKAAgK,EAChK,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EACjB,cAAc,CACf,GACD,EAEFF,cAAA,CAACW,0BAAU,EAAA,EAAA,YAAA,EACG,UAAU,iBACTJ,sBAAU,CAAC,WAAW,EAAE,OAAO,CAAC,EAC7C,SAAS,EAAEL,KAAE,CACX,6SAA6S,EAC7S,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAClB,YAEDF,cAAA,CAACY,cAAM,mBAAa,MAAM,EAAC,SAAS,EAAC,wBAAwB,EAAA,CAAG,GACrD,EACZ,QAAQ,KACPZ,cAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAEE,KAAE,CACX,2LAA2L,EAC3L,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CACrB,EAAA,QAAA,EAEDF,cAAA,CAAA,MAAA,EAAA,EAAA,aAAA,EACc,MAAM,EAClB,SAAS,EAAC,qGAAqG,EAAA,QAAA,EAE9G,aAAa,GACT,EAAA,CACH,CACP,IACS,EACX,IAAI,IAAIA,cAAA,CAACa,cAAQ,IAAC,SAAS,EAAE,SAAS,EAAA,QAAA,EAAG,IAAI,GAAY,CAAA,EAAA,CACzD,CACJ,EAAA,CACe;AAEtB;AAEA,WAAW,CAAC,WAAW,GAAG,aAAa;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/SearchInput/index.tsx"],"sourcesContent":[null],"names":["SearchInputNext"],"mappings":";;;;AAMA;AACO,MAAM,WAAW,GAAGA;;"}
@@ -1,47 +1,9 @@
1
- import type { ReactNode, Ref } from 'react';
2
- import type { SearchFieldProps as AriaSearchFieldProps } from 'react-aria-components';
3
- export interface SearchInputProps extends Omit<AriaSearchFieldProps, 'children' | 'className' | 'style'> {
4
- /** Visible label above the field. Without one, pass `aria-label`; the placeholder alone does not name the field once it holds a value. */
5
- label?: string;
6
- /** Helper text under the field. */
7
- hint?: ReactNode;
8
- /** Placeholder shown while the field is empty. */
9
- placeholder?: string;
10
- /** Height, padding and text size. */
11
- size?: 'sm' | 'md' | 'lg';
12
- /** Accessible name of the clear button. */
13
- clearLabel?: string;
14
- /** A search is running: a spinner takes the magnifier's place and the input is `aria-busy`, so results stay readable. */
15
- isLoading?: boolean;
16
- /**
17
- * Commits typing to `onChange` only once it pauses for this many milliseconds, with Enter and the clear button committing at
18
- * once. The field keeps its own draft meanwhile; a `value` changed elsewhere, by Back or a reset, replaces the draft.
19
- */
20
- debounce?: number;
21
- /**
22
- * Keyboard shortcut hint shown while the field is empty. `true` shows the search shortcut (⌘K on
23
- * macOS, Ctrl K elsewhere); a shortcut such as `mod+j` is drawn for the user's platform.
24
- */
25
- shortcut?: string | boolean;
26
- /** Extra classes merged onto the outer field. */
27
- className?: string;
28
- /** Extra classes merged onto the bordered group around the input. */
29
- wrapperClassName?: string;
30
- /** Extra classes merged onto the `<input>`. */
31
- inputClassName?: string;
32
- /** Ref forwarded to the `<input>`. */
33
- ref?: Ref<HTMLInputElement>;
34
- /** Overrides the `<input>`'s `data-testid` (defaults to `fd-search-input`). The clear button derives `<root>--clear`. */
35
- 'data-testid'?: string;
36
- }
37
- /**
38
- * A search box with a magnifier, a clear button once it holds text, and Escape to clear. Use it
39
- * wherever typing filters a list or table; for a field that collects a value, use `Input`.
40
- *
41
- * @summary search box that filters as you type and clears in one press
42
- */
1
+ import { type SearchInputProps as SearchInputPropsNext } from '@flipdish/ui-library/components/atoms/Inputs';
2
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Inputs`. Removed in the next major. */
43
3
  export declare const SearchInput: {
44
- ({ label, hint, placeholder, size, clearLabel, isLoading, debounce, shortcut, className, wrapperClassName, inputClassName, ref, "data-testid": dataTestId, ...props }: SearchInputProps): import("react").JSX.Element;
4
+ ({ label, hint, placeholder, size, clearLabel, isLoading, debounce, shortcut, className, wrapperClassName, inputClassName, ref, "data-testid": dataTestId, ...props }: SearchInputPropsNext): import("react").JSX.Element;
45
5
  displayName: string;
46
6
  };
7
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Inputs`. Removed in the next major. */
8
+ export type SearchInputProps = SearchInputPropsNext;
47
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SearchInput/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAWtF,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IACtG,0IAA0I;IAC1I,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yHAAyH;IACzH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sCAAsC;IACtC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC5B,yHAAyH;IACzH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW;2KAerB,gBAAgB;;CA0GlB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SearchInput/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAkC,KAAK,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAE7I,yGAAyG;AACzG,eAAO,MAAM,WAAW;;;CAAkB,CAAC;AAC3C,yGAAyG;AACzG,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC"}
@@ -1,56 +1,7 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { SearchLg, XClose } from '@flipdish/ui-icons';
3
- import { Label, HintText } from '@flipdish/ui-library/components/atoms/Input';
4
- import { LoadingIndicator } from '@flipdish/ui-library/components/atoms/LoadingIndicator';
5
- import { sortCx, cx } from '@flipdish/ui-library/utilities/cx';
6
- import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
7
- import { SearchField, Group, Input, Button } from 'react-aria-components';
8
- import { useDebouncedSearch } from '../../../hooks/__internal__/useDebouncedSearch/useDebouncedSearch.js';
9
- import { useHotkeyHint } from '../../../hooks/__internal__/useHotkeyHint/useHotkeyHint.js';
1
+ import { SearchInput as SearchInput$1 } from '@flipdish/ui-library/components/atoms/Inputs';
10
2
 
11
- const sizes = sortCx({
12
- sm: { input: 'py-2 pr-9 pl-9 text-sm', icon: 'left-3 size-4 stroke-[2.25px]', clear: 'right-2', shortcut: 'pr-1.5' },
13
- md: { input: 'py-2 pr-9 pl-10 text-md', icon: 'left-3 size-5', clear: 'right-2', shortcut: 'pr-2' },
14
- lg: { input: 'py-2.5 pr-9.5 pl-10.5 text-md', icon: 'left-3.5 size-5', clear: 'right-2.5', shortcut: 'pr-2.5' },
15
- });
16
- /**
17
- * A search box with a magnifier, a clear button once it holds text, and Escape to clear. Use it
18
- * wherever typing filters a list or table; for a field that collects a value, use `Input`.
19
- *
20
- * @summary search box that filters as you type and clears in one press
21
- */
22
- const SearchInput = ({ label, hint, placeholder, size = 'md', clearLabel = 'Clear search', isLoading = false, debounce, shortcut, className, wrapperClassName, inputClassName, ref, 'data-testid': dataTestId, ...props }) => {
23
- const inputTestId = useResolvedTestId({ testId: dataTestId, segment: 'search-input', rootName: 'search-input' });
24
- const shortcutLabel = useHotkeyHint(shortcut === true ? 'mod+k' : shortcut || null);
25
- const { onChange, onSubmit, onClear, defaultValue, ...fieldProps } = props;
26
- const draft = useDebouncedSearch({
27
- value: props.value ?? '',
28
- initialValue: defaultValue,
29
- onChange: (next) => onChange?.(next),
30
- delay: debounce ?? 0,
31
- });
32
- // With `debounce` the field shows its draft and commits through the hook; without it the props reach the field untouched.
33
- // The draft already starts from `defaultValue`, so the field gets only `value`, never both.
34
- const debouncedProps = {
35
- ...fieldProps,
36
- value: draft.draft,
37
- onChange: draft.change,
38
- onSubmit: (value) => {
39
- draft.submit();
40
- onSubmit?.(value);
41
- },
42
- onClear: () => {
43
- draft.clear();
44
- onClear?.();
45
- },
46
- };
47
- return (jsx(SearchField, { "aria-label": label ? undefined : placeholder, ...(debounce === undefined ? props : debouncedProps), className: cx('group/search flex h-max w-full flex-col items-start gap-1.5', className), children: ({ isInvalid, isDisabled }) => (jsxs(Fragment, { children: [label && jsx(Label, { isInvalid: isInvalid, children: label }), jsxs(Group, { isDisabled: isDisabled, isInvalid: isInvalid, className: ({ isFocusWithin }) => cx('relative flex w-full items-center rounded-lg bg-primary shadow-xs ring-1 ring-primary transition-shadow duration-100 ease-linear ring-inset', isFocusWithin && !isDisabled && 'ring-2 ring-brand', isDisabled && 'cursor-not-allowed opacity-50', isInvalid && 'ring-error_subtle', isInvalid && isFocusWithin && 'ring-2 ring-error', wrapperClassName), children: [isLoading ? (
48
- // In the magnifier's slot, with its size classes, so the field does not shift; the input's `aria-busy` carries the state.
49
- jsx("span", { "aria-hidden": "true", "data-testid": joinTestId(inputTestId, 'loading'), className: cx('pointer-events-none absolute flex items-center justify-center', sizes[size].icon), children: jsx(LoadingIndicator, { size: "xs" }) })) : (jsx(SearchLg, { "aria-hidden": "true", className: cx('pointer-events-none absolute text-fg-quaternary', sizes[size].icon) })), jsx(Input, { ref: ref, "data-testid": inputTestId, placeholder: placeholder, "aria-busy": isLoading || undefined, className: cx(
50
- // The browser draws its own cancel control on a search input; the clear button below replaces it.
51
- 'm-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:hidden', sizes[size].input, inputClassName) }), jsx(Button, { "aria-label": clearLabel, "data-testid": joinTestId(inputTestId, 'clear'), className: cx('absolute flex cursor-pointer items-center justify-center rounded-md p-1 text-fg-quaternary outline-focus-ring transition duration-100 ease-linear group-data-empty/search:hidden group-data-disabled/search:hidden group-data-readonly/search:hidden hover:text-fg-quaternary_hover focus-visible:outline-2', sizes[size].clear), children: jsx(XClose, { "aria-hidden": "true", className: "size-4 stroke-[2.25px]" }) }), shortcut && (jsx("div", { className: cx('pointer-events-none absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 group-data-empty/search:md:flex', sizes[size].shortcut), children: jsx("span", { "aria-hidden": "true", className: "rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset", children: shortcutLabel }) }))] }), hint && jsx(HintText, { isInvalid: isInvalid, children: hint })] })) }));
52
- };
53
- SearchInput.displayName = 'SearchInput';
3
+ /** @deprecated Import from `@flipdish/ui-library/components/atoms/Inputs`. Removed in the next major. */
4
+ const SearchInput = SearchInput$1;
54
5
 
55
6
  export { SearchInput };
56
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/SearchInput/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaSearch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,QAAQ,IAAC,SAAS,EAAE,SAAS,EAAA,QAAA,EAAG,IAAI,GAAY,CAAA,EAAA,CACzD,CACJ,EAAA,CACe;AAEtB;AAEA,WAAW,CAAC,WAAW,GAAG,aAAa;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/SearchInput/index.tsx"],"sourcesContent":[null],"names":["SearchInputNext"],"mappings":";;AAMA;AACO,MAAM,WAAW,GAAGA;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
- var Input = require('@flipdish/ui-library/components/atoms/Input');
4
+ var Inputs = require('@flipdish/ui-library/components/atoms/Inputs');
5
5
  var cx = require('@flipdish/ui-library/utilities/cx');
6
6
  var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
7
7
  var React = require('react');
@@ -29,7 +29,7 @@ const Slider = ({ labelPosition = 'default', minValue = 0, maxValue = 100, label
29
29
  const hintId = React.useId();
30
30
  // react-aria's slider has no description slot, so the hint is linked to the thumbs by id.
31
31
  const describedBy = ariaIds_utils.joinIds(ariaDescribedBy, hint && hintId);
32
- return (jsxRuntime.jsxs(reactAriaComponents.Slider, { ...rest, minValue, maxValue, formatOptions: formatOptions ?? defaultFormatOptions, "aria-describedby": describedBy, "data-testid": sliderTestId, className: (state) => cx.cx('flex flex-col gap-1.5', typeof className === 'function' ? className(state) : className), children: [label ? jsxRuntime.jsx(Input.Label, { children: label }) : null, jsxRuntime.jsx(reactAriaComponents.SliderTrack, { className: cx.cx('relative h-6 w-full', labelPosition === 'bottom' && 'mb-8', labelPosition === 'top-floating' && label && 'mt-9'), "data-testid": testIdUtils.joinTestId(sliderTestId, 'track'), children: ({ state: { values, getThumbValue, getThumbPercent, getFormattedValue } }) => {
32
+ return (jsxRuntime.jsxs(reactAriaComponents.Slider, { ...rest, minValue, maxValue, formatOptions: formatOptions ?? defaultFormatOptions, "aria-describedby": describedBy, "data-testid": sliderTestId, className: (state) => cx.cx('flex flex-col gap-1.5', typeof className === 'function' ? className(state) : className), children: [label ? jsxRuntime.jsx(Inputs.Label, { children: label }) : null, jsxRuntime.jsx(reactAriaComponents.SliderTrack, { className: cx.cx('relative h-6 w-full', labelPosition === 'bottom' && 'mb-8', labelPosition === 'top-floating' && label && 'mt-9'), "data-testid": testIdUtils.joinTestId(sliderTestId, 'track'), children: ({ state: { values, getThumbValue, getThumbPercent, getFormattedValue } }) => {
33
33
  const left = values.length === 1 ? 0 : getThumbPercent(0);
34
34
  const width = values.length === 1 ? getThumbPercent(0) : getThumbPercent(1) - left;
35
35
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "absolute top-1/2 h-2 w-full -translate-y-1/2 rounded-full bg-quaternary" }), jsxRuntime.jsx("span", { className: "absolute top-1/2 h-2 w-full -translate-y-1/2 rounded-full bg-brand-solid", style: {
@@ -40,7 +40,7 @@ const Slider = ({ labelPosition = 'default', minValue = 0, maxValue = 100, label
40
40
  // biome-ignore lint/suspicious/noArrayIndexKey: static, ordered list of thumbs
41
41
  , { index: index, isInvalid: isInvalid, "data-testid": testIdUtils.joinTestId(sliderTestId, `thumb-${index}`), className: ({ isFocusVisible, isDragging }) => cx.cx('top-1/2 box-border size-6 cursor-grab rounded-full bg-slider-handle-bg shadow-md ring-2 ring-slider-handle-border ring-inset', isFocusVisible && 'outline-2 outline-offset-2 outline-focus-ring', isDragging && 'cursor-grabbing'), children: jsxRuntime.jsx(reactAriaComponents.SliderOutput, { className: cx.cx('whitespace-nowrap', styles[labelPosition]), "data-testid": testIdUtils.joinTestId(sliderTestId, `output-${index}`), children: labelFormatter ? labelFormatter(getThumbValue(index)) : getFormattedValue(getThumbValue(index) / 100) }) }, index));
42
42
  })] }));
43
- } }), hint ? jsxRuntime.jsx(Input.HintText, { id: hintId, children: hint }) : null] }));
43
+ } }), hint ? jsxRuntime.jsx(Inputs.HintText, { id: hintId, children: hint }) : null] }));
44
44
  };
45
45
 
46
46
  exports.Slider = Slider;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Slider/index.tsx"],"sourcesContent":[null],"names":["sortCx","useResolvedTestId","useId","joinIds","_jsxs","AriaSlider","cx","_jsx","Label","AriaSliderTrack","joinTestId","_Fragment","AriaSliderThumb","AriaSliderOutput","HintText"],"mappings":";;;;;;;;;;AAeA,MAAM,MAAM,GAAGA,SAAM,CAAC;AACpB,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,MAAM,EAAE,4FAA4F;AACpG,IAAA,cAAc,EACZ,wKAAwK;AAC3K,CAAA,CAAC;AAiBF;;;;;AAKG;AACI,MAAM,MAAM,GAAG,CAAC,EACrB,aAAa,GAAG,SAAS,EACzB,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,GAAG,EACd,KAAK,EACL,IAAI,EACJ,cAAc,EACd,SAAS,EACT,aAAa,EACb,SAAS,EACT,kBAAkB,EAAE,eAAe,EACnC,aAAa,EAAE,UAAU,EACzB,GAAG,IAAI,EACK,KAAI;;AAEhB,IAAA,MAAM,oBAAoB,GAA6B;AACrD,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,qBAAqB,EAAE,CAAC;KACzB;AACD,IAAA,MAAM,YAAY,GAAGC,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AACrG,IAAA,MAAM,MAAM,GAAGC,WAAK,EAAE;;IAEtB,MAAM,WAAW,GAAGC,qBAAO,CAAC,eAAe,EAAE,IAAI,IAAI,MAAM,CAAC;IAE5D,QACEC,eAAA,CAACC,0BAAU,EAAA,EAAA,GACL,IAAI,EACF,QAAQ,EAAE,QAAQ,EACxB,aAAa,EAAE,aAAa,IAAI,oBAAoB,EAAA,kBAAA,EAClC,WAAW,EAAA,aAAA,EAChB,YAAY,EACzB,SAAS,EAAE,CAAC,KAAK,KAAKC,KAAE,CAAC,uBAAuB,EAA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,sBAAU,CAAC,YAAY,EAAE,CAAA,MAAA,EAAS,KAAK,EAAE,CAAC,EACvD,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,KACxCJ,KAAE,CACA,8HAA8H,EAC9H,cAAc,IAAI,+CAA+C,EACjE,UAAU,IAAI,iBAAiB,CAChC,EAAA,QAAA,EAGHC,eAACM,gCAAgB,EAAA,EACf,SAAS,EAAEP,KAAE,CAAC,mBAAmB,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,EAAA,aAAA,EAC5CI,sBAAU,CAAC,YAAY,EAAE,CAAA,OAAA,EAAU,KAAK,EAAE,CAAC,EAAA,QAAA,EAEvD,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAAG,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,EAAA,CACrF,IAjBd,KAAK,CAkBM;4BAEtB,CAAC,CAAC,CAAA,EAAA,CACD;gBAEP,CAAC,EAAA,CACe,EACjB,IAAI,GAAGH,cAAA,CAACO,cAAQ,EAAA,EAAC,EAAE,EAAE,MAAM,EAAA,QAAA,EAAG,IAAI,EAAA,CAAY,GAAG,IAAI,CAAA,EAAA,CAC3C;AAEjB;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Slider/index.tsx"],"sourcesContent":[null],"names":["sortCx","useResolvedTestId","useId","joinIds","_jsxs","AriaSlider","cx","_jsx","Label","AriaSliderTrack","joinTestId","_Fragment","AriaSliderThumb","AriaSliderOutput","HintText"],"mappings":";;;;;;;;;;AAeA,MAAM,MAAM,GAAGA,SAAM,CAAC;AACpB,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,MAAM,EAAE,4FAA4F;AACpG,IAAA,cAAc,EACZ,wKAAwK;AAC3K,CAAA,CAAC;AAiBF;;;;;AAKG;AACI,MAAM,MAAM,GAAG,CAAC,EACrB,aAAa,GAAG,SAAS,EACzB,QAAQ,GAAG,CAAC,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AAG,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,EAAA,CACrF,IAjBd,KAAK,CAkBM;4BAEtB,CAAC,CAAC,CAAA,EAAA,CACD;gBAEP,CAAC,EAAA,CACe,EACjB,IAAI,GAAGH,cAAA,CAACO,eAAQ,EAAA,EAAC,EAAE,EAAE,MAAM,EAAA,QAAA,EAAG,IAAI,EAAA,CAAY,GAAG,IAAI,CAAA,EAAA,CAC3C;AAEjB;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { Label, HintText } from '@flipdish/ui-library/components/atoms/Input';
2
+ import { Label, HintText } from '@flipdish/ui-library/components/atoms/Inputs';
3
3
  import { sortCx, cx } from '@flipdish/ui-library/utilities/cx';
4
4
  import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
5
5
  import { useId } from 'react';
@@ -1,57 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var Tooltip = require('@flipdish/ui-library/components/atoms/Tooltip');
5
- var cx = require('@flipdish/ui-library/utilities/cx');
6
- var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
7
- var React = require('react');
8
- var reactAriaComponents = require('react-aria-components');
9
- var componentGuard_utils = require('../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
3
+ var Buttons = require('@flipdish/ui-library/components/atoms/Buttons');
4
+ var IconButton = require('../Buttons/IconButton/IconButton.cjs');
10
5
 
11
- const styles = {
12
- secondary: 'bg-primary text-fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
13
- tertiary: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover',
14
- };
15
- /**
16
- * Compact icon-only button for toolbar, table, and card actions that should not
17
- * compete visually with primary calls-to-action. Renders as a `<button>` by
18
- * default; pass `href` to render as an `<a>` tag.
19
- *
20
- * @summary compact icon-only button for toolbar actions
21
- */
22
- const ButtonUtility = ({ tooltip, className, isDisabled, icon: Icon, size = 'sm', color = 'secondary', tooltipPlacement = 'top', 'data-testid': dataTestId, ...otherProps }) => {
23
- const buttonUtilityTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'button-utility', rootName: 'button-utility' });
24
- const href = 'href' in otherProps ? otherProps.href : undefined;
25
- const Component = href ? reactAriaComponents.Link : reactAriaComponents.Button;
26
- let props = {};
27
- if (href) {
28
- // react-aria writes `href=""` on the span for an `href` key that is present but undefined, so a disabled link drops the key.
29
- const { href: _href, ...withoutHref } = otherProps;
30
- props = {
31
- ...(isDisabled ? withoutHref : otherProps),
32
- // Without it react-aria keeps the span focusable and still fires `onPress`.
33
- isDisabled,
34
- // Since anchor elements do not support the `disabled` attribute and state,
35
- // we need to specify `data-rac` and `data-disabled` in order to be able
36
- // to use the `disabled:` selector in classes.
37
- ...(isDisabled ? { 'data-rac': true, 'data-disabled': true } : {}),
38
- };
39
- }
40
- else {
41
- props = {
42
- ...otherProps,
43
- type: otherProps.type || 'button',
44
- isDisabled,
45
- };
46
- }
47
- const content = (jsxRuntime.jsxs(Component, { "aria-label": tooltip, ...props, "data-testid": buttonUtilityTestId, className: cx.cx('group relative inline-flex h-max cursor-pointer items-center justify-center rounded-md p-1.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50', styles[color],
48
- // Icon styles
49
- '*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:text-current *:data-icon:transition-inherit-all', size === 'xs' ? '*:data-icon:size-4' : '*:data-icon:size-5', className), children: [componentGuard_utils.isReactComponent(Icon) && jsxRuntime.jsx(Icon, { "data-icon": true }), React.isValidElement(Icon) && Icon] }));
50
- if (tooltip) {
51
- return (jsxRuntime.jsx(Tooltip.Tooltip, { title: tooltip, placement: tooltipPlacement, isDisabled: isDisabled, offset: size === 'xs' ? 4 : 6, children: content }));
52
- }
53
- return content;
54
- };
6
+ /** @deprecated Use `IconButton` from `@flipdish/ui-library/components/atoms/Buttons`, which requires a `tooltip` or an `aria-label`. Removed in the next major. */
7
+ const ButtonUtility = Buttons.IconButton;
8
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
9
+ const styles = IconButton.styles;
55
10
 
56
11
  exports.ButtonUtility = ButtonUtility;
57
12
  exports.styles = styles;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","AriaLink","AriaButton","_jsxs","cx","isReactComponent","_jsx","isValidElement","Tooltip"],"mappings":";;;;;;;;;;AAWO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AA8CtF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,WAAW,EACnB,gBAAgB,GAAG,KAAK,EACxB,aAAa,EAAE,UAAU,EACzB,GAAG,UAAU,EACP,KAAI;AACV,IAAA,MAAM,mBAAmB,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AAC5H,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,UAAU,GAAG,UAAU,CAAC,IAAI,GAAG,SAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,GAAGC,wBAAQ,GAAGC,0BAAU;IAE9C,IAAI,KAAK,GAAG,EAAE;IAEd,IAAI,IAAI,EAAE;;QAER,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,UAA+B;AACvE,QAAA,KAAK,GAAG;YACN,IAAI,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;;YAE1C,UAAU;;;;AAKV,YAAA,IAAI,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;SACnE;IACH;SAAO;AACL,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;AAEb,YAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,QAAQ;YACjC,UAAU;SACX;IACH;IAEA,MAAM,OAAO,IACXC,eAAA,CAAC,SAAS,EAAA,EAAA,YAAA,EACI,OAAO,KACf,KAAK,EAAA,aAAA,EACI,mBAAmB,EAChC,SAAS,EAAEC,KAAE,CACX,4PAA4P,EAC5P,MAAM,CAAC,KAAK,CAAC;;AAGb,QAAA,kHAAkH,EAClH,IAAI,KAAK,IAAI,GAAG,oBAAoB,GAAG,oBAAoB,EAE3D,SAAS,CACV,EAAA,QAAA,EAAA,CAEAC,qCAAgB,CAAC,IAAI,CAAC,IAAIC,cAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAa,EAC5CC,oBAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAA,EAAA,CACnB,CACb;IAED,IAAI,OAAO,EAAE;AACX,QAAA,QACED,cAAA,CAACE,eAAO,EAAA,EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,EAAA,QAAA,EACxG,OAAO,EAAA,CACA;IAEd;AAEA,IAAA,OAAO,OAAO;AAChB;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["IconButtonNext","stylesNext"],"mappings":";;;;;AAcA;AACO,MAAM,aAAa,GAAGA;AAO7B;AACO,MAAM,MAAM,GAAsBC;;;"}
@@ -1,55 +1,13 @@
1
- import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';
2
- import type { ButtonProps as AriaButtonProps, LinkProps as AriaLinkProps, Placement } from 'react-aria-components';
3
- export declare const styles: {
4
- secondary: string;
5
- tertiary: string;
6
- };
7
- /**
8
- * Common props shared between button and anchor variants
9
- */
10
- export interface CommonProps {
11
- /** Disables the button and shows a disabled state */
12
- isDisabled?: boolean;
13
- /** The size variant of the button */
14
- size?: 'xs' | 'sm';
15
- /** The color variant of the button */
16
- color?: 'secondary' | 'tertiary';
17
- /** The icon to display in the button */
18
- icon?: FC<{
19
- className?: string;
20
- }> | ReactNode;
21
- /** The tooltip to display when hovering over the button */
22
- tooltip?: string;
23
- /** The placement of the tooltip */
24
- tooltipPlacement?: Placement;
25
- /** Overrides the `data-testid` (defaults to `fd-button-utility`). */
26
- 'data-testid'?: string;
27
- }
28
- /**
29
- * Props for the button variant (non-link)
30
- */
31
- export interface ButtonProps extends CommonProps, DetailedHTMLProps<Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'slot'>, HTMLButtonElement> {
32
- /** Slot name for react-aria component */
33
- slot?: AriaButtonProps['slot'];
34
- }
35
- /**
36
- * Props for the link variant (anchor tag)
37
- */
38
- interface LinkProps extends CommonProps, DetailedHTMLProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'>, HTMLAnchorElement> {
39
- /** Options for the configured client side router. */
40
- routerOptions?: AriaLinkProps['routerOptions'];
41
- /** Runs on a press of the link, alongside the navigation. */
42
- onPress?: AriaLinkProps['onPress'];
43
- }
44
- /** Union type of button and link props */
45
- export type Props = ButtonProps | LinkProps;
46
- /**
47
- * Compact icon-only button for toolbar, table, and card actions that should not
48
- * compete visually with primary calls-to-action. Renders as a `<button>` by
49
- * default; pass `href` to render as an `<a>` tag.
50
- *
51
- * @summary compact icon-only button for toolbar actions
52
- */
53
- export declare const ButtonUtility: ({ tooltip, className, isDisabled, icon: Icon, size, color, tooltipPlacement, "data-testid": dataTestId, ...otherProps }: Props) => import("react").JSX.Element;
54
- export {};
1
+ import { IconButton as IconButtonNext } from '@flipdish/ui-library/components/atoms/Buttons';
2
+ import { type ButtonProps as ButtonPropsNext, type CommonProps as CommonPropsNext, type Props as PropsNext, styles as stylesNext } from '../Buttons/IconButton/IconButton';
3
+ /** @deprecated Use `IconButton` from `@flipdish/ui-library/components/atoms/Buttons`, which requires a `tooltip` or an `aria-label`. Removed in the next major. */
4
+ export declare const ButtonUtility: (props: PropsNext) => ReturnType<typeof IconButtonNext>;
5
+ /** @deprecated Use `IconButtonProps` from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
6
+ export type Props = PropsNext;
7
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
8
+ export type ButtonProps = ButtonPropsNext;
9
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
10
+ export type CommonProps = CommonPropsNext;
11
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
12
+ export declare const styles: typeof stylesNext;
55
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1G,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,SAAS,IAAI,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAInH,eAAO,MAAM,MAAM;;;CAIlB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB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,KAAK,KAAK,IAAI,SAAS,EACvB,MAAM,IAAI,UAAU,EACrB,MAAM,kCAAkC,CAAC;AAE1C,mKAAmK;AACnK,eAAO,MAAM,aAAa,EAAqB,CAAC,KAAK,EAAE,SAAS,KAAK,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACvG,yHAAyH;AACzH,MAAM,MAAM,KAAK,GAAG,SAAS,CAAC;AAC9B,gHAAgH;AAChH,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAC1C,gHAAgH;AAChH,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAC1C,gHAAgH;AAChH,eAAO,MAAM,MAAM,EAAE,OAAO,UAAuB,CAAC"}
@@ -1,55 +1,10 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Tooltip } from '@flipdish/ui-library/components/atoms/Tooltip';
3
- import { cx } from '@flipdish/ui-library/utilities/cx';
4
- import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
5
- import { isValidElement } from 'react';
6
- import { Link, Button } from 'react-aria-components';
7
- import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
1
+ import { IconButton } from '@flipdish/ui-library/components/atoms/Buttons';
2
+ import { styles as styles$1 } from '../Buttons/IconButton/IconButton.js';
8
3
 
9
- const styles = {
10
- secondary: 'bg-primary text-fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
11
- tertiary: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover',
12
- };
13
- /**
14
- * Compact icon-only button for toolbar, table, and card actions that should not
15
- * compete visually with primary calls-to-action. Renders as a `<button>` by
16
- * default; pass `href` to render as an `<a>` tag.
17
- *
18
- * @summary compact icon-only button for toolbar actions
19
- */
20
- const ButtonUtility = ({ tooltip, className, isDisabled, icon: Icon, size = 'sm', color = 'secondary', tooltipPlacement = 'top', 'data-testid': dataTestId, ...otherProps }) => {
21
- const buttonUtilityTestId = useResolvedTestId({ testId: dataTestId, segment: 'button-utility', rootName: 'button-utility' });
22
- const href = 'href' in otherProps ? otherProps.href : undefined;
23
- const Component = href ? Link : Button;
24
- let props = {};
25
- if (href) {
26
- // react-aria writes `href=""` on the span for an `href` key that is present but undefined, so a disabled link drops the key.
27
- const { href: _href, ...withoutHref } = otherProps;
28
- props = {
29
- ...(isDisabled ? withoutHref : otherProps),
30
- // Without it react-aria keeps the span focusable and still fires `onPress`.
31
- isDisabled,
32
- // Since anchor elements do not support the `disabled` attribute and state,
33
- // we need to specify `data-rac` and `data-disabled` in order to be able
34
- // to use the `disabled:` selector in classes.
35
- ...(isDisabled ? { 'data-rac': true, 'data-disabled': true } : {}),
36
- };
37
- }
38
- else {
39
- props = {
40
- ...otherProps,
41
- type: otherProps.type || 'button',
42
- isDisabled,
43
- };
44
- }
45
- const content = (jsxs(Component, { "aria-label": tooltip, ...props, "data-testid": buttonUtilityTestId, className: cx('group relative inline-flex h-max cursor-pointer items-center justify-center rounded-md p-1.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50', styles[color],
46
- // Icon styles
47
- '*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:text-current *:data-icon:transition-inherit-all', size === 'xs' ? '*:data-icon:size-4' : '*:data-icon:size-5', className), children: [isReactComponent(Icon) && jsx(Icon, { "data-icon": true }), isValidElement(Icon) && Icon] }));
48
- if (tooltip) {
49
- return (jsx(Tooltip, { title: tooltip, placement: tooltipPlacement, isDisabled: isDisabled, offset: size === 'xs' ? 4 : 6, children: content }));
50
- }
51
- return content;
52
- };
4
+ /** @deprecated Use `IconButton` from `@flipdish/ui-library/components/atoms/Buttons`, which requires a `tooltip` or an `aria-label`. Removed in the next major. */
5
+ const ButtonUtility = IconButton;
6
+ /** @deprecated Not exported from `@flipdish/ui-library/components/atoms/Buttons`. Removed in the next major. */
7
+ const styles = styles$1;
53
8
 
54
9
  export { ButtonUtility, styles };
55
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","_jsx"],"mappings":";;;;;;;;AAWO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AA8CtF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,WAAW,EACnB,gBAAgB,GAAG,KAAK,EACxB,aAAa,EAAE,UAAU,EACzB,GAAG,UAAU,EACP,KAAI;AACV,IAAA,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AAC5H,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,UAAU,GAAG,UAAU,CAAC,IAAI,GAAG,SAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,GAAGA,IAAQ,GAAGC,MAAU;IAE9C,IAAI,KAAK,GAAG,EAAE;IAEd,IAAI,IAAI,EAAE;;QAER,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,UAA+B;AACvE,QAAA,KAAK,GAAG;YACN,IAAI,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;;YAE1C,UAAU;;;;AAKV,YAAA,IAAI,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;SACnE;IACH;SAAO;AACL,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;AAEb,YAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,QAAQ;YACjC,UAAU;SACX;IACH;IAEA,MAAM,OAAO,IACXC,IAAA,CAAC,SAAS,EAAA,EAAA,YAAA,EACI,OAAO,KACf,KAAK,EAAA,aAAA,EACI,mBAAmB,EAChC,SAAS,EAAE,EAAE,CACX,4PAA4P,EAC5P,MAAM,CAAC,KAAK,CAAC;;AAGb,QAAA,kHAAkH,EAClH,IAAI,KAAK,IAAI,GAAG,oBAAoB,GAAG,oBAAoB,EAE3D,SAAS,CACV,EAAA,QAAA,EAAA,CAEA,gBAAgB,CAAC,IAAI,CAAC,IAAIC,GAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAa,EAC5C,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAA,EAAA,CACnB,CACb;IAED,IAAI,OAAO,EAAE;AACX,QAAA,QACEA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,EAAA,QAAA,EACxG,OAAO,EAAA,CACA;IAEd;AAEA,IAAA,OAAO,OAAO;AAChB;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["IconButtonNext","stylesNext"],"mappings":";;;AAcA;AACO,MAAM,aAAa,GAAGA;AAO7B;AACO,MAAM,MAAM,GAAsBC;;"}