@flipdish/portal-library 7.6.0 → 7.8.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 (420) hide show
  1. package/dist/components/atoms/Avatar/index.cjs.js +1 -1
  2. package/dist/components/atoms/Avatar/index.cjs.js.map +1 -1
  3. package/dist/components/atoms/Avatar/index.d.ts +2 -0
  4. package/dist/components/atoms/Avatar/index.js +1 -1
  5. package/dist/components/atoms/Avatar/index.js.map +1 -1
  6. package/dist/components/atoms/Button/buttonThemeOverrides.cjs.js +1 -1
  7. package/dist/components/atoms/Button/buttonThemeOverrides.cjs.js.map +1 -1
  8. package/dist/components/atoms/Button/buttonThemeOverrides.js +1 -1
  9. package/dist/components/atoms/Button/buttonThemeOverrides.js.map +1 -1
  10. package/dist/components/atoms/Button/index.cjs.js +1 -1
  11. package/dist/components/atoms/Button/index.cjs.js.map +1 -1
  12. package/dist/components/atoms/Button/index.d.ts +1 -1
  13. package/dist/components/atoms/Button/index.js +1 -1
  14. package/dist/components/atoms/Button/index.js.map +1 -1
  15. package/dist/components/atoms/Checkbox/index.cjs.js +1 -1
  16. package/dist/components/atoms/Checkbox/index.cjs.js.map +1 -1
  17. package/dist/components/atoms/Checkbox/index.js +1 -1
  18. package/dist/components/atoms/Checkbox/index.js.map +1 -1
  19. package/dist/components/atoms/MenuItem/index.cjs.js +1 -1
  20. package/dist/components/atoms/MenuItem/index.cjs.js.map +1 -1
  21. package/dist/components/atoms/MenuItem/index.d.ts +45 -13
  22. package/dist/components/atoms/MenuItem/index.js +1 -1
  23. package/dist/components/atoms/MenuItem/index.js.map +1 -1
  24. package/dist/components/molecules/AlertGlobal/index.cjs.js +1 -1
  25. package/dist/components/molecules/AlertGlobal/index.cjs.js.map +1 -1
  26. package/dist/components/molecules/AlertGlobal/index.js +1 -1
  27. package/dist/components/molecules/AlertGlobal/index.js.map +1 -1
  28. package/dist/components/molecules/CheckboxGroup/index.cjs.js +1 -1
  29. package/dist/components/molecules/CheckboxGroup/index.cjs.js.map +1 -1
  30. package/dist/components/molecules/CheckboxGroup/index.d.ts +33 -0
  31. package/dist/components/molecules/CheckboxGroup/index.js +1 -1
  32. package/dist/components/molecules/CheckboxGroup/index.js.map +1 -1
  33. package/dist/components/molecules/DropdownMenu/index.cjs.js +2 -0
  34. package/dist/components/molecules/DropdownMenu/index.cjs.js.map +1 -0
  35. package/dist/components/molecules/DropdownMenu/index.d.ts +120 -0
  36. package/dist/components/molecules/DropdownMenu/index.js +2 -0
  37. package/dist/components/molecules/DropdownMenu/index.js.map +1 -0
  38. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.cjs.js +2 -0
  39. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.cjs.js.map +1 -0
  40. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.d.ts +21 -0
  41. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.js +2 -0
  42. package/dist/components/organisms/AssetManager/__mocks__/mockAssets.js.map +1 -0
  43. package/dist/components/organisms/AssetManager/hooks/useAssets.cjs.js +2 -0
  44. package/dist/components/organisms/AssetManager/hooks/useAssets.cjs.js.map +1 -0
  45. package/dist/components/organisms/AssetManager/hooks/useAssets.d.ts +10 -0
  46. package/dist/components/organisms/AssetManager/hooks/useAssets.js +2 -0
  47. package/dist/components/organisms/AssetManager/hooks/useAssets.js.map +1 -0
  48. package/dist/components/organisms/AssetManager/index.cjs.js +1 -1
  49. package/dist/components/organisms/AssetManager/index.cjs.js.map +1 -1
  50. package/dist/components/organisms/AssetManager/index.d.ts +4 -2
  51. package/dist/components/organisms/AssetManager/index.js +1 -1
  52. package/dist/components/organisms/AssetManager/index.js.map +1 -1
  53. package/dist/components/organisms/AssetManager/services/asset.service.cjs.js +2 -0
  54. package/dist/components/organisms/AssetManager/services/asset.service.cjs.js.map +1 -0
  55. package/dist/components/organisms/AssetManager/services/asset.service.d.ts +11 -0
  56. package/dist/components/organisms/AssetManager/services/asset.service.js +2 -0
  57. package/dist/components/organisms/AssetManager/services/asset.service.js.map +1 -0
  58. package/dist/mocks/msw/handlers.cjs.js +2 -0
  59. package/dist/mocks/msw/handlers.cjs.js.map +1 -0
  60. package/dist/mocks/msw/handlers.d.ts +5 -0
  61. package/dist/mocks/msw/handlers.js +2 -0
  62. package/dist/mocks/msw/handlers.js.map +1 -0
  63. package/dist/mocks/msw/server.cjs.js +2 -0
  64. package/dist/mocks/msw/server.cjs.js.map +1 -0
  65. package/dist/mocks/msw/server.d.ts +5 -0
  66. package/dist/mocks/msw/server.js +2 -0
  67. package/dist/mocks/msw/server.js.map +1 -0
  68. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.cjs.js +2 -0
  69. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.cjs.js.map +1 -0
  70. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.js +2 -0
  71. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.js.map +1 -0
  72. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.cjs.js +2 -0
  73. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.cjs.js.map +1 -0
  74. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.js +2 -0
  75. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.js.map +1 -0
  76. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.cjs.js +2 -0
  77. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.cjs.js.map +1 -0
  78. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.d.d.ts +225 -0
  79. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.js +2 -0
  80. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.js.map +1 -0
  81. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/BatchInterceptor-cb9a2eee.d.d.ts +25 -0
  82. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/Interceptor-dc0a39b5.d.d.ts +123 -0
  83. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.cjs.js +2 -0
  84. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.cjs.js.map +1 -0
  85. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.js +2 -0
  86. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.js.map +1 -0
  87. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.cjs.js +2 -0
  88. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.cjs.js.map +1 -0
  89. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.js +2 -0
  90. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.js.map +1 -0
  91. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.cjs.js +2 -0
  92. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.cjs.js.map +1 -0
  93. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.js +2 -0
  94. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.js.map +1 -0
  95. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.cjs.js +2 -0
  96. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.cjs.js.map +1 -0
  97. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.js +2 -0
  98. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.js.map +1 -0
  99. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.cjs.js +2 -0
  100. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.cjs.js.map +1 -0
  101. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.js +2 -0
  102. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.js.map +1 -0
  103. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.cjs.js +2 -0
  104. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.cjs.js.map +1 -0
  105. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.js +2 -0
  106. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.js.map +1 -0
  107. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.cjs.js +2 -0
  108. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.cjs.js.map +1 -0
  109. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.js +2 -0
  110. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.js.map +1 -0
  111. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.cjs.js +2 -0
  112. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.cjs.js.map +1 -0
  113. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.js +2 -0
  114. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.js.map +1 -0
  115. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.cjs.js +2 -0
  116. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.cjs.js.map +1 -0
  117. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.js +2 -0
  118. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.js.map +1 -0
  119. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.cjs.js +2 -0
  120. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.cjs.js.map +1 -0
  121. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.js +2 -0
  122. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.js.map +1 -0
  123. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.cjs.js +2 -0
  124. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.cjs.js.map +1 -0
  125. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.js +2 -0
  126. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.js.map +1 -0
  127. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.cjs.js +2 -0
  128. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.cjs.js.map +1 -0
  129. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.d.d.ts +26 -0
  130. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.js +2 -0
  131. package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.js.map +1 -0
  132. package/dist/node_modules/.pnpm/@open-draft_deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.cjs.js +2 -0
  133. package/dist/node_modules/.pnpm/@open-draft_deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.cjs.js.map +1 -0
  134. package/dist/node_modules/.pnpm/@open-draft_deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.js +2 -0
  135. package/dist/node_modules/.pnpm/@open-draft_deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.js.map +1 -0
  136. package/dist/node_modules/.pnpm/@open-draft_logger@0.3.0/node_modules/@open-draft/logger/lib/index.cjs.js +2 -0
  137. package/dist/node_modules/.pnpm/@open-draft_logger@0.3.0/node_modules/@open-draft/logger/lib/index.cjs.js.map +1 -0
  138. package/dist/node_modules/.pnpm/@open-draft_logger@0.3.0/node_modules/@open-draft/logger/lib/index.d.d.ts +52 -0
  139. package/dist/node_modules/.pnpm/@open-draft_logger@0.3.0/node_modules/@open-draft/logger/lib/index.js +2 -0
  140. package/dist/node_modules/.pnpm/@open-draft_logger@0.3.0/node_modules/@open-draft/logger/lib/index.js.map +1 -0
  141. package/dist/node_modules/.pnpm/@open-draft_until@2.1.0/node_modules/@open-draft/until/lib/index.cjs.js +2 -0
  142. package/dist/node_modules/.pnpm/@open-draft_until@2.1.0/node_modules/@open-draft/until/lib/index.cjs.js.map +1 -0
  143. package/dist/node_modules/.pnpm/@open-draft_until@2.1.0/node_modules/@open-draft/until/lib/index.js +2 -0
  144. package/dist/node_modules/.pnpm/@open-draft_until@2.1.0/node_modules/@open-draft/until/lib/index.js.map +1 -0
  145. package/dist/node_modules/.pnpm/headers-polyfill@4.0.3/node_modules/headers-polyfill/lib/index.cjs.js +2 -0
  146. package/dist/node_modules/.pnpm/headers-polyfill@4.0.3/node_modules/headers-polyfill/lib/index.cjs.js.map +1 -0
  147. package/dist/node_modules/.pnpm/headers-polyfill@4.0.3/node_modules/headers-polyfill/lib/index.js +2 -0
  148. package/dist/node_modules/.pnpm/headers-polyfill@4.0.3/node_modules/headers-polyfill/lib/index.js.map +1 -0
  149. package/dist/node_modules/.pnpm/is-node-process@1.2.0/node_modules/is-node-process/lib/index.cjs.js +2 -0
  150. package/dist/node_modules/.pnpm/is-node-process@1.2.0/node_modules/is-node-process/lib/index.cjs.js.map +1 -0
  151. package/dist/node_modules/.pnpm/is-node-process@1.2.0/node_modules/is-node-process/lib/index.js +2 -0
  152. package/dist/node_modules/.pnpm/is-node-process@1.2.0/node_modules/is-node-process/lib/index.js.map +1 -0
  153. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse-DC89RDb7.d.d.ts +196 -0
  154. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.cjs.js +2 -0
  155. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.cjs.js.map +1 -0
  156. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.js +2 -0
  157. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.js.map +1 -0
  158. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/SetupApi.cjs.js +2 -0
  159. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/SetupApi.cjs.js.map +1 -0
  160. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/SetupApi.d.d.ts +29 -0
  161. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/SetupApi.js +2 -0
  162. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/SetupApi.js.map +1 -0
  163. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/HttpHandler.cjs.js +2 -0
  164. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/HttpHandler.cjs.js.map +1 -0
  165. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/HttpHandler.d.d.ts +60 -0
  166. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/HttpHandler.js +2 -0
  167. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/HttpHandler.js.map +1 -0
  168. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/RequestHandler.cjs.js +2 -0
  169. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/RequestHandler.cjs.js.map +1 -0
  170. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/RequestHandler.js +2 -0
  171. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/RequestHandler.js.map +1 -0
  172. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/handlers/WebSocketHandler.d.d.ts +41 -0
  173. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/http.cjs.js +2 -0
  174. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/http.cjs.js.map +1 -0
  175. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/http.js +2 -0
  176. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/http.js.map +1 -0
  177. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/index.cjs.js +2 -0
  178. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/index.cjs.js.map +1 -0
  179. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/index.js +2 -0
  180. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/index.js.map +1 -0
  181. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/isCommonAssetRequest.cjs.js +2 -0
  182. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/isCommonAssetRequest.cjs.js.map +1 -0
  183. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/isCommonAssetRequest.js +2 -0
  184. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/isCommonAssetRequest.js.map +1 -0
  185. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/sharedOptions.d.d.ts +64 -0
  186. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/typeUtils.d.d.ts +8 -0
  187. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/HttpResponse/decorators.cjs.js +2 -0
  188. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/HttpResponse/decorators.cjs.js.map +1 -0
  189. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/HttpResponse/decorators.js +2 -0
  190. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/HttpResponse/decorators.js.map +1 -0
  191. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/cookieStore.cjs.js +2 -0
  192. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/cookieStore.cjs.js.map +1 -0
  193. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/cookieStore.js +2 -0
  194. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/cookieStore.js.map +1 -0
  195. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/executeHandlers.cjs.js +2 -0
  196. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/executeHandlers.cjs.js.map +1 -0
  197. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/executeHandlers.js +2 -0
  198. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/executeHandlers.js.map +1 -0
  199. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.cjs.js +2 -0
  200. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.cjs.js.map +1 -0
  201. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.js +2 -0
  202. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/handleRequest.js.map +1 -0
  203. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/Disposable.cjs.js +2 -0
  204. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/Disposable.cjs.js.map +1 -0
  205. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/Disposable.d.d.ts +8 -0
  206. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/Disposable.js +2 -0
  207. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/Disposable.js.map +1 -0
  208. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/checkGlobals.cjs.js +2 -0
  209. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/checkGlobals.cjs.js.map +1 -0
  210. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/checkGlobals.js +2 -0
  211. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/checkGlobals.js.map +1 -0
  212. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/devUtils.cjs.js +2 -0
  213. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/devUtils.cjs.js.map +1 -0
  214. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/devUtils.js +2 -0
  215. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/devUtils.js.map +1 -0
  216. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/getCallFrame.cjs.js +2 -0
  217. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/getCallFrame.cjs.js.map +1 -0
  218. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/getCallFrame.js +2 -0
  219. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/getCallFrame.js.map +1 -0
  220. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isHandlerKind.cjs.js +2 -0
  221. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isHandlerKind.cjs.js.map +1 -0
  222. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isHandlerKind.js +2 -0
  223. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isHandlerKind.js.map +1 -0
  224. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isIterable.cjs.js +2 -0
  225. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isIterable.cjs.js.map +1 -0
  226. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isIterable.d.d.ts +16 -0
  227. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isIterable.js +2 -0
  228. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isIterable.js.map +1 -0
  229. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isObject.cjs.js +2 -0
  230. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isObject.cjs.js.map +1 -0
  231. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isObject.js +2 -0
  232. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isObject.js.map +1 -0
  233. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isStringEqual.cjs.js +2 -0
  234. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isStringEqual.cjs.js.map +1 -0
  235. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isStringEqual.js +2 -0
  236. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/isStringEqual.js.map +1 -0
  237. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/jsonParse.cjs.js +2 -0
  238. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/jsonParse.cjs.js.map +1 -0
  239. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/jsonParse.js +2 -0
  240. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/jsonParse.js.map +1 -0
  241. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/mergeRight.cjs.js +2 -0
  242. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/mergeRight.cjs.js.map +1 -0
  243. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/mergeRight.js +2 -0
  244. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/mergeRight.js.map +1 -0
  245. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/pipeEvents.cjs.js +2 -0
  246. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/pipeEvents.cjs.js.map +1 -0
  247. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/pipeEvents.js +2 -0
  248. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map +1 -0
  249. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/toReadonlyArray.cjs.js +2 -0
  250. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/toReadonlyArray.cjs.js.map +1 -0
  251. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/toReadonlyArray.js +2 -0
  252. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/internal/toReadonlyArray.js.map +1 -0
  253. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.cjs.js +2 -0
  254. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.cjs.js.map +1 -0
  255. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.js +2 -0
  256. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.js.map +1 -0
  257. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getTimestamp.cjs.js +2 -0
  258. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getTimestamp.cjs.js.map +1 -0
  259. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getTimestamp.js +2 -0
  260. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/getTimestamp.js.map +1 -0
  261. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeRequest.cjs.js +2 -0
  262. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeRequest.cjs.js.map +1 -0
  263. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeRequest.js +2 -0
  264. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeRequest.js.map +1 -0
  265. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeResponse.cjs.js +2 -0
  266. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeResponse.cjs.js.map +1 -0
  267. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeResponse.js +2 -0
  268. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/logging/serializeResponse.js.map +1 -0
  269. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/matchRequestUrl.cjs.js +2 -0
  270. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/matchRequestUrl.cjs.js.map +1 -0
  271. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/matchRequestUrl.d.d.ts +10 -0
  272. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/matchRequestUrl.js +2 -0
  273. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/matchRequestUrl.js.map +1 -0
  274. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/normalizePath.cjs.js +2 -0
  275. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/normalizePath.cjs.js.map +1 -0
  276. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/normalizePath.js +2 -0
  277. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/matching/normalizePath.js.map +1 -0
  278. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/getRequestCookies.cjs.js +2 -0
  279. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/getRequestCookies.cjs.js.map +1 -0
  280. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/getRequestCookies.js +2 -0
  281. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/getRequestCookies.js.map +1 -0
  282. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/onUnhandledRequest.cjs.js +2 -0
  283. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/onUnhandledRequest.cjs.js.map +1 -0
  284. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/onUnhandledRequest.d.d.ts +8 -0
  285. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/onUnhandledRequest.js +2 -0
  286. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/onUnhandledRequest.js.map +1 -0
  287. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/storeResponseCookies.cjs.js +2 -0
  288. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/storeResponseCookies.cjs.js.map +1 -0
  289. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/storeResponseCookies.js +2 -0
  290. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/storeResponseCookies.js.map +1 -0
  291. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/toPublicUrl.cjs.js +2 -0
  292. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/toPublicUrl.cjs.js.map +1 -0
  293. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/toPublicUrl.js +2 -0
  294. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/request/toPublicUrl.js.map +1 -0
  295. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/cleanUrl.cjs.js +2 -0
  296. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/cleanUrl.cjs.js.map +1 -0
  297. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/cleanUrl.js +2 -0
  298. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/cleanUrl.js.map +1 -0
  299. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.cjs.js +2 -0
  300. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.cjs.js.map +1 -0
  301. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.js +2 -0
  302. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.js.map +1 -0
  303. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.cjs.js +2 -0
  304. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.cjs.js.map +1 -0
  305. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.js +2 -0
  306. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.js.map +1 -0
  307. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/handleWebSocketEvent.cjs.js +2 -0
  308. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/handleWebSocketEvent.cjs.js.map +1 -0
  309. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/handleWebSocketEvent.js +2 -0
  310. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/handleWebSocketEvent.js.map +1 -0
  311. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/webSocketInterceptor.cjs.js +2 -0
  312. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/webSocketInterceptor.cjs.js.map +1 -0
  313. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/webSocketInterceptor.js +2 -0
  314. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/core/ws/webSocketInterceptor.js.map +1 -0
  315. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/node/index.cjs.js +2 -0
  316. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/node/index.cjs.js.map +1 -0
  317. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/node/index.d.d.ts +85 -0
  318. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/node/index.js +2 -0
  319. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/node/index.js.map +1 -0
  320. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/cookie.cjs.js +2 -0
  321. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/cookie.cjs.js.map +1 -0
  322. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/cookie.js +2 -0
  323. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/cookie.js.map +1 -0
  324. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/statuses.cjs.js +12 -0
  325. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/statuses.cjs.js.map +1 -0
  326. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/statuses.js +12 -0
  327. package/dist/node_modules/.pnpm/msw@2.12.3_@types_node@20.19.25_typescript@5.4.5/node_modules/msw/lib/shims/statuses.js.map +1 -0
  328. package/dist/node_modules/.pnpm/outvariant@1.4.3/node_modules/outvariant/lib/index.cjs.js +2 -0
  329. package/dist/node_modules/.pnpm/outvariant@1.4.3/node_modules/outvariant/lib/index.cjs.js.map +1 -0
  330. package/dist/node_modules/.pnpm/outvariant@1.4.3/node_modules/outvariant/lib/index.js +2 -0
  331. package/dist/node_modules/.pnpm/outvariant@1.4.3/node_modules/outvariant/lib/index.js.map +1 -0
  332. package/dist/node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.cjs.js +2 -0
  333. package/dist/node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.cjs.js.map +1 -0
  334. package/dist/node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.js +2 -0
  335. package/dist/node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.js.map +1 -0
  336. package/dist/node_modules/.pnpm/strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.cjs.js +2 -0
  337. package/dist/node_modules/.pnpm/strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.cjs.js.map +1 -0
  338. package/dist/node_modules/.pnpm/strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.d.d.ts +75 -0
  339. package/dist/node_modules/.pnpm/strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.js +2 -0
  340. package/dist/node_modules/.pnpm/strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.js.map +1 -0
  341. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/domain.cjs.js +2 -0
  342. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/domain.cjs.js.map +1 -0
  343. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/domain.js +2 -0
  344. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/domain.js.map +1 -0
  345. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/extract-hostname.cjs.js +2 -0
  346. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/extract-hostname.cjs.js.map +1 -0
  347. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/extract-hostname.js +2 -0
  348. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/extract-hostname.js.map +1 -0
  349. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/factory.cjs.js +2 -0
  350. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/factory.cjs.js.map +1 -0
  351. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/factory.js +2 -0
  352. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/factory.js.map +1 -0
  353. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-ip.cjs.js +2 -0
  354. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-ip.cjs.js.map +1 -0
  355. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-ip.js +2 -0
  356. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-ip.js.map +1 -0
  357. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-valid.cjs.js +2 -0
  358. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-valid.cjs.js.map +1 -0
  359. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-valid.js +2 -0
  360. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/is-valid.js.map +1 -0
  361. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/lookup/fast-path.cjs.js +2 -0
  362. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/lookup/fast-path.cjs.js.map +1 -0
  363. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js +2 -0
  364. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js.map +1 -0
  365. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/options.cjs.js +2 -0
  366. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/options.cjs.js.map +1 -0
  367. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/options.js +2 -0
  368. package/dist/node_modules/.pnpm/tldts-core@7.0.19/node_modules/tldts-core/dist/es6/src/options.js.map +1 -0
  369. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/index.cjs.js +2 -0
  370. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/index.cjs.js.map +1 -0
  371. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/index.js +2 -0
  372. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/index.js.map +1 -0
  373. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.cjs.js +2 -0
  374. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.cjs.js.map +1 -0
  375. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.js +2 -0
  376. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.js.map +1 -0
  377. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.cjs.js +2 -0
  378. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.cjs.js.map +1 -0
  379. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.js +2 -0
  380. package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.js.map +1 -0
  381. package/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.cjs.js +33 -0
  382. package/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.cjs.js.map +1 -0
  383. package/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.js +32 -0
  384. package/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.js.map +1 -0
  385. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/if.d.d.ts +102 -0
  386. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/internal/object.d.d.ts +74 -0
  387. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/internal/type.d.d.ts +25 -0
  388. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-any.d.d.ts +31 -0
  389. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-never.d.d.ts +44 -0
  390. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-optional-key-of.d.d.ts +51 -0
  391. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/merge.d.d.ts +50 -0
  392. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/omit-index-signature.d.d.ts +97 -0
  393. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/optional-keys-of.d.d.ts +46 -0
  394. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/partial-deep.d.d.ts +156 -0
  395. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/pick-index-signature.d.d.ts +52 -0
  396. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/primitive.d.d.ts +15 -0
  397. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/required-keys-of.d.d.ts +32 -0
  398. package/dist/node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/simplify.d.d.ts +60 -0
  399. package/dist/node_modules/.pnpm/until-async@3.0.2/node_modules/until-async/lib/index.cjs.js +2 -0
  400. package/dist/node_modules/.pnpm/until-async@3.0.2/node_modules/until-async/lib/index.cjs.js.map +1 -0
  401. package/dist/node_modules/.pnpm/until-async@3.0.2/node_modules/until-async/lib/index.js +2 -0
  402. package/dist/node_modules/.pnpm/until-async@3.0.2/node_modules/until-async/lib/index.js.map +1 -0
  403. package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
  404. package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
  405. package/dist/themes/flipdishPublicTheme.js +1 -1
  406. package/dist/themes/flipdishPublicTheme.js.map +1 -1
  407. package/dist/themes/overrides/listSubheaderOverrides.cjs.js +2 -0
  408. package/dist/themes/overrides/listSubheaderOverrides.cjs.js.map +1 -0
  409. package/dist/themes/overrides/listSubheaderOverrides.d.ts +5 -0
  410. package/dist/themes/overrides/listSubheaderOverrides.js +2 -0
  411. package/dist/themes/overrides/listSubheaderOverrides.js.map +1 -0
  412. package/dist/themes/overrides/menuItemOverrides.cjs.js +1 -1
  413. package/dist/themes/overrides/menuItemOverrides.cjs.js.map +1 -1
  414. package/dist/themes/overrides/menuItemOverrides.js +1 -1
  415. package/dist/themes/overrides/menuItemOverrides.js.map +1 -1
  416. package/dist/themes/overrides/menuOverrides.cjs.js +1 -1
  417. package/dist/themes/overrides/menuOverrides.cjs.js.map +1 -1
  418. package/dist/themes/overrides/menuOverrides.js +1 -1
  419. package/dist/themes/overrides/menuOverrides.js.map +1 -1
  420. package/package.json +9 -2
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/Avatar"),r=require("../../../themes/tokens/typography/font-family.cjs.js"),o=require("../../../themes/tokens/typography/font-size.cjs.js"),i=require("../../../themes/typography.cjs.js");const s=require("@mui/material/styles").styled(t,{shouldForwardProp:e=>"size"!==e&&"type"!==e})((({theme:e,size:t="medium",type:s})=>{const a={small:o.fontSize.desktop.caption,medium:o.fontSize.desktop.h4,large:o.fontSize.desktop.h3},l={small:"32",medium:"48",large:"64"}[t],n="photo"!==s?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:r.fontFamily.desktop.body,fontSize:a[t],color:e.palette.grey[700],backgroundColor:"#f5f5f5",width:`${l}px`,height:`${l}px`,border:"1px solid #ddd",...n,[e.breakpoints.down("tablet")]:{...i.getMobileTextStyle({small:"caption",medium:"h4",large:"h3"}[t])}}}));module.exports=t=>{const{type:r,fdKey:o}=t;return e.jsx(s,{alt:t.alt||t.type,"data-fd":o,size:t.size,src:(()=>{switch(r){case"logo":case"photo":return t.src;default:return}})(),type:t.type,variant:"photo"===r?"circular":"rounded",children:(()=>{switch(r){case"icon":return t.icon;case"initials":return t.initials;default:return null}})()})};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/Avatar"),r=require("../../../themes/tokens/typography/font-family.cjs.js"),i=require("../../../themes/tokens/typography/font-size.cjs.js"),o=require("../../../themes/typography.cjs.js");const a=require("@mui/material/styles").styled(t,{shouldForwardProp:e=>"size"!==e&&"type"!==e})((({theme:e,size:t="medium",type:a})=>{const s={small:i.fontSize.desktop.caption,medium:i.fontSize.desktop.h4,large:i.fontSize.desktop.h3},l={small:"32",medium:"48",large:"64"}[t],n="photo"!==a?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:r.fontFamily.desktop.body,fontSize:s[t],color:e.palette.grey[700],backgroundColor:"#f5f5f5",width:`${l}px`,height:`${l}px`,border:"1px solid #ddd",...n,[e.breakpoints.down("tablet")]:{...o.getMobileTextStyle({small:"caption",medium:"h4",large:"h3"}[t])}}}));module.exports=t=>{const{type:r,fdKey:i}=t;return e.jsx(a,{alt:t.alt,"aria-hidden":"icon"===t.type,"aria-label":(()=>{if("initials"===r)return t.ariaLabel})(),"data-fd":i,size:t.size,src:(()=>{switch(r){case"logo":case"photo":return t.src;default:return}})(),type:t.type,variant:"photo"===r?"circular":"rounded",children:(()=>{switch(r){case"icon":return t.icon;case"initials":return t.initials;default:return null}})()})};
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt || props.type}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","props","fdKey","_jsx","alt","src","getSrc","variant","children","icon","initials","getChildren"],"mappings":"mQA4DA,MAAMA,kCAAeC,OAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAAAA,SAASC,QAAQC,QACxBC,OAAQH,EAAAA,SAASC,QAAQG,GACzBC,MAAOL,EAAAA,SAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAAA,WAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EACH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBA3BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAwB4BT,wBAUA4B,IACrC,MAAM3B,KAAEA,EAAI4B,MAAEA,GAAUD,EAiCxB,OACEE,MAACpC,GACCqC,IAAKH,EAAMG,KAAOH,EAAM3B,KAAI,UACnB4B,EACT7B,KAAM4B,EAAM5B,KACZgC,IAfW,MACb,OAAQ/B,GACN,IAAK,OACL,IAAK,QACH,OAAO2B,EAAMI,IACf,QACE,SASGC,GACLhC,KAAM2B,EAAM3B,KACZiC,QApCK,UADCjC,EAEG,WAGA,UAgCYkC,SA5BL,MAClB,OAAQlC,GACN,IAAK,OACH,OAAO2B,EAAMQ,KACf,IAAK,WACH,OAAOR,EAAMS,SACf,QACE,OAAO,OAuBRC"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Aria-label for full name of the displayed initials */\n ariaLabel?: string;\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getAriaLabel = (): string | undefined => {\n switch (type) {\n case 'initials':\n return props.ariaLabel;\n default:\n return undefined;\n }\n };\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt}\n aria-hidden={props.type === 'icon'}\n aria-label={getAriaLabel()}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","props","fdKey","_jsx","alt","ariaLabel","getAriaLabel","src","getSrc","variant","icon","initials","getChildren"],"mappings":"mQA8DA,MAAMA,kCAAeC,OAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAAAA,SAASC,QAAQC,QACxBC,OAAQH,EAAAA,SAASC,QAAQG,GACzBC,MAAOL,EAAAA,SAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAAA,WAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EAEH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBA5BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAyB4BT,wBAUA4B,IACrC,MAAM3B,KAAEA,EAAI4B,MAAEA,GAAUD,EA0CxB,OACEE,EAAAA,IAACpC,EAAY,CACXqC,IAAKH,EAAMG,IAAG,cACc,SAAfH,EAAM3B,KAAe,aA3CjB,MACnB,GACO,aADCA,EAEJ,OAAO2B,EAAMI,WAyCHC,GAAc,UACjBJ,EACT7B,KAAM4B,EAAM5B,KACZkC,IAjBW,MACb,OAAQjC,GACN,IAAK,OACL,IAAK,QACH,OAAO2B,EAAMM,IACf,QACE,SAWGC,GACLlC,KAAM2B,EAAM3B,KACZmC,QAtCK,UADCnC,EAEG,WAGA,mBAIO,MAClB,OAAQA,GACN,IAAK,OACH,OAAO2B,EAAMS,KACf,IAAK,WACH,OAAOT,EAAMU,SACf,QACE,OAAO,OAyBRC"}
@@ -24,6 +24,8 @@ interface PhotoProps {
24
24
  alt: string;
25
25
  }
