@flipdish/portal-library 7.12.0 → 8.0.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 (333) hide show
  1. package/README.md +22 -4
  2. package/dist/components/atoms/Tab/index.cjs.js +1 -1
  3. package/dist/components/atoms/Tab/index.cjs.js.map +1 -1
  4. package/dist/components/atoms/Tab/index.d.ts +4 -1
  5. package/dist/components/atoms/Tab/index.js +1 -1
  6. package/dist/components/atoms/Tab/index.js.map +1 -1
  7. package/dist/components/atoms/Tag/index.cjs.js +1 -1
  8. package/dist/components/atoms/Tag/index.cjs.js.map +1 -1
  9. package/dist/components/atoms/Tag/index.d.ts +3 -7
  10. package/dist/components/atoms/Tag/index.js +1 -1
  11. package/dist/components/atoms/Tag/index.js.map +1 -1
  12. package/dist/components/atoms/TextArea/index.cjs.js.map +1 -1
  13. package/dist/components/atoms/TextArea/index.d.ts +1 -1
  14. package/dist/components/atoms/TextArea/index.js.map +1 -1
  15. package/dist/components/atoms/TextField/index.cjs.js +1 -1
  16. package/dist/components/atoms/TextField/index.cjs.js.map +1 -1
  17. package/dist/components/atoms/TextField/index.d.ts +5 -22
  18. package/dist/components/atoms/TextField/index.js +1 -1
  19. package/dist/components/atoms/TextField/index.js.map +1 -1
  20. package/dist/components/molecules/AlertGlobal/index.cjs.js +1 -1
  21. package/dist/components/molecules/AlertGlobal/index.cjs.js.map +1 -1
  22. package/dist/components/molecules/AlertGlobal/index.d.ts +1 -8
  23. package/dist/components/molecules/AlertGlobal/index.js +1 -1
  24. package/dist/components/molecules/AlertGlobal/index.js.map +1 -1
  25. package/dist/components/molecules/Autocomplete/index.cjs.js +1 -1
  26. package/dist/components/molecules/Autocomplete/index.cjs.js.map +1 -1
  27. package/dist/components/molecules/Autocomplete/index.d.ts +1 -16
  28. package/dist/components/molecules/Autocomplete/index.js +1 -1
  29. package/dist/components/molecules/Autocomplete/index.js.map +1 -1
  30. package/dist/components/molecules/Pagination/index.cjs.js +1 -1
  31. package/dist/components/molecules/Pagination/index.cjs.js.map +1 -1
  32. package/dist/components/molecules/Pagination/index.d.ts +1 -12
  33. package/dist/components/molecules/Pagination/index.js +1 -1
  34. package/dist/components/molecules/Pagination/index.js.map +1 -1
  35. package/dist/components/molecules/QuantitySelector/index.cjs.js +1 -1
  36. package/dist/components/molecules/QuantitySelector/index.cjs.js.map +1 -1
  37. package/dist/components/molecules/QuantitySelector/index.d.ts +1 -7
  38. package/dist/components/molecules/QuantitySelector/index.js +1 -1
  39. package/dist/components/molecules/QuantitySelector/index.js.map +1 -1
  40. package/dist/components/molecules/Rating/index.cjs.js +1 -1
  41. package/dist/components/molecules/Rating/index.cjs.js.map +1 -1
  42. package/dist/components/molecules/Rating/index.d.ts +0 -15
  43. package/dist/components/molecules/Rating/index.js +1 -1
  44. package/dist/components/molecules/Rating/index.js.map +1 -1
  45. package/dist/components/molecules/SearchInput/index.cjs.js +1 -1
  46. package/dist/components/molecules/SearchInput/index.cjs.js.map +1 -1
  47. package/dist/components/molecules/SearchInput/index.d.ts +1 -5
  48. package/dist/components/molecules/SearchInput/index.js +1 -1
  49. package/dist/components/molecules/SearchInput/index.js.map +1 -1
  50. package/dist/components/organisms/AssetManager/LibraryTabContent/LibraryTabContentSkeleton.cjs.js +2 -0
  51. package/dist/components/organisms/AssetManager/LibraryTabContent/LibraryTabContentSkeleton.cjs.js.map +1 -0
  52. package/dist/components/organisms/AssetManager/LibraryTabContent/LibraryTabContentSkeleton.d.ts +11 -0
  53. package/dist/components/organisms/AssetManager/LibraryTabContent/LibraryTabContentSkeleton.js +2 -0
  54. package/dist/components/organisms/AssetManager/LibraryTabContent/LibraryTabContentSkeleton.js.map +1 -0
  55. package/dist/components/organisms/AssetManager/LibraryTabContent/index.cjs.js +1 -1
  56. package/dist/components/organisms/AssetManager/LibraryTabContent/index.cjs.js.map +1 -1
  57. package/dist/components/organisms/AssetManager/LibraryTabContent/index.d.ts +10 -10
  58. package/dist/components/organisms/AssetManager/LibraryTabContent/index.js +1 -1
  59. package/dist/components/organisms/AssetManager/LibraryTabContent/index.js.map +1 -1
  60. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.cjs.js +1 -1
  61. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.cjs.js.map +1 -1
  62. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.js +1 -1
  63. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.js.map +1 -1
  64. package/dist/components/organisms/AssetManager/assets.queryKeys.cjs.js +2 -0
  65. package/dist/components/organisms/AssetManager/assets.queryKeys.cjs.js.map +1 -0
  66. package/dist/components/organisms/AssetManager/assets.queryKeys.d.ts +13 -0
  67. package/dist/components/organisms/AssetManager/assets.queryKeys.js +2 -0
  68. package/dist/components/organisms/AssetManager/assets.queryKeys.js.map +1 -0
  69. package/dist/components/organisms/AssetManager/hooks/useGetAssets.cjs.js +1 -1
  70. package/dist/components/organisms/AssetManager/hooks/useGetAssets.cjs.js.map +1 -1
  71. package/dist/components/organisms/AssetManager/hooks/useGetAssets.js +1 -1
  72. package/dist/components/organisms/AssetManager/hooks/useGetAssets.js.map +1 -1
  73. package/dist/components/organisms/AssetManager/hooks/useUploadAsset.cjs.js +1 -1
  74. package/dist/components/organisms/AssetManager/hooks/useUploadAsset.cjs.js.map +1 -1
  75. package/dist/components/organisms/AssetManager/hooks/useUploadAsset.d.ts +1 -1
  76. package/dist/components/organisms/AssetManager/hooks/useUploadAsset.js +1 -1
  77. package/dist/components/organisms/AssetManager/hooks/useUploadAsset.js.map +1 -1
  78. package/dist/components/organisms/AssetManager/index.cjs.js +1 -1
  79. package/dist/components/organisms/AssetManager/index.cjs.js.map +1 -1
  80. package/dist/components/organisms/AssetManager/index.js +1 -1
  81. package/dist/components/organisms/AssetManager/index.js.map +1 -1
  82. package/dist/components/organisms/AssetManager/services/asset.service.cjs.js +1 -1
  83. package/dist/components/organisms/AssetManager/services/asset.service.cjs.js.map +1 -1
  84. package/dist/components/organisms/AssetManager/services/asset.service.d.ts +1 -3
  85. package/dist/components/organisms/AssetManager/services/asset.service.js +1 -1
  86. package/dist/components/organisms/AssetManager/services/asset.service.js.map +1 -1
  87. package/dist/components/organisms/AssetManager/types/index.cjs.js.map +1 -1
  88. package/dist/components/organisms/AssetManager/types/index.d.ts +4 -9
  89. package/dist/components/organisms/AssetManager/types/index.js.map +1 -1
  90. package/dist/components/organisms/FileUpload/components/FileDropZone.cjs.js +1 -1
  91. package/dist/components/organisms/FileUpload/components/FileDropZone.cjs.js.map +1 -1
  92. package/dist/components/organisms/FileUpload/components/FileDropZone.js +1 -1
  93. package/dist/components/organisms/FileUpload/components/FileDropZone.js.map +1 -1
  94. package/dist/components/organisms/FileUpload/components/FileItem.cjs.js +1 -1
  95. package/dist/components/organisms/FileUpload/components/FileItem.cjs.js.map +1 -1
  96. package/dist/components/organisms/FileUpload/components/FileItem.js +1 -1
  97. package/dist/components/organisms/FileUpload/components/FileItem.js.map +1 -1
  98. package/dist/components/organisms/Heading/Heading.cjs.js +1 -1
  99. package/dist/components/organisms/Heading/Heading.cjs.js.map +1 -1
  100. package/dist/components/organisms/Heading/Heading.d.ts +0 -1
  101. package/dist/components/organisms/Heading/Heading.js +1 -1
  102. package/dist/components/organisms/Heading/Heading.js.map +1 -1
  103. package/dist/components/organisms/ImageUploadWidget/components/FlipdishFonts.cjs.js +2 -2
  104. package/dist/components/organisms/ImageUploadWidget/components/FlipdishFonts.cjs.js.map +1 -1
  105. package/dist/components/organisms/ImageUploadWidget/components/FlipdishFonts.js +2 -2
  106. package/dist/components/organisms/ImageUploadWidget/components/FlipdishFonts.js.map +1 -1
  107. package/dist/localization/de.json.cjs.js +1 -1
  108. package/dist/localization/de.json.js +1 -1
  109. package/dist/localization/dev-lang.json.cjs.js +1 -1
  110. package/dist/localization/dev-lang.json.js +1 -1
  111. package/dist/localization/en-US.json.cjs.js +1 -1
  112. package/dist/localization/en-US.json.js +1 -1
  113. package/dist/localization/en.json.cjs.js +1 -1
  114. package/dist/localization/en.json.d.ts +186 -1
  115. package/dist/localization/en.json.js +1 -1
  116. package/dist/localization/es-MX.json.cjs.js +1 -1
  117. package/dist/localization/es-MX.json.js +1 -1
  118. package/dist/localization/es.json.cjs.js +1 -1
  119. package/dist/localization/es.json.js +1 -1
  120. package/dist/localization/fr.json.cjs.js +1 -1
  121. package/dist/localization/fr.json.js +1 -1
  122. package/dist/localization/it.json.cjs.js +1 -1
  123. package/dist/localization/it.json.js +1 -1
  124. package/dist/localization/nl.json.cjs.js +1 -1
  125. package/dist/localization/nl.json.js +1 -1
  126. package/dist/localization/pt.json.cjs.js +1 -1
  127. package/dist/localization/pt.json.js +1 -1
  128. package/dist/mocks/msw/handlers.cjs.js +1 -1
  129. package/dist/mocks/msw/handlers.d.ts +1 -1
  130. package/dist/mocks/msw/handlers.js +1 -1
  131. package/dist/mocks/msw/server.cjs.js +1 -1
  132. package/dist/mocks/msw/server.d.ts +1 -1
  133. package/dist/mocks/msw/server.js +1 -1
  134. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse-DC89RDb7.d.d.ts → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse-CVs3ngx3.d.d.ts} +7 -1
  135. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/HttpResponse.cjs.js.map +1 -1
  136. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/HttpResponse.js.map +1 -1
  137. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.cjs.js.map +1 -1
  138. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.d.d.ts +1 -1
  139. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.js.map +1 -1
  140. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.cjs.js.map +1 -1
  141. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.d.d.ts +1 -1
  142. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.js.map +1 -1
  143. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.cjs.js.map +1 -1
  144. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.js.map +1 -1
  145. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/http.cjs.js.map +1 -1
  146. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/http.js.map +1 -1
  147. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/index.cjs.js.map +1 -1
  148. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/index.js.map +1 -1
  149. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.cjs.js.map +1 -1
  150. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.js.map +1 -1
  151. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.cjs.js.map +1 -1
  152. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.js.map +1 -1
  153. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.cjs.js.map +1 -1
  154. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.js.map +1 -1
  155. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.cjs.js.map +1 -1
  156. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.js.map +1 -1
  157. package/dist/node_modules/.pnpm/msw@2.12.7_@types_node@20.19.27_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.cjs.js.map +1 -0
  158. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.cjs.js.map → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.js.map} +1 -1
  159. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.cjs.js.map +1 -1
  160. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.js.map +1 -1
  161. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.cjs.js.map +1 -1
  162. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.js.map +1 -1
  163. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.cjs.js.map +1 -1
  164. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.js.map +1 -1
  165. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.cjs.js.map +1 -1
  166. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.js.map +1 -1
  167. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.cjs.js.map +1 -1
  168. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.js.map +1 -1
  169. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.cjs.js.map +1 -1
  170. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.js.map +1 -1
  171. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.cjs.js.map +1 -1
  172. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.js.map +1 -1
  173. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.cjs.js.map +1 -1
  174. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.js.map +1 -1
  175. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.cjs.js.map +1 -1
  176. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.js.map +1 -1
  177. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.cjs.js.map +1 -1
  178. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.js.map +1 -1
  179. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.cjs.js.map +1 -1
  180. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map +1 -1
  181. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.cjs.js.map +1 -1
  182. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.js.map +1 -1
  183. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.cjs.js.map +1 -1
  184. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.js.map +1 -1
  185. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.cjs.js.map +1 -1
  186. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.js.map +1 -1
  187. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.cjs.js.map +1 -1
  188. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.js.map +1 -1
  189. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.cjs.js.map +1 -1
  190. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.js.map +1 -1
  191. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.cjs.js.map +1 -1
  192. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.js.map +1 -1
  193. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.cjs.js.map +1 -1
  194. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.js.map +1 -1
  195. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.cjs.js.map +1 -1
  196. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.js.map +1 -1
  197. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.cjs.js.map +1 -1
  198. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.js.map +1 -1
  199. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.cjs.js.map +1 -1
  200. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.js.map +1 -1
  201. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.cjs.js.map +1 -1
  202. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.js.map +1 -1
  203. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.cjs.js.map +1 -1
  204. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.js.map +1 -1
  205. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.cjs.js.map +1 -1
  206. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.js.map +1 -1
  207. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.cjs.js.map +1 -1
  208. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.js.map +1 -1
  209. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.cjs.js.map +1 -1
  210. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.js.map +1 -1
  211. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.cjs.js.map +1 -1
  212. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.js.map +1 -1
  213. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/node/index.cjs.js.map +1 -1
  214. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/node/index.d.d.ts +2 -2
  215. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/node/index.js.map +1 -1
  216. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.cjs.js.map +1 -1
  217. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.js.map +1 -1
  218. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.cjs.js.map +1 -1
  219. package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.js.map +1 -1
  220. package/dist/providers/TranslationProvider.cjs.js.map +1 -1
  221. package/dist/providers/TranslationProvider.d.ts +6 -2
  222. package/dist/providers/TranslationProvider.js +1 -1
  223. package/dist/providers/TranslationProvider.js.map +1 -1
  224. package/dist/utilities/renderUtilities.cjs.js +1 -1
  225. package/dist/utilities/renderUtilities.cjs.js.map +1 -1
  226. package/dist/utilities/renderUtilities.d.ts +14 -1
  227. package/dist/utilities/renderUtilities.js +1 -1
  228. package/dist/utilities/renderUtilities.js.map +1 -1
  229. package/package.json +1 -1
  230. package/dist/node_modules/.pnpm/msw@2.12.4_@types_node@20.19.27_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.js.map +0 -1
  231. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/HttpResponse.cjs.js +0 -0
  232. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/HttpResponse.js +0 -0
  233. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.cjs.js +0 -0
  234. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.js +0 -0
  235. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.cjs.js +0 -0
  236. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.js +0 -0
  237. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.cjs.js +0 -0
  238. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.js +0 -0
  239. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/handlers/WebSocketHandler.d.d.ts +0 -0
  240. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/http.cjs.js +0 -0
  241. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/http.js +0 -0
  242. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/index.cjs.js +0 -0
  243. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/index.js +0 -0
  244. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.cjs.js +0 -0
  245. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.js +0 -0
  246. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/sharedOptions.d.d.ts +0 -0
  247. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/typeUtils.d.d.ts +0 -0
  248. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.cjs.js +0 -0
  249. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.js +0 -0
  250. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.cjs.js +0 -0
  251. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.js +0 -0
  252. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.cjs.js +0 -0
  253. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.js +0 -0
  254. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/handleRequest.cjs.js +0 -0
  255. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/handleRequest.js +0 -0
  256. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.cjs.js +0 -0
  257. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.d.d.ts +0 -0
  258. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.js +0 -0
  259. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.cjs.js +0 -0
  260. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.js +0 -0
  261. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.cjs.js +0 -0
  262. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.js +0 -0
  263. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.cjs.js +0 -0
  264. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.js +0 -0
  265. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.cjs.js +0 -0
  266. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.js +0 -0
  267. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.cjs.js +0 -0
  268. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.d.d.ts +0 -0
  269. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.js +0 -0
  270. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.cjs.js +0 -0
  271. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.js +0 -0
  272. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.cjs.js +0 -0
  273. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.js +0 -0
  274. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.cjs.js +0 -0
  275. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.js +0 -0
  276. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.cjs.js +0 -0
  277. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.js +0 -0
  278. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.cjs.js +0 -0
  279. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.js +0 -0
  280. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.cjs.js +0 -0
  281. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.js +0 -0
  282. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.cjs.js +0 -0
  283. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.js +0 -0
  284. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.cjs.js +0 -0
  285. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.js +0 -0
  286. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.cjs.js +0 -0
  287. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.js +0 -0
  288. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.cjs.js +0 -0
  289. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.js +0 -0
  290. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.cjs.js +0 -0
  291. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.d.d.ts +0 -0
  292. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.js +0 -0
  293. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.cjs.js +0 -0
  294. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.js +0 -0
  295. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.cjs.js +0 -0
  296. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.js +0 -0
  297. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.cjs.js +0 -0
  298. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.d.d.ts +0 -0
  299. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.js +0 -0
  300. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.cjs.js +0 -0
  301. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.js +0 -0
  302. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.cjs.js +0 -0
  303. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.js +0 -0
  304. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.cjs.js +0 -0
  305. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.js +0 -0
  306. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.cjs.js +0 -0
  307. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.js +0 -0
  308. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.cjs.js +0 -0
  309. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.js +0 -0
  310. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.cjs.js +0 -0
  311. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.js +0 -0
  312. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.cjs.js +0 -0
  313. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.js +0 -0
  314. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/node/index.cjs.js +0 -0
  315. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/node/index.js +0 -0
  316. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.cjs.js +0 -0
  317. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.js +0 -0
  318. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.cjs.js +0 -0
  319. /package/dist/node_modules/.pnpm/{msw@2.12.4_@types_node@20.19.27_typescript@5.4.5 → msw@2.12.7_@types_node@20.19.27_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.js +0 -0
  320. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/if.d.d.ts +0 -0
  321. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/internal/object.d.d.ts +0 -0
  322. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/internal/type.d.d.ts +0 -0
  323. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/is-any.d.d.ts +0 -0
  324. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/is-never.d.d.ts +0 -0
  325. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/is-optional-key-of.d.d.ts +0 -0
  326. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/merge.d.d.ts +0 -0
  327. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/omit-index-signature.d.d.ts +0 -0
  328. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/optional-keys-of.d.d.ts +0 -0
  329. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/partial-deep.d.d.ts +0 -0
  330. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/pick-index-signature.d.d.ts +0 -0
  331. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/primitive.d.d.ts +0 -0
  332. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/required-keys-of.d.d.ts +0 -0
  333. /package/dist/node_modules/.pnpm/{type-fest@5.3.0 → type-fest@5.3.1}/node_modules/type-fest/source/simplify.d.d.ts +0 -0
package/README.md CHANGED
@@ -96,9 +96,27 @@ You can find the current list of provided icons at https://flipdishbytes.github.
96
96
 
97
97
  ## Changelog
98
98
 
99
- ## 5.0.0 — 2025-08-19
99
+ ### 8.0.0 — 2026-01-07
100
100
 
101
- ### Breaking changes
101
+ #### Breaking Changes
102
102
 
103
- Breaking: Required MUI v6 for Grid usage. Apps on MUI v5 should use MUI v5 Grid: https://v5.mui.com/material-ui/react-grid/.
104
- Breaking: Replaced deprecated LegacyGrid with Grid2. The exported Grid now wraps Grid2; review and adjust any Grid props/usages accordingly.
103
+ - Removed required translated props from FlipdishUI and implemented the `useTranslation` hook.
104
+
105
+ #### Migration Steps
106
+
107
+ - Replace direct `ThemeProvider` usage with `FlipdishUIProvider`, which composes both `ThemeProvider` and `TranslationProvider`. Portal will use the `languageOverride` prop to set the language. MFE’s should not have to do anything, it will use the micro-frontend attribute `data-language`. Alternatively you can nest `TranslationProvider` within `ThemeProvider` as shown in `FlipdishUIProvider`.
108
+
109
+ - Remove unnecessary translation props from following:
110
+ - **Atoms:** Tag, TextField
111
+ - **Molecules:** AlertGlobal, Autocomplete, Combobox, Pagination, QuantitySelector, Rating, SearchInput
112
+ - **Organisms:** Heading
113
+
114
+ ### 5.0.0 — 2025-08-19
115
+
116
+ #### Breaking Changes
117
+
118
+ - Required MUI v6 for Grid usage. Apps on MUI v5 should use MUI v5 Grid: https://v5.mui.com/material-ui/react-grid/.
119
+
120
+ #### Migration Steps
121
+
122
+ - Replaced deprecated LegacyGrid with Grid2. The exported Grid now wraps Grid2; review and adjust any Grid props/usages accordingly.
@@ -1,2 +1,2 @@
1
- "use strict";var i=require("react/jsx-runtime"),r=require("@mui/material/Tab");module.exports=({iconPosition:e="start",...t})=>i.jsx(r,{iconPosition:e,...t});
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/styles"),s=require("@mui/material/Tab"),r=require("../BadgeCount/index.cjs.js"),t=require("@mui/material/Box");const a=i.styled(t)((({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})));module.exports=({iconPosition:i="start",badgeCount:t,badgeEmphasis:n="strong",label:l,...o})=>{const u=void 0!==t?e.jsxs(a,{children:[l,e.jsx(r,{emphasis:n,children:t})]}):l;return e.jsx(s,{iconPosition:i,label:u,...o})};
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Tab/index.tsx"],"sourcesContent":["import MuiTab, { type TabProps as MuiTabProps } from '@mui/material/Tab';\n\nexport interface TabProps {\n iconPosition?: MuiTabProps['iconPosition'];\n icon?: MuiTabProps['icon'];\n label: string;\n value?: MuiTabProps['value'];\n disabled?: boolean;\n className?: string;\n onClick?: () => void;\n}\n\nconst Tab = ({ iconPosition = 'start', ...props }: TabProps): JSX.Element => {\n return <MuiTab iconPosition={iconPosition} {...props} />;\n};\n\nexport default Tab;\n"],"names":["iconPosition","props","_jsx","MuiTab"],"mappings":"8FAYY,EAAGA,eAAe,WAAYC,KACjCC,EAAAA,IAACC,EAAM,CAACH,aAAcA,KAAkBC"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Tab/index.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport MuiTab, { type TabProps as MuiTabProps } from '@mui/material/Tab';\n\nimport BadgeCount, { type BadgeCountProps } from '../BadgeCount';\nimport Box from '../Box';\n\nexport interface TabProps {\n badgeCount?: number;\n badgeEmphasis?: BadgeCountProps['emphasis'];\n iconPosition?: MuiTabProps['iconPosition'];\n icon?: MuiTabProps['icon'];\n label: string;\n value?: MuiTabProps['value'];\n disabled?: boolean;\n className?: string;\n onClick?: () => void;\n}\n\nconst StyledTabLabelContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n}));\n\nconst Tab = ({\n iconPosition = 'start',\n badgeCount,\n badgeEmphasis = 'strong',\n label,\n ...props\n}: TabProps): JSX.Element => {\n const tabLabel =\n badgeCount !== undefined ? (\n <StyledTabLabelContainer>\n {label}\n <BadgeCount emphasis={badgeEmphasis}>{badgeCount}</BadgeCount>\n </StyledTabLabelContainer>\n ) : (\n label\n );\n\n return <MuiTab iconPosition={iconPosition} label={tabLabel} {...props} />;\n};\n\nexport default Tab;\n"],"names":["StyledTabLabelContainer","styled","Box","theme","display","alignItems","gap","spacing","iconPosition","badgeCount","badgeEmphasis","label","props","tabLabel","undefined","_jsxs","children","_jsx","BadgeCount","emphasis","MuiTab"],"mappings":"wLAkBA,MAAMA,EAA0BC,EAAAA,OAAOC,EAAPD,EAAY,EAAGE,YAAO,CACpDC,QAAS,OACTC,WAAY,SACZC,IAAKH,EAAMI,QAAQ,sBAGT,EACVC,eAAe,QACfC,aACAC,gBAAgB,SAChBC,WACGC,MAEH,MAAMC,OACWC,IAAfL,EACEM,EAAAA,KAACf,EAAuB,CAAAgB,SAAA,CACrBL,EACDM,EAAAA,IAACC,EAAU,CAACC,SAAUT,EAAaM,SAAGP,OACd,EAK9B,OAAOQ,EAAAA,IAACG,EAAM,CAACZ,aAAcA,EAAcG,MAAOE,KAAcD"}
@@ -1,6 +1,9 @@
1
1
  import { TabProps as TabProps$1 } from '@mui/material/Tab';