26
26
  interface InitialsProps {
27
+ /** Aria-label for full name of the displayed initials */
28
+ ariaLabel?: string;
27
29
  /** Type of avatar - displays initials text */
28
30
  type: 'initials';
29
31
  /** Initials text to display in the avatar */
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import e from"@mui/material/Avatar";import{fontFamily as o}from"../../../themes/tokens/typography/font-family.js";import{fontSize as r}from"../../../themes/tokens/typography/font-size.js";import{getMobileTextStyle as a}from"../../../themes/typography.js";import{styled as i}from"@mui/material/styles";const s=i(e,{shouldForwardProp:t=>"size"!==t&&"type"!==t})((({theme:t,size:e="medium",type:i})=>{const s={small:r.desktop.caption,medium:r.desktop.h4,large:r.desktop.h3},m={small:"32",medium:"48",large:"64"}[e],p="photo"!==i?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:o.desktop.body,fontSize:s[e],color:t.palette.grey[700],backgroundColor:"#f5f5f5",width:`${m}px`,height:`${m}px`,border:"1px solid #ddd",...p,[t.breakpoints.down("tablet")]:{...a({small:"caption",medium:"h4",large:"h3"}[e])}}})),m=e=>{const{type:o,fdKey:r}=e;return t(s,{alt:e.alt||e.type,"data-fd":r,size:e.size,src:(()=>{switch(o){case"logo":case"photo":return e.src;default:return}})(),type:e.type,variant:"photo"===o?"circular":"rounded",children:(()=>{switch(o){case"icon":return e.icon;case"initials":return e.initials;default:return null}})()})};export{m as default};
1
+ import{jsx as t}from"react/jsx-runtime";import e from"@mui/material/Avatar";import{fontFamily as r}from"../../../themes/tokens/typography/font-family.js";import{fontSize as o}from"../../../themes/tokens/typography/font-size.js";import{getMobileTextStyle as a}from"../../../themes/typography.js";import{styled as i}from"@mui/material/styles";const s=i(e,{shouldForwardProp:t=>"size"!==t&&"type"!==t})((({theme:t,size:e="medium",type:i})=>{const s={small:o.desktop.caption,medium:o.desktop.h4,large:o.desktop.h3},l={small:"32",medium:"48",large:"64"}[e],n="photo"!==i?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:r.desktop.body,fontSize:s[e],color:t.palette.grey[700],backgroundColor:"#f5f5f5",width:`${l}px`,height:`${l}px`,border:"1px solid #ddd",...n,[t.breakpoints.down("tablet")]:{...a({small:"caption",medium:"h4",large:"h3"}[e])}}})),l=e=>{const{type:r,fdKey:o}=e;return t(s,{alt:e.alt,"aria-hidden":"icon"===e.type,"aria-label":(()=>{if("initials"===r)return e.ariaLabel})(),"data-fd":o,size:e.size,src:(()=>{switch(r){case"logo":case"photo":return e.src;default:return}})(),type:e.type,variant:"photo"===r?"circular":"rounded",children:(()=>{switch(r){case"icon":return e.icon;case"initials":return e.initials;default:return null}})()})};export{l as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt || props.type}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","Avatar","props","fdKey","_jsx","alt","src","getSrc","variant","children","icon","initials","getChildren"],"mappings":"qVA4DA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAASC,QAAQC,QACxBC,OAAQH,EAASC,QAAQG,GACzBC,MAAOL,EAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EACH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EA3BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAwB4BT,SAUjC4B,EAAiCC,IACrC,MAAM5B,KAAEA,EAAI6B,MAAEA,GAAUD,EAiCxB,OACEE,EAACrC,GACCsC,IAAKH,EAAMG,KAAOH,EAAM5B,KAAI,UACnB6B,EACT9B,KAAM6B,EAAM7B,KACZiC,IAfW,MACb,OAAQhC,GACN,IAAK,OACL,IAAK,QACH,OAAO4B,EAAMI,IACf,QACE,SASGC,GACLjC,KAAM4B,EAAM5B,KACZkC,QApCK,UADClC,EAEG,WAGA,UAgCYmC,SA5BL,MAClB,OAAQnC,GACN,IAAK,OACH,OAAO4B,EAAMQ,KACf,IAAK,WACH,OAAOR,EAAMS,SACf,QACE,OAAO,OAuBRC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Aria-label for full name of the displayed initials */\n ariaLabel?: string;\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getAriaLabel = (): string | undefined => {\n switch (type) {\n case 'initials':\n return props.ariaLabel;\n default:\n return undefined;\n }\n };\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt}\n aria-hidden={props.type === 'icon'}\n aria-label={getAriaLabel()}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","Avatar","props","fdKey","_jsx","alt","ariaLabel","getAriaLabel","src","getSrc","variant","icon","initials","getChildren"],"mappings":"qVA8DA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAASC,QAAQC,QACxBC,OAAQH,EAASC,QAAQG,GACzBC,MAAOL,EAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EAEH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EA5BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAyB4BT,SAUjC4B,EAAiCC,IACrC,MAAM5B,KAAEA,EAAI6B,MAAEA,GAAUD,EA0CxB,OACEE,EAACrC,EAAY,CACXsC,IAAKH,EAAMG,IAAG,cACc,SAAfH,EAAM5B,KAAe,aA3CjB,MACnB,GACO,aADCA,EAEJ,OAAO4B,EAAMI,WAyCHC,GAAc,UACjBJ,EACT9B,KAAM6B,EAAM7B,KACZmC,IAjBW,MACb,OAAQlC,GACN,IAAK,OACL,IAAK,QACH,OAAO4B,EAAMM,IACf,QACE,SAWGC,GACLnC,KAAM4B,EAAM5B,KACZoC,QAtCK,UADCpC,EAEG,WAGA,mBAIO,MAClB,OAAQA,GACN,IAAK,OACH,OAAO4B,EAAMS,KACf,IAAK,WACH,OAAOT,EAAMU,SACf,QACE,OAAO,OAyBRC"}
@@ -1,2 +1,2 @@
1
- "use strict";require("@mui/material/styles");var e=require("../../../themes/tokens/typography/font-family.cjs.js"),t=require("../../../themes/tokens/typography/font-size.cjs.js"),i=require("../../../themes/tokens/typography/letter-spacing.cjs.js"),n=require("../../../themes/tokens/typography/line-height.cjs.js");exports.buttonStyleOverrides=o=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.caption,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.caption,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.caption,lineHeight:n.lineHeight.mobile.caption,letterSpacing:i.letterSpacing.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.b1,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.b1,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.b1,lineHeight:n.lineHeight.mobile.b1,letterSpacing:i.letterSpacing.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.heading,fontSize:t.fontSize.desktop.h4,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.h4,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.heading,fontSize:t.fontSize.mobile.h4,lineHeight:n.lineHeight.mobile.h4,letterSpacing:i.letterSpacing.mobile.h4}}}});
1
+ "use strict";require("@mui/material/styles");var e=require("../../../themes/tokens/typography/font-family.cjs.js"),t=require("../../../themes/tokens/typography/font-size.cjs.js"),i=require("../../../themes/tokens/typography/letter-spacing.cjs.js"),n=require("../../../themes/tokens/typography/line-height.cjs.js");exports.buttonStyleOverrides=o=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.caption,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.caption,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.caption,lineHeight:n.lineHeight.mobile.caption,letterSpacing:i.letterSpacing.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.b1,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.b1,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.b1,lineHeight:n.lineHeight.mobile.b1,letterSpacing:i.letterSpacing.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.heading,fontSize:t.fontSize.desktop.h4,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.h4,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.heading,fontSize:t.fontSize.mobile.h4,lineHeight:n.lineHeight.mobile.h4,letterSpacing:i.letterSpacing.mobile.h4}}}});
2
2
  //# sourceMappingURL=buttonThemeOverrides.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttonThemeOverrides.cjs.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","flex","alignSelf","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","heading","h4"],"mappings":"uVAgBqCA,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,WAEbC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAON,QAC1BC,WAAYA,EAAAA,WAAWK,OAAON,QAC9BE,cAAeA,EAAAA,cAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAOG,GAC1BR,WAAYA,EAAAA,WAAWK,OAAOG,GAC9BP,cAAeA,EAAAA,cAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRN,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,UACXiB,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQc,QAC/BZ,SAAUA,EAAAA,SAASF,QAAQe,GAC3BX,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQe,GACrCT,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOK,QAC9BZ,SAAUA,EAAAA,SAASO,OAAOM,GAC1BX,WAAYA,EAAAA,WAAWK,OAAOM,GAC9BV,cAAeA,EAAAA,cAAcI,OAAOM"}
1
+ {"version":3,"file":"buttonThemeOverrides.cjs.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","flex","alignSelf","heading","h4"],"mappings":"uVAgBqCA,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,UAElBC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAON,QAC1BC,WAAYA,EAAAA,WAAWK,OAAON,QAC9BE,cAAeA,EAAAA,cAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAOG,GAC1BR,WAAYA,EAAAA,WAAWK,OAAOG,GAC9BP,cAAeA,EAAAA,cAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRJ,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBoB,KAAM,QACNC,UAAW,UACXJ,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQgB,QAC/Bd,SAAUA,EAAAA,SAASF,QAAQiB,GAC3Bb,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQiB,GACrCX,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOO,QAC9Bd,SAAUA,EAAAA,SAASO,OAAOQ,GAC1Bb,WAAYA,EAAAA,WAAWK,OAAOQ,GAC9BZ,cAAeA,EAAAA,cAAcI,OAAOQ"}
@@ -1,2 +1,2 @@
1
- import"@mui/material/styles";import{fontFamily as e}from"../../../themes/tokens/typography/font-family.js";import{fontSize as t}from"../../../themes/tokens/typography/font-size.js";import{letterSpacing as i}from"../../../themes/tokens/typography/letter-spacing.js";import{lineHeight as o}from"../../../themes/tokens/typography/line-height.js";const n=n=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.caption,lineHeight:"normal",letterSpacing:i.desktop.caption,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.caption,lineHeight:o.mobile.caption,letterSpacing:i.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.b1,lineHeight:"normal",letterSpacing:i.desktop.b1,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.b1,lineHeight:o.mobile.b1,letterSpacing:i.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.desktop.heading,fontSize:t.desktop.h4,lineHeight:"normal",letterSpacing:i.desktop.h4,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.heading,fontSize:t.mobile.h4,lineHeight:o.mobile.h4,letterSpacing:i.mobile.h4}}}});export{n as buttonStyleOverrides};
1
+ import"@mui/material/styles";import{fontFamily as e}from"../../../themes/tokens/typography/font-family.js";import{fontSize as t}from"../../../themes/tokens/typography/font-size.js";import{letterSpacing as o}from"../../../themes/tokens/typography/letter-spacing.js";import{lineHeight as i}from"../../../themes/tokens/typography/line-height.js";const n=n=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.caption,lineHeight:"normal",letterSpacing:o.desktop.caption,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.caption,lineHeight:i.mobile.caption,letterSpacing:o.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.b1,lineHeight:"normal",letterSpacing:o.desktop.b1,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.b1,lineHeight:i.mobile.b1,letterSpacing:o.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.desktop.heading,fontSize:t.desktop.h4,lineHeight:"normal",letterSpacing:o.desktop.h4,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.heading,fontSize:t.mobile.h4,lineHeight:i.mobile.h4,letterSpacing:o.mobile.h4}}}});export{n as buttonStyleOverrides};
2
2
  //# sourceMappingURL=buttonThemeOverrides.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttonThemeOverrides.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["buttonStyleOverrides","baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","flex","alignSelf","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","heading","h4"],"mappings":"6VAgBaA,EAAwBC,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,WAEbC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAON,QAC1BC,WAAYA,EAAWK,OAAON,QAC9BE,cAAeA,EAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAOG,GAC1BR,WAAYA,EAAWK,OAAOG,GAC9BP,cAAeA,EAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRN,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,UACXiB,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQc,QAC/BZ,SAAUA,EAASF,QAAQe,GAC3BX,WAAY,SACZC,cAAeA,EAAcL,QAAQe,GACrCT,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOK,QAC9BZ,SAAUA,EAASO,OAAOM,GAC1BX,WAAYA,EAAWK,OAAOM,GAC9BV,cAAeA,EAAcI,OAAOM"}