2
+ import { BadgeCountProps } from '../BadgeCount/index.js';
2
3
 
3
4
  interface TabProps {
5
+ badgeCount?: number;
6
+ badgeEmphasis?: BadgeCountProps['emphasis'];
4
7
  iconPosition?: TabProps$1['iconPosition'];
5
8
  icon?: TabProps$1['icon'];
6
9
  label: string;
@@ -9,7 +12,7 @@ interface TabProps {
9
12
  className?: string;
10
13
  onClick?: () => void;
11
14
  }
12
- declare const Tab: ({ iconPosition, ...props }: TabProps) => JSX.Element;
15
+ declare const Tab: ({ iconPosition, badgeCount, badgeEmphasis, label, ...props }: TabProps) => JSX.Element;
13
16
 
14
17
  export { Tab as default };
15
18
  export type { TabProps };
@@ -1,2 +1,2 @@
1
- import{jsx as o}from"react/jsx-runtime";import t from"@mui/material/Tab";const i=({iconPosition:i="start",...r})=>o(t,{iconPosition:i,...r});export{i as default};
1
+ import{jsxs as i,jsx as t}from"react/jsx-runtime";import{styled as e}from"@mui/material/styles";import o from"@mui/material/Tab";import r from"../BadgeCount/index.js";import a from"@mui/material/Box";const m=e(a)((({theme:i})=>({display:"flex",alignItems:"center",gap:i.spacing(1)}))),s=({iconPosition:e="start",badgeCount:a,badgeEmphasis:s="strong",label:n,...l})=>{const p=void 0!==a?i(m,{children:[n,t(r,{emphasis:s,children:a})]}):n;return t(o,{iconPosition:e,label:p,...l})};export{s as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Tab/index.tsx"],"sourcesContent":["import MuiTab, { type TabProps as MuiTabProps } from '@mui/material/Tab';\n\nexport interface TabProps {\n iconPosition?: MuiTabProps['iconPosition'];\n icon?: MuiTabProps['icon'];\n label: string;\n value?: MuiTabProps['value'];\n disabled?: boolean;\n className?: string;\n onClick?: () => void;\n}\n\nconst Tab = ({ iconPosition = 'start', ...props }: TabProps): JSX.Element => {\n return <MuiTab iconPosition={iconPosition} {...props} />;\n};\n\nexport default Tab;\n"],"names":["Tab","iconPosition","props","_jsx","MuiTab"],"mappings":"yEAYA,MAAMA,EAAM,EAAGC,eAAe,WAAYC,KACjCC,EAACC,EAAM,CAACH,aAAcA,KAAkBC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Tab/index.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport MuiTab, { type TabProps as MuiTabProps } from '@mui/material/Tab';\n\nimport BadgeCount, { type BadgeCountProps } from '../BadgeCount';\nimport Box from '../Box';\n\nexport interface TabProps {\n badgeCount?: number;\n badgeEmphasis?: BadgeCountProps['emphasis'];\n iconPosition?: MuiTabProps['iconPosition'];\n icon?: MuiTabProps['icon'];\n label: string;\n value?: MuiTabProps['value'];\n disabled?: boolean;\n className?: string;\n onClick?: () => void;\n}\n\nconst StyledTabLabelContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n}));\n\nconst Tab = ({\n iconPosition = 'start',\n badgeCount,\n badgeEmphasis = 'strong',\n label,\n ...props\n}: TabProps): JSX.Element => {\n const tabLabel =\n badgeCount !== undefined ? (\n <StyledTabLabelContainer>\n {label}\n <BadgeCount emphasis={badgeEmphasis}>{badgeCount}</BadgeCount>\n </StyledTabLabelContainer>\n ) : (\n label\n );\n\n return <MuiTab iconPosition={iconPosition} label={tabLabel} {...props} />;\n};\n\nexport default Tab;\n"],"names":["StyledTabLabelContainer","styled","Box","theme","display","alignItems","gap","spacing","Tab","iconPosition","badgeCount","badgeEmphasis","label","props","tabLabel","undefined","_jsxs","children","_jsx","BadgeCount","emphasis","MuiTab"],"mappings":"wMAkBA,MAAMA,EAA0BC,EAAOC,EAAPD,EAAY,EAAGE,YAAO,CACpDC,QAAS,OACTC,WAAY,SACZC,IAAKH,EAAMI,QAAQ,OAGfC,EAAM,EACVC,eAAe,QACfC,aACAC,gBAAgB,SAChBC,WACGC,MAEH,MAAMC,OACWC,IAAfL,EACEM,EAAChB,EAAuB,CAAAiB,SAAA,CACrBL,EACDM,EAACC,EAAU,CAACC,SAAUT,EAAaM,SAAGP,OACd,EAK9B,OAAOQ,EAACG,EAAM,CAACZ,aAAcA,EAAcG,MAAOE,KAAcD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/Box"),l=require("@mui/material/Chip"),i=require("@mui/material/styles"),s=require("../../../icons/Cancel/index.cjs.js");const o=i.styled(t,{shouldForwardProp:e=>"disabled"!==e})((({disabled:e})=>({cursor:e?"not-allowed":void 0}))),r=i.styled(l,{shouldForwardProp:e=>"selected"!==e})((({theme:e,selected:t})=>({...t&&{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"],"&:hover:not(.Mui-disabled)":{color:e.palette.semantic.text["text-inverse-strong"]}},"&:hover:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:active:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:focus-visible, &.Mui-focusVisible":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&.Mui-disabled":{backgroundColor:e.palette.semantic.fill["fill-disabled"],borderColor:e.palette.semantic.fill["fill-disabled"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"]}}}}))),a=({className:t,disabled:l=!1,fdKey:i,label:a,onClick:d,onDismiss:n,selected:c=!1,size:m="medium",dismissAriaLabel:u})=>e.jsx(o,{disabled:l,children:e.jsx(r,{"aria-label":d?`${a}`:n?`${u} ${a}`:void 0,className:t,clickable:!l&&!!d,"data-fd":i,"data-fd-variant":"tag",deleteIcon:(()=>{if(n)return e.jsx(s,{"aria-hidden":!0,"data-testid":"tag-dismiss-icon",size:"sm"})})(),disabled:l,label:a,onClick:l?void 0:d,onDelete:l?void 0:n,onKeyDown:e=>{l||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),n?n(e):d&&d(e))},selected:c,size:m})});a.displayName="Tag",exports.Tag=a,exports.default=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/Box"),i=require("@mui/material/Chip"),s=require("@mui/material/styles"),l=require("../../../icons/Cancel/index.cjs.js"),o=require("../../../providers/TranslationProvider.cjs.js");const r=s.styled(t,{shouldForwardProp:e=>"disabled"!==e})((({disabled:e})=>({cursor:e?"not-allowed":void 0}))),a=s.styled(i,{shouldForwardProp:e=>"selected"!==e})((({theme:e,selected:t})=>({...t&&{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"],"&:hover:not(.Mui-disabled)":{color:e.palette.semantic.text["text-inverse-strong"]}},"&:hover:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:active:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:focus-visible, &.Mui-focusVisible":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&.Mui-disabled":{backgroundColor:e.palette.semantic.fill["fill-disabled"],borderColor:e.palette.semantic.fill["fill-disabled"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"]}}}}))),d=({className:t,disabled:i=!1,fdKey:s,label:d,onClick:n,onDismiss:c,selected:u=!1,size:m="medium"})=>{const{translate:p}=o.useTranslation();return e.jsx(r,{disabled:i,children:e.jsx(a,{"aria-label":n?d:c?p("Dismiss_dismissible",{dismissible:d}):void 0,className:t,clickable:!i&&!!n,"data-fd":s,"data-fd-variant":"tag",deleteIcon:(()=>{if(c)return e.jsx(l,{"aria-hidden":!0,"data-testid":"tag-dismiss-icon",size:"sm"})})(),disabled:i,label:d,onClick:i?void 0:n,onDelete:i?void 0:c,onKeyDown:e=>{i||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),c?c(e):n&&n(e))},selected:u,size:m})})};d.displayName="Tag",exports.Tag=d,exports.default=d;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Tag/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiChip, { type ChipProps as MuiChipProps } from '@mui/material/Chip';\nimport { styled } from '@mui/material/styles';\n\nimport CancelIcon from '@fd/icons/Cancel';\n\n/** Props for the Tag component */\ninterface TagBaseProps {\n /** Additional CSS class names */\n className?: string;\n /** Whether the tag is disabled */\n disabled?: boolean;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Text label displayed in the tag */\n label: string;\n /** Whether the tag is selected */\n selected?: boolean;\n /** Size of the tag */\n size?: MuiChipProps['size'];\n}\n\ninterface TagDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: undefined;\n /** Callback function when the tag is dismissed */\n onDismiss: NonNullable<MuiChipProps['onDelete']>;\n /** Aria-label prefix for the dismiss button; the tag label is appended automatically */\n dismissAriaLabel: string;\n}\n\ninterface TagNonDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: MuiChipProps['onClick'];\n /** No dismiss handler in this variant */\n onDismiss?: undefined;\n /** No aria label when there is no dismiss */\n dismissAriaLabel?: undefined;\n}\n\n/** Props for the Tag component */\nexport type TagProps = TagDismissibleProps | TagNonDismissibleProps;\n\nconst StyledTagContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ disabled }) => ({\n cursor: disabled ? 'not-allowed' : undefined,\n}));\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) => prop !== 'selected',\n})<{ selected?: boolean }>(({ theme, selected }) => ({\n ...(selected && {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n\n '&:hover:not(.Mui-disabled)': {\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:active:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:focus-visible, &.Mui-focusVisible': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&.Mui-disabled': {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n borderColor: theme.palette.semantic.fill['fill-disabled'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n },\n },\n }),\n}));\n\n/**\n * Tag component used for categorization and filtering.\n * It supports two variants: dismissible (with delete icon) and clickable (entire tag is interactive).\n * Both variants support a selected state.\n */\nexport const Tag = ({\n className,\n disabled = false,\n fdKey,\n label,\n onClick,\n onDismiss,\n selected = false,\n size = 'medium',\n dismissAriaLabel,\n}: TagProps): JSX.Element => {\n const getAriaLabel = (): string | undefined => {\n if (onClick) {\n return `${label}`;\n }\n if (onDismiss) {\n return `${dismissAriaLabel} ${label}`;\n }\n\n return undefined;\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (disabled) {\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n\n if (onDismiss) {\n onDismiss(event as unknown as React.MouseEvent<HTMLDivElement>);\n } else if (onClick) {\n onClick(event as unknown as React.MouseEvent<HTMLDivElement>);\n }\n }\n };\n\n const renderDismissIcon = (): React.ReactElement<unknown> | undefined => {\n if (!onDismiss) {\n return undefined;\n }\n\n return <CancelIcon aria-hidden={true} data-testid=\"tag-dismiss-icon\" size=\"sm\" />;\n };\n\n return (\n <StyledTagContainer disabled={disabled}>\n <StyledTag\n aria-label={getAriaLabel()}\n className={className}\n clickable={disabled ? false : !!onClick}\n data-fd={fdKey}\n data-fd-variant=\"tag\"\n deleteIcon={renderDismissIcon()}\n disabled={disabled}\n label={label}\n onClick={disabled ? undefined : onClick}\n onDelete={disabled ? undefined : onDismiss}\n onKeyDown={handleKeyDown}\n selected={selected}\n size={size}\n />\n </StyledTagContainer>\n );\n};\n\nTag.displayName = 'Tag';\n\nexport default Tag;\n"],"names":["StyledTagContainer","styled","Box","shouldForwardProp","prop","disabled","cursor","undefined","StyledTag","MuiChip","theme","selected","backgroundColor","palette","semantic","fill","borderColor","stroke","color","text","icon","Tag","className","fdKey","label","onClick","onDismiss","size","dismissAriaLabel","_jsx","children","clickable","deleteIcon","CancelIcon","renderDismissIcon","onDelete","onKeyDown","event","key","preventDefault","stopPropagation","displayName"],"mappings":"wPA2CA,MAAMA,EAAqBC,EAAAA,OAAOC,EAAK,CACrCC,kBAAoBC,GAAkB,aAATA,GADJH,EAEA,EAAGI,eAAU,CACtCC,OAAQD,EAAW,mBAAgBE,MAG/BC,EAAYP,EAAAA,OAAOQ,EAAS,CAChCN,kBAAoBC,GAAkB,aAATA,GADbH,EAES,EAAGS,QAAOC,eAAU,IACzCA,GAAY,CACdC,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,uBAEnC,6BAA8B,CAC5BF,MAAOR,EAAMG,QAAQC,SAASK,KAAK,yBAGvC,6BAA8B,CAC5BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,8BAA+B,CAC7BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,sCAAuC,CACrCP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,iBAAkB,CAChBP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASC,KAAK,iBACzCG,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,8BAW9BC,EAAM,EACjBC,YACAjB,YAAW,EACXkB,QACAC,QACAC,UACAC,YACAf,YAAW,EACXgB,OAAO,SACPC,sBAuCEC,EAAAA,IAAC7B,GAAmBK,SAAUA,EAAQyB,SACpCD,EAAAA,IAACrB,EAAS,CAAA,aArCRiB,EACK,GAAGD,IAERE,EACK,GAAGE,KAAoBJ,SADhC,EAoCIF,UAAWA,EACXS,WAAW1B,KAAqBoB,YACvBF,EAAK,kBACE,MAChBS,WAhBoB,MACxB,GAAKN,EAIL,OAAOG,EAAAA,IAACI,EAAU,CAAA,eAAc,EAAI,cAAc,mBAAmBN,KAAK,QAW1DO,GACZ7B,SAAUA,EACVmB,MAAOA,EACPC,QAASpB,OAAWE,EAAYkB,EAChCU,SAAU9B,OAAWE,EAAYmB,EACjCU,UAtCiBC,IACjBhC,GAIc,UAAdgC,EAAMC,KAAiC,MAAdD,EAAMC,MACjCD,EAAME,iBACNF,EAAMG,kBAEFd,EACFA,EAAUW,GACDZ,GACTA,EAAQY,KA2BR1B,SAAUA,EACVgB,KAAMA,MAMdN,EAAIoB,YAAc"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Tag/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiChip, { type ChipProps as MuiChipProps } from '@mui/material/Chip';\nimport { styled } from '@mui/material/styles';\n\nimport CancelIcon from '@fd/icons/Cancel';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\n/** Props for the Tag component */\ninterface TagBaseProps {\n /** Additional CSS class names */\n className?: string;\n /** Whether the tag is disabled */\n disabled?: boolean;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Text label displayed in the tag */\n label: string;\n /** Whether the tag is selected */\n selected?: boolean;\n /** Size of the tag */\n size?: MuiChipProps['size'];\n}\n\ninterface TagDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: never;\n /** Callback function when the tag is dismissed */\n onDismiss: NonNullable<MuiChipProps['onDelete']>;\n}\n\ninterface TagNonDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: MuiChipProps['onClick'];\n /** No dismiss handler in this variant */\n onDismiss?: never;\n}\n\n/** Props for the Tag component */\nexport type TagProps = TagDismissibleProps | TagNonDismissibleProps;\n\nconst StyledTagContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ disabled }) => ({\n cursor: disabled ? 'not-allowed' : undefined,\n}));\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) => prop !== 'selected',\n})<{ selected?: boolean }>(({ theme, selected }) => ({\n ...(selected && {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n\n '&:hover:not(.Mui-disabled)': {\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:active:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:focus-visible, &.Mui-focusVisible': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&.Mui-disabled': {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n borderColor: theme.palette.semantic.fill['fill-disabled'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n },\n },\n }),\n}));\n\n/**\n * Tag component used for categorization and filtering.\n * It supports two variants: dismissible (with delete icon) and clickable (entire tag is interactive).\n * Both variants support a selected state.\n */\nexport const Tag = ({\n className,\n disabled = false,\n fdKey,\n label,\n onClick,\n onDismiss,\n selected = false,\n size = 'medium',\n}: TagProps): JSX.Element => {\n const { translate } = useTranslation();\n\n const getAriaLabel = (): string | undefined => {\n if (onClick) {\n return label;\n }\n if (onDismiss) {\n return translate('Dismiss_dismissible', { dismissible: label });\n }\n\n return undefined;\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (disabled) {\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n\n if (onDismiss) {\n onDismiss(event as unknown as React.MouseEvent<HTMLDivElement>);\n } else if (onClick) {\n onClick(event as unknown as React.MouseEvent<HTMLDivElement>);\n }\n }\n };\n\n const renderDismissIcon = (): React.ReactElement<unknown> | undefined => {\n if (!onDismiss) {\n return undefined;\n }\n\n return <CancelIcon aria-hidden={true} data-testid=\"tag-dismiss-icon\" size=\"sm\" />;\n };\n\n return (\n <StyledTagContainer disabled={disabled}>\n <StyledTag\n aria-label={getAriaLabel()}\n className={className}\n clickable={disabled ? false : !!onClick}\n data-fd={fdKey}\n data-fd-variant=\"tag\"\n deleteIcon={renderDismissIcon()}\n disabled={disabled}\n label={label}\n onClick={disabled ? undefined : onClick}\n onDelete={disabled ? undefined : onDismiss}\n onKeyDown={handleKeyDown}\n selected={selected}\n size={size}\n />\n </StyledTagContainer>\n );\n};\n\nTag.displayName = 'Tag';\n\nexport default Tag;\n"],"names":["StyledTagContainer","styled","Box","shouldForwardProp","prop","disabled","cursor","undefined","StyledTag","MuiChip","theme","selected","backgroundColor","palette","semantic","fill","borderColor","stroke","color","text","icon","Tag","className","fdKey","label","onClick","onDismiss","size","translate","useTranslation","_jsx","children","dismissible","clickable","deleteIcon","CancelIcon","renderDismissIcon","onDelete","onKeyDown","event","key","preventDefault","stopPropagation","displayName"],"mappings":"mTAwCA,MAAMA,EAAqBC,EAAAA,OAAOC,EAAK,CACrCC,kBAAoBC,GAAkB,aAATA,GADJH,EAEA,EAAGI,eAAU,CACtCC,OAAQD,EAAW,mBAAgBE,MAG/BC,EAAYP,EAAAA,OAAOQ,EAAS,CAChCN,kBAAoBC,GAAkB,aAATA,GADbH,EAES,EAAGS,QAAOC,eAAU,IACzCA,GAAY,CACdC,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,uBAEnC,6BAA8B,CAC5BF,MAAOR,EAAMG,QAAQC,SAASK,KAAK,yBAGvC,6BAA8B,CAC5BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,8BAA+B,CAC7BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,sCAAuC,CACrCP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,iBAAkB,CAChBP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASC,KAAK,iBACzCG,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,8BAW9BC,EAAM,EACjBC,YACAjB,YAAW,EACXkB,QACAC,QACAC,UACAC,YACAf,YAAW,EACXgB,OAAO,aAEP,MAAMC,UAAEA,GAAcC,mBAsCtB,OACEC,EAAAA,IAAC9B,GAAmBK,SAAUA,EAAQ0B,SACpCD,EAAAA,IAACtB,EAAS,CAAA,aArCRiB,EACKD,EAELE,EACKE,EAAU,sBAAuB,CAAEI,YAAaR,SADzD,EAoCIF,UAAWA,EACXW,WAAW5B,KAAqBoB,YACvBF,EAAK,kBACE,MAChBW,WAhBoB,MACxB,GAAKR,EAIL,OAAOI,EAAAA,IAACK,EAAU,CAAA,eAAc,EAAI,cAAc,mBAAmBR,KAAK,QAW1DS,GACZ/B,SAAUA,EACVmB,MAAOA,EACPC,QAASpB,OAAWE,EAAYkB,EAChCY,SAAUhC,OAAWE,EAAYmB,EACjCY,UAtCiBC,IACjBlC,GAIc,UAAdkC,EAAMC,KAAiC,MAAdD,EAAMC,MACjCD,EAAME,iBACNF,EAAMG,kBAEFhB,EACFA,EAAUa,GACDd,GACTA,EAAQc,KA2BR5B,SAAUA,EACVgB,KAAMA,OAMdN,EAAIsB,YAAc"}
@@ -17,19 +17,15 @@ interface TagBaseProps {
17
17
  }
18
18
  interface TagDismissibleProps extends TagBaseProps {
19
19
  /** Callback function when the tag is clicked */
20
- onClick?: undefined;
20
+ onClick?: never;
21
21
  /** Callback function when the tag is dismissed */
22
22
  onDismiss: NonNullable<ChipProps['onDelete']>;
23
- /** Aria-label prefix for the dismiss button; the tag label is appended automatically */
24
- dismissAriaLabel: string;
25
23
  }
26
24
  interface TagNonDismissibleProps extends TagBaseProps {
27
25
  /** Callback function when the tag is clicked */
28
26
  onClick?: ChipProps['onClick'];
29
27
  /** No dismiss handler in this variant */
30
- onDismiss?: undefined;
31
- /** No aria label when there is no dismiss */
32
- dismissAriaLabel?: undefined;
28
+ onDismiss?: never;
33
29
  }
34
30
  /** Props for the Tag component */
35
31
  type TagProps = TagDismissibleProps | TagNonDismissibleProps;
@@ -39,7 +35,7 @@ type TagProps = TagDismissibleProps | TagNonDismissibleProps;
39
35
  * Both variants support a selected state.
40
36
  */
41
37
  declare const Tag: {
42
- ({ className, disabled, fdKey, label, onClick, onDismiss, selected, size, dismissAriaLabel, }: TagProps): JSX.Element;
38
+ ({ className, disabled, fdKey, label, onClick, onDismiss, selected, size, }: TagProps): JSX.Element;
43
39
  displayName: string;
44
40
  };
45
41
 
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import t from"@mui/material/Box";import i from"@mui/material/Chip";import{styled as l}from"@mui/material/styles";import o from"../../../icons/Cancel/index.js";const s=l(t,{shouldForwardProp:e=>"disabled"!==e})((({disabled:e})=>({cursor:e?"not-allowed":void 0}))),a=l(i,{shouldForwardProp:e=>"selected"!==e})((({theme:e,selected:t})=>({...t&&{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"],"&:hover:not(.Mui-disabled)":{color:e.palette.semantic.text["text-inverse-strong"]}},"&:hover:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:active:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:focus-visible, &.Mui-focusVisible":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&.Mui-disabled":{backgroundColor:e.palette.semantic.fill["fill-disabled"],borderColor:e.palette.semantic.fill["fill-disabled"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"]}}}}))),r=({className:t,disabled:i=!1,fdKey:l,label:r,onClick:d,onDismiss:n,selected:c=!1,size:m="medium",dismissAriaLabel:p})=>e(s,{disabled:i,children:e(a,{"aria-label":d?`${r}`:n?`${p} ${r}`:void 0,className:t,clickable:!i&&!!d,"data-fd":l,"data-fd-variant":"tag",deleteIcon:(()=>{if(n)return e(o,{"aria-hidden":!0,"data-testid":"tag-dismiss-icon",size:"sm"})})(),disabled:i,label:r,onClick:i?void 0:d,onDelete:i?void 0:n,onKeyDown:e=>{i||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),n?n(e):d&&d(e))},selected:c,size:m})});r.displayName="Tag";export{r as Tag,r as default};
1
+ import{jsx as e}from"react/jsx-runtime";import t from"@mui/material/Box";import i from"@mui/material/Chip";import{styled as o}from"@mui/material/styles";import l from"../../../icons/Cancel/index.js";import{useTranslation as s}from"../../../providers/TranslationProvider.js";const r=o(t,{shouldForwardProp:e=>"disabled"!==e})((({disabled:e})=>({cursor:e?"not-allowed":void 0}))),a=o(i,{shouldForwardProp:e=>"selected"!==e})((({theme:e,selected:t})=>({...t&&{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"],"&:hover:not(.Mui-disabled)":{color:e.palette.semantic.text["text-inverse-strong"]}},"&:hover:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:active:not(.Mui-disabled)":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&:focus-visible, &.Mui-focusVisible":{backgroundColor:e.palette.semantic.fill["fill-selected"],borderColor:e.palette.semantic.stroke["stroke-selected"],color:e.palette.semantic.text["text-inverse-strong"]},"&.Mui-disabled":{backgroundColor:e.palette.semantic.fill["fill-disabled"],borderColor:e.palette.semantic.fill["fill-disabled"],color:e.palette.semantic.text["text-inverse-strong"],"& .MuiChip-deleteIcon, & .MuiChip-icon":{color:e.palette.semantic.icon["icon-inverse-strong"]}}}}))),n=({className:t,disabled:i=!1,fdKey:o,label:n,onClick:d,onDismiss:c,selected:m=!1,size:p="medium"})=>{const{translate:b}=s();return e(r,{disabled:i,children:e(a,{"aria-label":d?n:c?b("Dismiss_dismissible",{dismissible:n}):void 0,className:t,clickable:!i&&!!d,"data-fd":o,"data-fd-variant":"tag",deleteIcon:(()=>{if(c)return e(l,{"aria-hidden":!0,"data-testid":"tag-dismiss-icon",size:"sm"})})(),disabled:i,label:n,onClick:i?void 0:d,onDelete:i?void 0:c,onKeyDown:e=>{i||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),c?c(e):d&&d(e))},selected:m,size:p})})};n.displayName="Tag";export{n as Tag,n as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Tag/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiChip, { type ChipProps as MuiChipProps } from '@mui/material/Chip';\nimport { styled } from '@mui/material/styles';\n\nimport CancelIcon from '@fd/icons/Cancel';\n\n/** Props for the Tag component */\ninterface TagBaseProps {\n /** Additional CSS class names */\n className?: string;\n /** Whether the tag is disabled */\n disabled?: boolean;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Text label displayed in the tag */\n label: string;\n /** Whether the tag is selected */\n selected?: boolean;\n /** Size of the tag */\n size?: MuiChipProps['size'];\n}\n\ninterface TagDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: undefined;\n /** Callback function when the tag is dismissed */\n onDismiss: NonNullable<MuiChipProps['onDelete']>;\n /** Aria-label prefix for the dismiss button; the tag label is appended automatically */\n dismissAriaLabel: string;\n}\n\ninterface TagNonDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: MuiChipProps['onClick'];\n /** No dismiss handler in this variant */\n onDismiss?: undefined;\n /** No aria label when there is no dismiss */\n dismissAriaLabel?: undefined;\n}\n\n/** Props for the Tag component */\nexport type TagProps = TagDismissibleProps | TagNonDismissibleProps;\n\nconst StyledTagContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ disabled }) => ({\n cursor: disabled ? 'not-allowed' : undefined,\n}));\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) => prop !== 'selected',\n})<{ selected?: boolean }>(({ theme, selected }) => ({\n ...(selected && {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n\n '&:hover:not(.Mui-disabled)': {\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:active:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:focus-visible, &.Mui-focusVisible': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&.Mui-disabled': {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n borderColor: theme.palette.semantic.fill['fill-disabled'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n },\n },\n }),\n}));\n\n/**\n * Tag component used for categorization and filtering.\n * It supports two variants: dismissible (with delete icon) and clickable (entire tag is interactive).\n * Both variants support a selected state.\n */\nexport const Tag = ({\n className,\n disabled = false,\n fdKey,\n label,\n onClick,\n onDismiss,\n selected = false,\n size = 'medium',\n dismissAriaLabel,\n}: TagProps): JSX.Element => {\n const getAriaLabel = (): string | undefined => {\n if (onClick) {\n return `${label}`;\n }\n if (onDismiss) {\n return `${dismissAriaLabel} ${label}`;\n }\n\n return undefined;\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (disabled) {\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n\n if (onDismiss) {\n onDismiss(event as unknown as React.MouseEvent<HTMLDivElement>);\n } else if (onClick) {\n onClick(event as unknown as React.MouseEvent<HTMLDivElement>);\n }\n }\n };\n\n const renderDismissIcon = (): React.ReactElement<unknown> | undefined => {\n if (!onDismiss) {\n return undefined;\n }\n\n return <CancelIcon aria-hidden={true} data-testid=\"tag-dismiss-icon\" size=\"sm\" />;\n };\n\n return (\n <StyledTagContainer disabled={disabled}>\n <StyledTag\n aria-label={getAriaLabel()}\n className={className}\n clickable={disabled ? false : !!onClick}\n data-fd={fdKey}\n data-fd-variant=\"tag\"\n deleteIcon={renderDismissIcon()}\n disabled={disabled}\n label={label}\n onClick={disabled ? undefined : onClick}\n onDelete={disabled ? undefined : onDismiss}\n onKeyDown={handleKeyDown}\n selected={selected}\n size={size}\n />\n </StyledTagContainer>\n );\n};\n\nTag.displayName = 'Tag';\n\nexport default Tag;\n"],"names":["StyledTagContainer","styled","Box","shouldForwardProp","prop","disabled","cursor","undefined","StyledTag","MuiChip","theme","selected","backgroundColor","palette","semantic","fill","borderColor","stroke","color","text","icon","Tag","className","fdKey","label","onClick","onDismiss","size","dismissAriaLabel","_jsx","children","clickable","deleteIcon","CancelIcon","renderDismissIcon","onDelete","onKeyDown","event","key","preventDefault","stopPropagation","displayName"],"mappings":"uMA2CA,MAAMA,EAAqBC,EAAOC,EAAK,CACrCC,kBAAoBC,GAAkB,aAATA,GADJH,EAEA,EAAGI,eAAU,CACtCC,OAAQD,EAAW,mBAAgBE,MAG/BC,EAAYP,EAAOQ,EAAS,CAChCN,kBAAoBC,GAAkB,aAATA,GADbH,EAES,EAAGS,QAAOC,eAAU,IACzCA,GAAY,CACdC,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,uBAEnC,6BAA8B,CAC5BF,MAAOR,EAAMG,QAAQC,SAASK,KAAK,yBAGvC,6BAA8B,CAC5BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,8BAA+B,CAC7BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,sCAAuC,CACrCP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,iBAAkB,CAChBP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASC,KAAK,iBACzCG,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,8BAW9BC,EAAM,EACjBC,YACAjB,YAAW,EACXkB,QACAC,QACAC,UACAC,YACAf,YAAW,EACXgB,OAAO,SACPC,sBAuCEC,EAAC7B,GAAmBK,SAAUA,EAAQyB,SACpCD,EAACrB,EAAS,CAAA,aArCRiB,EACK,GAAGD,IAERE,EACK,GAAGE,KAAoBJ,SADhC,EAoCIF,UAAWA,EACXS,WAAW1B,KAAqBoB,YACvBF,EAAK,kBACE,MAChBS,WAhBoB,MACxB,GAAKN,EAIL,OAAOG,EAACI,EAAU,CAAA,eAAc,EAAI,cAAc,mBAAmBN,KAAK,QAW1DO,GACZ7B,SAAUA,EACVmB,MAAOA,EACPC,QAASpB,OAAWE,EAAYkB,EAChCU,SAAU9B,OAAWE,EAAYmB,EACjCU,UAtCiBC,IACjBhC,GAIc,UAAdgC,EAAMC,KAAiC,MAAdD,EAAMC,MACjCD,EAAME,iBACNF,EAAMG,kBAEFd,EACFA,EAAUW,GACDZ,GACTA,EAAQY,KA2BR1B,SAAUA,EACVgB,KAAMA,MAMdN,EAAIoB,YAAc"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Tag/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiChip, { type ChipProps as MuiChipProps } from '@mui/material/Chip';\nimport { styled } from '@mui/material/styles';\n\nimport CancelIcon from '@fd/icons/Cancel';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\n/** Props for the Tag component */\ninterface TagBaseProps {\n /** Additional CSS class names */\n className?: string;\n /** Whether the tag is disabled */\n disabled?: boolean;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Text label displayed in the tag */\n label: string;\n /** Whether the tag is selected */\n selected?: boolean;\n /** Size of the tag */\n size?: MuiChipProps['size'];\n}\n\ninterface TagDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: never;\n /** Callback function when the tag is dismissed */\n onDismiss: NonNullable<MuiChipProps['onDelete']>;\n}\n\ninterface TagNonDismissibleProps extends TagBaseProps {\n /** Callback function when the tag is clicked */\n onClick?: MuiChipProps['onClick'];\n /** No dismiss handler in this variant */\n onDismiss?: never;\n}\n\n/** Props for the Tag component */\nexport type TagProps = TagDismissibleProps | TagNonDismissibleProps;\n\nconst StyledTagContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ disabled }) => ({\n cursor: disabled ? 'not-allowed' : undefined,\n}));\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) => prop !== 'selected',\n})<{ selected?: boolean }>(({ theme, selected }) => ({\n ...(selected && {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n\n '&:hover:not(.Mui-disabled)': {\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:active:not(.Mui-disabled)': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&:focus-visible, &.Mui-focusVisible': {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n borderColor: theme.palette.semantic.stroke['stroke-selected'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n },\n '&.Mui-disabled': {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n borderColor: theme.palette.semantic.fill['fill-disabled'],\n color: theme.palette.semantic.text['text-inverse-strong'],\n\n '& .MuiChip-deleteIcon, & .MuiChip-icon': {\n color: theme.palette.semantic.icon['icon-inverse-strong'],\n },\n },\n }),\n}));\n\n/**\n * Tag component used for categorization and filtering.\n * It supports two variants: dismissible (with delete icon) and clickable (entire tag is interactive).\n * Both variants support a selected state.\n */\nexport const Tag = ({\n className,\n disabled = false,\n fdKey,\n label,\n onClick,\n onDismiss,\n selected = false,\n size = 'medium',\n}: TagProps): JSX.Element => {\n const { translate } = useTranslation();\n\n const getAriaLabel = (): string | undefined => {\n if (onClick) {\n return label;\n }\n if (onDismiss) {\n return translate('Dismiss_dismissible', { dismissible: label });\n }\n\n return undefined;\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (disabled) {\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n\n if (onDismiss) {\n onDismiss(event as unknown as React.MouseEvent<HTMLDivElement>);\n } else if (onClick) {\n onClick(event as unknown as React.MouseEvent<HTMLDivElement>);\n }\n }\n };\n\n const renderDismissIcon = (): React.ReactElement<unknown> | undefined => {\n if (!onDismiss) {\n return undefined;\n }\n\n return <CancelIcon aria-hidden={true} data-testid=\"tag-dismiss-icon\" size=\"sm\" />;\n };\n\n return (\n <StyledTagContainer disabled={disabled}>\n <StyledTag\n aria-label={getAriaLabel()}\n className={className}\n clickable={disabled ? false : !!onClick}\n data-fd={fdKey}\n data-fd-variant=\"tag\"\n deleteIcon={renderDismissIcon()}\n disabled={disabled}\n label={label}\n onClick={disabled ? undefined : onClick}\n onDelete={disabled ? undefined : onDismiss}\n onKeyDown={handleKeyDown}\n selected={selected}\n size={size}\n />\n </StyledTagContainer>\n );\n};\n\nTag.displayName = 'Tag';\n\nexport default Tag;\n"],"names":["StyledTagContainer","styled","Box","shouldForwardProp","prop","disabled","cursor","undefined","StyledTag","MuiChip","theme","selected","backgroundColor","palette","semantic","fill","borderColor","stroke","color","text","icon","Tag","className","fdKey","label","onClick","onDismiss","size","translate","useTranslation","_jsx","children","dismissible","clickable","deleteIcon","CancelIcon","renderDismissIcon","onDelete","onKeyDown","event","key","preventDefault","stopPropagation","displayName"],"mappings":"kRAwCA,MAAMA,EAAqBC,EAAOC,EAAK,CACrCC,kBAAoBC,GAAkB,aAATA,GADJH,EAEA,EAAGI,eAAU,CACtCC,OAAQD,EAAW,mBAAgBE,MAG/BC,EAAYP,EAAOQ,EAAS,CAChCN,kBAAoBC,GAAkB,aAATA,GADbH,EAES,EAAGS,QAAOC,eAAU,IACzCA,GAAY,CACdC,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,uBAEnC,6BAA8B,CAC5BF,MAAOR,EAAMG,QAAQC,SAASK,KAAK,yBAGvC,6BAA8B,CAC5BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,8BAA+B,CAC7BP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,sCAAuC,CACrCP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASG,OAAO,mBAC3CC,MAAOR,EAAMG,QAAQC,SAASK,KAAK,wBAErC,iBAAkB,CAChBP,gBAAiBF,EAAMG,QAAQC,SAASC,KAAK,iBAC7CC,YAAaN,EAAMG,QAAQC,SAASC,KAAK,iBACzCG,MAAOR,EAAMG,QAAQC,SAASK,KAAK,uBAEnC,yCAA0C,CACxCD,MAAOR,EAAMG,QAAQC,SAASM,KAAK,8BAW9BC,EAAM,EACjBC,YACAjB,YAAW,EACXkB,QACAC,QACAC,UACAC,YACAf,YAAW,EACXgB,OAAO,aAEP,MAAMC,UAAEA,GAAcC,IAsCtB,OACEC,EAAC9B,GAAmBK,SAAUA,EAAQ0B,SACpCD,EAACtB,EAAS,CAAA,aArCRiB,EACKD,EAELE,EACKE,EAAU,sBAAuB,CAAEI,YAAaR,SADzD,EAoCIF,UAAWA,EACXW,WAAW5B,KAAqBoB,YACvBF,EAAK,kBACE,MAChBW,WAhBoB,MACxB,GAAKR,EAIL,OAAOI,EAACK,EAAU,CAAA,eAAc,EAAI,cAAc,mBAAmBR,KAAK,QAW1DS,GACZ/B,SAAUA,EACVmB,MAAOA,EACPC,QAASpB,OAAWE,EAAYkB,EAChCY,SAAUhC,OAAWE,EAAYmB,EACjCY,UAtCiBC,IACjBlC,GAIc,UAAdkC,EAAMC,KAAiC,MAAdD,EAAMC,MACjCD,EAAME,iBACNF,EAAMG,kBAEFhB,EACFA,EAAUa,GACDd,GACTA,EAAQc,KA2BR5B,SAAUA,EACVgB,KAAMA,OAMdN,EAAIsB,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/TextArea/index.tsx"],"sourcesContent":["import TextField, { type TextFieldProps } from '../TextField';\n\n/**\n * The props for the TextArea component.\n */\nexport type TextAreaProps = Omit<\n TextFieldProps,\n 'hidePasswordAriaLabel' | 'multiline' | 'showPasswordAriaLabel' | 'type'\n> & {\n /** The number of rows for the text area. */\n rows?: number;\n};\n\n/**\n * A TextArea component.\n *\n * @param props - The component props\n * @returns The rendered TextArea component\n */\nexport const TextArea = ({ fdKey, rows = 6, ...props }: TextAreaProps): JSX.Element => {\n return <TextField {...props} multiline fdKey={fdKey} rows={rows} type=\"text\" />;\n};\n\nexport default TextArea;\n"],"names":["TextArea","fdKey","rows","props","_jsx","TextField","multiline","type"],"mappings":"8IAmBO,MAAMA,EAAW,EAAGC,QAAOC,OAAO,KAAMC,KACtCC,EAAAA,IAACC,EAAAA,UAAS,IAAKF,EAAOG,aAAUL,MAAOA,EAAOC,KAAMA,EAAMK,KAAK"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/TextArea/index.tsx"],"sourcesContent":["import TextField, { type TextFieldProps } from '../TextField';\n\n/**\n * The props for the TextArea component.\n */\nexport type TextAreaProps = Omit<TextFieldProps, 'multiline' | 'type'> & {\n /** The number of rows for the text area. */\n rows?: number;\n};\n\n/**\n * A TextArea component.\n *\n * @param props - The component props\n * @returns The rendered TextArea component\n */\nexport const TextArea = ({ fdKey, rows = 6, ...props }: TextAreaProps): JSX.Element => {\n return <TextField {...props} multiline fdKey={fdKey} rows={rows} type=\"text\" />;\n};\n\nexport default TextArea;\n"],"names":["TextArea","fdKey","rows","props","_jsx","TextField","multiline","type"],"mappings":"8IAgBO,MAAMA,EAAW,EAAGC,QAAOC,OAAO,KAAMC,KACtCC,EAAAA,IAACC,EAAAA,UAAS,IAAKF,EAAOG,aAAUL,MAAOA,EAAOC,KAAMA,EAAMK,KAAK"}
@@ -3,7 +3,7 @@ import { TextFieldProps } from '../TextField/index.js';
3
3
  /**
4
4
  * The props for the TextArea component.
5
5
  */
6
- type TextAreaProps = Omit<TextFieldProps, 'hidePasswordAriaLabel' | 'multiline' | 'showPasswordAriaLabel' | 'type'> & {
6
+ type TextAreaProps = Omit<TextFieldProps, 'multiline' | 'type'> & {
7
7
  /** The number of rows for the text area. */
8
8
  rows?: number;
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/TextArea/index.tsx"],"sourcesContent":["import TextField, { type TextFieldProps } from '../TextField';\n\n/**\n * The props for the TextArea component.\n */\nexport type TextAreaProps = Omit<\n TextFieldProps,\n 'hidePasswordAriaLabel' | 'multiline' | 'showPasswordAriaLabel' | 'type'\n> & {\n /** The number of rows for the text area. */\n rows?: number;\n};\n\n/**\n * A TextArea component.\n *\n * @param props - The component props\n * @returns The rendered TextArea component\n */\nexport const TextArea = ({ fdKey, rows = 6, ...props }: TextAreaProps): JSX.Element => {\n return <TextField {...props} multiline fdKey={fdKey} rows={rows} type=\"text\" />;\n};\n\nexport default TextArea;\n"],"names":["TextArea","fdKey","rows","props","_jsx","TextField","multiline","type"],"mappings":"0FAmBO,MAAMA,EAAW,EAAGC,QAAOC,OAAO,KAAMC,KACtCC,EAACC,EAAS,IAAKF,EAAOG,aAAUL,MAAOA,EAAOC,KAAMA,EAAMK,KAAK"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/TextArea/index.tsx"],"sourcesContent":["import TextField, { type TextFieldProps } from '../TextField';\n\n/**\n * The props for the TextArea component.\n */\nexport type TextAreaProps = Omit<TextFieldProps, 'multiline' | 'type'> & {\n /** The number of rows for the text area. */\n rows?: number;\n};\n\n/**\n * A TextArea component.\n *\n * @param props - The component props\n * @returns The rendered TextArea component\n */\nexport const TextArea = ({ fdKey, rows = 6, ...props }: TextAreaProps): JSX.Element => {\n return <TextField {...props} multiline fdKey={fdKey} rows={rows} type=\"text\" />;\n};\n\nexport default TextArea;\n"],"names":["TextArea","fdKey","rows","props","_jsx","TextField","multiline","type"],"mappings":"0FAgBO,MAAMA,EAAW,EAAGC,QAAOC,OAAO,KAAMC,KACtCC,EAACC,EAAS,IAAKF,EAAOG,aAAUL,MAAOA,EAAOC,KAAMA,EAAMK,KAAK"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material/Box"),t=require("@mui/material/FormHelperText"),l=require("@mui/material/InputAdornment"),d=require("@mui/material/InputLabel"),s=require("@mui/material/styles"),n=require("@mui/material/TextField"),o=require("../../../icons/CancelCircle/index.cjs.js"),a=require("../../../icons/View/index.cjs.js"),u=require("../../../icons/ViewOff/index.cjs.js"),c=require("../IconButton/index.cjs.js");const p=s.styled(i,{shouldForwardProp:e=>"fullWidth"!==e})((({theme:e,fullWidth:r=!1})=>({display:"flex",flexDirection:"column",gap:e.spacing(.5),width:r?"100%":"min(364px, 100%)"}))),x=s.styled(n,{shouldForwardProp:e=>"fullWidth"!==e})((({fullWidth:e=!1})=>({display:"flex",width:e?"100%":"auto"}))),m=s.styled(l,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:r=!1})=>({color:r?e.palette.semantic.icon["icon-disabled"]:e.palette.semantic.icon["icon-strong"]}))),h=({disabled:l=!1,endAdornment:s,errorText:n,fdKey:h,fullWidth:j=!1,helperText:f,hidePasswordAriaLabel:b,label:q,multiline:y=!1,required:w=!1,showPasswordAriaLabel:P,startAdornment:v,type:A="text",...F})=>{const[I,W]=r.useState(!1),B=f?`${h}-helper-text`:void 0,T=n?`${h}-error-message`:void 0,g=[B,T].filter(Boolean).join(" ")||void 0,C=F.slotProps?.htmlInput?.["aria-describedby"],L=[C,g].filter(Boolean).join(" ")||void 0,O=!!n&&!l,V="password"===A,$=()=>W((e=>!e)),_=(()=>{if(V){if(!P||!b)return;return e.jsx(m,{position:"end",children:e.jsx(c.IconButton,{"aria-label":I?b:P,disabled:l,onClick:$,size:"small",tone:"neutral",variant:"tertiary",children:I?e.jsx(u,{}):e.jsx(a,{})})})}if(s)return e.jsx(m,{disabled:l,position:"end",children:s})})(),k=(()=>{if(v)return e.jsx(m,{disabled:l,position:"start",children:v})})();return e.jsxs(p,{fullWidth:j,children:[e.jsxs(i,{children:[q&&e.jsx(d,{disabled:l,htmlFor:h,required:w,children:q}),f&&e.jsx(t,{disabled:l,id:B,children:f})]}),O&&e.jsxs(t,{error:!0,id:T,children:[e.jsx(o,{}),n]}),e.jsx(x,{...F,"data-fd":h,disabled:l,error:O,fullWidth:j,id:h,label:"",multiline:y,required:w,slotProps:{input:{...F.slotProps?.input??{},...k&&{startAdornment:k},..._&&{endAdornment:_}},htmlInput:{...F.slotProps?.htmlInput??{},"aria-describedby":L}},type:V?I?"text":"password":A,variant:"outlined"})]})};exports.TextField=h,exports.default=h;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material/Box"),t=require("@mui/material/FormHelperText"),l=require("@mui/material/InputAdornment"),s=require("@mui/material/InputLabel"),d=require("@mui/material/styles"),o=require("@mui/material/TextField"),n=require("../../../icons/CancelCircle/index.cjs.js"),a=require("../../../icons/View/index.cjs.js"),u=require("../../../icons/ViewOff/index.cjs.js"),c=require("../../../providers/TranslationProvider.cjs.js"),p=require("../IconButton/index.cjs.js");const x=d.styled(i,{shouldForwardProp:e=>"fullWidth"!==e})((({theme:e,fullWidth:r=!1})=>({display:"flex",flexDirection:"column",gap:e.spacing(.5),width:r?"100%":"min(364px, 100%)"}))),m=d.styled(o,{shouldForwardProp:e=>"fullWidth"!==e})((({fullWidth:e=!1})=>({display:"flex",width:e?"100%":"auto"}))),h=d.styled(l,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:r=!1})=>({color:r?e.palette.semantic.icon["icon-disabled"]:e.palette.semantic.icon["icon-strong"]}))),j=({disabled:l=!1,endAdornment:d,errorText:o,fdKey:j,fullWidth:b=!1,helperText:f,label:q,multiline:y=!1,required:w=!1,startAdornment:v,type:P="text",...F})=>{const[I,T]=r.useState(!1),{translate:W}=c.useTranslation(),A=f?`${j}-helper-text`:void 0,B=o?`${j}-error-message`:void 0,g=[A,B].filter(Boolean).join(" ")||void 0,_=F.slotProps?.htmlInput?.["aria-describedby"],C=[_,g].filter(Boolean).join(" ")||void 0,H=!!o&&!l,O="password"===P,S=()=>T((e=>!e)),V=O?e.jsx(h,{position:"end",children:e.jsx(p.IconButton,{"aria-label":W(I?"Hide_password":"Show_password"),disabled:l,onClick:S,size:"small",tone:"neutral",variant:"tertiary",children:I?e.jsx(u,{}):e.jsx(a,{})})}):d?e.jsx(h,{disabled:l,position:"end",children:d}):void 0,$=(()=>{if(v)return e.jsx(h,{disabled:l,position:"start",children:v})})();return e.jsxs(x,{fullWidth:b,children:[e.jsxs(i,{children:[q&&e.jsx(s,{disabled:l,htmlFor:j,required:w,children:q}),f&&e.jsx(t,{disabled:l,id:A,children:f})]}),H&&e.jsxs(t,{error:!0,id:B,children:[e.jsx(n,{}),o]}),e.jsx(m,{...F,"data-fd":j,disabled:l,error:H,fullWidth:b,id:j,label:"",multiline:y,required:w,slotProps:{input:{...F.slotProps?.input??{},...$&&{startAdornment:$},...V&&{endAdornment:V}},htmlInput:{...F.slotProps?.htmlInput??{},"aria-describedby":C}},type:O?I?"text":"password":P,variant:"outlined"})]})};exports.TextField=j,exports.default=j;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n /** The content rendered at the end of the input (suffix). */\n endAdornment?: ReactNode;\n /** The error text to display. */\n errorText?: string;\n /** The key for the input. */\n fdKey: string;\n /** The content rendered at the start of the input (prefix). */\n startAdornment?: ReactNode;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n /** The type of the input. */\n type: 'password';\n /** The aria label for the hide password button. */\n hidePasswordAriaLabel: string;\n /** The aria label for the show password button. */\n showPasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n /** The type of the input. */\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n /** The aria label for the hide password button. */\n hidePasswordAriaLabel?: never;\n /** The aria label for the show password button. */\n showPasswordAriaLabel?: never;\n};\n\n/**\n * The props for the TextField component.\n */\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain width to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst StyledInputAdornment = styled(MuiInputAdornment, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n color: disabled ? theme.palette.semantic.icon['icon-disabled'] : theme.palette.semantic.icon['icon-strong'],\n}));\n\n/**\n * A TextField component.\n *\n * @param props - The component props\n * @returns The rendered TextField component\n */\nexport const TextField = ({\n disabled = false,\n endAdornment = undefined,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n startAdornment = undefined,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n const incomingAriaDescribedBy = (props.slotProps?.htmlInput as Record<string, unknown>)?.[\n 'aria-describedby'\n ] as string | undefined;\n const mergedAriaDescribedBy =\n [incomingAriaDescribedBy, ariaDescribedBy].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <StyledInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </StyledInputAdornment>\n );\n }\n if (endAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"end\">\n {endAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n if (startAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"start\">\n {startAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderedEndAdornment = renderEndAdornment();\n const renderedStartAdornment = renderStartAdornment();\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n <Box>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n </Box>\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n {...props}\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n ...(props.slotProps?.input ?? {}),\n // Only pass startAdornment and endAdornment if they are defined\n ...(renderedStartAdornment && { startAdornment: renderedStartAdornment }),\n ...(renderedEndAdornment && { endAdornment: renderedEndAdornment }),\n },\n htmlInput: {\n ...(props.slotProps?.htmlInput ?? {}),\n 'aria-describedby': mergedAriaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","StyledInputAdornment","MuiInputAdornment","disabled","color","palette","semantic","icon","TextField","endAdornment","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","startAdornment","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","incomingAriaDescribedBy","slotProps","htmlInput","mergedAriaDescribedBy","isError","isPassword","handleClickShowPassword","show","renderedEndAdornment","_jsx","position","children","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","renderedStartAdornment","renderStartAdornment","_jsxs","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","CancelCircleIcon","input"],"mappings":"uhBAoDA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAAA,OAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,WAGxBQ,EAAuBb,EAAAA,OAAOc,EAAmB,CACrDZ,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOW,YAAW,MAAO,CACrDC,MAAOD,EAAWX,EAAMa,QAAQC,SAASC,KAAK,iBAAmBf,EAAMa,QAAQC,SAASC,KAAK,mBASlFC,EAAY,EACvBL,YAAW,EACXM,eACAC,YACAC,QACAlB,aAAY,EACZmB,aACAC,wBACAC,QACAC,aAAY,EACZC,YAAW,EACXC,wBACAC,iBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,EAAAA,UAAkB,GAEpDC,EAAeZ,EAAa,GAAGD,qBAAsBc,EACrDC,EAAiBhB,EAAY,GAAGC,uBAAwBc,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAC9EM,EAA2BX,EAAMY,WAAWC,YAChD,oBAEIC,EACJ,CAACH,EAAyBJ,GAAiBC,OAAOC,SAASC,KAAK,WAAQL,EAEpEU,IAAYzB,IAAcP,EAC1BiC,EAAsB,aAATjB,EAEbkB,EAA0B,IAAYf,GAAiBgB,IAAUA,IAsDjEC,EA5CqB,MACzB,GAAIH,EAAY,CACd,IAAKnB,IAA0BJ,EAC7B,OAGF,OACE2B,EAAAA,IAACvC,EAAoB,CAACwC,SAAS,MAAKC,SAClCF,MAACG,EAAAA,WAAU,CAAA,aACGtB,EAAeR,EAAwBI,EACnDd,SAAUA,EACVyC,QAASP,EACTQ,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUL,SAEjBrB,EAAemB,EAAAA,IAACQ,EAAW,CAAA,GAAMR,EAAAA,IAACS,EAAQ,CAAA,MAInD,CACA,GAAIxC,EACF,OACE+B,EAAAA,IAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,MAAKC,SACrDjC,KAoBoByC,GACvBC,EAbuB,MAC3B,GAAIjC,EACF,OACEsB,EAAAA,IAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,QAAOC,SACvDxB,KASsBkC,GAE/B,OACEC,EAAAA,KAAClE,EAAe,CAACM,UAAWA,YAC1B4D,EAAAA,KAAChE,aACEyB,GACC0B,EAAAA,IAACc,GAAcnD,SAAUA,EAAUoD,QAAS5C,EAAOK,SAAUA,EAAQ0B,SAClE5B,IAIJF,GACC4B,EAAAA,IAACgB,EAAiB,CAACrD,SAAUA,EAAUsD,GAAIjC,EAAYkB,SACpD9B,OAKNuB,GACCkB,EAAAA,KAACG,EAAiB,CAACE,OAAK,EAACD,GAAI/B,EAAcgB,SAAA,CACzCF,EAAAA,IAACmB,EAAgB,CAAA,GAEhBjD,KAIL8B,EAAAA,IAACzC,EAAe,IACVqB,EAAK,UACAT,EACTR,SAAUA,EACVuD,MAAOvB,EACP1C,UAAWA,EACXgE,GAAI9C,EACJG,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACVgB,UAAW,CACT4B,MAAO,IACDxC,EAAMY,WAAW4B,OAAS,MAE1BT,GAA0B,CAAEjC,eAAgBiC,MAC5CZ,GAAwB,CAAE9B,aAAc8B,IAE9CN,UAAW,IACLb,EAAMY,WAAWC,WAAa,GAClC,mBAAoBC,IAGxBf,KApGAiB,EACKf,EAAe,OAAS,WAG1BF,EAiGH4B,QAAQ"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\nimport IconButton from '../IconButton';\n\n/**\n * The props for the TextField component.\n */\nexport type TextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'variant'> & {\n /** The content rendered at the end of the input (suffix). */\n endAdornment?: ReactNode;\n /** The error text to display. */\n errorText?: string;\n /** The key for the input. */\n fdKey: string;\n /** The content rendered at the start of the input (prefix). */\n startAdornment?: ReactNode;\n};\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain width to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst StyledInputAdornment = styled(MuiInputAdornment, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n color: disabled ? theme.palette.semantic.icon['icon-disabled'] : theme.palette.semantic.icon['icon-strong'],\n}));\n\n/**\n * A TextField component.\n *\n * @param props - The component props\n * @returns The rendered TextField component\n */\nexport const TextField = ({\n disabled = false,\n endAdornment = undefined,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n label,\n multiline = false,\n required = false,\n startAdornment = undefined,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const { translate } = useTranslation();\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n const incomingAriaDescribedBy = (props.slotProps?.htmlInput as Record<string, unknown>)?.[\n 'aria-describedby'\n ] as string | undefined;\n const mergedAriaDescribedBy =\n [incomingAriaDescribedBy, ariaDescribedBy].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n return (\n <StyledInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? translate('Hide_password') : translate('Show_password')}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </StyledInputAdornment>\n );\n }\n if (endAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"end\">\n {endAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n if (startAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"start\">\n {startAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderedEndAdornment = renderEndAdornment();\n const renderedStartAdornment = renderStartAdornment();\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n <Box>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n </Box>\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n {...props}\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n ...(props.slotProps?.input ?? {}),\n // Only pass startAdornment and endAdornment if they are defined\n ...(renderedStartAdornment && { startAdornment: renderedStartAdornment }),\n ...(renderedEndAdornment && { endAdornment: renderedEndAdornment }),\n },\n htmlInput: {\n ...(props.slotProps?.htmlInput ?? {}),\n 'aria-describedby': mergedAriaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","StyledInputAdornment","MuiInputAdornment","disabled","color","palette","semantic","icon","TextField","endAdornment","errorText","fdKey","helperText","label","multiline","required","startAdornment","type","props","showPassword","setShowPassword","useState","translate","useTranslation","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","incomingAriaDescribedBy","slotProps","htmlInput","mergedAriaDescribedBy","isError","isPassword","handleClickShowPassword","show","renderedEndAdornment","_jsx","position","children","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderedStartAdornment","renderStartAdornment","_jsxs","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","CancelCircleIcon","input"],"mappings":"klBA8BA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAAA,OAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,WAGxBQ,EAAuBb,EAAAA,OAAOc,EAAmB,CACrDZ,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOW,YAAW,MAAO,CACrDC,MAAOD,EAAWX,EAAMa,QAAQC,SAASC,KAAK,iBAAmBf,EAAMa,QAAQC,SAASC,KAAK,mBASlFC,EAAY,EACvBL,YAAW,EACXM,eACAC,YACAC,QACAlB,aAAY,EACZmB,aACAC,QACAC,aAAY,EACZC,YAAW,EACXC,iBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,EAAAA,UAAkB,IAEpDC,UAAEA,GAAcC,mBAEhBC,EAAeZ,EAAa,GAAGD,qBAAsBc,EACrDC,EAAiBhB,EAAY,GAAGC,uBAAwBc,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAC9EM,EAA2Bb,EAAMc,WAAWC,YAChD,oBAEIC,EACJ,CAACH,EAAyBJ,GAAiBC,OAAOC,SAASC,KAAK,WAAQL,EAEpEU,IAAYzB,IAAcP,EAC1BiC,EAAsB,aAATnB,EAEboB,EAA0B,IAAYjB,GAAiBkB,IAAUA,IAkDjEC,EAvCAH,EAEAI,EAAAA,IAACvC,EAAoB,CAACwC,SAAS,MAAKC,SAClCF,EAAAA,IAACG,EAAAA,WAAU,CAAA,aACkBrB,EAAfH,EAAyB,gBAA6B,iBAClEhB,SAAUA,EACVyC,QAASP,EACTQ,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUL,SAEjBvB,EAAeqB,EAAAA,IAACQ,EAAW,CAAA,GAAMR,EAAAA,IAACS,EAAQ,CAAA,OAK/CxC,EAEA+B,EAAAA,IAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,MAAKC,SACrDjC,SAHP,EAwBIyC,EAbuB,MAC3B,GAAIlC,EACF,OACEwB,EAAAA,IAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,QAAOC,SACvD1B,KASsBmC,GAE/B,OACEC,EAAAA,KAACjE,EAAe,CAACM,UAAWA,YAC1B2D,EAAAA,KAAC/D,aACEwB,GACC2B,EAAAA,IAACa,GAAclD,SAAUA,EAAUmD,QAAS3C,EAAOI,SAAUA,EAAQ2B,SAClE7B,IAIJD,GACC4B,EAAAA,IAACe,EAAiB,CAACpD,SAAUA,EAAUqD,GAAIhC,EAAYkB,SACpD9B,OAKNuB,GACCiB,EAAAA,KAACG,EAAiB,CAACE,OAAK,EAACD,GAAI9B,EAAcgB,SAAA,CACzCF,EAAAA,IAACkB,EAAgB,CAAA,GAEhBhD,KAIL8B,EAAAA,IAACzC,EAAe,IACVmB,EAAK,UACAP,EACTR,SAAUA,EACVsD,MAAOtB,EACP1C,UAAWA,EACX+D,GAAI7C,EACJE,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACViB,UAAW,CACT2B,MAAO,IACDzC,EAAMc,WAAW2B,OAAS,MAE1BT,GAA0B,CAAElC,eAAgBkC,MAC5CX,GAAwB,CAAE9B,aAAc8B,IAE9CN,UAAW,IACLf,EAAMc,WAAWC,WAAa,GAClC,mBAAoBC,IAGxBjB,KAhGAmB,EACKjB,EAAe,OAAS,WAG1BF,EA6FH8B,QAAQ"}
@@ -1,7 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TextFieldProps as TextFieldProps$1 } from '@mui/material/TextField';
3
3
 
4
- type BaseTextFieldProps = Omit<TextFieldProps$1, 'error' | 'id' | 'type' | 'variant'> & {
4
+ /**
5
+ * The props for the TextField component.
6
+ */
7
+ type TextFieldProps = Omit<TextFieldProps$1, 'error' | 'id' | 'variant'> & {
5
8
  /** The content rendered at the end of the input (suffix). */
6
9
  endAdornment?: ReactNode;
7
10
  /** The error text to display. */
@@ -11,33 +14,13 @@ type BaseTextFieldProps = Omit<TextFieldProps$1, 'error' | 'id' | 'type' | 'vari
11
14
  /** The content rendered at the start of the input (prefix). */
12
15
  startAdornment?: ReactNode;
13
16
  };
14
- type PasswordTextFieldProps = BaseTextFieldProps & {
15
- /** The type of the input. */
16
- type: 'password';
17
- /** The aria label for the hide password button. */
18
- hidePasswordAriaLabel: string;
19
- /** The aria label for the show password button. */
20
- showPasswordAriaLabel: string;
21
- };
22
- type GenericTextFieldProps = BaseTextFieldProps & {
23
- /** The type of the input. */
24
- type?: Exclude<TextFieldProps$1['type'], 'password'>;
25
- /** The aria label for the hide password button. */
26
- hidePasswordAriaLabel?: never;
27
- /** The aria label for the show password button. */
28
- showPasswordAriaLabel?: never;
29
- };
30
- /**
31
- * The props for the TextField component.
32
- */
33
- type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;
34
17
  /**
35
18
  * A TextField component.
36
19
  *
37
20
  * @param props - The component props
38
21
  * @returns The rendered TextField component
39
22
  */
40
- declare const TextField: ({ disabled, endAdornment, errorText, fdKey, fullWidth, helperText, hidePasswordAriaLabel, label, multiline, required, showPasswordAriaLabel, startAdornment, type, ...props }: TextFieldProps) => JSX.Element;
23
+ declare const TextField: ({ disabled, endAdornment, errorText, fdKey, fullWidth, helperText, label, multiline, required, startAdornment, type, ...props }: TextFieldProps) => JSX.Element;
41
24
 
42
25
  export { TextField, TextField as default };
43
26
  export type { TextFieldProps };
@@ -1,2 +1,2 @@
1
- import{jsxs as i,jsx as r}from"react/jsx-runtime";import{useState as e}from"react";import t from"@mui/material/Box";import o from"@mui/material/FormHelperText";import l from"@mui/material/InputAdornment";import d from"@mui/material/InputLabel";import{styled as n}from"@mui/material/styles";import a from"@mui/material/TextField";import s from"../../../icons/CancelCircle/index.js";import m from"../../../icons/View/index.js";import p from"../../../icons/ViewOff/index.js";import{IconButton as u}from"../IconButton/index.js";const f=n(t,{shouldForwardProp:i=>"fullWidth"!==i})((({theme:i,fullWidth:r=!1})=>({display:"flex",flexDirection:"column",gap:i.spacing(.5),width:r?"100%":"min(364px, 100%)"}))),c=n(a,{shouldForwardProp:i=>"fullWidth"!==i})((({fullWidth:i=!1})=>({display:"flex",width:i?"100%":"auto"}))),h=n(l,{shouldForwardProp:i=>"disabled"!==i})((({theme:i,disabled:r=!1})=>({color:r?i.palette.semantic.icon["icon-disabled"]:i.palette.semantic.icon["icon-strong"]}))),b=({disabled:l=!1,endAdornment:n,errorText:a,fdKey:b,fullWidth:x=!1,helperText:w,hidePasswordAriaLabel:y,label:P,multiline:j=!1,required:A=!1,showPasswordAriaLabel:W,startAdornment:v,type:F="text",...I})=>{const[g,B]=e(!1),T=w?`${b}-helper-text`:void 0,q=a?`${b}-error-message`:void 0,C=[T,q].filter(Boolean).join(" ")||void 0,L=I.slotProps?.htmlInput?.["aria-describedby"],V=[L,C].filter(Boolean).join(" ")||void 0,$=!!a&&!l,k="password"===F,z=()=>B((i=>!i)),D=(()=>{if(k){if(!W||!y)return;return r(h,{position:"end",children:r(u,{"aria-label":g?y:W,disabled:l,onClick:z,size:"small",tone:"neutral",variant:"tertiary",children:r(g?p:m,{})})})}if(n)return r(h,{disabled:l,position:"end",children:n})})(),H=(()=>{if(v)return r(h,{disabled:l,position:"start",children:v})})();return i(f,{fullWidth:x,children:[i(t,{children:[P&&r(d,{disabled:l,htmlFor:b,required:A,children:P}),w&&r(o,{disabled:l,id:T,children:w})]}),$&&i(o,{error:!0,id:q,children:[r(s,{}),a]}),r(c,{...I,"data-fd":b,disabled:l,error:$,fullWidth:x,id:b,label:"",multiline:j,required:A,slotProps:{input:{...I.slotProps?.input??{},...H&&{startAdornment:H},...D&&{endAdornment:D}},htmlInput:{...I.slotProps?.htmlInput??{},"aria-describedby":V}},type:k?g?"text":"password":F,variant:"outlined"})]})};export{b as TextField,b as default};
1
+ import{jsxs as i,jsx as r}from"react/jsx-runtime";import{useState as e}from"react";import t from"@mui/material/Box";import o from"@mui/material/FormHelperText";import l from"@mui/material/InputAdornment";import d from"@mui/material/InputLabel";import{styled as n}from"@mui/material/styles";import a from"@mui/material/TextField";import s from"../../../icons/CancelCircle/index.js";import m from"../../../icons/View/index.js";import p from"../../../icons/ViewOff/index.js";import{useTranslation as u}from"../../../providers/TranslationProvider.js";import{IconButton as c}from"../IconButton/index.js";const f=n(t,{shouldForwardProp:i=>"fullWidth"!==i})((({theme:i,fullWidth:r=!1})=>({display:"flex",flexDirection:"column",gap:i.spacing(.5),width:r?"100%":"min(364px, 100%)"}))),h=n(a,{shouldForwardProp:i=>"fullWidth"!==i})((({fullWidth:i=!1})=>({display:"flex",width:i?"100%":"auto"}))),b=n(l,{shouldForwardProp:i=>"disabled"!==i})((({theme:i,disabled:r=!1})=>({color:r?i.palette.semantic.icon["icon-disabled"]:i.palette.semantic.icon["icon-strong"]}))),x=({disabled:l=!1,endAdornment:n,errorText:a,fdKey:x,fullWidth:w=!1,helperText:v,label:y,multiline:j=!1,required:P=!1,startAdornment:W,type:F="text",...I})=>{const[A,T]=e(!1),{translate:g}=u(),B=v?`${x}-helper-text`:void 0,q=a?`${x}-error-message`:void 0,C=[B,q].filter(Boolean).join(" ")||void 0,H=I.slotProps?.htmlInput?.["aria-describedby"],V=[H,C].filter(Boolean).join(" ")||void 0,$=!!a&&!l,_="password"===F,k=()=>T((i=>!i)),z=_?r(b,{position:"end",children:r(c,{"aria-label":g(A?"Hide_password":"Show_password"),disabled:l,onClick:k,size:"small",tone:"neutral",variant:"tertiary",children:r(A?p:m,{})})}):n?r(b,{disabled:l,position:"end",children:n}):void 0,D=(()=>{if(W)return r(b,{disabled:l,position:"start",children:W})})();return i(f,{fullWidth:w,children:[i(t,{children:[y&&r(d,{disabled:l,htmlFor:x,required:P,children:y}),v&&r(o,{disabled:l,id:B,children:v})]}),$&&i(o,{error:!0,id:q,children:[r(s,{}),a]}),r(h,{...I,"data-fd":x,disabled:l,error:$,fullWidth:w,id:x,label:"",multiline:j,required:P,slotProps:{input:{...I.slotProps?.input??{},...D&&{startAdornment:D},...z&&{endAdornment:z}},htmlInput:{...I.slotProps?.htmlInput??{},"aria-describedby":V}},type:_?A?"text":"password":F,variant:"outlined"})]})};export{x as TextField,x as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n /** The content rendered at the end of the input (suffix). */\n endAdornment?: ReactNode;\n /** The error text to display. */\n errorText?: string;\n /** The key for the input. */\n fdKey: string;\n /** The content rendered at the start of the input (prefix). */\n startAdornment?: ReactNode;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n /** The type of the input. */\n type: 'password';\n /** The aria label for the hide password button. */\n hidePasswordAriaLabel: string;\n /** The aria label for the show password button. */\n showPasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n /** The type of the input. */\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n /** The aria label for the hide password button. */\n hidePasswordAriaLabel?: never;\n /** The aria label for the show password button. */\n showPasswordAriaLabel?: never;\n};\n\n/**\n * The props for the TextField component.\n */\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain width to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst StyledInputAdornment = styled(MuiInputAdornment, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n color: disabled ? theme.palette.semantic.icon['icon-disabled'] : theme.palette.semantic.icon['icon-strong'],\n}));\n\n/**\n * A TextField component.\n *\n * @param props - The component props\n * @returns The rendered TextField component\n */\nexport const TextField = ({\n disabled = false,\n endAdornment = undefined,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n startAdornment = undefined,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n const incomingAriaDescribedBy = (props.slotProps?.htmlInput as Record<string, unknown>)?.[\n 'aria-describedby'\n ] as string | undefined;\n const mergedAriaDescribedBy =\n [incomingAriaDescribedBy, ariaDescribedBy].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <StyledInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </StyledInputAdornment>\n );\n }\n if (endAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"end\">\n {endAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n if (startAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"start\">\n {startAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderedEndAdornment = renderEndAdornment();\n const renderedStartAdornment = renderStartAdornment();\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n <Box>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n </Box>\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n {...props}\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n ...(props.slotProps?.input ?? {}),\n // Only pass startAdornment and endAdornment if they are defined\n ...(renderedStartAdornment && { startAdornment: renderedStartAdornment }),\n ...(renderedEndAdornment && { endAdornment: renderedEndAdornment }),\n },\n htmlInput: {\n ...(props.slotProps?.htmlInput ?? {}),\n 'aria-describedby': mergedAriaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","StyledInputAdornment","MuiInputAdornment","disabled","color","palette","semantic","icon","TextField","endAdornment","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","startAdornment","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","incomingAriaDescribedBy","slotProps","htmlInput","mergedAriaDescribedBy","isError","isPassword","handleClickShowPassword","show","renderedEndAdornment","_jsx","position","children","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","renderedStartAdornment","renderStartAdornment","_jsxs","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","CancelCircleIcon","input"],"mappings":"4gBAoDA,MAAMA,EAAkBC,EAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,WAGxBQ,EAAuBb,EAAOc,EAAmB,CACrDZ,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOW,YAAW,MAAO,CACrDC,MAAOD,EAAWX,EAAMa,QAAQC,SAASC,KAAK,iBAAmBf,EAAMa,QAAQC,SAASC,KAAK,mBASlFC,EAAY,EACvBL,YAAW,EACXM,eACAC,YACAC,QACAlB,aAAY,EACZmB,aACAC,wBACAC,QACAC,aAAY,EACZC,YAAW,EACXC,wBACAC,iBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,GAAkB,GAEpDC,EAAeZ,EAAa,GAAGD,qBAAsBc,EACrDC,EAAiBhB,EAAY,GAAGC,uBAAwBc,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAC9EM,EAA2BX,EAAMY,WAAWC,YAChD,oBAEIC,EACJ,CAACH,EAAyBJ,GAAiBC,OAAOC,SAASC,KAAK,WAAQL,EAEpEU,IAAYzB,IAAcP,EAC1BiC,EAAsB,aAATjB,EAEbkB,EAA0B,IAAYf,GAAiBgB,IAAUA,IAsDjEC,EA5CqB,MACzB,GAAIH,EAAY,CACd,IAAKnB,IAA0BJ,EAC7B,OAGF,OACE2B,EAACvC,EAAoB,CAACwC,SAAS,MAAKC,SAClCF,EAACG,EAAU,CAAA,aACGtB,EAAeR,EAAwBI,EACnDd,SAAUA,EACVyC,QAASP,EACTQ,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUL,SAEFF,EAAfnB,EAAgB2B,EAAkBC,EAAP,CAAA,MAIpC,CACA,GAAIxC,EACF,OACE+B,EAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,MAAKC,SACrDjC,KAoBoByC,GACvBC,EAbuB,MAC3B,GAAIjC,EACF,OACEsB,EAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,QAAOC,SACvDxB,KASsBkC,GAE/B,OACEC,EAAClE,EAAe,CAACM,UAAWA,YAC1B4D,EAAChE,aACEyB,GACC0B,EAACc,GAAcnD,SAAUA,EAAUoD,QAAS5C,EAAOK,SAAUA,EAAQ0B,SAClE5B,IAIJF,GACC4B,EAACgB,EAAiB,CAACrD,SAAUA,EAAUsD,GAAIjC,EAAYkB,SACpD9B,OAKNuB,GACCkB,EAACG,EAAiB,CAACE,OAAK,EAACD,GAAI/B,EAAcgB,SAAA,CACzCF,EAACmB,EAAgB,CAAA,GAEhBjD,KAIL8B,EAACzC,EAAe,IACVqB,EAAK,UACAT,EACTR,SAAUA,EACVuD,MAAOvB,EACP1C,UAAWA,EACXgE,GAAI9C,EACJG,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACVgB,UAAW,CACT4B,MAAO,IACDxC,EAAMY,WAAW4B,OAAS,MAE1BT,GAA0B,CAAEjC,eAAgBiC,MAC5CZ,GAAwB,CAAE9B,aAAc8B,IAE9CN,UAAW,IACLb,EAAMY,WAAWC,WAAa,GAClC,mBAAoBC,IAGxBf,KApGAiB,EACKf,EAAe,OAAS,WAG1BF,EAiGH4B,QAAQ"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\nimport IconButton from '../IconButton';\n\n/**\n * The props for the TextField component.\n */\nexport type TextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'variant'> & {\n /** The content rendered at the end of the input (suffix). */\n endAdornment?: ReactNode;\n /** The error text to display. */\n errorText?: string;\n /** The key for the input. */\n fdKey: string;\n /** The content rendered at the start of the input (prefix). */\n startAdornment?: ReactNode;\n};\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain width to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst StyledInputAdornment = styled(MuiInputAdornment, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n color: disabled ? theme.palette.semantic.icon['icon-disabled'] : theme.palette.semantic.icon['icon-strong'],\n}));\n\n/**\n * A TextField component.\n *\n * @param props - The component props\n * @returns The rendered TextField component\n */\nexport const TextField = ({\n disabled = false,\n endAdornment = undefined,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n label,\n multiline = false,\n required = false,\n startAdornment = undefined,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const { translate } = useTranslation();\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n const incomingAriaDescribedBy = (props.slotProps?.htmlInput as Record<string, unknown>)?.[\n 'aria-describedby'\n ] as string | undefined;\n const mergedAriaDescribedBy =\n [incomingAriaDescribedBy, ariaDescribedBy].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n return (\n <StyledInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? translate('Hide_password') : translate('Show_password')}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </StyledInputAdornment>\n );\n }\n if (endAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"end\">\n {endAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n if (startAdornment) {\n return (\n <StyledInputAdornment disabled={disabled} position=\"start\">\n {startAdornment}\n </StyledInputAdornment>\n );\n }\n\n return undefined;\n };\n\n const renderedEndAdornment = renderEndAdornment();\n const renderedStartAdornment = renderStartAdornment();\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n <Box>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n </Box>\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n {...props}\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n ...(props.slotProps?.input ?? {}),\n // Only pass startAdornment and endAdornment if they are defined\n ...(renderedStartAdornment && { startAdornment: renderedStartAdornment }),\n ...(renderedEndAdornment && { endAdornment: renderedEndAdornment }),\n },\n htmlInput: {\n ...(props.slotProps?.htmlInput ?? {}),\n 'aria-describedby': mergedAriaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","StyledInputAdornment","MuiInputAdornment","disabled","color","palette","semantic","icon","TextField","endAdornment","errorText","fdKey","helperText","label","multiline","required","startAdornment","type","props","showPassword","setShowPassword","useState","translate","useTranslation","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","incomingAriaDescribedBy","slotProps","htmlInput","mergedAriaDescribedBy","isError","isPassword","handleClickShowPassword","show","renderedEndAdornment","_jsx","position","children","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderedStartAdornment","renderStartAdornment","_jsxs","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","CancelCircleIcon","input"],"mappings":"ulBA8BA,MAAMA,EAAkBC,EAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,WAGxBQ,EAAuBb,EAAOc,EAAmB,CACrDZ,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOW,YAAW,MAAO,CACrDC,MAAOD,EAAWX,EAAMa,QAAQC,SAASC,KAAK,iBAAmBf,EAAMa,QAAQC,SAASC,KAAK,mBASlFC,EAAY,EACvBL,YAAW,EACXM,eACAC,YACAC,QACAlB,aAAY,EACZmB,aACAC,QACAC,aAAY,EACZC,YAAW,EACXC,iBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,GAAkB,IAEpDC,UAAEA,GAAcC,IAEhBC,EAAeZ,EAAa,GAAGD,qBAAsBc,EACrDC,EAAiBhB,EAAY,GAAGC,uBAAwBc,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAC9EM,EAA2Bb,EAAMc,WAAWC,YAChD,oBAEIC,EACJ,CAACH,EAAyBJ,GAAiBC,OAAOC,SAASC,KAAK,WAAQL,EAEpEU,IAAYzB,IAAcP,EAC1BiC,EAAsB,aAATnB,EAEboB,EAA0B,IAAYjB,GAAiBkB,IAAUA,IAkDjEC,EAvCAH,EAEAI,EAACvC,EAAoB,CAACwC,SAAS,MAAKC,SAClCF,EAACG,EAAU,CAAA,aACkBrB,EAAfH,EAAyB,gBAA6B,iBAClEhB,SAAUA,EACVyC,QAASP,EACTQ,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUL,SAEFF,EAAfrB,EAAgB6B,EAAkBC,EAAP,CAAA,OAKhCxC,EAEA+B,EAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,MAAKC,SACrDjC,SAHP,EAwBIyC,EAbuB,MAC3B,GAAIlC,EACF,OACEwB,EAACvC,EAAoB,CAACE,SAAUA,EAAUsC,SAAS,QAAOC,SACvD1B,KASsBmC,GAE/B,OACEC,EAACjE,EAAe,CAACM,UAAWA,YAC1B2D,EAAC/D,aACEwB,GACC2B,EAACa,GAAclD,SAAUA,EAAUmD,QAAS3C,EAAOI,SAAUA,EAAQ2B,SAClE7B,IAIJD,GACC4B,EAACe,EAAiB,CAACpD,SAAUA,EAAUqD,GAAIhC,EAAYkB,SACpD9B,OAKNuB,GACCiB,EAACG,EAAiB,CAACE,OAAK,EAACD,GAAI9B,EAAcgB,SAAA,CACzCF,EAACkB,EAAgB,CAAA,GAEhBhD,KAIL8B,EAACzC,EAAe,IACVmB,EAAK,UACAP,EACTR,SAAUA,EACVsD,MAAOtB,EACP1C,UAAWA,EACX+D,GAAI7C,EACJE,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACViB,UAAW,CACT2B,MAAO,IACDzC,EAAMc,WAAW2B,OAAS,MAE1BT,GAA0B,CAAElC,eAAgBkC,MAC5CX,GAAwB,CAAE9B,aAAc8B,IAE9CN,UAAW,IACLf,EAAMc,WAAWC,WAAa,GAClC,mBAAoBC,IAGxBjB,KAhGAmB,EACKjB,EAAe,OAAS,WAG1BF,EA6FH8B,QAAQ"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),a=require("@mui/material/Alert"),i=require("@mui/material/Box"),l=require("../../atoms/Button/index.cjs.js"),n=require("../../atoms/IconButton/index.cjs.js"),o=require("../ButtonGroup/index.cjs.js"),r=require("../../../icons/Cancel/index.cjs.js"),s=require("@mui/material/styles"),c=require("@mui/material/useMediaQuery"),d=require("@mui/material/styles/useTheme"),u=require("./alertGlobalTokens.cjs.js");const g=s.styled(a,{shouldForwardProp:e=>!["tone"].includes(e)})((({theme:e,tone:t})=>({alignItems:"center",backgroundColor:u.getAlertGlobalBackgroundColour(e,t),borderBottom:"1px solid",borderRadius:0,borderColor:u.getAlertGlobalBorderColour(e,t),color:u.getAlertGlobalTextColour(e,t),padding:e.spacing(3),paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5),width:"100%",display:"flex",position:"relative","& .MuiAlert-icon":{alignSelf:"flex-start"},"& .MuiAlert-message":{display:"flex",alignItems:"center",gap:e.spacing(2),flexGrow:1,minWidth:0},"& .MuiAlert-action":{display:"flex",alignItems:"center",gap:e.spacing(3),marginLeft:"auto"},"& .MuiAlert-action .MuiIconButton-root":{outline:"none",boxShadow:"none",border:"none"},"& .MuiAlert-action .MuiIconButton-root:focus, & .MuiAlert-action .MuiIconButton-root:focus-visible":{outline:"none",boxShadow:"none"},"& .fd-alert-message":{display:"flex",alignItems:"center",gap:e.spacing(2),width:"100%"},"& .fd-alert-description":{flexGrow:1,minWidth:0},"& .fd-alert-actions-inline":{marginLeft:"auto",display:"none"},"& .fd-alert-actions-action":{display:"flex"},[e.breakpoints.down("tablet")]:{"& .fd-alert-message":{flexDirection:"column",alignItems:"stretch",gap:e.spacing(2)},"& .fd-alert-actions-inline":{marginLeft:0,marginTop:e.spacing(2),width:"100%",justifyContent:"flex-end",display:"flex"},"& .fd-alert-actions-action":{display:"none"},"& .MuiAlert-action":{position:"absolute",top:e.spacing(3),right:e.spacing(3),marginLeft:0}}}))),p=s.styled(i)((({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(3)}))),m=t.memo((({description:t,tone:a="neutral",onClose:s,action:m,className:f,closeAriaLabel:x="Close","data-fd":h})=>{const b=d(),y=c(b.breakpoints.down("tablet")),j=(m?Array.isArray(m)?m:[m]:[]).map((t=>{const a=t.id??`${t.label.replace(/\s+/g,"-").toLowerCase()}-${t.type??"type"}`;return e.jsx(l.Button,{fdKey:t["data-fd"]??`action-button-${t.label.replace(/\s+/g,"-").toLowerCase()}`,onClick:t.onClick,size:"small",tone:"neutral",variant:t.type??"secondary",children:t.label},a)})),A=[];return j.length&&!y&&A.push(e.jsx(o,{align:"right",className:"fd-alert-actions-action",layout:"horizontal",size:"small",children:j},"action-group-action")),s&&A.push(e.jsx(n.IconButton,{"aria-label":x,"data-fd":"close-button",onClick:s,size:"small",tone:"neutral",variant:"tertiary",children:e.jsx(r,{})},"close")),e.jsx(g,{action:A.length?e.jsx(p,{children:A}):void 0,className:f,"data-fd":h,icon:u.getAlertGlobalIcon(b,a),role:"alert",tone:a,children:e.jsxs(i,{className:"fd-alert-message",children:[e.jsx(i,{className:"fd-alert-description",children:t}),y&&j.length?e.jsx(o,{align:"right",className:"fd-alert-actions-inline",layout:"horizontal",size:"small",children:j}):null]})})}));m.displayName="AlertGlobal",module.exports=m;
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),a=require("@mui/material/Alert"),i=require("@mui/material/Box"),n=require("../../atoms/Button/index.cjs.js"),o=require("../../atoms/IconButton/index.cjs.js"),l=require("../ButtonGroup/index.cjs.js"),r=require("../../../icons/Cancel/index.cjs.js"),s=require("../../../providers/TranslationProvider.cjs.js"),c=require("@mui/material/styles"),d=require("@mui/material/useMediaQuery"),u=require("@mui/material/styles/useTheme"),p=require("./alertGlobalTokens.cjs.js");const g=c.styled(a,{shouldForwardProp:e=>!["tone"].includes(e)})((({theme:e,tone:t})=>({alignItems:"center",backgroundColor:p.getAlertGlobalBackgroundColour(e,t),borderBottom:"1px solid",borderRadius:0,borderColor:p.getAlertGlobalBorderColour(e,t),color:p.getAlertGlobalTextColour(e,t),padding:e.spacing(3),paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5),width:"100%",display:"flex",position:"relative","& .MuiAlert-icon":{alignSelf:"flex-start"},"& .MuiAlert-message":{display:"flex",alignItems:"center",gap:e.spacing(2),flexGrow:1,minWidth:0},"& .MuiAlert-action":{display:"flex",alignItems:"center",gap:e.spacing(3),marginLeft:"auto"},"& .MuiAlert-action .MuiIconButton-root":{outline:"none",boxShadow:"none",border:"none"},"& .MuiAlert-action .MuiIconButton-root:focus, & .MuiAlert-action .MuiIconButton-root:focus-visible":{outline:"none",boxShadow:"none"},"& .fd-alert-message":{display:"flex",alignItems:"center",gap:e.spacing(2),width:"100%"},"& .fd-alert-description":{flexGrow:1,minWidth:0},"& .fd-alert-actions-inline":{marginLeft:"auto",display:"none"},"& .fd-alert-actions-action":{display:"flex"},[e.breakpoints.down("tablet")]:{"& .fd-alert-message":{flexDirection:"column",alignItems:"stretch",gap:e.spacing(2)},"& .fd-alert-actions-inline":{marginLeft:0,marginTop:e.spacing(2),width:"100%",justifyContent:"flex-end",display:"flex"},"& .fd-alert-actions-action":{display:"none"},"& .MuiAlert-action":{position:"absolute",top:e.spacing(3),right:e.spacing(3),marginLeft:0}}}))),m=c.styled(i)((({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(3)}))),f=t.memo((({description:t,tone:a="neutral",onClose:c,action:f,className:x,"data-fd":h})=>{const y=u(),b=d(y.breakpoints.down("tablet")),{translate:j}=s.useTranslation(),A=(f?Array.isArray(f)?f:[f]:[]).map((t=>{const a=t.id??`${t.label.replace(/\s+/g,"-").toLowerCase()}-${t.type??"type"}`;return e.jsx(n.Button,{fdKey:t["data-fd"]??`action-button-${t.label.replace(/\s+/g,"-").toLowerCase()}`,onClick:t.onClick,size:"small",tone:"neutral",variant:t.type??"secondary",children:t.label},a)})),C=[];return A.length&&!b&&C.push(e.jsx(l,{align:"right",className:"fd-alert-actions-action",layout:"horizontal",size:"small",children:A},"action-group-action")),c&&C.push(e.jsx(o.IconButton,{"aria-label":j("Close"),"data-fd":"close-button",onClick:c,size:"small",tone:"neutral",variant:"tertiary",children:e.jsx(r,{})},"close")),e.jsx(g,{action:C.length?e.jsx(m,{children:C}):void 0,className:x,"data-fd":h,icon:p.getAlertGlobalIcon(y,a),role:"alert",tone:a,children:e.jsxs(i,{className:"fd-alert-message",children:[e.jsx(i,{className:"fd-alert-description",children:t}),b&&A.length?e.jsx(l,{align:"right",className:"fd-alert-actions-inline",layout:"horizontal",size:"small",children:A}):null]})})}));f.displayName="AlertGlobal",module.exports=f;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/molecules/AlertGlobal/index.tsx"],"sourcesContent":["import { memo, type ReactElement, type ReactNode } from 'react';\n\nimport MuiAlert from '@mui/material/Alert';\n\nimport Box from '@fd/components/atoms/Box';\nimport Button from '@fd/components/atoms/Button';\nimport type { ButtonType } from '@fd/components/atoms/Button/getButtonStyles';\nimport IconButton from '@fd/components/atoms/IconButton';\nimport type { AlertTones } from '@fd/components/molecules/Alert';\nimport ButtonGroup from '@fd/components/molecules/ButtonGroup';\nimport CancelIcon from '@fd/icons/Cancel';\nimport styled from '@fd/utilities/styledUtilities';\nimport useMediaQuery from '@fd/utilities/useMediaQuery';\nimport useTheme from '@fd/utilities/useTheme';\n\nimport {\n getAlertGlobalBackgroundColour,\n getAlertGlobalBorderColour,\n getAlertGlobalIcon,\n getAlertGlobalTextColour,\n} from './alertGlobalTokens';\n\n/**\n * Global alert component for prominent, page-level messages.\n *\n * - Renders an icon and description with optional actions and a close button\n * - `action` accepts a single action object or an array of action objects\n * (use an array to render multiple buttons side-by-side)\n * - Consumers are responsible for providing localized strings for any\n * user-visible text (e.g. `description`, action `label`, `closeAriaLabel`).\n */\nexport interface AlertGlobalProps {\n /**\n * Message content shown in the alert. Provide a localized string.\n */\n description: string;\n /**\n * Visual tone of the alert which controls icon and colors.\n * Defaults to `neutral`.\n */\n tone?: AlertTones;\n /**\n * Called when the close button is pressed. When omitted, no close button is rendered.\n */\n onClose?: () => void;\n /**\n * One or more actions to render as buttons. A single object renders one button;\n * an array renders multiple buttons. Provide localized `label` values.\n */\n action?: AlertAction | AlertAction[];\n /**\n * Accessible label for the close icon button. Provide a localized string.\n * Defaults to \"Close\".\n */\n closeAriaLabel?: string;\n /** Optional CSS class name for the root element. */\n className?: string;\n /** Optional test id for the root element. */\n 'data-fd'?: string;\n}\n\n/**\n * Describes a user action rendered as a button in the alert.\n */\nexport interface AlertAction {\n /** Optional unique identifier for this action. Recommended for stable React keys. */\n id?: string;\n /** Button text. Provide a localized string. */\n label: string;\n /** Visual variant of the button. Defaults to `secondary`. */\n type?: ButtonType;\n /** Click handler for the action. */\n onClick: () => void;\n /** Optional test id applied to the button. */\n 'data-fd'?: string;\n}\n\ninterface StyledAlertProps {\n tone: AlertTones;\n}\n\nconst StyledGlobalAlert = styled(MuiAlert, {\n shouldForwardProp: (prop: string): boolean => !['tone'].includes(prop),\n})<StyledAlertProps>(({ theme, tone }) => ({\n alignItems: 'center',\n backgroundColor: getAlertGlobalBackgroundColour(theme, tone),\n borderBottom: '1px solid',\n borderRadius: 0,\n borderColor: getAlertGlobalBorderColour(theme, tone),\n color: getAlertGlobalTextColour(theme, tone),\n padding: theme.spacing(3),\n paddingTop: theme.spacing(1.5),\n paddingBottom: theme.spacing(1.5),\n width: '100%',\n display: 'flex',\n position: 'relative',\n '& .MuiAlert-icon': {\n alignSelf: 'flex-start',\n },\n '& .MuiAlert-message': {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(2),\n flexGrow: 1,\n minWidth: 0,\n },\n '& .MuiAlert-action': {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(3),\n marginLeft: 'auto',\n },\n '& .MuiAlert-action .MuiIconButton-root': {\n outline: 'none',\n boxShadow: 'none',\n border: 'none',\n },\n '& .MuiAlert-action .MuiIconButton-root:focus, & .MuiAlert-action .MuiIconButton-root:focus-visible': {\n outline: 'none',\n boxShadow: 'none',\n },\n // Inline actions inside message container\n '& .fd-alert-message': {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(2),\n width: '100%',\n },\n '& .fd-alert-description': {\n flexGrow: 1,\n minWidth: 0,\n },\n '& .fd-alert-actions-inline': {\n marginLeft: 'auto',\n display: 'none',\n },\n '& .fd-alert-actions-action': {\n display: 'flex',\n },\n // Mobile layout: stack and right-align button group below description\n [theme.breakpoints.down('tablet')]: {\n '& .fd-alert-message': {\n flexDirection: 'column',\n alignItems: 'stretch',\n gap: theme.spacing(2),\n },\n '& .fd-alert-actions-inline': {\n marginLeft: 0,\n marginTop: theme.spacing(2),\n width: '100%',\n justifyContent: 'flex-end',\n display: 'flex',\n },\n '& .fd-alert-actions-action': {\n display: 'none',\n },\n '& .MuiAlert-action': {\n position: 'absolute',\n top: theme.spacing(3),\n right: theme.spacing(3),\n marginLeft: 0,\n },\n },\n}));\n\nconst ActionContainer = styled(Box)(\n ({ theme }): Record<string, unknown> => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(3),\n }),\n);\n\nconst AlertGlobalComponent = ({\n description,\n tone = 'neutral',\n onClose,\n action,\n className,\n closeAriaLabel = 'Close',\n 'data-fd': dataFd,\n}: AlertGlobalProps): ReactElement => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n\n const actionsArray = action ? (Array.isArray(action) ? action : [action]) : [];\n const actionButtons = actionsArray.map((actionItem) => {\n const uniqueKey =\n actionItem.id ?? `${actionItem.label.replace(/\\s+/g, '-').toLowerCase()}-${actionItem.type ?? 'type'}`;\n return (\n <Button\n key={uniqueKey}\n fdKey={\n actionItem['data-fd'] ?? `action-button-${actionItem.label.replace(/\\s+/g, '-').toLowerCase()}`\n }\n onClick={actionItem.onClick}\n size=\"small\"\n tone=\"neutral\"\n variant={actionItem.type ?? 'secondary'}\n >\n {actionItem.label}\n </Button>\n );\n });\n\n const nodes: ReactNode[] = [];\n if (actionButtons.length && !isMobile) {\n nodes.push(\n <ButtonGroup\n key=\"action-group-action\"\n align=\"right\"\n className=\"fd-alert-actions-action\"\n layout=\"horizontal\"\n size=\"small\"\n >\n {actionButtons}\n </ButtonGroup>,\n );\n }\n if (onClose) {\n nodes.push(\n <IconButton\n key=\"close\"\n aria-label={closeAriaLabel}\n data-fd=\"close-button\"\n onClick={onClose}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n <CancelIcon />\n </IconButton>,\n );\n }\n\n return (\n <StyledGlobalAlert\n action={nodes.length ? <ActionContainer>{nodes}</ActionContainer> : undefined}\n className={className}\n data-fd={dataFd}\n icon={getAlertGlobalIcon(theme, tone)}\n role=\"alert\"\n tone={tone}\n >\n <Box className=\"fd-alert-message\">\n <Box className=\"fd-alert-description\">{description}</Box>\n {isMobile && actionButtons.length ? (\n <ButtonGroup align=\"right\" className=\"fd-alert-actions-inline\" layout=\"horizontal\" size=\"small\">\n {actionButtons}\n </ButtonGroup>\n ) : null}\n </Box>\n </StyledGlobalAlert>\n );\n};\n\nconst AlertGlobal = memo(AlertGlobalComponent);\nAlertGlobal.displayName = 'AlertGlobal';\n\nexport default AlertGlobal;\n"],"names":["StyledGlobalAlert","styled","MuiAlert","shouldForwardProp","prop","includes","theme","tone","alignItems","backgroundColor","getAlertGlobalBackgroundColour","borderBottom","borderRadius","borderColor","getAlertGlobalBorderColour","color","getAlertGlobalTextColour","padding","spacing","paddingTop","paddingBottom","width","display","position","alignSelf","gap","flexGrow","minWidth","marginLeft","outline","boxShadow","border","breakpoints","down","flexDirection","marginTop","justifyContent","top","right","ActionContainer","Box","AlertGlobal","memo","description","onClose","action","className","closeAriaLabel","dataFd","useTheme","isMobile","useMediaQuery","actionButtons","Array","isArray","map","actionItem","uniqueKey","id","label","replace","toLowerCase","type","_jsx","Button","fdKey","onClick","size","variant","children","nodes","length","push","ButtonGroup","align","layout","IconButton","CancelIcon","undefined","icon","getAlertGlobalIcon","role","_jsxs","displayName"],"mappings":"wdAiFA,MAAMA,EAAoBC,EAAAA,OAAOC,EAAU,CACzCC,kBAAoBC,IAA2B,CAAC,QAAQC,SAASD,IADzCH,EAEL,EAAGK,QAAOC,WAAM,CACnCC,WAAY,SACZC,gBAAiBC,EAAAA,+BAA+BJ,EAAOC,GACvDI,aAAc,YACdC,aAAc,EACdC,YAAaC,EAAAA,2BAA2BR,EAAOC,GAC/CQ,MAAOC,EAAAA,yBAAyBV,EAAOC,GACvCU,QAASX,EAAMY,QAAQ,GACvBC,WAAYb,EAAMY,QAAQ,KAC1BE,cAAed,EAAMY,QAAQ,KAC7BG,MAAO,OACPC,QAAS,OACTC,SAAU,WACV,mBAAoB,CAClBC,UAAW,cAEb,sBAAuB,CACrBF,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,GACnBQ,SAAU,EACVC,SAAU,GAEZ,qBAAsB,CACpBL,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,GACnBU,WAAY,QAEd,yCAA0C,CACxCC,QAAS,OACTC,UAAW,OACXC,OAAQ,QAEV,qGAAsG,CACpGF,QAAS,OACTC,UAAW,QAGb,sBAAuB,CACrBR,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,GACnBG,MAAO,QAET,0BAA2B,CACzBK,SAAU,EACVC,SAAU,GAEZ,6BAA8B,CAC5BC,WAAY,OACZN,QAAS,QAEX,6BAA8B,CAC5BA,QAAS,QAGX,CAAChB,EAAM0B,YAAYC,KAAK,WAAY,CAClC,sBAAuB,CACrBC,cAAe,SACf1B,WAAY,UACZiB,IAAKnB,EAAMY,QAAQ,IAErB,6BAA8B,CAC5BU,WAAY,EACZO,UAAW7B,EAAMY,QAAQ,GACzBG,MAAO,OACPe,eAAgB,WAChBd,QAAS,QAEX,6BAA8B,CAC5BA,QAAS,QAEX,qBAAsB,CACpBC,SAAU,WACVc,IAAK/B,EAAMY,QAAQ,GACnBoB,MAAOhC,EAAMY,QAAQ,GACrBU,WAAY,QAKZW,EAAkBtC,EAAAA,OAAOuC,EAAPvC,EACtB,EAAGK,YAAO,CACRgB,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,OAuFjBuB,EAAcC,EAAAA,MAnFS,EAC3BC,cACApC,OAAO,UACPqC,UACAC,SACAC,YACAC,iBAAiB,QACjB,UAAWC,MAEX,MAAM1C,EAAQ2C,IACRC,EAAWC,EAAc7C,EAAM0B,YAAYC,KAAK,WAGhDmB,GADeP,EAAUQ,MAAMC,QAAQT,GAAUA,EAAS,CAACA,GAAW,IACzCU,KAAKC,IACtC,MAAMC,EACJD,EAAWE,IAAM,GAAGF,EAAWG,MAAMC,QAAQ,OAAQ,KAAKC,iBAAiBL,EAAWM,MAAQ,SAChG,OACEC,EAAAA,IAACC,EAAAA,OAAM,CAELC,MACET,EAAW,YAAc,iBAAiBA,EAAWG,MAAMC,QAAQ,OAAQ,KAAKC,gBAElFK,QAASV,EAAWU,QACpBC,KAAK,QACL5D,KAAK,UACL6D,QAASZ,EAAWM,MAAQ,YAAWO,SAEtCb,EAAWG,OATPF,MAcLa,EAAqB,GA8B3B,OA7BIlB,EAAcmB,SAAWrB,GAC3BoB,EAAME,KACJT,MAACU,EAAW,CAEVC,MAAM,QACN5B,UAAU,0BACV6B,OAAO,aACPR,KAAK,QAAOE,SAEXjB,GANG,wBAUNR,GACF0B,EAAME,KACJT,MAACa,EAAAA,WAAU,CAAA,aAEG7B,EAAc,UAClB,eACRmB,QAAStB,EACTuB,KAAK,QACL5D,KAAK,UACL6D,QAAQ,WAAUC,SAElBN,EAAAA,IAACc,EAAU,CAAA,IARP,UAcRd,EAAAA,IAAC/D,EAAiB,CAChB6C,OAAQyB,EAAMC,OAASR,EAAAA,IAACxB,YAAiB+B,SAA2BQ,EACpEhC,UAAWA,EAAS,UACXE,EACT+B,KAAMC,EAAAA,mBAAmB1E,EAAOC,GAChC0E,KAAK,QACL1E,KAAMA,EAAI8D,SAEVa,EAAAA,KAAC1C,EAAG,CAACM,UAAU,mBAAkBuB,SAAA,CAC/BN,EAAAA,IAACvB,EAAG,CAACM,UAAU,uBAAsBuB,SAAE1B,IACtCO,GAAYE,EAAcmB,OACzBR,EAAAA,IAACU,EAAW,CAACC,MAAM,QAAQ5B,UAAU,0BAA0B6B,OAAO,aAAaR,KAAK,iBACrFf,IAED,aAOZX,EAAY0C,YAAc"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/molecules/AlertGlobal/index.tsx"],"sourcesContent":["import { memo, type ReactElement, type ReactNode } from 'react';\n\nimport MuiAlert from '@mui/material/Alert';\n\nimport Box from '@fd/components/atoms/Box';\nimport Button from '@fd/components/atoms/Button';\nimport type { ButtonType } from '@fd/components/atoms/Button/getButtonStyles';\nimport IconButton from '@fd/components/atoms/IconButton';\nimport type { AlertTones } from '@fd/components/molecules/Alert';\nimport ButtonGroup from '@fd/components/molecules/ButtonGroup';\nimport CancelIcon from '@fd/icons/Cancel';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\nimport styled from '@fd/utilities/styledUtilities';\nimport useMediaQuery from '@fd/utilities/useMediaQuery';\nimport useTheme from '@fd/utilities/useTheme';\n\nimport {\n getAlertGlobalBackgroundColour,\n getAlertGlobalBorderColour,\n getAlertGlobalIcon,\n getAlertGlobalTextColour,\n} from './alertGlobalTokens';\n\n/**\n * Global alert component for prominent, page-level messages.\n *\n * - Renders an icon and description with optional actions and a close button\n * - `action` accepts a single action object or an array of action objects\n * (use an array to render multiple buttons side-by-side)\n */\nexport interface AlertGlobalProps {\n /**\n * Message content shown in the alert. Provide a localized string.\n */\n description: string;\n /**\n * Visual tone of the alert which controls icon and colors.\n * Defaults to `neutral`.\n */\n tone?: AlertTones;\n /**\n * Called when the close button is pressed. When omitted, no close button is rendered.\n */\n onClose?: () => void;\n /**\n * One or more actions to render as buttons. A single object renders one button;\n * an array renders multiple buttons. Provide localized `label` values.\n */\n action?: AlertAction | AlertAction[];\n /** Optional CSS class name for the root element. */\n className?: string;\n /** Optional test id for the root element. */\n 'data-fd'?: string;\n}\n\n/**\n * Describes a user action rendered as a button in the alert.\n */\nexport interface AlertAction {\n /** Optional unique identifier for this action. Recommended for stable React keys. */\n id?: string;\n /** Button text. Provide a localized string. */\n label: string;\n /** Visual variant of the button. Defaults to `secondary`. */\n type?: ButtonType;\n /** Click handler for the action. */\n onClick: () => void;\n /** Optional test id applied to the button. */\n 'data-fd'?: string;\n}\n\ninterface StyledAlertProps {\n tone: AlertTones;\n}\n\nconst StyledGlobalAlert = styled(MuiAlert, {\n shouldForwardProp: (prop: string): boolean => !['tone'].includes(prop),\n})<StyledAlertProps>(({ theme, tone }) => ({\n alignItems: 'center',\n backgroundColor: getAlertGlobalBackgroundColour(theme, tone),\n borderBottom: '1px solid',\n borderRadius: 0,\n borderColor: getAlertGlobalBorderColour(theme, tone),\n color: getAlertGlobalTextColour(theme, tone),\n padding: theme.spacing(3),\n paddingTop: theme.spacing(1.5),\n paddingBottom: theme.spacing(1.5),\n width: '100%',\n display: 'flex',\n position: 'relative',\n '& .MuiAlert-icon': {\n alignSelf: 'flex-start',\n },\n '& .MuiAlert-message': {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(2),\n flexGrow: 1,\n minWidth: 0,\n },\n '& .MuiAlert-action': {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(3),\n marginLeft: 'auto',\n },\n '& .MuiAlert-action .MuiIconButton-root': {\n outline: 'none',\n boxShadow: 'none',\n border: 'none',\n },\n '& .MuiAlert-action .MuiIconButton-root:focus, & .MuiAlert-action .MuiIconButton-root:focus-visible': {\n outline: 'none',\n boxShadow: 'none',\n },\n // Inline actions inside message container\n '& .fd-alert-message': {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(2),\n width: '100%',\n },\n '& .fd-alert-description': {\n flexGrow: 1,\n minWidth: 0,\n },\n '& .fd-alert-actions-inline': {\n marginLeft: 'auto',\n display: 'none',\n },\n '& .fd-alert-actions-action': {\n display: 'flex',\n },\n // Mobile layout: stack and right-align button group below description\n [theme.breakpoints.down('tablet')]: {\n '& .fd-alert-message': {\n flexDirection: 'column',\n alignItems: 'stretch',\n gap: theme.spacing(2),\n },\n '& .fd-alert-actions-inline': {\n marginLeft: 0,\n marginTop: theme.spacing(2),\n width: '100%',\n justifyContent: 'flex-end',\n display: 'flex',\n },\n '& .fd-alert-actions-action': {\n display: 'none',\n },\n '& .MuiAlert-action': {\n position: 'absolute',\n top: theme.spacing(3),\n right: theme.spacing(3),\n marginLeft: 0,\n },\n },\n}));\n\nconst ActionContainer = styled(Box)(\n ({ theme }): Record<string, unknown> => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(3),\n }),\n);\n\nconst AlertGlobalComponent = ({\n description,\n tone = 'neutral',\n onClose,\n action,\n className,\n 'data-fd': dataFd,\n}: AlertGlobalProps): ReactElement => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n const { translate } = useTranslation();\n\n const actionsArray = action ? (Array.isArray(action) ? action : [action]) : [];\n const actionButtons = actionsArray.map((actionItem) => {\n const uniqueKey =\n actionItem.id ?? `${actionItem.label.replace(/\\s+/g, '-').toLowerCase()}-${actionItem.type ?? 'type'}`;\n return (\n <Button\n key={uniqueKey}\n fdKey={\n actionItem['data-fd'] ?? `action-button-${actionItem.label.replace(/\\s+/g, '-').toLowerCase()}`\n }\n onClick={actionItem.onClick}\n size=\"small\"\n tone=\"neutral\"\n variant={actionItem.type ?? 'secondary'}\n >\n {actionItem.label}\n </Button>\n );\n });\n\n const nodes: ReactNode[] = [];\n if (actionButtons.length && !isMobile) {\n nodes.push(\n <ButtonGroup\n key=\"action-group-action\"\n align=\"right\"\n className=\"fd-alert-actions-action\"\n layout=\"horizontal\"\n size=\"small\"\n >\n {actionButtons}\n </ButtonGroup>,\n );\n }\n if (onClose) {\n nodes.push(\n <IconButton\n key=\"close\"\n aria-label={translate('Close')}\n data-fd=\"close-button\"\n onClick={onClose}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n <CancelIcon />\n </IconButton>,\n );\n }\n\n return (\n <StyledGlobalAlert\n action={nodes.length ? <ActionContainer>{nodes}</ActionContainer> : undefined}\n className={className}\n data-fd={dataFd}\n icon={getAlertGlobalIcon(theme, tone)}\n role=\"alert\"\n tone={tone}\n >\n <Box className=\"fd-alert-message\">\n <Box className=\"fd-alert-description\">{description}</Box>\n {isMobile && actionButtons.length ? (\n <ButtonGroup align=\"right\" className=\"fd-alert-actions-inline\" layout=\"horizontal\" size=\"small\">\n {actionButtons}\n </ButtonGroup>\n ) : null}\n </Box>\n </StyledGlobalAlert>\n );\n};\n\nconst AlertGlobal = memo(AlertGlobalComponent);\nAlertGlobal.displayName = 'AlertGlobal';\n\nexport default AlertGlobal;\n"],"names":["StyledGlobalAlert","styled","MuiAlert","shouldForwardProp","prop","includes","theme","tone","alignItems","backgroundColor","getAlertGlobalBackgroundColour","borderBottom","borderRadius","borderColor","getAlertGlobalBorderColour","color","getAlertGlobalTextColour","padding","spacing","paddingTop","paddingBottom","width","display","position","alignSelf","gap","flexGrow","minWidth","marginLeft","outline","boxShadow","border","breakpoints","down","flexDirection","marginTop","justifyContent","top","right","ActionContainer","Box","AlertGlobal","memo","description","onClose","action","className","dataFd","useTheme","isMobile","useMediaQuery","translate","useTranslation","actionButtons","Array","isArray","map","actionItem","uniqueKey","id","label","replace","toLowerCase","type","_jsx","Button","fdKey","onClick","size","variant","children","nodes","length","push","ButtonGroup","align","layout","IconButton","CancelIcon","undefined","icon","getAlertGlobalIcon","role","_jsxs","displayName"],"mappings":"mhBA2EA,MAAMA,EAAoBC,EAAAA,OAAOC,EAAU,CACzCC,kBAAoBC,IAA2B,CAAC,QAAQC,SAASD,IADzCH,EAEL,EAAGK,QAAOC,WAAM,CACnCC,WAAY,SACZC,gBAAiBC,EAAAA,+BAA+BJ,EAAOC,GACvDI,aAAc,YACdC,aAAc,EACdC,YAAaC,EAAAA,2BAA2BR,EAAOC,GAC/CQ,MAAOC,EAAAA,yBAAyBV,EAAOC,GACvCU,QAASX,EAAMY,QAAQ,GACvBC,WAAYb,EAAMY,QAAQ,KAC1BE,cAAed,EAAMY,QAAQ,KAC7BG,MAAO,OACPC,QAAS,OACTC,SAAU,WACV,mBAAoB,CAClBC,UAAW,cAEb,sBAAuB,CACrBF,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,GACnBQ,SAAU,EACVC,SAAU,GAEZ,qBAAsB,CACpBL,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,GACnBU,WAAY,QAEd,yCAA0C,CACxCC,QAAS,OACTC,UAAW,OACXC,OAAQ,QAEV,qGAAsG,CACpGF,QAAS,OACTC,UAAW,QAGb,sBAAuB,CACrBR,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,GACnBG,MAAO,QAET,0BAA2B,CACzBK,SAAU,EACVC,SAAU,GAEZ,6BAA8B,CAC5BC,WAAY,OACZN,QAAS,QAEX,6BAA8B,CAC5BA,QAAS,QAGX,CAAChB,EAAM0B,YAAYC,KAAK,WAAY,CAClC,sBAAuB,CACrBC,cAAe,SACf1B,WAAY,UACZiB,IAAKnB,EAAMY,QAAQ,IAErB,6BAA8B,CAC5BU,WAAY,EACZO,UAAW7B,EAAMY,QAAQ,GACzBG,MAAO,OACPe,eAAgB,WAChBd,QAAS,QAEX,6BAA8B,CAC5BA,QAAS,QAEX,qBAAsB,CACpBC,SAAU,WACVc,IAAK/B,EAAMY,QAAQ,GACnBoB,MAAOhC,EAAMY,QAAQ,GACrBU,WAAY,QAKZW,EAAkBtC,EAAAA,OAAOuC,EAAPvC,EACtB,EAAGK,YAAO,CACRgB,QAAS,OACTd,WAAY,SACZiB,IAAKnB,EAAMY,QAAQ,OAuFjBuB,EAAcC,EAAAA,MAnFS,EAC3BC,cACApC,OAAO,UACPqC,UACAC,SACAC,YACA,UAAWC,MAEX,MAAMzC,EAAQ0C,IACRC,EAAWC,EAAc5C,EAAM0B,YAAYC,KAAK,YAChDkB,UAAEA,GAAcC,mBAGhBC,GADeR,EAAUS,MAAMC,QAAQV,GAAUA,EAAS,CAACA,GAAW,IACzCW,KAAKC,IACtC,MAAMC,EACJD,EAAWE,IAAM,GAAGF,EAAWG,MAAMC,QAAQ,OAAQ,KAAKC,iBAAiBL,EAAWM,MAAQ,SAChG,OACEC,EAAAA,IAACC,EAAAA,OAAM,CAELC,MACET,EAAW,YAAc,iBAAiBA,EAAWG,MAAMC,QAAQ,OAAQ,KAAKC,gBAElFK,QAASV,EAAWU,QACpBC,KAAK,QACL7D,KAAK,UACL8D,QAASZ,EAAWM,MAAQ,YAAWO,SAEtCb,EAAWG,OATPF,MAcLa,EAAqB,GA8B3B,OA7BIlB,EAAcmB,SAAWvB,GAC3BsB,EAAME,KACJT,MAACU,EAAW,CAEVC,MAAM,QACN7B,UAAU,0BACV8B,OAAO,aACPR,KAAK,QAAOE,SAEXjB,GANG,wBAUNT,GACF2B,EAAME,KACJT,MAACa,EAAAA,yBAEa1B,EAAU,mBACd,eACRgB,QAASvB,EACTwB,KAAK,QACL7D,KAAK,UACL8D,QAAQ,WAAUC,SAElBN,EAAAA,IAACc,EAAU,CAAA,IARP,UAcRd,EAAAA,IAAChE,EAAiB,CAChB6C,OAAQ0B,EAAMC,OAASR,EAAAA,IAACzB,YAAiBgC,SAA2BQ,EACpEjC,UAAWA,EAAS,UACXC,EACTiC,KAAMC,EAAAA,mBAAmB3E,EAAOC,GAChC2E,KAAK,QACL3E,KAAMA,EAAI+D,SAEVa,EAAAA,KAAC3C,EAAG,CAACM,UAAU,mBAAkBwB,SAAA,CAC/BN,EAAAA,IAACxB,EAAG,CAACM,UAAU,uBAAsBwB,SAAE3B,IACtCM,GAAYI,EAAcmB,OACzBR,EAAAA,IAACU,EAAW,CAACC,MAAM,QAAQ7B,UAAU,0BAA0B8B,OAAO,aAAaR,KAAK,iBACrFf,IAED,aAOZZ,EAAY2C,YAAc"}