1
+ {"version":3,"file":"buttonThemeOverrides.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["buttonStyleOverrides","baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","flex","alignSelf","heading","h4"],"mappings":"6VAgBaA,EAAwBC,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,UAElBC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAON,QAC1BC,WAAYA,EAAWK,OAAON,QAC9BE,cAAeA,EAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAOG,GAC1BR,WAAYA,EAAWK,OAAOG,GAC9BP,cAAeA,EAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRJ,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBoB,KAAM,QACNC,UAAW,UACXJ,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQgB,QAC/Bd,SAAUA,EAASF,QAAQiB,GAC3Bb,WAAY,SACZC,cAAeA,EAAcL,QAAQiB,GACrCX,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOO,QAC9Bd,SAAUA,EAASO,OAAOQ,GAC1Bb,WAAYA,EAAWK,OAAOQ,GAC9BZ,cAAeA,EAAcI,OAAOQ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/material/Button"),r=require("@mui/material/styles"),a=require("./getButtonStyles.cjs.js");const i=r.styled(t,{shouldForwardProp:e=>!["casingOverride","customVariant","tone"].includes(e)})((({theme:e,customVariant:t="primary",tone:r="brand",casingOverride:i="none",fullWidth:n=!1})=>{const o=a(e,t,r);return{...o.default,width:n?"100%":"fit-content",maxWidth:n?"100%":"fit-content",textTransform:i,transition:"all 0.2s ease-in-out",padding:"12px 24px","&:hover":{...o.hover},"&:focus":{outline:"none"},"&:focus-visible":{...o.focus},"&:active":{...o.press},"&:disabled":{...o.disabled,cursor:"not-allowed"}}})),n={primary:"contained",secondary:"outlined",tertiary:"text"},o=({children:t,className:r,disabled:a=!1,fdKey:o,form:s,fullWidth:d=!1,href:l,casingOverride:u="none",type:c="button",variant:f="primary",tone:m,target:p,startIcon:h,endIcon:v,onKeyDown:y,...x})=>e.jsx(i,{disableRipple:!0,casingOverride:u,className:r,customVariant:f,"data-fd":o,disabled:a,endIcon:v,form:s,fullWidth:d,href:l,startIcon:h,target:p,tone:m,type:c,variant:n[f],...x,children:t});exports.Button=o,exports.default=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/material/Button"),r=require("@mui/material/styles"),i=require("./getButtonStyles.cjs.js");const a=r.styled(t,{shouldForwardProp:e=>!["casingOverride","customVariant","tone"].includes(e)})((({theme:e,customVariant:t="primary",tone:r="brand",casingOverride:a="none",fullWidth:n=!1})=>{const s=i(e,t,r);return{...s.default,width:n?"100%":"fit-content",maxWidth:n?"100%":"fit-content",textTransform:a,transition:"all 0.2s ease-in-out","&:hover":{...s.hover},"&:focus":{outline:"none"},"&:focus-visible":{...s.focus},"&:active":{...s.press},"&:disabled":{...s.disabled,cursor:"not-allowed"}}})),n={primary:"contained",secondary:"outlined",tertiary:"text"},s=({casingOverride:t="none",children:r,className:i,disabled:s=!1,endIcon:o,fdKey:d,form:l,fullWidth:u=!1,href:c,onKeyDown:m,size:f="medium",startIcon:h,target:p,tone:v,type:y="button",variant:b="primary",...x})=>e.jsx(a,{...x,disableRipple:!0,casingOverride:t,className:i,customVariant:b,"data-fd":d,disabled:s,endIcon:o,form:l,fullWidth:u,href:c,size:f,startIcon:h,target:p,tone:v,type:y,variant:n[b],children:r});exports.Button=s,exports.default=s;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n padding: '12px 24px',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n children,\n className,\n disabled = false,\n fdKey,\n form,\n fullWidth = false,\n href,\n casingOverride = 'none',\n type = 'button',\n variant = 'primary',\n tone,\n target,\n startIcon,\n endIcon,\n onKeyDown,\n ...rest\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n {...rest}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","padding","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","fdKey","form","href","type","variant","target","startIcon","endIcon","onKeyDown","rest","_jsx","disableRipple"],"mappings":"sOAyBA,MAAMA,EAAeC,EAAAA,OAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBACZC,QAAS,YAET,UAAW,IAAKP,EAAOQ,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKT,EAAOU,OAC/B,WAAY,IAAKV,EAAOW,OACxB,aAAc,IAAKX,EAAOY,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBC,WACAC,YACAR,YAAW,EACXS,QACAC,OACAvB,aAAY,EACZwB,OACAzB,iBAAiB,OACjB0B,OAAO,SACPC,UAAU,UACV5B,OACA6B,SACAC,YACAC,UACAC,eACGC,KAGDC,MAAC1C,GACC2C,eAAa,EACblC,eAAgBA,EAChBsB,UAAWA,EACXxB,cAAe6B,EAAO,UACbJ,EACTT,SAAUA,EACVgB,QAASA,EACTN,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNI,UAAWA,EAEXD,OAAQA,EACR7B,KAAMA,EACN2B,KAAMA,EACNC,QAASX,EAAgBW,MACrBK,EAAIX,SAEPA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n casingOverride = 'none',\n children,\n className,\n disabled = false,\n endIcon,\n fdKey,\n form,\n fullWidth = false,\n href,\n onKeyDown,\n size = 'medium',\n startIcon,\n target,\n tone,\n type = 'button',\n variant = 'primary',\n ...props\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n {...props}\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n size={size}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","endIcon","fdKey","form","href","onKeyDown","size","startIcon","target","type","variant","props","_jsx","disableRipple"],"mappings":"sOAyBA,MAAMA,EAAeC,EAAAA,OAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBAEZ,UAAW,IAAKN,EAAOO,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKR,EAAOS,OAC/B,WAAY,IAAKT,EAAOU,OACxB,aAAc,IAAKV,EAAOW,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBnB,iBAAiB,OACjBoB,WACAC,YACAR,YAAW,EACXS,UACAC,QACAC,OACAvB,aAAY,EACZwB,OACAC,YACAC,OAAO,SACPC,YACAC,SACA9B,OACA+B,OAAO,SACPC,UAAU,aACPC,KAGDC,EAAAA,IAAC1C,EAAY,IACPyC,EACJE,eAAa,EACblC,eAAgBA,EAChBqB,UAAWA,EACXvB,cAAeiC,EAAO,UACbR,EACTV,SAAUA,EACVS,QAASA,EACTE,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNE,KAAMA,EACNC,UAAWA,EAEXC,OAAQA,EACR9B,KAAMA,EACN+B,KAAMA,EACNC,QAAShB,EAAgBgB,GAAqCX,SAE7DA"}
@@ -18,7 +18,7 @@ interface ButtonProps extends Omit<ButtonProps$1, 'variant'> {
18
18
  startIcon?: react__default.ReactNode;
19
19
  endIcon?: react__default.ReactNode;
20
20
  }
21
- declare const Button: ({ children, className, disabled, fdKey, form, fullWidth, href, casingOverride, type, variant, tone, target, startIcon, endIcon, onKeyDown, ...rest }: ButtonProps) => JSX.Element;
21
+ declare const Button: ({ casingOverride, children, className, disabled, endIcon, fdKey, form, fullWidth, href, onKeyDown, size, startIcon, target, tone, type, variant, ...props }: ButtonProps) => JSX.Element;
22
22
 
23
23
  export { Button, Button as default };
24
24
  export type { ButtonProps };
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import"react";import e from"@mui/material/Button";import{styled as r}from"@mui/material/styles";import a from"./getButtonStyles.js";const i=r(e,{shouldForwardProp:t=>!["casingOverride","customVariant","tone"].includes(t)})((({theme:t,customVariant:e="primary",tone:r="brand",casingOverride:i="none",fullWidth:n=!1})=>{const o=a(t,e,r);return{...o.default,width:n?"100%":"fit-content",maxWidth:n?"100%":"fit-content",textTransform:i,transition:"all 0.2s ease-in-out",padding:"12px 24px","&:hover":{...o.hover},"&:focus":{outline:"none"},"&:focus-visible":{...o.focus},"&:active":{...o.press},"&:disabled":{...o.disabled,cursor:"not-allowed"}}})),n={primary:"contained",secondary:"outlined",tertiary:"text"},o=({children:e,className:r,disabled:a=!1,fdKey:o,form:s,fullWidth:d=!1,href:l,casingOverride:c="none",type:m="button",variant:u="primary",tone:f,target:p,startIcon:h,endIcon:y,onKeyDown:v,...b})=>t(i,{disableRipple:!0,casingOverride:c,className:r,customVariant:u,"data-fd":o,disabled:a,endIcon:y,form:s,fullWidth:d,href:l,startIcon:h,target:p,tone:f,type:m,variant:n[u],...b,children:e});export{o as Button,o as default};
1
+ import{jsx as t}from"react/jsx-runtime";import"react";import e from"@mui/material/Button";import{styled as r}from"@mui/material/styles";import i from"./getButtonStyles.js";const a=r(e,{shouldForwardProp:t=>!["casingOverride","customVariant","tone"].includes(t)})((({theme:t,customVariant:e="primary",tone:r="brand",casingOverride:a="none",fullWidth:o=!1})=>{const n=i(t,e,r);return{...n.default,width:o?"100%":"fit-content",maxWidth:o?"100%":"fit-content",textTransform:a,transition:"all 0.2s ease-in-out","&:hover":{...n.hover},"&:focus":{outline:"none"},"&:focus-visible":{...n.focus},"&:active":{...n.press},"&:disabled":{...n.disabled,cursor:"not-allowed"}}})),o={primary:"contained",secondary:"outlined",tertiary:"text"},n=({casingOverride:e="none",children:r,className:i,disabled:n=!1,endIcon:s,fdKey:d,form:l,fullWidth:c=!1,href:m,onKeyDown:u,size:f="medium",startIcon:p,target:h,tone:y,type:v="button",variant:b="primary",...g})=>t(a,{...g,disableRipple:!0,casingOverride:e,className:i,customVariant:b,"data-fd":d,disabled:n,endIcon:s,form:l,fullWidth:c,href:m,size:f,startIcon:p,target:h,tone:y,type:v,variant:o[b],children:r});export{n as Button,n as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n padding: '12px 24px',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n children,\n className,\n disabled = false,\n fdKey,\n form,\n fullWidth = false,\n href,\n casingOverride = 'none',\n type = 'button',\n variant = 'primary',\n tone,\n target,\n startIcon,\n endIcon,\n onKeyDown,\n ...rest\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n {...rest}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","padding","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","fdKey","form","href","type","variant","target","startIcon","endIcon","onKeyDown","rest","_jsx","disableRipple"],"mappings":"4KAyBA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBACZC,QAAS,YAET,UAAW,IAAKP,EAAOQ,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKT,EAAOU,OAC/B,WAAY,IAAKV,EAAOW,OACxB,aAAc,IAAKX,EAAOY,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBC,WACAC,YACAR,YAAW,EACXS,QACAC,OACAvB,aAAY,EACZwB,OACAzB,iBAAiB,OACjB0B,OAAO,SACPC,UAAU,UACV5B,OACA6B,SACAC,YACAC,UACAC,eACGC,KAGDC,EAAC1C,GACC2C,eAAa,EACblC,eAAgBA,EAChBsB,UAAWA,EACXxB,cAAe6B,EAAO,UACbJ,EACTT,SAAUA,EACVgB,QAASA,EACTN,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNI,UAAWA,EAEXD,OAAQA,EACR7B,KAAMA,EACN2B,KAAMA,EACNC,QAASX,EAAgBW,MACrBK,EAAIX,SAEPA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n casingOverride = 'none',\n children,\n className,\n disabled = false,\n endIcon,\n fdKey,\n form,\n fullWidth = false,\n href,\n onKeyDown,\n size = 'medium',\n startIcon,\n target,\n tone,\n type = 'button',\n variant = 'primary',\n ...props\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n {...props}\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n size={size}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","endIcon","fdKey","form","href","onKeyDown","size","startIcon","target","type","variant","props","_jsx","disableRipple"],"mappings":"4KAyBA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBAEZ,UAAW,IAAKN,EAAOO,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKR,EAAOS,OAC/B,WAAY,IAAKT,EAAOU,OACxB,aAAc,IAAKV,EAAOW,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBnB,iBAAiB,OACjBoB,WACAC,YACAR,YAAW,EACXS,UACAC,QACAC,OACAvB,aAAY,EACZwB,OACAC,YACAC,OAAO,SACPC,YACAC,SACA9B,OACA+B,OAAO,SACPC,UAAU,aACPC,KAGDC,EAAC1C,EAAY,IACPyC,EACJE,eAAa,EACblC,eAAgBA,EAChBqB,UAAWA,EACXvB,cAAeiC,EAAO,UACbR,EACTV,SAAUA,EACVS,QAASA,EACTE,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNE,KAAMA,EACNC,UAAWA,EAEXC,OAAQA,EACR9B,KAAMA,EACN+B,KAAMA,EACNC,QAAShB,EAAgBgB,GAAqCX,SAE7DA"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/Box"),l=require("@mui/material/Checkbox"),t=require("@mui/material/FormControlLabel"),r=require("@mui/material/styles"),s=require("../../../icons/Remove/index.cjs.js"),o=require("../../../icons/Tick/index.cjs.js"),a=require("../../../themes/tokens/typography/font-family.cjs.js"),n=require("../../../themes/typography.cjs.js");const d=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:"transparent",position:"relative",...t&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!l&&!t&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!t&&{"&::before":{content:'""',width:r,height:r,inset:l?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...t&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!l&&!t&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!t&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:r,height:r,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),p=r.styled(t,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...n.typography.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:a.fontFamily.mobile.body,...n.getMobileTextStyle("caption")}}}}))),u=r.styled(l,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:l})=>({padding:0,margin:0,...!i&&!l&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}})));module.exports=({fdKey:i,label:l,size:t="medium",valid:r=!0,disabled:a,...n})=>e.jsx(p,{control:e.jsx(u,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(o,{})}),"data-fd":i,icon:e.jsx(d,{disabled:a,size:t,valid:r}),indeterminateIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(s,{})}),size:t,valid:r,...n}),"data-fd":`${i}-label`,disabled:a,label:l,size:t});
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/Box"),l=require("@mui/material/Checkbox"),t=require("@mui/material/FormControlLabel"),r=require("@mui/material/styles"),s=require("../../../icons/Remove/index.cjs.js"),o=require("../../../icons/Tick/index.cjs.js"),a=require("../../../themes/tokens/typography/font-family.cjs.js"),n=require("../../../themes/typography.cjs.js");const d=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"],position:"relative",...t&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!l&&!t&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!t&&{"&::before":{content:'""',width:r,height:r,inset:l?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...t&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!l&&!t&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!t&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:r,height:r,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),p=r.styled(t,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...n.typography.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:a.fontFamily.mobile.body,...n.getMobileTextStyle("caption")}}}}))),u=r.styled(l,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:l})=>({padding:0,margin:0,...!i&&!l&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}})));module.exports=({fdKey:i,label:l,size:t="medium",valid:r=!0,disabled:a,...n})=>e.jsx(p,{control:e.jsx(u,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(o,{})}),"data-fd":i,icon:e.jsx(d,{disabled:a,size:t,valid:r}),indeterminateIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(s,{})}),size:t,valid:r,...n}),"data-fd":`${i}-label`,disabled:a,label:l,size:t});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: 'transparent',\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","position","fill","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","fill","position","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import i from"@mui/material/Box";import o from"@mui/material/Checkbox";import t from"@mui/material/FormControlLabel";import{styled as l}from"@mui/material/styles";import r from"../../../icons/Remove/index.js";import a from"../../../icons/Tick/index.js";import{fontFamily as s}from"../../../themes/tokens/typography/font-family.js";import{getMobileTextStyle as n,typography as d}from"../../../themes/typography.js";const p=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:o,disabled:t})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:"transparent",position:"relative",...t&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!o&&!t&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!t&&{"&::before":{content:'""',width:l,height:l,inset:o?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:o,disabled:t})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...t&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!o&&!t&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!t&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:l,height:l,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),m=l(t,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...d.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:s.mobile.body,...n("caption")}}}}))),f=l(o,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:o})=>({padding:0,margin:0,...!i&&!o&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}}))),u=({fdKey:i,label:o,size:t="medium",valid:l=!0,disabled:s,...n})=>e(m,{control:e(f,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e(c,{disabled:s,size:t,valid:l,children:e(a,{})}),"data-fd":i,icon:e(p,{disabled:s,size:t,valid:l}),indeterminateIcon:e(c,{disabled:s,size:t,valid:l,children:e(r,{})}),size:t,valid:l,...n}),"data-fd":`${i}-label`,disabled:s,label:o,size:t});export{u as default};
1
+ import{jsx as e}from"react/jsx-runtime";import i from"@mui/material/Box";import t from"@mui/material/Checkbox";import o from"@mui/material/FormControlLabel";import{styled as l}from"@mui/material/styles";import r from"../../../icons/Remove/index.js";import a from"../../../icons/Tick/index.js";import{fontFamily as s}from"../../../themes/tokens/typography/font-family.js";import{getMobileTextStyle as n,typography as d}from"../../../themes/typography.js";const p=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:t,disabled:o})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"],position:"relative",...o&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!t&&!o&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!o&&{"&::before":{content:'""',width:l,height:l,inset:t?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:t,disabled:o})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...o&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!t&&!o&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!o&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:l,height:l,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),m=l(o,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...d.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:s.mobile.body,...n("caption")}}}}))),f=l(t,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:t})=>({padding:0,margin:0,...!i&&!t&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}}))),u=({fdKey:i,label:t,size:o="medium",valid:l=!0,disabled:s,...n})=>e(m,{control:e(f,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e(c,{disabled:s,size:o,valid:l,children:e(a,{})}),"data-fd":i,icon:e(p,{disabled:s,size:o,valid:l}),indeterminateIcon:e(c,{disabled:s,size:o,valid:l,children:e(r,{})}),size:o,valid:l,...n}),"data-fd":`${i}-label`,disabled:s,label:t,size:o});export{u as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: 'transparent',\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","position","fill","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","Checkbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","fill","position","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","Checkbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/Box"),r=require("@mui/material/ListItemText"),a=require("@mui/material/MenuItem"),n=require("@mui/material/styles"),c=require("../Checkbox/index.cjs.js");const i=n.styled(t,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:t=!1})=>({alignItems:"center",display:"inline-flex",justifyContent:"center","& .MuiAvatar-img":{opacity:t?e.palette.action.disabledOpacity:1}}))),s=n.styled(c)((()=>({pointerEvents:"none"}))),o=({children:t,disabled:n=!1,label:c,secondaryText:o,type:l="text",...d})=>{const u=(()=>{switch(l){case"checkbox":{const{checked:e,onCheckedChange:t,...r}=d;return r}case"avatar":{const{avatar:e,...t}=d;return t}case"icon":{const{icon:e,...t}=d;return t}default:return d}})();return e.jsxs(a,{...u,disabled:n,onClick:e=>{if(!n)if("checkbox"!==l)u?.onClick?.(e);else{e.preventDefault(),e.stopPropagation();const{checked:t,onCheckedChange:r}=d,a="boolean"==typeof t?t:Boolean(d.selected);r?.(!a,e)}},children:[(()=>{switch(l){case"avatar":return(()=>{const{avatar:t}=d;return e.jsx(i,{disabled:n,children:t})})();case"checkbox":return(()=>{const{checked:t}=d,r="boolean"==typeof t?t:Boolean(d.selected);return e.jsx(s,{"aria-hidden":!0,checked:r,disabled:n,fdKey:"checkbox-menu-item",size:"small",tabIndex:-1})})();case"icon":return(()=>{const{icon:t}=d;return e.jsx(i,{children:t})})();default:return null}})(),c||o?e.jsx(r,{primary:c,secondary:o}):t]})};exports.MenuItem=o,exports.default=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/MenuItem"),r=require("@mui/material/styles"),a=require("../Avatar/index.cjs.js"),n=require("@mui/material/Box"),s=require("../Checkbox/index.cjs.js"),c=require("@mui/material/ListItemText");const i=r.styled(n,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:t=!1})=>({alignItems:"center",display:"inline-flex",justifyContent:"center","& .MuiAvatar-img":{opacity:t?e.palette.action.disabledOpacity:1}}))),o=r.styled(s)((()=>({pointerEvents:"none"}))),l=({children:r,disabled:n=!1,label:s,secondaryText:l,type:d="text",...u})=>{const m=(()=>{switch(d){case"checkbox":{const{checked:e,onCheckedChange:t,...r}=u;return r}case"avatar":{const{avatarSrc:e,...t}=u;return t}case"icon":{const{icon:e,...t}=u;return t}default:return u}})();return e.jsxs(t,{...m,disabled:n,onClick:e=>{if(!n)if("checkbox"!==d)m?.onClick?.(e);else{e.preventDefault(),e.stopPropagation();const{checked:t,onCheckedChange:r}=u,a="boolean"==typeof t?t:Boolean(u.selected);r?.(!a,e)}},children:[(()=>{switch(d){case"avatar":return(()=>{const{avatarSrc:t}=u;return e.jsx(i,{className:"fd-MenuItem-startAdornment",disabled:n,children:e.jsx(a,{alt:"",src:t,type:"logo"})})})();case"checkbox":return(()=>{const{checked:t}=u,r="boolean"==typeof t?t:Boolean(u.selected);return e.jsx(o,{"aria-hidden":!0,checked:r,disabled:n,fdKey:"checkbox-menu-item",size:"small",tabIndex:-1})})();case"icon":return(()=>{const{icon:t}=u;return e.jsx(i,{className:"fd-MenuItem-startAdornment",children:t})})();default:return null}})(),s||l?e.jsx(c,{primary:s,secondary:l}):r]})};exports.MenuItem=l,exports.default=l;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/MenuItem/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport ListItemText from '@mui/material/ListItemText';\nimport MuiMenuItem, { type MenuItemProps as MuiMenuItemProps } from '@mui/material/MenuItem';\nimport { styled } from '@mui/material/styles';\n\nimport Checkbox from '../Checkbox';\n\ntype BaseProps = Omit<MuiMenuItemProps, 'children'> & {\n children?: React.ReactNode;\n label?: React.ReactNode;\n secondaryText?: React.ReactNode;\n type?: 'avatar' | 'checkbox' | 'icon' | 'text';\n};\n\ntype AvatarMenuItemProps = BaseProps & {\n avatar: React.ReactNode;\n checkbox?: never;\n icon?: never;\n type: 'avatar';\n};\n\ntype CheckboxMenuItemProps = BaseProps & {\n avatar?: never;\n checked?: boolean;\n icon?: never;\n onCheckedChange?: (\n checked: boolean,\n e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLLIElement>,\n ) => void;\n type: 'checkbox';\n};\n\ntype IconMenuItemProps = BaseProps & {\n avatar?: never;\n checkbox?: never;\n icon: React.ReactNode;\n type: 'icon';\n};\n\ntype TextMenuItemProps = BaseProps & {\n avatar?: never;\n checkbox?: never;\n icon?: never;\n type?: 'text';\n};\n\nexport type MenuItemProps =\n | AvatarMenuItemProps\n | CheckboxMenuItemProps\n | IconMenuItemProps\n | TextMenuItemProps;\n\nconst StyledStartAdornment = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n '& .MuiAvatar-img': {\n opacity: disabled ? theme.palette.action.disabledOpacity : 1,\n },\n}));\n\nconst StyledCheckbox = styled(Checkbox)(() => ({\n pointerEvents: 'none',\n}));\n\nexport const MenuItem = ({\n children,\n disabled = false,\n label,\n secondaryText,\n type = 'text',\n ...props\n}: MenuItemProps): JSX.Element => {\n // Remove type-specific props from props object to avoid passing them to MuiMenuItem\n const muiProps: MuiMenuItemProps = ((): MuiMenuItemProps => {\n switch (type) {\n case 'checkbox': {\n const { checked: _c, onCheckedChange: _h, ...rest } = props as CheckboxMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'avatar': {\n const { avatar: _a, ...rest } = props as AvatarMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'icon': {\n const { icon: _i, ...rest } = props as IconMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n default:\n return props as MuiMenuItemProps;\n }\n })();\n\n const handleClick = (event: React.MouseEvent<HTMLLIElement>): void => {\n if (disabled) {\n return;\n }\n\n // If menu item is a checkbox, clicking the menu item will toggle the checkbox\n if (type === 'checkbox') {\n event.preventDefault();\n event.stopPropagation();\n\n const { checked, onCheckedChange } = props as CheckboxMenuItemProps;\n const isChecked =\n typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n onCheckedChange?.(!isChecked, event);\n return;\n }\n\n muiProps?.onClick?.(event);\n };\n\n const renderAvatar = (): React.ReactNode => {\n const { avatar } = props as AvatarMenuItemProps;\n return <StyledStartAdornment disabled={disabled}>{avatar}</StyledStartAdornment>;\n };\n\n const renderCheckbox = (): React.ReactNode => {\n const { checked } = props as CheckboxMenuItemProps;\n const isChecked = typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n return (\n <StyledCheckbox\n aria-hidden\n checked={isChecked}\n disabled={disabled}\n fdKey=\"checkbox-menu-item\"\n size=\"small\"\n tabIndex={-1}\n />\n );\n };\n\n const renderIcon = (): React.ReactNode => {\n const { icon } = props as IconMenuItemProps;\n return <StyledStartAdornment>{icon}</StyledStartAdornment>;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n switch (type) {\n case 'avatar':\n return renderAvatar();\n case 'checkbox':\n return renderCheckbox();\n case 'icon':\n return renderIcon();\n default:\n return null;\n }\n };\n\n const renderText = (): React.ReactNode => {\n if (label || secondaryText) {\n return <ListItemText primary={label} secondary={secondaryText} />;\n }\n\n return children;\n };\n\n return (\n <MuiMenuItem {...muiProps} disabled={disabled} onClick={handleClick}>\n {renderStartAdornment()}\n {renderText()}\n </MuiMenuItem>\n );\n};\n\nexport default MenuItem;\n"],"names":["StyledStartAdornment","styled","Box","shouldForwardProp","prop","theme","disabled","alignItems","display","justifyContent","opacity","palette","action","disabledOpacity","StyledCheckbox","Checkbox","pointerEvents","MenuItem","children","label","secondaryText","type","props","muiProps","checked","_c","onCheckedChange","_h","rest","avatar","_a","icon","_i","_jsxs","MuiMenuItem","onClick","event","preventDefault","stopPropagation","isChecked","Boolean","selected","_jsx","renderAvatar","fdKey","size","tabIndex","renderCheckbox","renderIcon","renderStartAdornment","ListItemText","primary","secondary"],"mappings":"0RAoDA,MAAMA,EAAuBC,EAAAA,OAAOC,EAAK,CACvCC,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOC,YAAW,MAAO,CACrDC,WAAY,SACZC,QAAS,cACTC,eAAgB,SAEhB,mBAAoB,CAClBC,QAASJ,EAAWD,EAAMM,QAAQC,OAAOC,gBAAkB,OAIzDC,EAAiBb,EAAAA,OAAOc,EAAPd,EAAiB,KAAA,CACtCe,cAAe,WAGJC,EAAW,EACtBC,WACAZ,YAAW,EACXa,QACAC,gBACAC,OAAO,UACJC,MAGH,MAAMC,EAA6B,MACjC,OAAQF,GACN,IAAK,WAAY,CACf,MAAQG,QAASC,EAAIC,gBAAiBC,KAAOC,GAASN,EACtD,OAAOM,CACT,CACA,IAAK,SAAU,CACb,MAAQC,OAAQC,KAAOF,GAASN,EAChC,OAAOM,CACT,CACA,IAAK,OAAQ,CACX,MAAQG,KAAMC,KAAOJ,GAASN,EAC9B,OAAOM,CACT,CACA,QACE,OAAON,EAEZ,EAjBkC,GAuFnC,OACEW,EAAAA,KAACC,EAAW,IAAKX,EAAUjB,SAAUA,EAAU6B,QArE5BC,IACnB,IAAI9B,EAKJ,GAAa,aAATe,EAYJE,GAAUY,UAAUC,OAZpB,CACEA,EAAMC,iBACND,EAAME,kBAEN,MAAMd,QAAEA,EAAOE,gBAAEA,GAAoBJ,EAC/BiB,EACe,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/Ef,KAAmBa,EAAWH,EAEhC,aA+B2B,MAC3B,OAAQf,GACN,IAAK,SACH,MA7Be,MACnB,MAAMQ,OAAEA,GAAWP,EACnB,OAAOoB,EAAAA,IAAC1C,EAAoB,CAACM,SAAUA,EAAQY,SAAGW,KA2BvCc,GACT,IAAK,WACH,MA1BiB,MACrB,MAAMnB,QAAEA,GAAYF,EACdiB,EAA+B,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/F,OACEC,EAAAA,IAAC5B,EAAc,CAAA,eAAA,EAEbU,QAASe,EACTjC,SAAUA,EACVsC,MAAM,qBACNC,KAAK,QACLC,UAAU,KAeHC,GACT,IAAK,OACH,MAZa,MACjB,MAAMhB,KAAEA,GAAST,EACjB,OAAOoB,EAAAA,IAAC1C,EAAoB,CAAAkB,SAAEa,KAUnBiB,GACT,QACE,OAAO,OAcRC,GATC9B,GAASC,EACJsB,EAAAA,IAACQ,EAAY,CAACC,QAAShC,EAAOiC,UAAWhC,IAG3CF"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/MenuItem/index.tsx"],"sourcesContent":["import MuiMenuItem, { type MenuItemProps as MuiMenuItemProps } from '@mui/material/MenuItem';\nimport { styled } from '@mui/material/styles';\n\nimport Avatar from '../Avatar';\nimport Box from '../Box';\nimport Checkbox from '../Checkbox';\nimport ListItemText from '../ListItemText';\n\ntype BaseProps = Omit<MuiMenuItemProps, 'children'> & {\n /** Children of the menu item */\n children?: React.ReactNode;\n /** Label of the menu item */\n label?: React.ReactNode;\n /** Secondary text of the menu item */\n secondaryText?: React.ReactNode;\n};\n\n/** Props for an avatar menu item */\nexport interface AvatarMenuItemProps extends BaseProps {\n /** Source URL for the avatar image */\n avatarSrc: string;\n /** Checkbox of the menu item */\n checkbox?: never;\n /** Icon of the menu item */\n icon?: never;\n /** Type of the menu item */\n type: 'avatar';\n}\n\n/** Props for a checkbox menu item */\nexport interface CheckboxMenuItemProps extends BaseProps {\n /** Avatar of the menu item */\n avatar?: never;\n /** Checked state of the menu item */\n checked: boolean;\n /** Icon of the menu item */\n icon?: never;\n /** Function to call when the checkbox is changed */\n onCheckedChange: (\n checked: boolean,\n e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLLIElement>,\n ) => void;\n /** Function to call when the menu item is clicked */\n onClick?: never;\n /** Type of the menu item */\n type: 'checkbox';\n}\n\n/** Props for an icon menu item */\nexport interface IconMenuItemProps extends BaseProps {\n /** Avatar of the menu item */\n avatar?: never;\n /** Checkbox of the menu item */\n checkbox?: never;\n /** Icon of the menu item */\n icon: React.ReactNode;\n /** Type of the menu item */\n type: 'icon';\n}\n\n/** Props for a text menu item */\nexport interface TextMenuItemProps extends BaseProps {\n /** Avatar of the menu item */\n avatar?: never;\n /** Checkbox of the menu item */\n checkbox?: never;\n /** Icon of the menu item */\n icon?: never;\n /** Type of the menu item */\n type?: 'text';\n}\n\n/** Props for the MenuItem component */\nexport type MenuItemProps =\n | AvatarMenuItemProps\n | CheckboxMenuItemProps\n | IconMenuItemProps\n | TextMenuItemProps;\n\nconst StyledStartAdornment = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n '& .MuiAvatar-img': {\n opacity: disabled ? theme.palette.action.disabledOpacity : 1,\n },\n}));\n\nconst StyledCheckbox = styled(Checkbox)(() => ({\n pointerEvents: 'none',\n}));\n\n/**\n * A customizable MenuItem component supporting text, avatar, icon and checkbox menu items.\n *\n * @param props - The component props\n * @returns The rendered MenuItem component\n */\nexport const MenuItem = ({\n children,\n disabled = false,\n label,\n secondaryText,\n type = 'text',\n ...props\n}: MenuItemProps): JSX.Element => {\n // Remove type-specific props from props object to avoid passing them to MuiMenuItem\n const muiProps: MuiMenuItemProps = ((): MuiMenuItemProps => {\n switch (type) {\n case 'checkbox': {\n const { checked: _c, onCheckedChange: _h, ...rest } = props as CheckboxMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'avatar': {\n const { avatarSrc: _avatarSrc, ...rest } = props as AvatarMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'icon': {\n const { icon: _i, ...rest } = props as IconMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n default:\n return props as MuiMenuItemProps;\n }\n })();\n\n const handleClick = (event: React.MouseEvent<HTMLLIElement>): void => {\n if (disabled) {\n return;\n }\n\n // If menu item is a checkbox, clicking the menu item will toggle the checkbox\n if (type === 'checkbox') {\n event.preventDefault();\n event.stopPropagation();\n\n const { checked, onCheckedChange } = props as CheckboxMenuItemProps;\n const isChecked =\n typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n onCheckedChange?.(!isChecked, event);\n return;\n }\n\n muiProps?.onClick?.(event);\n };\n\n const renderAvatar = (): React.ReactNode => {\n const { avatarSrc } = props as AvatarMenuItemProps;\n return (\n <StyledStartAdornment className=\"fd-MenuItem-startAdornment\" disabled={disabled}>\n <Avatar\n alt=\"\" // Avatar is described by the label\n src={avatarSrc}\n type=\"logo\"\n />\n </StyledStartAdornment>\n );\n };\n\n const renderCheckbox = (): React.ReactNode => {\n const { checked } = props as CheckboxMenuItemProps;\n const isChecked = typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n return (\n <StyledCheckbox\n aria-hidden\n checked={isChecked}\n disabled={disabled}\n fdKey=\"checkbox-menu-item\"\n size=\"small\"\n tabIndex={-1}\n />\n );\n };\n\n const renderIcon = (): React.ReactNode => {\n const { icon } = props as IconMenuItemProps;\n return <StyledStartAdornment className=\"fd-MenuItem-startAdornment\">{icon}</StyledStartAdornment>;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n switch (type) {\n case 'avatar':\n return renderAvatar();\n case 'checkbox':\n return renderCheckbox();\n case 'icon':\n return renderIcon();\n default:\n return null;\n }\n };\n\n const renderText = (): React.ReactNode => {\n if (label || secondaryText) {\n return <ListItemText primary={label} secondary={secondaryText} />;\n }\n\n return children;\n };\n\n return (\n <MuiMenuItem {...muiProps} disabled={disabled} onClick={handleClick}>\n {renderStartAdornment()}\n {renderText()}\n </MuiMenuItem>\n );\n};\n\nexport default MenuItem;\n"],"names":["StyledStartAdornment","styled","Box","shouldForwardProp","prop","theme","disabled","alignItems","display","justifyContent","opacity","palette","action","disabledOpacity","StyledCheckbox","Checkbox","pointerEvents","MenuItem","children","label","secondaryText","type","props","muiProps","checked","_c","onCheckedChange","_h","rest","avatarSrc","_avatarSrc","icon","_i","_jsxs","MuiMenuItem","onClick","event","preventDefault","stopPropagation","isChecked","Boolean","selected","_jsx","className","Avatar","alt","src","renderAvatar","fdKey","size","tabIndex","renderCheckbox","renderIcon","renderStartAdornment","ListItemText","primary","secondary"],"mappings":"8TA+EA,MAAMA,EAAuBC,EAAAA,OAAOC,EAAK,CACvCC,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOC,YAAW,MAAO,CACrDC,WAAY,SACZC,QAAS,cACTC,eAAgB,SAEhB,mBAAoB,CAClBC,QAASJ,EAAWD,EAAMM,QAAQC,OAAOC,gBAAkB,OAIzDC,EAAiBb,EAAAA,OAAOc,EAAPd,EAAiB,KAAA,CACtCe,cAAe,WASJC,EAAW,EACtBC,WACAZ,YAAW,EACXa,QACAC,gBACAC,OAAO,UACJC,MAGH,MAAMC,EAA6B,MACjC,OAAQF,GACN,IAAK,WAAY,CACf,MAAQG,QAASC,EAAIC,gBAAiBC,KAAOC,GAASN,EACtD,OAAOM,CACT,CACA,IAAK,SAAU,CACb,MAAQC,UAAWC,KAAeF,GAASN,EAC3C,OAAOM,CACT,CACA,IAAK,OAAQ,CACX,MAAQG,KAAMC,KAAOJ,GAASN,EAC9B,OAAOM,CACT,CACA,QACE,OAAON,EAEZ,EAjBkC,GA+FnC,OACEW,EAAAA,KAACC,EAAW,IAAKX,EAAUjB,SAAUA,EAAU6B,QA7E5BC,IACnB,IAAI9B,EAKJ,GAAa,aAATe,EAYJE,GAAUY,UAAUC,OAZpB,CACEA,EAAMC,iBACND,EAAME,kBAEN,MAAMd,QAAEA,EAAOE,gBAAEA,GAAoBJ,EAC/BiB,EACe,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/Ef,KAAmBa,EAAWH,EAEhC,aAuC2B,MAC3B,OAAQf,GACN,IAAK,SACH,MArCe,MACnB,MAAMQ,UAAEA,GAAcP,EACtB,OACEoB,MAAC1C,GAAqB2C,UAAU,6BAA6BrC,SAAUA,EAAQY,SAC7EwB,EAAAA,IAACE,EAAM,CACLC,IAAI,GACJC,IAAKjB,EACLR,KAAK,YA8BA0B,GACT,IAAK,WACH,MA1BiB,MACrB,MAAMvB,QAAEA,GAAYF,EACdiB,EAA+B,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/F,OACEC,EAAAA,IAAC5B,EAAc,CAAA,eAAA,EAEbU,QAASe,EACTjC,SAAUA,EACV0C,MAAM,qBACNC,KAAK,QACLC,UAAU,KAeHC,GACT,IAAK,OACH,MAZa,MACjB,MAAMpB,KAAEA,GAAST,EACjB,OAAOoB,EAAAA,IAAC1C,EAAoB,CAAC2C,UAAU,6BAA4BzB,SAAEa,KAU1DqB,GACT,QACE,OAAO,OAcRC,GATClC,GAASC,EACJsB,EAAAA,IAACY,EAAY,CAACC,QAASpC,EAAOqC,UAAWpC,IAG3CF"}