@okta/odyssey-react-mui 1.42.0 → 1.43.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 (297) hide show
  1. package/dist/cjs/DataTable/DataTable.cjs +67 -42
  2. package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
  3. package/dist/cjs/Drawer.cjs +16 -14
  4. package/dist/cjs/Drawer.cjs.map +1 -1
  5. package/dist/cjs/PasswordField.cjs +1 -1
  6. package/dist/cjs/PasswordField.cjs.map +1 -1
  7. package/dist/cjs/Select.cjs +34 -43
  8. package/dist/cjs/Select.cjs.map +1 -1
  9. package/dist/cjs/Status.cjs +2 -0
  10. package/dist/cjs/Status.cjs.map +1 -1
  11. package/dist/cjs/Typography.cjs +32 -8
  12. package/dist/cjs/Typography.cjs.map +1 -1
  13. package/dist/cjs/labs/DataFilters.cjs +1 -0
  14. package/dist/cjs/labs/DataFilters.cjs.map +1 -1
  15. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
  16. package/dist/cjs/labs/DataView/CardLayoutContent.cjs.map +1 -1
  17. package/dist/cjs/labs/DataView/DataView.cjs +10 -1
  18. package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
  19. package/dist/cjs/labs/DataView/RowActions.cjs +3 -4
  20. package/dist/cjs/labs/DataView/RowActions.cjs.map +1 -1
  21. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +2 -4
  22. package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
  23. package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
  24. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs.map +1 -1
  25. package/dist/cjs/labs/OdysseyPickers/Picker.cjs +17 -11
  26. package/dist/cjs/labs/OdysseyPickers/Picker.cjs.map +1 -1
  27. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +2 -1
  28. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
  29. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +2 -3
  30. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs.map +1 -1
  31. package/dist/cjs/properties/ts/odyssey-react-mui.cjs +0 -1
  32. package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
  33. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +0 -1
  34. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
  35. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +0 -1
  36. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
  37. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +0 -1
  38. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
  39. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +0 -1
  40. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
  41. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +0 -1
  42. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
  43. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +0 -1
  44. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -1
  45. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +0 -1
  46. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
  47. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +0 -1
  48. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
  49. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +0 -1
  50. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
  51. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +0 -1
  52. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
  53. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +0 -1
  54. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
  55. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +0 -1
  56. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
  57. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +0 -1
  58. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
  59. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +0 -1
  60. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
  61. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +0 -1
  62. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
  63. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +0 -1
  64. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
  65. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +0 -1
  66. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
  67. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +4 -2
  68. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
  69. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +129 -126
  70. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
  71. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +0 -1
  72. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
  73. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +0 -1
  74. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
  75. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +0 -1
  76. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
  77. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +0 -1
  78. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
  79. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +0 -1
  80. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
  81. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +0 -1
  82. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
  83. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +0 -1
  84. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
  85. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +0 -1
  86. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
  87. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +0 -1
  88. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
  89. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +0 -1
  90. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
  91. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +0 -1
  92. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
  93. package/dist/cjs/theme/components.cjs +7 -1
  94. package/dist/cjs/theme/components.cjs.map +1 -1
  95. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -0
  96. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  97. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  98. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  99. package/dist/esm/DataTable/DataTable.js +67 -40
  100. package/dist/esm/DataTable/DataTable.js.map +1 -1
  101. package/dist/esm/Drawer.js +16 -14
  102. package/dist/esm/Drawer.js.map +1 -1
  103. package/dist/esm/PasswordField.js +1 -1
  104. package/dist/esm/PasswordField.js.map +1 -1
  105. package/dist/esm/Select.js +34 -43
  106. package/dist/esm/Select.js.map +1 -1
  107. package/dist/esm/Status.js +2 -0
  108. package/dist/esm/Status.js.map +1 -1
  109. package/dist/esm/Typography.js +32 -8
  110. package/dist/esm/Typography.js.map +1 -1
  111. package/dist/esm/labs/DataFilters.js +1 -0
  112. package/dist/esm/labs/DataFilters.js.map +1 -1
  113. package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
  114. package/dist/esm/labs/DataView/CardLayoutContent.js.map +1 -1
  115. package/dist/esm/labs/DataView/DataView.js +10 -1
  116. package/dist/esm/labs/DataView/DataView.js.map +1 -1
  117. package/dist/esm/labs/DataView/RowActions.js +2 -1
  118. package/dist/esm/labs/DataView/RowActions.js.map +1 -1
  119. package/dist/esm/labs/DataView/TableLayoutContent.js +2 -4
  120. package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
  121. package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
  122. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js.map +1 -1
  123. package/dist/esm/labs/OdysseyPickers/Picker.js +19 -13
  124. package/dist/esm/labs/OdysseyPickers/Picker.js.map +1 -1
  125. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +2 -1
  126. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
  127. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +2 -3
  128. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js.map +1 -1
  129. package/dist/esm/properties/ts/odyssey-react-mui.js +0 -1
  130. package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
  131. package/dist/esm/properties/ts/odyssey-react-mui_cs.js +0 -1
  132. package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  133. package/dist/esm/properties/ts/odyssey-react-mui_da.js +0 -1
  134. package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
  135. package/dist/esm/properties/ts/odyssey-react-mui_de.js +0 -1
  136. package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
  137. package/dist/esm/properties/ts/odyssey-react-mui_el.js +0 -1
  138. package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
  139. package/dist/esm/properties/ts/odyssey-react-mui_es.js +0 -1
  140. package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
  141. package/dist/esm/properties/ts/odyssey-react-mui_eu.js +0 -1
  142. package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -1
  143. package/dist/esm/properties/ts/odyssey-react-mui_fi.js +0 -1
  144. package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  145. package/dist/esm/properties/ts/odyssey-react-mui_fr.js +0 -1
  146. package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  147. package/dist/esm/properties/ts/odyssey-react-mui_ht.js +0 -1
  148. package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
  149. package/dist/esm/properties/ts/odyssey-react-mui_hu.js +0 -1
  150. package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  151. package/dist/esm/properties/ts/odyssey-react-mui_id.js +0 -1
  152. package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
  153. package/dist/esm/properties/ts/odyssey-react-mui_it.js +0 -1
  154. package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
  155. package/dist/esm/properties/ts/odyssey-react-mui_ja.js +0 -1
  156. package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  157. package/dist/esm/properties/ts/odyssey-react-mui_ko.js +0 -1
  158. package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  159. package/dist/esm/properties/ts/odyssey-react-mui_ms.js +0 -1
  160. package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  161. package/dist/esm/properties/ts/odyssey-react-mui_nb.js +0 -1
  162. package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  163. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +0 -1
  164. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  165. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +4 -2
  166. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
  167. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +129 -126
  168. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
  169. package/dist/esm/properties/ts/odyssey-react-mui_pl.js +0 -1
  170. package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  171. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +0 -1
  172. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  173. package/dist/esm/properties/ts/odyssey-react-mui_ro.js +0 -1
  174. package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  175. package/dist/esm/properties/ts/odyssey-react-mui_ru.js +0 -1
  176. package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  177. package/dist/esm/properties/ts/odyssey-react-mui_sv.js +0 -1
  178. package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  179. package/dist/esm/properties/ts/odyssey-react-mui_th.js +0 -1
  180. package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
  181. package/dist/esm/properties/ts/odyssey-react-mui_tr.js +0 -1
  182. package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  183. package/dist/esm/properties/ts/odyssey-react-mui_uk.js +0 -1
  184. package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  185. package/dist/esm/properties/ts/odyssey-react-mui_vi.js +0 -1
  186. package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  187. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +0 -1
  188. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  189. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +0 -1
  190. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  191. package/dist/esm/theme/components.js +7 -1
  192. package/dist/esm/theme/components.js.map +1 -1
  193. package/dist/esm/ui-shell/SideNav/SideNav.js +1 -0
  194. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  195. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  196. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  197. package/dist/index.cjs +1 -1
  198. package/dist/index.d.ts +1 -1
  199. package/dist/index.mjs +1 -1
  200. package/dist/index.scss +1 -1
  201. package/dist/tsconfig.production.tsbuildinfo +1 -1
  202. package/dist/tsconfig.tsbuildinfo +1 -1
  203. package/dist/types/DataTable/DataTable.d.ts +2 -2
  204. package/dist/types/DataTable/DataTable.d.ts.map +1 -1
  205. package/dist/types/Drawer.d.ts +24 -6
  206. package/dist/types/Drawer.d.ts.map +1 -1
  207. package/dist/types/OdysseyTranslationProvider.d.ts +1 -1
  208. package/dist/types/OdysseyTranslationProvider.d.ts.map +1 -1
  209. package/dist/types/PasswordField.d.ts.map +1 -1
  210. package/dist/types/Select.d.ts.map +1 -1
  211. package/dist/types/Status.d.ts +2 -2
  212. package/dist/types/Status.d.ts.map +1 -1
  213. package/dist/types/Typography.d.ts +16 -12
  214. package/dist/types/Typography.d.ts.map +1 -1
  215. package/dist/types/i18n.d.ts +6 -29
  216. package/dist/types/i18n.d.ts.map +1 -1
  217. package/dist/types/labs/DataFilters.d.ts.map +1 -1
  218. package/dist/types/labs/DataView/BulkActionsMenu.d.ts +1 -1
  219. package/dist/types/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
  220. package/dist/types/labs/DataView/CardLayoutContent.d.ts.map +1 -1
  221. package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
  222. package/dist/types/labs/DataView/RowActions.d.ts +5 -4
  223. package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
  224. package/dist/types/labs/DataView/TableLayoutContent.d.ts +1 -1
  225. package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  226. package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts +4 -1
  227. package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -1
  228. package/dist/types/labs/OdysseyPickers/Picker.d.ts +7 -7
  229. package/dist/types/labs/OdysseyPickers/Picker.d.ts.map +1 -1
  230. package/dist/types/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -1
  231. package/dist/types/labs/OdysseyPickers/SearchDropdown.d.ts.map +1 -1
  232. package/dist/types/properties/ts/odyssey-react-mui.d.ts +0 -1
  233. package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  234. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +0 -1
  235. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  236. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +0 -1
  237. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  238. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +0 -1
  239. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  240. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +0 -1
  241. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  242. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +0 -1
  243. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  244. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +0 -1
  245. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -1
  246. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +0 -1
  247. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  248. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +0 -1
  249. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  250. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +0 -1
  251. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
  252. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +0 -1
  253. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  254. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +0 -1
  255. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  256. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +0 -1
  257. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  258. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +0 -1
  259. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  260. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +0 -1
  261. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  262. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +0 -1
  263. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  264. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +0 -1
  265. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  266. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +0 -1
  267. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  268. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +3 -1
  269. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
  270. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +3 -0
  271. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
  272. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +0 -1
  273. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  274. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +0 -1
  275. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  276. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +0 -1
  277. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  278. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +0 -1
  279. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  280. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +0 -1
  281. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  282. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +0 -1
  283. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  284. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +0 -1
  285. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  286. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +0 -1
  287. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  288. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +0 -1
  289. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  290. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +0 -1
  291. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  292. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +0 -1
  293. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  294. package/dist/types/theme/components.d.ts.map +1 -1
  295. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  296. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  297. package/package.json +9 -7
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.js","names":["memo","useCallback","useEffect","useMemo","useRef","useState","useMaterialReactTable","MRT_TableContainer","useTranslation","ArrowDownIcon","ArrowUnsortedIcon","ChevronDownIcon","DragIndicatorIcon","MoreIcon","densityValues","Pagination","usePagination","DataFilters","DataTableRowActions","useRowReordering","DataTableSettings","Box","useOdysseyDesignTokens","useScrollIndication","styled","EmptyState","Button","MenuButton","Callout","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ScrollableTableContainer","shouldForwardProp","prop","odysseyDesignTokens","isScrollableStart","isScrollableEnd","marginBlockEnd","Spacing4","position","borderInlineStartColor","HueNeutral200","borderInlineStartStyle","borderInlineStartWidth","BorderWidthMain","background","content","opacity","pointerEvents","top","left","bottom","width","Spacing6","zIndex","transition","TransitionDurationMain","TransitionTimingMain","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","right","defaultGetRowId","row","id","DataTable","additionalActionButton","additionalActionMenuItems","bulkActionMenuItems","columns","currentPage","emptyPlaceholder","errorMessage","errorMessageProp","filters","filtersProp","getData","getRowId","hasChangeableDensity","hasColumnResizing","hasColumnVisibility","hasFilters","hasPagination","hasRowReordering","hasRowSelection","hasSearch","hasSearchSubmitButton","hasSorting","initialDensity","initialSearchValue","isPaginationMoreDisabled","noResultsPlaceholder","onChangeRowSelection","onReorderRows","paginationType","renderDetailPanel","resultsPerPage","maxResultsPerPage","maxPages","rowActionButtons","rowActionMenuItems","searchDelayTime","selectedRows","totalRows","t","data","setData","pagination","setPagination","pageIndex","pageSize","draggingRow","setDraggingRow","isTableContainerScrolledToStart","setIsTableContainerScrolledToStart","isTableContainerScrolledToEnd","setIsTableContainerScrolledToEnd","tableInnerContainerWidth","setTableInnerContainerWidth","tableOuterContainerRef","tableInnerContainerRef","tableContentRef","columnSorting","setColumnSorting","columnVisibility","setColumnVisibility","rowDensity","setRowDensity","search","setSearch","setFilters","initialFilters","setInitialFilters","isLoading","setIsLoading","isEmpty","setIsEmpty","setErrorMessage","_rowSelection","setRowSelection","rowSelection","tableOuterContainer","current","tableInnerContainer","dragHandleStyles","dragHandleText","draggableTableBodyRowClassName","handleDragHandleKeyDown","handleDragHandleOnDragCapture","handleDragHandleOnDragEnd","resetDraggingAndHoveredRow","updateRowOrder","page","rowDensityClassName","renderRowActions","currentIndex","index","rowIndex","undefined","convertFilterSelectOptions","options","map","option","label","value","convertColumnToFilter","column","enableColumnFilter","accessorKey","header","variant","filterVariant","filterSelectOptions","dataTableFilters","providedFilters","reduce","accumulator","item","foundColumn","find","filter","concat","defaultCell","cell","getValue","hasTextWrapping","columnDef","enableWrapping","sx","whiteSpace","textOverflow","overflow","children","emptyState","noResultsInnerContent","heading","description","emptyStateInnerContent","columnIds","columnOrder","shouldDisplayRowActions","dataTable","state","sorting","globalFilter","icons","ArrowDownwardIcon","DragHandleIcon","SyncAltIcon","ExpandMoreIcon","enableColumnActions","enableColumnResizing","enableDensityToggle","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableHiding","enablePagination","layoutMode","manualFiltering","manualSorting","muiTablePaperProps","elevation","selectAllMode","displayColumnDefOptions","grow","muiTableBodyCellProps","align","className","muiTableHeadCellProps","display","visibility","endIcon","size","ariaLabel","isDisabled","minWidth","marginInline","padding","muiTableBodyProps","defaultColumn","Cell","getIsResizing","enableRowOrdering","Boolean","enableRowDragging","muiTableBodyRowProps","table","currentRowId","draggingRowId","hoveredRowId","getState","hoveredRow","muiRowDragHandleProps","onKeyDown","event","onBlur","onDragEnd","onDragCapture","enableRowActions","positionActionsColumn","enableRowSelection","onRowSelectionChange","enableSorting","onSortingChange","currentColumn","sortedColumn","enableRowVirtualization","rowVirtualizerInstanceRef","rowVirtualizerOptions","overscan","renderEmptyRowsFallback","muiTableProps","ref","muiTableContainerProps","enableExpandAll","bulkActionMenuButton","buttonVariant","Object","keys","length","incomingData","sort","error","prev","lastRow","currentRowsCount","marginBottom","onChangeSearch","onChangeFilters","defaultSearchTerm","additionalActions","menuAlignment","severity","text","maxPageIndex","maxPageSize","onPaginationChange","isMoreDisabled","rowsPerPageLabel","currentPageLabel","previousLabel","nextLabel","loadMoreLabel","MemoizedDataTable","displayName"],"sources":["../../../src/DataTable/DataTable.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n ReactNode,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n MRT_Cell,\n MRT_DensityState,\n MRT_Row,\n MRT_SortingState,\n MRT_TableOptions,\n MRT_RowSelectionState,\n MRT_RowVirtualizer,\n MRT_VisibilityState,\n useMaterialReactTable,\n MRT_TableContainer,\n MRT_Column,\n MRT_ColumnDef,\n MRT_TableInstance,\n} from \"material-react-table\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n ArrowDownIcon,\n ArrowUnsortedIcon,\n ChevronDownIcon,\n DragIndicatorIcon,\n MoreIcon,\n} from \"../icons.generated/index.js\";\nimport { densityValues } from \"./constants.js\";\nimport {\n Pagination,\n paginationTypeValues,\n usePagination,\n} from \"../Pagination/index.js\";\nimport { DataFilter, DataFilters } from \"../labs/DataFilters.js\";\nimport {\n DataTableRowActions,\n DataTableRowActionsProps,\n} from \"./DataTableRowActions.js\";\nimport { useRowReordering } from \"./useRowReordering.js\";\nimport { DataTableSettings } from \"./DataTableSettings.js\";\nimport { Box } from \"../Box.js\";\nimport { DataTableRowSelectionState, DataTableRowData } from \"./index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { useScrollIndication } from \"./useScrollIndication.js\";\nimport styled from \"@emotion/styled\";\nimport { EmptyState } from \"../EmptyState.js\";\nimport { Button, MenuButton, MenuButtonProps } from \"../Buttons/index.js\";\nimport { Callout } from \"../Callout.js\";\n\nexport type DataTableColumn<T extends DataTableRowData> = MRT_ColumnDef<T> & {\n /**\n * @deprecated use hasTextWrapping instead of enableWrapping\n */\n enableWrapping?: boolean;\n hasTextWrapping?: boolean;\n};\n\ntype DataTableColumnInstance<T extends DataTableRowData> = Omit<\n MRT_Column<T, unknown>,\n \"columnDef\"\n> & {\n columnDef: DataTableColumn<T>;\n};\n\ntype DataTableCell<T extends DataTableRowData> = Omit<MRT_Cell<T>, \"column\"> & {\n column: DataTableColumnInstance<T>;\n};\n\nexport type DataTableGetDataType = {\n page?: number;\n resultsPerPage?: number;\n search?: string;\n filters?: DataFilter[];\n sort?: MRT_SortingState;\n};\n\nexport type DataTableOnReorderRowsType = {\n rowId: string;\n newRowIndex: number;\n};\n\nexport type DataTableRenderDetailPanelType = {\n row: MRT_Row<DataTableRowData>;\n table: MRT_TableInstance<DataTableRowData>;\n};\n\nexport type DataTableProps = {\n /**\n * An optional action button above the table.\n */\n additionalActionButton?: ReactNode;\n /**\n * MenuItems that go in an optional action menu above the table.\n */\n additionalActionMenuItems?: ReactNode;\n /**\n * Menu items to include in the bulk actions menu, which appears above the table if a row or rows are selected\n */\n bulkActionMenuItems?: (\n selectedRows: MRT_RowSelectionState,\n ) => MenuButtonProps[\"children\"];\n /**\n * The columns that make up the table\n */\n columns: DataTableColumn<DataTableRowData>[];\n /**\n * The current page number.\n */\n currentPage?: number;\n /**\n * If `error` is not undefined, the DataTable will indicate an error.\n */\n errorMessage?: string;\n /**\n * The component to display when the table is displaying the initial empty state\n */\n emptyPlaceholder?: ReactNode;\n /**\n * An optional set of filters to render in the filters menu\n */\n filters?: Array<DataFilter | DataTableColumn<DataTableRowData> | string>;\n /**\n * The function to get the ID of a row\n */\n getRowId?: MRT_TableOptions<DataTableRowData>[\"getRowId\"];\n /**\n * Callback that fires whenever the table needs to fetch new data, due to changes in\n * page, results per page, search input, filters, or sorting\n */\n getData: ({\n page,\n resultsPerPage,\n search,\n filters,\n sort,\n }: DataTableGetDataType) =>\n | MRT_TableOptions<DataTableRowData>[\"data\"]\n | Promise<MRT_TableOptions<DataTableRowData>[\"data\"]>;\n /**\n * If true, the end user can resize individual columns.\n */\n hasColumnResizing?: boolean;\n /**\n * If true, the end user will be able to show/hide columns.\n */\n hasColumnVisibility?: boolean;\n /**\n * If true, the end user will be able to filter columns.\n */\n hasFilters?: boolean;\n /**\n * If true, the table will include pagination controls.\n */\n hasPagination?: boolean;\n /**\n * If true, the end user can reorder rows via a drag-and-drop interface\n */\n hasRowReordering?: boolean;\n /**\n * If true, the table will include checkboxes on each row, enabling\n * the user to select some or all rows.\n */\n hasRowSelection?: boolean;\n /**\n * If true, the global table search controls will be shown.\n */\n hasSearch?: boolean;\n /**\n * If true, the search field will include a Search button, rather than\n * firing on input change.\n */\n hasSearchSubmitButton?: boolean;\n /**\n * If true, the end user can sort columns (ascending, descending, or neither)\n */\n hasSorting?: boolean;\n /**\n * If true, the end user will be able to change the table density.\n */\n hasChangeableDensity?: boolean;\n /**\n * The initial density (height & padding) of the table rows. This is available even if the\n * table density isn't changeable by the end user via hasChangeableDensity.\n */\n initialDensity?: (typeof densityValues)[number];\n /**\n * The initial search value\n */\n initialSearchValue?: string;\n /**\n * Is the next or show-more button disabled\n */\n isPaginationMoreDisabled?: boolean;\n /**\n * The component to display when the query returns no results\n */\n noResultsPlaceholder?: ReactNode;\n /**\n * The number of results per page.\n */\n resultsPerPage?: number;\n /**\n * The optional component to display when expanding a row.\n */\n renderDetailPanel?: MRT_TableOptions<DataTableRowData>[\"renderDetailPanel\"];\n /**\n * Action buttons to display in each row\n */\n rowActionButtons?: DataTableRowActionsProps[\"rowActionButtons\"];\n /**\n * Menu items to include in the optional actions menu on each row.\n */\n rowActionMenuItems?: DataTableRowActionsProps[\"rowActionMenuItems\"];\n /**\n * The debounce time, in milliseconds, for the search input firing\n * `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,\n * this doesn't do anything.\n */\n searchDelayTime?: number;\n /**\n * Allows for external control of the selected row state\n * use in tandem with onChangeRowSelection to manage your state\n */\n selectedRows?: DataTableRowSelectionState;\n /**\n * Callback that fires when a row (or rows) is selected or unselected.\n */\n onChangeRowSelection?: (rowSelection: DataTableRowSelectionState) => void;\n /**\n * Callback that fires when the user reorders rows within the table. Can be used\n * to propagate order change to the backend.\n */\n onReorderRows?: ({ rowId, newRowIndex }: DataTableOnReorderRowsType) => void;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n paginationType?: (typeof paginationTypeValues)[number];\n /**\n * The total number of rows in the table. Optional, because it's sometimes impossible\n * to calculate. Used in table pagination to know when to disable the \"next\"/\"more\" button.\n */\n totalRows?: number;\n /**\n * The largest number of rows allowed to be shown per page. This only affects the row input\n * in pagination.\n */\n maxResultsPerPage?: number;\n /**\n * The highest page number allowed to be manually input in pagination\n */\n maxPages?: number;\n};\n\nconst ScrollableTableContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isScrollableStart\" &&\n prop !== \"isScrollableEnd\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isScrollableStart: boolean;\n isScrollableEnd: boolean;\n}>(({ odysseyDesignTokens, isScrollableStart, isScrollableEnd }) => ({\n marginBlockEnd: odysseyDesignTokens.Spacing4,\n position: \"relative\",\n borderInlineStartColor: isScrollableStart\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineStartStyle: \"solid\",\n borderInlineStartWidth: odysseyDesignTokens.BorderWidthMain,\n \"::before\": {\n background:\n \"linear-gradient(-90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableStart ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n left: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n zIndex: 100,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n borderInlineEndColor: isScrollableEnd\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineEndStyle: \"solid\",\n borderInlineEndWidth: odysseyDesignTokens.BorderWidthMain,\n \"::after\": {\n background:\n \"linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableEnd ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n right: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n}));\n\nconst defaultGetRowId: DataTableProps[\"getRowId\"] = (row) => row.id as string;\n\nconst DataTable = ({\n additionalActionButton,\n additionalActionMenuItems,\n bulkActionMenuItems,\n columns,\n currentPage = 1,\n emptyPlaceholder,\n errorMessage: errorMessageProp,\n filters: filtersProp,\n getData,\n getRowId = defaultGetRowId,\n hasChangeableDensity,\n hasColumnResizing,\n hasColumnVisibility,\n hasFilters,\n hasPagination,\n hasRowReordering,\n hasRowSelection,\n hasSearch,\n hasSearchSubmitButton,\n hasSorting,\n initialDensity = densityValues[0],\n initialSearchValue = \"\",\n isPaginationMoreDisabled,\n noResultsPlaceholder,\n onChangeRowSelection,\n onReorderRows,\n paginationType = \"paged\",\n renderDetailPanel,\n resultsPerPage = 20,\n maxResultsPerPage,\n maxPages,\n rowActionButtons,\n rowActionMenuItems,\n searchDelayTime,\n selectedRows,\n totalRows,\n}: DataTableProps) => {\n const { t } = useTranslation();\n\n const [data, setData] = useState<DataTableRowData[]>([]);\n const [pagination, setPagination] = useState({\n pageIndex: currentPage,\n pageSize: resultsPerPage,\n });\n const [draggingRow, setDraggingRow] =\n useState<MRT_Row<DataTableRowData> | null>();\n const [isTableContainerScrolledToStart, setIsTableContainerScrolledToStart] =\n useState(true);\n const [isTableContainerScrolledToEnd, setIsTableContainerScrolledToEnd] =\n useState(true);\n const [tableInnerContainerWidth, setTableInnerContainerWidth] =\n useState<string>(\"100%\");\n const tableOuterContainerRef = useRef<HTMLDivElement>(null);\n const tableInnerContainerRef = useRef<HTMLDivElement>(null);\n const tableContentRef = useRef<HTMLTableElement>(null);\n\n // Table states\n const [columnSorting, setColumnSorting] = useState<MRT_SortingState>([]);\n const [columnVisibility, setColumnVisibility] =\n useState<MRT_VisibilityState>();\n const [rowDensity, setRowDensity] =\n useState<MRT_DensityState>(initialDensity);\n const [search, setSearch] = useState<string>(initialSearchValue);\n const [filters, setFilters] = useState<DataFilter[]>();\n const [initialFilters, setInitialFilters] = useState<DataFilter[]>();\n const [isLoading, setIsLoading] = useState<boolean | undefined>(true);\n const [isEmpty, setIsEmpty] = useState<boolean | undefined>();\n const [errorMessage, setErrorMessage] = useState<string | undefined>(\n errorMessageProp,\n );\n const [_rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});\n const rowSelection = selectedRows || _rowSelection;\n\n useScrollIndication({\n tableOuterContainer: tableOuterContainerRef.current,\n tableInnerContainer: tableInnerContainerRef.current,\n setIsTableContainerScrolledToStart: setIsTableContainerScrolledToStart,\n setIsTableContainerScrolledToEnd: setIsTableContainerScrolledToEnd,\n setTableInnerContainerWidth: setTableInnerContainerWidth,\n });\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const {\n dragHandleStyles,\n dragHandleText,\n draggableTableBodyRowClassName,\n handleDragHandleKeyDown,\n handleDragHandleOnDragCapture,\n handleDragHandleOnDragEnd,\n resetDraggingAndHoveredRow,\n updateRowOrder,\n } = useRowReordering({\n totalRows,\n onReorderRows,\n data,\n setData,\n draggingRow,\n setDraggingRow,\n resultsPerPage: pagination.pageSize,\n page: pagination.pageIndex,\n });\n\n const rowDensityClassName = useMemo(() => {\n return rowDensity === \"spacious\"\n ? \"MuiTableBody-spacious\"\n : rowDensity === \"compact\"\n ? \"MuiTableBody-compact\"\n : \"MuiTableBody-default\";\n }, [rowDensity]);\n\n const renderRowActions = useCallback(\n ({ row }: { row: MRT_Row<DataTableRowData> }) => {\n const currentIndex =\n row.index + (pagination.pageIndex - 1) * pagination.pageSize;\n return (\n <DataTableRowActions\n row={row}\n rowIndex={currentIndex}\n rowActionButtons={rowActionButtons}\n rowActionMenuItems={rowActionMenuItems}\n totalRows={totalRows}\n updateRowOrder={\n hasRowReordering && onReorderRows ? updateRowOrder : undefined\n }\n />\n );\n },\n [\n pagination,\n rowActionButtons,\n rowActionMenuItems,\n hasRowReordering,\n onReorderRows,\n totalRows,\n updateRowOrder,\n ],\n );\n\n /**\n * This hack is to provide compatibility with Material-React-Table's\n * filterOptions format, which allows for strings and { label: string, value: string }\n */\n const convertFilterSelectOptions = useCallback(\n (options: DataTableColumn<DataTableRowData>[\"filterSelectOptions\"]) =>\n options?.map((option) =>\n typeof option === \"string\"\n ? {\n label: option,\n value: option,\n }\n : {\n // If the option isn't a string, it must have value and/or option defined\n // If either is undefined, use the other\n // These shouldn't need `as`, but this is a legacy file now. --Kevin Ghadyani\n label: (option.label ?? option.value) as string,\n value: (option.value ?? option.label) as string,\n },\n ),\n [],\n );\n\n const convertColumnToFilter = useCallback(\n (column: DataTableColumn<DataTableRowData>) =>\n column.enableColumnFilter !== false && column.accessorKey\n ? ({\n id: column.accessorKey,\n label: column.header,\n variant: column.filterVariant,\n options: convertFilterSelectOptions(column.filterSelectOptions),\n } satisfies DataFilter as DataFilter)\n : null,\n [convertFilterSelectOptions],\n );\n\n /**\n * Filters default to the columns, but can be overridden\n * with the `filters` prop. `filters` should be an array\n * of column accessorKeys, column defs, or DataFilters.\n */\n const dataTableFilters = useMemo(() => {\n const providedFilters = filtersProp || columns;\n return providedFilters.reduce<DataFilter[]>((accumulator, item) => {\n if (typeof item === \"string\") {\n const foundColumn = columns.find(\n (column) => column.accessorKey === item,\n );\n if (foundColumn) {\n const filter = convertColumnToFilter(foundColumn);\n if (filter) {\n return accumulator.concat(filter);\n }\n }\n } else if (\"accessorKey\" in item) {\n // Checks if it's a column\n const filter = convertColumnToFilter(item);\n if (filter) {\n return accumulator.concat(filter);\n }\n } else if (\"label\" in item) {\n // Checks if it's a DataFilter\n return accumulator.concat(item);\n }\n // If none of the conditions match, item is ignored (not mapping to undefined)\n return accumulator;\n }, []);\n }, [columns, filtersProp, convertColumnToFilter]);\n\n const defaultCell = useCallback(\n ({ cell }: { cell: DataTableCell<DataTableRowData> }) => {\n const value = cell.getValue<string>();\n const hasTextWrapping =\n cell.column.columnDef.hasTextWrapping ||\n cell.column.columnDef.enableWrapping;\n\n return hasTextWrapping ? (\n value\n ) : (\n <Box\n sx={{\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n }}\n >\n {value}\n </Box>\n );\n },\n [],\n );\n\n const emptyState = useCallback(() => {\n const noResultsInnerContent = noResultsPlaceholder || (\n <EmptyState\n heading={t(\"table.noresults.heading\")}\n description={t(\"table.noresults.text\")}\n />\n );\n\n const emptyStateInnerContent =\n emptyPlaceholder && isEmpty ? emptyPlaceholder : noResultsInnerContent;\n\n return (\n <Box sx={{ width: tableInnerContainerWidth }}>\n {emptyStateInnerContent}\n </Box>\n );\n }, [\n emptyPlaceholder,\n isEmpty,\n noResultsPlaceholder,\n t,\n tableInnerContainerWidth,\n ]);\n\n const columnIds = useMemo(() => {\n return columns.map((column) => column.accessorKey);\n }, [columns]);\n\n const columnOrder = useMemo(\n () => [\n \"mrt-row-drag\",\n \"mrt-row-select\",\n \"mrt-row-expand\",\n ...columnIds,\n \"mrt-row-actions\",\n ],\n [columnIds],\n ) as string[];\n\n const shouldDisplayRowActions = useMemo(\n () =>\n (hasRowReordering === true && onReorderRows) ||\n rowActionButtons ||\n rowActionMenuItems\n ? true\n : false,\n [hasRowReordering, onReorderRows, rowActionButtons, rowActionMenuItems],\n );\n\n const dataTable = useMaterialReactTable({\n columns: columns,\n data: data,\n getRowId,\n state: {\n sorting: columnSorting,\n globalFilter: search,\n columnVisibility,\n isLoading,\n rowSelection,\n columnOrder,\n },\n icons: {\n ArrowDownwardIcon: ArrowDownIcon,\n DragHandleIcon: DragIndicatorIcon,\n SyncAltIcon: ArrowUnsortedIcon,\n ExpandMoreIcon: ChevronDownIcon,\n },\n\n // Base table settings\n enableColumnActions: false,\n enableColumnResizing: hasColumnResizing,\n enableDensityToggle: false,\n enableFilters: false,\n enableFullScreenToggle: false,\n enableGlobalFilter: false,\n enableHiding: false,\n enablePagination: false,\n layoutMode: \"grid-no-grow\",\n manualFiltering: true,\n manualSorting: true,\n muiTablePaperProps: {\n elevation: 0,\n sx: {\n overflow: \"visible\",\n },\n },\n selectAllMode: \"all\",\n displayColumnDefOptions: {\n \"mrt-row-actions\": {\n header: \"\",\n grow: true,\n muiTableBodyCellProps: {\n align: \"right\",\n sx: {\n overflow: \"visible\",\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n },\n muiTableHeadCellProps: {\n align: \"right\",\n sx: {\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n children: (\n <Box sx={{ display: \"flex\", visibility: \"hidden\" }}>\n {rowActionButtons && rowActionButtons({ id: null })}\n {((hasRowReordering && onReorderRows) || rowActionMenuItems) && (\n <Box>\n <Button\n endIcon={<MoreIcon />}\n size=\"small\"\n variant=\"floating\"\n ariaLabel={t(\"table.moreactions.arialabel\")}\n isDisabled\n />\n </Box>\n )}\n </Box>\n ),\n },\n },\n \"mrt-row-drag\": {\n header: \"\",\n muiTableBodyCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n className: \"ods-drag-handle\",\n },\n muiTableHeadCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n children: (\n // Add a spacer to simulate the width of the drag handle in the column.\n // Without this, the head cells are offset from their body cell counterparts\n <Box sx={{ marginInline: \"-0.1rem\" }}>\n <DragIndicatorIcon sx={{ marginInline: 1, opacity: 0 }} />\n </Box>\n ),\n },\n },\n \"mrt-row-select\": {\n muiTableHeadCellProps: {\n padding: \"checkbox\",\n },\n muiTableBodyCellProps: {\n padding: \"checkbox\",\n },\n },\n \"mrt-row-expand\": {\n header: \"\",\n },\n },\n muiTableBodyProps: () => ({\n className: rowDensityClassName,\n }),\n defaultColumn: {\n Cell: defaultCell,\n },\n muiTableBodyCellProps: ({ column }) => ({\n className: column.getIsResizing() ? \"isResizing\" : \"\",\n }),\n\n // Reordering\n enableRowOrdering: hasRowReordering && Boolean(onReorderRows),\n enableRowDragging: hasRowReordering && Boolean(onReorderRows),\n muiTableBodyRowProps: ({ table, row }) => ({\n className: draggableTableBodyRowClassName({\n currentRowId: row.id,\n draggingRowId: draggingRow?.id,\n hoveredRowId: table.getState().hoveredRow?.id,\n }),\n }),\n muiRowDragHandleProps: ({ table, row }) => ({\n onKeyDown: (event) => handleDragHandleKeyDown({ table, row, event }),\n onBlur: () => resetDraggingAndHoveredRow(table),\n onDragEnd: () => handleDragHandleOnDragEnd(table),\n onDragCapture: () => handleDragHandleOnDragCapture(table),\n sx: dragHandleStyles,\n ...dragHandleText,\n }),\n\n // Row actions\n enableRowActions: shouldDisplayRowActions,\n positionActionsColumn:\n \"last\" as MRT_TableOptions<DataTableRowData>[\"positionActionsColumn\"],\n renderRowActions: ({ row }) => renderRowActions({ row }),\n\n // Row selection\n enableRowSelection: hasRowSelection,\n onRowSelectionChange: setRowSelection,\n\n // Sorting\n enableSorting: hasSorting,\n onSortingChange: setColumnSorting,\n muiTableHeadCellProps: ({ column: currentColumn }) => ({\n className: columnSorting.find(\n (sortedColumn) => sortedColumn.id === currentColumn.id,\n )\n ? \"isSorted\"\n : \"isUnsorted\",\n }),\n\n // Virtualization\n enableRowVirtualization:\n paginationType !== \"loadMore\" && pagination.pageSize > 50,\n rowVirtualizerInstanceRef:\n useRef<MRT_RowVirtualizer<HTMLDivElement, HTMLTableRowElement>>(null),\n rowVirtualizerOptions: {\n overscan: 4,\n },\n\n // States\n renderEmptyRowsFallback: emptyState,\n\n // Refs\n muiTableProps: {\n ref: tableContentRef,\n className:\n !shouldDisplayRowActions && hasColumnResizing\n ? \"ods-hide-spacer-column\"\n : \"\",\n },\n\n muiTableContainerProps: {\n ref: tableInnerContainerRef,\n },\n\n // Row expansion\n enableExpandAll: false,\n renderDetailPanel: renderDetailPanel,\n });\n\n // Effects\n const bulkActionMenuButton = useMemo(\n () => (\n <>\n <MenuButton\n buttonVariant=\"secondary\"\n endIcon={<MoreIcon />}\n isDisabled={Object.keys(rowSelection).length === 0}\n ariaLabel=\"More actions\"\n >\n {bulkActionMenuItems?.(rowSelection)}\n </MenuButton>\n </>\n ),\n [bulkActionMenuItems, rowSelection],\n );\n\n useEffect(() => {\n (async () => {\n setIsLoading(true);\n setErrorMessage(errorMessageProp);\n try {\n const incomingData = await getData?.({\n page: pagination.pageIndex,\n resultsPerPage: pagination.pageSize,\n search,\n filters,\n sort: columnSorting,\n });\n setData(incomingData);\n } catch (error) {\n setErrorMessage(typeof error === \"string\" ? error : t(\"table.error\"));\n } finally {\n setIsLoading(false);\n }\n })();\n }, [\n columnSorting,\n errorMessageProp,\n filters,\n getData,\n pagination,\n search,\n t,\n ]);\n\n useEffect(() => {\n if (!initialFilters && filters) {\n setInitialFilters(filters);\n }\n\n setIsEmpty(\n pagination.pageIndex === currentPage &&\n pagination.pageSize === resultsPerPage &&\n search === \"\" &&\n filters === initialFilters &&\n data.length === 0,\n );\n }, [\n filters,\n pagination,\n search,\n data,\n currentPage,\n initialFilters,\n resultsPerPage,\n ]);\n\n useEffect(() => {\n setPagination((prev) => ({\n pageIndex: 1,\n pageSize: prev.pageSize,\n }));\n }, [filters, search]);\n\n useEffect(() => {\n onChangeRowSelection?.(rowSelection);\n }, [rowSelection, onChangeRowSelection]);\n\n const { lastRow } = usePagination({\n currentRowsCount: data.length,\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n totalRows,\n });\n\n // Render the table\n return (\n <>\n {(hasSearch ||\n hasFilters ||\n hasChangeableDensity ||\n hasColumnVisibility ||\n bulkActionMenuItems ||\n additionalActionButton ||\n additionalActionMenuItems) && (\n <Box sx={{ marginBottom: 5 }}>\n <DataFilters\n onChangeSearch={hasSearch ? setSearch : undefined}\n onChangeFilters={hasFilters ? setFilters : undefined}\n hasSearchSubmitButton={hasSearchSubmitButton}\n searchDelayTime={searchDelayTime}\n filters={hasFilters ? dataTableFilters : undefined}\n defaultSearchTerm={initialSearchValue}\n isDisabled={isEmpty}\n additionalActions={\n <>\n <DataTableSettings\n hasChangeableDensity={hasChangeableDensity}\n rowDensity={rowDensity}\n setRowDensity={setRowDensity}\n hasColumnVisibility={hasColumnVisibility}\n columns={columns}\n columnVisibility={columnVisibility}\n setColumnVisibility={setColumnVisibility}\n />\n {bulkActionMenuItems && bulkActionMenuButton}\n {additionalActionButton}\n {additionalActionMenuItems && (\n <MenuButton\n endIcon={<MoreIcon />}\n ariaLabel={t(\"table.moreactions.arialabel\")}\n buttonVariant=\"secondary\"\n menuAlignment=\"right\"\n >\n {additionalActionMenuItems}\n </MenuButton>\n )}\n </>\n }\n />\n </Box>\n )}\n\n {errorMessage && (\n <Box sx={{ marginBlockEnd: 2 }}>\n <Callout severity=\"error\" text={errorMessage} />\n </Box>\n )}\n\n <ScrollableTableContainer\n odysseyDesignTokens={odysseyDesignTokens}\n isScrollableStart={!isTableContainerScrolledToStart}\n isScrollableEnd={!isTableContainerScrolledToEnd}\n ref={tableOuterContainerRef}\n >\n <MRT_TableContainer table={dataTable} />\n </ScrollableTableContainer>\n\n {hasPagination && (\n <Pagination\n pageIndex={pagination.pageIndex}\n pageSize={pagination.pageSize}\n maxPageIndex={maxPages}\n maxPageSize={maxResultsPerPage}\n onPaginationChange={setPagination}\n lastRow={lastRow}\n totalRows={totalRows}\n currentRowsCount={data.length}\n isDisabled={isEmpty}\n isMoreDisabled={isPaginationMoreDisabled}\n variant={paginationType}\n rowsPerPageLabel={t(\"pagination.rowsperpage\")}\n currentPageLabel={t(\"pagination.page\")}\n previousLabel={t(\"pagination.previous\")}\n nextLabel={t(\"pagination.next\")}\n loadMoreLabel={t(\"pagination.loadmore\")}\n />\n )}\n </>\n );\n};\n\nconst MemoizedDataTable = memo(DataTable);\nMemoizedDataTable.displayName = \"DataTable\";\n\nexport { MemoizedDataTable as DataTable };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SASEC,qBAAqB,EACrBC,kBAAkB,QAIb,sBAAsB;AAC7B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SACEC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,iBAAiB,EACjBC,QAAQ,QACH,6BAA6B;AACpC,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SACEC,UAAU,EAEVC,aAAa,QACR,wBAAwB;AAC/B,SAAqBC,WAAW,QAAQ,wBAAwB;AAChE,SACEC,mBAAmB,QAEd,0BAA0B;AACjC,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,GAAG,QAAQ,WAAW;AAE/B,SAEEC,sBAAsB,QACjB,kCAAkC;AACzC,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,MAAM,EAAEC,UAAU,QAAyB,qBAAqB;AACzE,SAASC,OAAO,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AA+MxC,MAAMC,wBAAwB,GAAGX,MAAM,CAAC,KAAK,EAAE;EAC7CY,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK,mBAAmB,IAC5BA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,mBAAmB;EAAEC,iBAAiB;EAAEC;AAAgB,CAAC,MAAM;E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List":[]}
1
+ {"version":3,"file":"DataTable.js","names":["memo","useCallback","useEffect","useMemo","useRef","useState","MRT_TableContainer","useMaterialReactTable","useTranslation","ArrowDownIcon","ArrowUnsortedIcon","ChevronDownIcon","DragIndicatorIcon","MoreIcon","densityValues","Pagination","usePagination","DataFilters","DataTableRowActions","useRowReordering","DataTableSettings","Box","useOdysseyDesignTokens","useScrollIndication","styled","EmptyState","Button","MenuButton","Callout","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ScrollableTableContainer","shouldForwardProp","prop","odysseyDesignTokens","isScrollableStart","isScrollableEnd","marginBlockEnd","Spacing4","position","borderInlineStartColor","HueNeutral200","borderInlineStartStyle","borderInlineStartWidth","BorderWidthMain","background","content","opacity","pointerEvents","top","left","bottom","width","Spacing6","zIndex","transition","TransitionDurationMain","TransitionTimingMain","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","right","defaultGetRowId","row","id","DataTable","additionalActionButton","additionalActionMenuItems","bulkActionMenuItems","columns","currentPage","emptyPlaceholder","errorMessage","errorMessageProp","filters","filtersProp","getData","getRowId","hasChangeableDensity","hasColumnResizing","hasColumnVisibility","hasFilters","hasPagination","hasRowReordering","hasRowSelection","hasSearch","hasSearchSubmitButton","hasSorting","initialDensity","initialSearchValue","isPaginationMoreDisabled","noResultsPlaceholder","onChangeRowSelection","onReorderRows","paginationType","renderDetailPanel","resultsPerPage","maxResultsPerPage","maxPages","rowActionButtons","rowActionMenuItems","searchDelayTime","selectedRows","totalRows","t","data","setData","pagination","setPagination","pageIndex","pageSize","draggingRow","setDraggingRow","isTableContainerScrolledToStart","setIsTableContainerScrolledToStart","isTableContainerScrolledToEnd","setIsTableContainerScrolledToEnd","tableInnerContainerWidth","setTableInnerContainerWidth","tableOuterContainerRef","tableInnerContainerRef","tableContentRef","columnSorting","setColumnSorting","columnVisibility","setColumnVisibility","rowDensity","setRowDensity","search","setSearch","setFilters","initialFilters","setInitialFilters","isLoading","setIsLoading","isEmpty","setIsEmpty","setErrorMessage","_rowSelection","setRowSelection","rowSelection","tableOuterContainer","current","tableInnerContainer","dragHandleStyles","dragHandleText","draggableTableBodyRowClassName","handleDragHandleKeyDown","handleDragHandleOnDragCapture","handleDragHandleOnDragEnd","resetDraggingAndHoveredRow","updateRowOrder","page","rowDensityClassName","renderRowActions","currentIndex","index","rowIndex","undefined","convertFilterSelectOptions","options","map","option","label","value","convertColumnToFilter","column","enableColumnFilter","accessorKey","header","variant","filterVariant","filterSelectOptions","dataTableFilters","providedFilters","reduce","accumulator","item","foundColumn","find","filter","concat","defaultCell","cell","getValue","hasTextWrapping","columnDef","enableWrapping","sx","whiteSpace","textOverflow","overflow","children","emptyState","noResultsInnerContent","heading","description","emptyStateInnerContent","columnIds","columnOrder","shouldDisplayRowActions","muiTableBodyProps","className","muiTableBodyCellProps","getIsResizing","overflowWrap","muiDetailPanelProps","paddingBlock","getIsExpanded","Spacing3","muiTableBodyRowProps","table","isDetailPanel","currentRowId","draggingRowId","hoveredRowId","getState","hoveredRow","border","backgroundColor","muiRowDragHandleProps","onKeyDown","event","onBlur","onDragEnd","onDragCapture","muiTableHeadCellProps","currentColumn","sortedColumn","hasColumnWithGrow","some","grow","dataTable","state","sorting","globalFilter","icons","ArrowDownwardIcon","DragHandleIcon","SyncAltIcon","ExpandMoreIcon","enableColumnActions","enableColumnResizing","enableDensityToggle","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableHiding","enablePagination","layoutMode","manualFiltering","manualSorting","muiTablePaperProps","elevation","selectAllMode","displayColumnDefOptions","align","display","visibility","endIcon","size","ariaLabel","isDisabled","minWidth","marginInline","padding","defaultColumn","Cell","enableRowOrdering","Boolean","enableRowDragging","enableRowActions","positionActionsColumn","enableRowSelection","onRowSelectionChange","enableSorting","onSortingChange","enableRowVirtualization","rowVirtualizerInstanceRef","rowVirtualizerOptions","overscan","renderEmptyRowsFallback","muiTableProps","ref","muiTableContainerProps","enableExpandAll","bulkActionMenuButton","buttonVariant","Object","keys","length","incomingData","sort","error","prev","lastRow","currentRowsCount","marginBottom","onChangeSearch","onChangeFilters","defaultSearchTerm","additionalActions","menuAlignment","severity","text","maxPageIndex","maxPageSize","onPaginationChange","isMoreDisabled","rowsPerPageLabel","currentPageLabel","previousLabel","nextLabel","loadMoreLabel","MemoizedDataTable","displayName"],"sources":["../../../src/DataTable/DataTable.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n MRT_Cell,\n MRT_Column,\n MRT_ColumnDef,\n MRT_DensityState,\n MRT_Row,\n MRT_RowData,\n MRT_RowSelectionState,\n MRT_RowVirtualizer,\n MRT_SortingState,\n MRT_TableContainer,\n MRT_TableInstance,\n MRT_TableOptions,\n MRT_VisibilityState,\n useMaterialReactTable,\n} from \"material-react-table\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n ArrowDownIcon,\n ArrowUnsortedIcon,\n ChevronDownIcon,\n DragIndicatorIcon,\n MoreIcon,\n} from \"../icons.generated/index.js\";\nimport { densityValues } from \"./constants.js\";\nimport {\n Pagination,\n paginationTypeValues,\n usePagination,\n} from \"../Pagination/index.js\";\nimport { DataFilter, DataFilters } from \"../labs/DataFilters.js\";\nimport {\n DataTableRowActions,\n DataTableRowActionsProps,\n} from \"./DataTableRowActions.js\";\nimport { useRowReordering } from \"./useRowReordering.js\";\nimport { DataTableSettings } from \"./DataTableSettings.js\";\nimport { Box } from \"../Box.js\";\nimport { DataTableRowData, DataTableRowSelectionState } from \"./index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { useScrollIndication } from \"./useScrollIndication.js\";\nimport styled from \"@emotion/styled\";\nimport { EmptyState } from \"../EmptyState.js\";\nimport { Button, MenuButton, MenuButtonProps } from \"../Buttons/index.js\";\nimport { Callout } from \"../Callout.js\";\n\nexport type DataTableColumn<T extends DataTableRowData> = MRT_ColumnDef<T> & {\n /**\n * @deprecated use hasTextWrapping instead of enableWrapping\n */\n enableWrapping?: boolean;\n hasTextWrapping?: boolean;\n};\n\ntype DataTableColumnInstance<T extends DataTableRowData> = Omit<\n MRT_Column<T, unknown>,\n \"columnDef\"\n> & {\n columnDef: DataTableColumn<T>;\n};\n\ntype DataTableCell<T extends DataTableRowData> = Omit<MRT_Cell<T>, \"column\"> & {\n column: DataTableColumnInstance<T>;\n};\n\n/**\n * Utility type to extract a callback function type from a given key of `MRT_TableOptions`.\n *\n * The `Extract<>` utility is used to filter out only the function type from the property,\n * as some `MRT_TableOptions` properties can be union types (e.g., `function` | `object`).\n *\n * The `@typescript-eslint/no-unsafe-function-type` rule is disabled here because we must extract\n * a function type from a property of `MRT_TableOptions`, but the exact function signature varies\n * depending on the key.\n */\ntype MRT_TableOptionsCallback<\n TableOptionKey extends keyof Required<MRT_TableOptions<MRT_RowData>>,\n TData extends MRT_RowData = MRT_RowData,\n> = Extract<\n Required<MRT_TableOptions<TData>>[TableOptionKey],\n Function // eslint-disable-line @typescript-eslint/no-unsafe-function-type\n>;\n\nexport type DataTableGetDataType = {\n page?: number;\n resultsPerPage?: number;\n search?: string;\n filters?: DataFilter[];\n sort?: MRT_SortingState;\n};\n\nexport type DataTableOnReorderRowsType = {\n rowId: string;\n newRowIndex: number;\n};\n\nexport type DataTableRenderDetailPanelType = {\n row: MRT_Row<DataTableRowData>;\n table: MRT_TableInstance<DataTableRowData>;\n};\n\nexport type DataTableProps = {\n /**\n * An optional action button above the table.\n */\n additionalActionButton?: ReactNode;\n /**\n * MenuItems that go in an optional action menu above the table.\n */\n additionalActionMenuItems?: ReactNode;\n /**\n * Menu items to include in the bulk actions menu, which appears above the table if a row or rows are selected\n */\n bulkActionMenuItems?: (\n selectedRows: MRT_RowSelectionState,\n ) => MenuButtonProps[\"children\"];\n /**\n * The columns that make up the table\n */\n columns: DataTableColumn<DataTableRowData>[];\n /**\n * The current page number.\n */\n currentPage?: number;\n /**\n * If `error` is not undefined, the DataTable will indicate an error.\n */\n errorMessage?: string;\n /**\n * The component to display when the table is displaying the initial empty state\n */\n emptyPlaceholder?: ReactNode;\n /**\n * An optional set of filters to render in the filters menu\n */\n filters?: Array<DataFilter | DataTableColumn<DataTableRowData> | string>;\n /**\n * The function to get the ID of a row\n */\n getRowId?: MRT_TableOptions<DataTableRowData>[\"getRowId\"];\n /**\n * Callback that fires whenever the table needs to fetch new data, due to changes in\n * page, results per page, search input, filters, or sorting\n */\n getData: ({\n page,\n resultsPerPage,\n search,\n filters,\n sort,\n }: DataTableGetDataType) =>\n | MRT_TableOptions<DataTableRowData>[\"data\"]\n | Promise<MRT_TableOptions<DataTableRowData>[\"data\"]>;\n /**\n * If true, the end user can resize individual columns.\n */\n hasColumnResizing?: boolean;\n /**\n * If true, the end user will be able to show/hide columns.\n */\n hasColumnVisibility?: boolean;\n /**\n * If true, the end user will be able to filter columns.\n */\n hasFilters?: boolean;\n /**\n * If true, the table will include pagination controls.\n */\n hasPagination?: boolean;\n /**\n * If true, the end user can reorder rows via a drag-and-drop interface\n */\n hasRowReordering?: boolean;\n /**\n * If true, the table will include checkboxes on each row, enabling\n * the user to select some or all rows.\n */\n hasRowSelection?: boolean;\n /**\n * If true, the global table search controls will be shown.\n */\n hasSearch?: boolean;\n /**\n * If true, the search field will include a Search button, rather than\n * firing on input change.\n */\n hasSearchSubmitButton?: boolean;\n /**\n * If true, the end user can sort columns (ascending, descending, or neither)\n */\n hasSorting?: boolean;\n /**\n * If true, the end user will be able to change the table density.\n */\n hasChangeableDensity?: boolean;\n /**\n * The initial density (height & padding) of the table rows. This is available even if the\n * table density isn't changeable by the end user via hasChangeableDensity.\n */\n initialDensity?: (typeof densityValues)[number];\n /**\n * The initial search value\n */\n initialSearchValue?: string;\n /**\n * Is the next or show-more button disabled\n */\n isPaginationMoreDisabled?: boolean;\n /**\n * The component to display when the query returns no results\n */\n noResultsPlaceholder?: ReactNode;\n /**\n * The number of results per page.\n */\n resultsPerPage?: number;\n /**\n * The optional component to display when expanding a row.\n */\n renderDetailPanel?: MRT_TableOptions<DataTableRowData>[\"renderDetailPanel\"];\n /**\n * Action buttons to display in each row\n */\n rowActionButtons?: DataTableRowActionsProps[\"rowActionButtons\"];\n /**\n * Menu items to include in the optional actions menu on each row.\n */\n rowActionMenuItems?: DataTableRowActionsProps[\"rowActionMenuItems\"];\n /**\n * The debounce time, in milliseconds, for the search input firing\n * `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,\n * this doesn't do anything.\n */\n searchDelayTime?: number;\n /**\n * Allows for external control of the selected row state\n * use in tandem with onChangeRowSelection to manage your state\n */\n selectedRows?: DataTableRowSelectionState;\n /**\n * Callback that fires when a row (or rows) is selected or unselected.\n */\n onChangeRowSelection?: (rowSelection: DataTableRowSelectionState) => void;\n /**\n * Callback that fires when the user reorders rows within the table. Can be used\n * to propagate order change to the backend.\n */\n onReorderRows?: ({ rowId, newRowIndex }: DataTableOnReorderRowsType) => void;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n paginationType?: (typeof paginationTypeValues)[number];\n /**\n * The total number of rows in the table. Optional, because it's sometimes impossible\n * to calculate. Used in table pagination to know when to disable the \"next\"/\"more\" button.\n */\n totalRows?: number;\n /**\n * The largest number of rows allowed to be shown per page. This only affects the row input\n * in pagination.\n */\n maxResultsPerPage?: number;\n /**\n * The highest page number allowed to be manually input in pagination\n */\n maxPages?: number;\n};\n\nconst ScrollableTableContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isScrollableStart\" &&\n prop !== \"isScrollableEnd\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isScrollableStart: boolean;\n isScrollableEnd: boolean;\n}>(({ odysseyDesignTokens, isScrollableStart, isScrollableEnd }) => ({\n marginBlockEnd: odysseyDesignTokens.Spacing4,\n position: \"relative\",\n borderInlineStartColor: isScrollableStart\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineStartStyle: \"solid\",\n borderInlineStartWidth: odysseyDesignTokens.BorderWidthMain,\n \"::before\": {\n background:\n \"linear-gradient(-90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableStart ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n left: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n zIndex: 100,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n borderInlineEndColor: isScrollableEnd\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineEndStyle: \"solid\",\n borderInlineEndWidth: odysseyDesignTokens.BorderWidthMain,\n \"::after\": {\n background:\n \"linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableEnd ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n right: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n}));\n\nconst defaultGetRowId: DataTableProps[\"getRowId\"] = (row) => row.id as string;\n\nconst DataTable = ({\n additionalActionButton,\n additionalActionMenuItems,\n bulkActionMenuItems,\n columns,\n currentPage = 1,\n emptyPlaceholder,\n errorMessage: errorMessageProp,\n filters: filtersProp,\n getData,\n getRowId = defaultGetRowId,\n hasChangeableDensity,\n hasColumnResizing,\n hasColumnVisibility,\n hasFilters,\n hasPagination,\n hasRowReordering,\n hasRowSelection,\n hasSearch,\n hasSearchSubmitButton,\n hasSorting,\n initialDensity = densityValues[0],\n initialSearchValue = \"\",\n isPaginationMoreDisabled,\n noResultsPlaceholder,\n onChangeRowSelection,\n onReorderRows,\n paginationType = \"paged\",\n renderDetailPanel,\n resultsPerPage = 20,\n maxResultsPerPage,\n maxPages,\n rowActionButtons,\n rowActionMenuItems,\n searchDelayTime,\n selectedRows,\n totalRows,\n}: DataTableProps) => {\n const { t } = useTranslation();\n\n const [data, setData] = useState<DataTableRowData[]>([]);\n const [pagination, setPagination] = useState({\n pageIndex: currentPage,\n pageSize: resultsPerPage,\n });\n const [draggingRow, setDraggingRow] =\n useState<MRT_Row<DataTableRowData> | null>();\n const [isTableContainerScrolledToStart, setIsTableContainerScrolledToStart] =\n useState(true);\n const [isTableContainerScrolledToEnd, setIsTableContainerScrolledToEnd] =\n useState(true);\n const [tableInnerContainerWidth, setTableInnerContainerWidth] =\n useState<string>(\"100%\");\n const tableOuterContainerRef = useRef<HTMLDivElement>(null);\n const tableInnerContainerRef = useRef<HTMLDivElement>(null);\n const tableContentRef = useRef<HTMLTableElement>(null);\n\n // Table states\n const [columnSorting, setColumnSorting] = useState<MRT_SortingState>([]);\n const [columnVisibility, setColumnVisibility] =\n useState<MRT_VisibilityState>();\n const [rowDensity, setRowDensity] =\n useState<MRT_DensityState>(initialDensity);\n const [search, setSearch] = useState<string>(initialSearchValue);\n const [filters, setFilters] = useState<DataFilter[]>();\n const [initialFilters, setInitialFilters] = useState<DataFilter[]>();\n const [isLoading, setIsLoading] = useState<boolean | undefined>(true);\n const [isEmpty, setIsEmpty] = useState<boolean | undefined>();\n const [errorMessage, setErrorMessage] = useState<string | undefined>(\n errorMessageProp,\n );\n const [_rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});\n const rowSelection = selectedRows || _rowSelection;\n\n useScrollIndication({\n tableOuterContainer: tableOuterContainerRef.current,\n tableInnerContainer: tableInnerContainerRef.current,\n setIsTableContainerScrolledToStart: setIsTableContainerScrolledToStart,\n setIsTableContainerScrolledToEnd: setIsTableContainerScrolledToEnd,\n setTableInnerContainerWidth: setTableInnerContainerWidth,\n });\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const {\n dragHandleStyles,\n dragHandleText,\n draggableTableBodyRowClassName,\n handleDragHandleKeyDown,\n handleDragHandleOnDragCapture,\n handleDragHandleOnDragEnd,\n resetDraggingAndHoveredRow,\n updateRowOrder,\n } = useRowReordering({\n totalRows,\n onReorderRows,\n data,\n setData,\n draggingRow,\n setDraggingRow,\n resultsPerPage: pagination.pageSize,\n page: pagination.pageIndex,\n });\n\n const rowDensityClassName = useMemo(() => {\n return rowDensity === \"spacious\"\n ? \"MuiTableBody-spacious\"\n : rowDensity === \"compact\"\n ? \"MuiTableBody-compact\"\n : \"MuiTableBody-default\";\n }, [rowDensity]);\n\n const renderRowActions = useCallback(\n ({ row }: { row: MRT_Row<DataTableRowData> }) => {\n const currentIndex =\n row.index + (pagination.pageIndex - 1) * pagination.pageSize;\n return (\n <DataTableRowActions\n row={row}\n rowIndex={currentIndex}\n rowActionButtons={rowActionButtons}\n rowActionMenuItems={rowActionMenuItems}\n totalRows={totalRows}\n updateRowOrder={\n hasRowReordering && onReorderRows ? updateRowOrder : undefined\n }\n />\n );\n },\n [\n pagination,\n rowActionButtons,\n rowActionMenuItems,\n hasRowReordering,\n onReorderRows,\n totalRows,\n updateRowOrder,\n ],\n );\n\n /**\n * This hack is to provide compatibility with Material-React-Table's\n * filterOptions format, which allows for strings and { label: string, value: string }\n */\n const convertFilterSelectOptions = useCallback(\n (options: DataTableColumn<DataTableRowData>[\"filterSelectOptions\"]) =>\n options?.map((option) =>\n typeof option === \"string\"\n ? {\n label: option,\n value: option,\n }\n : {\n // If the option isn't a string, it must have value and/or option defined\n // If either is undefined, use the other\n // These shouldn't need `as`, but this is a legacy file now. --Kevin Ghadyani\n label: (option.label ?? option.value) as string,\n value: (option.value ?? option.label) as string,\n },\n ),\n [],\n );\n\n const convertColumnToFilter = useCallback(\n (column: DataTableColumn<DataTableRowData>) =>\n column.enableColumnFilter !== false && column.accessorKey\n ? ({\n id: column.accessorKey,\n label: column.header,\n variant: column.filterVariant,\n options: convertFilterSelectOptions(column.filterSelectOptions),\n } satisfies DataFilter as DataFilter)\n : null,\n [convertFilterSelectOptions],\n );\n\n /**\n * Filters default to the columns, but can be overridden\n * with the `filters` prop. `filters` should be an array\n * of column accessorKeys, column defs, or DataFilters.\n */\n const dataTableFilters = useMemo(() => {\n const providedFilters = filtersProp || columns;\n return providedFilters.reduce<DataFilter[]>((accumulator, item) => {\n if (typeof item === \"string\") {\n const foundColumn = columns.find(\n (column) => column.accessorKey === item,\n );\n if (foundColumn) {\n const filter = convertColumnToFilter(foundColumn);\n if (filter) {\n return accumulator.concat(filter);\n }\n }\n } else if (\"accessorKey\" in item) {\n // Checks if it's a column\n const filter = convertColumnToFilter(item);\n if (filter) {\n return accumulator.concat(filter);\n }\n } else if (\"label\" in item) {\n // Checks if it's a DataFilter\n return accumulator.concat(item);\n }\n // If none of the conditions match, item is ignored (not mapping to undefined)\n return accumulator;\n }, []);\n }, [columns, filtersProp, convertColumnToFilter]);\n\n const defaultCell = useCallback(\n ({ cell }: { cell: DataTableCell<DataTableRowData> }) => {\n const value = cell.getValue<string>();\n const hasTextWrapping =\n cell.column.columnDef.hasTextWrapping ||\n cell.column.columnDef.enableWrapping;\n\n return hasTextWrapping ? (\n value\n ) : (\n <Box\n sx={{\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n }}\n >\n {value}\n </Box>\n );\n },\n [],\n );\n\n const emptyState = useCallback(() => {\n const noResultsInnerContent = noResultsPlaceholder || (\n <EmptyState\n heading={t(\"table.noresults.heading\")}\n description={t(\"table.noresults.text\")}\n />\n );\n\n const emptyStateInnerContent =\n emptyPlaceholder && isEmpty ? emptyPlaceholder : noResultsInnerContent;\n\n return (\n <Box sx={{ width: tableInnerContainerWidth }}>\n {emptyStateInnerContent}\n </Box>\n );\n }, [\n emptyPlaceholder,\n isEmpty,\n noResultsPlaceholder,\n t,\n tableInnerContainerWidth,\n ]);\n\n const columnIds = useMemo(() => {\n return columns.map((column) => column.accessorKey);\n }, [columns]);\n\n const columnOrder = useMemo(\n () => [\n \"mrt-row-drag\",\n \"mrt-row-select\",\n \"mrt-row-expand\",\n ...columnIds,\n \"mrt-row-actions\",\n ],\n [columnIds],\n ) as string[];\n\n const shouldDisplayRowActions = useMemo(\n () =>\n (hasRowReordering === true && onReorderRows) ||\n rowActionButtons ||\n rowActionMenuItems\n ? true\n : false,\n [hasRowReordering, onReorderRows, rowActionButtons, rowActionMenuItems],\n );\n\n const muiTableBodyProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableBodyProps\">\n >(\n () => ({\n className: rowDensityClassName,\n }),\n [rowDensityClassName],\n );\n\n const muiTableBodyCellProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableBodyCellProps\">\n >(\n ({ column }) => ({\n className: column.getIsResizing() ? \"isResizing\" : \"\",\n sx: {\n overflowWrap: \"anywhere\",\n },\n }),\n [],\n );\n\n const muiDetailPanelProps = useCallback<\n MRT_TableOptionsCallback<\"muiDetailPanelProps\">\n >(\n ({ row }) => ({\n sx: {\n paddingBlock: row.getIsExpanded()\n ? `${odysseyDesignTokens.Spacing3} !important`\n : undefined,\n },\n }),\n [odysseyDesignTokens.Spacing3],\n );\n\n const muiTableBodyRowProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableBodyRowProps\">\n >(\n ({ table, row, isDetailPanel }) => ({\n className: draggableTableBodyRowClassName({\n currentRowId: row.id,\n draggingRowId: draggingRow?.id,\n hoveredRowId: table.getState().hoveredRow?.id,\n }),\n sx: {\n ...(isDetailPanel && {\n paddingBlock: \"0 !important\",\n border: 0,\n [\"&:hover\"]: {\n backgroundColor: `transparent !important`,\n },\n }),\n },\n }),\n [draggableTableBodyRowClassName, draggingRow?.id],\n );\n\n const muiRowDragHandleProps = useCallback<\n MRT_TableOptionsCallback<\"muiRowDragHandleProps\">\n >(\n ({ table, row }) => ({\n onKeyDown: (event) => handleDragHandleKeyDown({ table, row, event }),\n onBlur: () => resetDraggingAndHoveredRow(table),\n onDragEnd: () => handleDragHandleOnDragEnd(table),\n onDragCapture: () => handleDragHandleOnDragCapture(table),\n sx: dragHandleStyles,\n ...dragHandleText,\n }),\n [\n dragHandleStyles,\n dragHandleText,\n handleDragHandleKeyDown,\n resetDraggingAndHoveredRow,\n handleDragHandleOnDragEnd,\n handleDragHandleOnDragCapture,\n ],\n );\n\n const muiTableHeadCellProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableHeadCellProps\">\n >(\n ({ column: currentColumn }) => ({\n className: columnSorting.find(\n (sortedColumn) => sortedColumn.id === currentColumn.id,\n )\n ? \"isSorted\"\n : \"isUnsorted\",\n }),\n [columnSorting],\n );\n\n const hasColumnWithGrow = useMemo(\n () => columns.some((column) => column.grow === true),\n [columns],\n );\n\n const dataTable = useMaterialReactTable({\n columns: columns,\n data: data,\n getRowId,\n state: {\n sorting: columnSorting,\n globalFilter: search,\n columnVisibility,\n isLoading,\n rowSelection,\n columnOrder,\n },\n icons: {\n ArrowDownwardIcon: ArrowDownIcon,\n DragHandleIcon: DragIndicatorIcon,\n SyncAltIcon: ArrowUnsortedIcon,\n ExpandMoreIcon: ChevronDownIcon,\n },\n\n // Base table settings\n enableColumnActions: false,\n enableColumnResizing: hasColumnResizing,\n enableDensityToggle: false,\n enableFilters: false,\n enableFullScreenToggle: false,\n enableGlobalFilter: false,\n enableHiding: false,\n enablePagination: false,\n layoutMode: \"grid-no-grow\",\n manualFiltering: true,\n manualSorting: true,\n muiTablePaperProps: {\n elevation: 0,\n sx: {\n overflow: \"visible\",\n },\n },\n selectAllMode: \"all\",\n displayColumnDefOptions: {\n \"mrt-row-actions\": {\n header: \"\",\n grow: true,\n muiTableBodyCellProps: {\n align: \"right\",\n sx: {\n overflow: \"visible\",\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n },\n muiTableHeadCellProps: {\n align: \"right\",\n sx: {\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n children: (\n <Box sx={{ display: \"flex\", visibility: \"hidden\" }}>\n {rowActionButtons && rowActionButtons({ id: null })}\n {((hasRowReordering && onReorderRows) || rowActionMenuItems) && (\n <Box>\n <Button\n endIcon={<MoreIcon />}\n size=\"small\"\n variant=\"floating\"\n ariaLabel={t(\"table.moreactions.arialabel\")}\n isDisabled\n />\n </Box>\n )}\n </Box>\n ),\n },\n },\n \"mrt-row-drag\": {\n header: \"\",\n muiTableBodyCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n className: \"ods-drag-handle\",\n },\n muiTableHeadCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n children: (\n // Add a spacer to simulate the width of the drag handle in the column.\n // Without this, the head cells are offset from their body cell counterparts\n <Box sx={{ marginInline: \"-0.1rem\" }}>\n <DragIndicatorIcon sx={{ marginInline: 1, opacity: 0 }} />\n </Box>\n ),\n },\n },\n \"mrt-row-select\": {\n muiTableHeadCellProps: {\n padding: \"checkbox\",\n },\n muiTableBodyCellProps: {\n padding: \"checkbox\",\n },\n },\n \"mrt-row-expand\": {\n header: \"\",\n },\n },\n muiTableBodyProps,\n defaultColumn: {\n Cell: defaultCell,\n },\n muiTableBodyCellProps,\n\n // Reordering\n enableRowOrdering: hasRowReordering && Boolean(onReorderRows),\n enableRowDragging: hasRowReordering && Boolean(onReorderRows),\n muiDetailPanelProps,\n muiTableBodyRowProps,\n muiRowDragHandleProps,\n\n // Row actions\n enableRowActions: shouldDisplayRowActions,\n positionActionsColumn:\n \"last\" as MRT_TableOptions<DataTableRowData>[\"positionActionsColumn\"],\n renderRowActions: ({ row }) => renderRowActions({ row }),\n\n // Row selection\n enableRowSelection: hasRowSelection,\n onRowSelectionChange: setRowSelection,\n\n // Sorting\n enableSorting: hasSorting,\n onSortingChange: setColumnSorting,\n muiTableHeadCellProps,\n\n // Virtualization\n enableRowVirtualization:\n paginationType !== \"loadMore\" && pagination.pageSize > 50,\n rowVirtualizerInstanceRef:\n useRef<MRT_RowVirtualizer<HTMLDivElement, HTMLTableRowElement>>(null),\n rowVirtualizerOptions: {\n overscan: 4,\n },\n\n // States\n renderEmptyRowsFallback: emptyState,\n\n // Refs\n muiTableProps: {\n ref: tableContentRef,\n className:\n !shouldDisplayRowActions && hasColumnResizing\n ? hasColumnWithGrow\n ? \"ods-hide-spacer-column\"\n : \"ods-hide-spacer-column ods-column-grow\"\n : \"\",\n },\n\n muiTableContainerProps: {\n ref: tableInnerContainerRef,\n },\n\n // Row expansion\n enableExpandAll: false,\n renderDetailPanel: renderDetailPanel,\n });\n\n // Effects\n const bulkActionMenuButton = useMemo(\n () => (\n <>\n <MenuButton\n buttonVariant=\"secondary\"\n endIcon={<MoreIcon />}\n isDisabled={Object.keys(rowSelection).length === 0}\n ariaLabel=\"More actions\"\n >\n {bulkActionMenuItems?.(rowSelection)}\n </MenuButton>\n </>\n ),\n [bulkActionMenuItems, rowSelection],\n );\n\n useEffect(() => {\n (async () => {\n setIsLoading(true);\n setErrorMessage(errorMessageProp);\n try {\n const incomingData = await getData?.({\n page: pagination.pageIndex,\n resultsPerPage: pagination.pageSize,\n search,\n filters,\n sort: columnSorting,\n });\n setData(incomingData);\n } catch (error) {\n setErrorMessage(typeof error === \"string\" ? error : t(\"table.error\"));\n } finally {\n setIsLoading(false);\n }\n })();\n }, [\n columnSorting,\n errorMessageProp,\n filters,\n getData,\n pagination,\n search,\n t,\n ]);\n\n useEffect(() => {\n if (!initialFilters && filters) {\n setInitialFilters(filters);\n }\n\n setIsEmpty(\n pagination.pageIndex === currentPage &&\n pagination.pageSize === resultsPerPage &&\n search === \"\" &&\n filters === initialFilters &&\n data.length === 0,\n );\n }, [\n filters,\n pagination,\n search,\n data,\n currentPage,\n initialFilters,\n resultsPerPage,\n ]);\n\n useEffect(() => {\n setPagination((prev) => ({\n pageIndex: 1,\n pageSize: prev.pageSize,\n }));\n }, [filters, search]);\n\n useEffect(() => {\n onChangeRowSelection?.(rowSelection);\n }, [rowSelection, onChangeRowSelection]);\n\n const { lastRow } = usePagination({\n currentRowsCount: data.length,\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n totalRows,\n });\n\n // Render the table\n return (\n <>\n {(hasSearch ||\n hasFilters ||\n hasChangeableDensity ||\n hasColumnVisibility ||\n bulkActionMenuItems ||\n additionalActionButton ||\n additionalActionMenuItems) && (\n <Box sx={{ marginBottom: 5 }}>\n <DataFilters\n onChangeSearch={hasSearch ? setSearch : undefined}\n onChangeFilters={hasFilters ? setFilters : undefined}\n hasSearchSubmitButton={hasSearchSubmitButton}\n searchDelayTime={searchDelayTime}\n filters={hasFilters ? dataTableFilters : undefined}\n defaultSearchTerm={initialSearchValue}\n isDisabled={isEmpty}\n additionalActions={\n <>\n <DataTableSettings\n hasChangeableDensity={hasChangeableDensity}\n rowDensity={rowDensity}\n setRowDensity={setRowDensity}\n hasColumnVisibility={hasColumnVisibility}\n columns={columns}\n columnVisibility={columnVisibility}\n setColumnVisibility={setColumnVisibility}\n />\n {bulkActionMenuItems && bulkActionMenuButton}\n {additionalActionButton}\n {additionalActionMenuItems && (\n <MenuButton\n endIcon={<MoreIcon />}\n ariaLabel={t(\"table.moreactions.arialabel\")}\n buttonVariant=\"secondary\"\n menuAlignment=\"right\"\n >\n {additionalActionMenuItems}\n </MenuButton>\n )}\n </>\n }\n />\n </Box>\n )}\n\n {errorMessage && (\n <Box sx={{ marginBlockEnd: 2 }}>\n <Callout severity=\"error\" text={errorMessage} />\n </Box>\n )}\n\n <ScrollableTableContainer\n odysseyDesignTokens={odysseyDesignTokens}\n isScrollableStart={!isTableContainerScrolledToStart}\n isScrollableEnd={!isTableContainerScrolledToEnd}\n ref={tableOuterContainerRef}\n >\n <MRT_TableContainer table={dataTable} />\n </ScrollableTableContainer>\n\n {hasPagination && (\n <Pagination\n pageIndex={pagination.pageIndex}\n pageSize={pagination.pageSize}\n maxPageIndex={maxPages}\n maxPageSize={maxResultsPerPage}\n onPaginationChange={setPagination}\n lastRow={lastRow}\n totalRows={totalRows}\n currentRowsCount={data.length}\n isDisabled={isEmpty}\n isMoreDisabled={isPaginationMoreDisabled}\n variant={paginationType}\n rowsPerPageLabel={t(\"pagination.rowsperpage\")}\n currentPageLabel={t(\"pagination.page\")}\n previousLabel={t(\"pagination.previous\")}\n nextLabel={t(\"pagination.next\")}\n loadMoreLabel={t(\"pagination.loadmore\")}\n />\n )}\n </>\n );\n};\n\nconst MemoizedDataTable = memo(DataTable);\nMemoizedDataTable.displayName = \"DataTable\";\n\nexport { MemoizedDataTable as DataTable };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,IAAI,EAEJC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAUEC,kBAAkB,EAIlBC,qBAAqB,QAChB,sBAAsB;AAC7B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SACEC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,iBAAiB,EACjBC,QAAQ,QACH,6BAA6B;AACpC,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SACEC,UAAU,EAEVC,aAAa,QACR,wBAAwB;AAC/B,SAAqBC,WAAW,QAAQ,wBAAwB;AAChE,SACEC,mBAAmB,QAEd,0BAA0B;AACjC,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,GAAG,QAAQ,WAAW;AAE/B,SAEEC,sBAAsB,QACjB,kCAAkC;AACzC,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9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CAAC,wBAAwB,CAAE;MAC9C8M,gBAAgB,EAAE9M,CAAC,CAAC,iBAAiB,CAAE;MACvC+M,aAAa,EAAE/M,CAAC,CAAC,qBAAqB,CAAE;MACxCgN,SAAS,EAAEhN,CAAC,CAAC,iBAAiB,CAAE;MAChCiN,aAAa,EAAEjN,CAAC,CAAC,qBAAqB;IAAE,CACzC,CACF;EAAA,CACD,CAAC;AAEP,CAAC;AAED,MAAMkN,iBAAiB,GAAG9T,IAAI,CAACqE,SAAS,CAAC;AACzCyP,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIzP,SAAS","ignoreList":[]}
@@ -21,7 +21,7 @@ import { Heading5 } from "./Typography.js";
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  export const variantValues = ["temporary", "persistent"];
23
23
  const DrawerHeader = styled("div", {
24
- shouldForwardProp: prop => prop !== "odysseyDesignTokens"
24
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasDividers"
25
25
  })`
26
26
  position: sticky;
27
27
  top: 0;
@@ -42,9 +42,9 @@ const DrawerHeader = styled("div", {
42
42
  odysseyDesignTokens
43
43
  }) => odysseyDesignTokens.HueNeutralWhite};
44
44
  border-bottom: ${({
45
- showDividers,
45
+ hasDividers,
46
46
  odysseyDesignTokens
47
- }) => showDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : "none"};
47
+ }) => hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : "none"};
48
48
  `;
49
49
  const DrawerContentWrapper = styled("div", {
50
50
  shouldForwardProp: prop => prop !== "odysseyDesignTokens"
@@ -52,15 +52,15 @@ const DrawerContentWrapper = styled("div", {
52
52
  overflow-y: auto;
53
53
  `;
54
54
  const DrawerContent = styled("div", {
55
- shouldForwardProp: prop => prop !== "odysseyDesignTokens"
55
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasDividers"
56
56
  })`
57
57
  padding: ${({
58
- showDividers,
58
+ hasDividers,
59
59
  odysseyDesignTokens
60
- }) => showDividers ? `${odysseyDesignTokens.Spacing5}` : `0 ${odysseyDesignTokens.Spacing5}`};
60
+ }) => hasDividers ? `${odysseyDesignTokens.Spacing5}` : `0 ${odysseyDesignTokens.Spacing5}`};
61
61
  `;
62
62
  const DrawerFooter = styled("div", {
63
- shouldForwardProp: prop => prop !== "odysseyDesignTokens"
63
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasDividers"
64
64
  })`
65
65
  position: sticky;
66
66
  bottom: 0;
@@ -72,9 +72,9 @@ const DrawerFooter = styled("div", {
72
72
  odysseyDesignTokens
73
73
  }) => odysseyDesignTokens.Spacing4};
74
74
  border-top: ${({
75
- showDividers,
75
+ hasDividers,
76
76
  odysseyDesignTokens
77
- }) => showDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : "none"};
77
+ }) => hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : "none"};
78
78
  background-color: ${({
79
79
  odysseyDesignTokens
80
80
  }) => odysseyDesignTokens.HueNeutralWhite};
@@ -82,6 +82,7 @@ const DrawerFooter = styled("div", {
82
82
  const Drawer = ({
83
83
  ariaLabel,
84
84
  children,
85
+ hasDividers: hasDividersProp = false,
85
86
  isOpen,
86
87
  onClose,
87
88
  primaryCallToActionComponent,
@@ -96,6 +97,7 @@ const Drawer = ({
96
97
  const [isContentScrollable, setIsContentScrollable] = useState(false);
97
98
  const drawerContentRef = useRef(null);
98
99
  const odysseyDesignTokens = useOdysseyDesignTokens();
100
+ const hasDividers = hasDividersProp || showDividers;
99
101
  const {
100
102
  i18n
101
103
  } = useTranslation();
@@ -118,8 +120,8 @@ const Drawer = ({
118
120
  };
119
121
  }, [isOpen]);
120
122
  const dividersVisible = useMemo(() => {
121
- return showDividers || isContentScrollable;
122
- }, [showDividers, isContentScrollable]);
123
+ return hasDividers || isContentScrollable;
124
+ }, [hasDividers, isContentScrollable]);
123
125
  const hasFooter = useMemo(() => primaryCallToActionComponent || secondaryCallToActionComponent || tertiaryCallToActionComponent, [primaryCallToActionComponent, secondaryCallToActionComponent, tertiaryCallToActionComponent]);
124
126
  return _jsxs(_Drawer, {
125
127
  "data-se": testId,
@@ -143,7 +145,7 @@ const Drawer = ({
143
145
  children: [_jsxs(DrawerHeader, {
144
146
  translate: translate,
145
147
  odysseyDesignTokens: odysseyDesignTokens,
146
- showDividers: dividersVisible,
148
+ hasDividers: dividersVisible,
147
149
  children: [_jsx(Heading5, {
148
150
  children: title
149
151
  }), _jsx(Button, {
@@ -154,13 +156,13 @@ const Drawer = ({
154
156
  variant: "floating"
155
157
  })]
156
158
  }), _jsx(DrawerContent, {
157
- showDividers: dividersVisible,
159
+ hasDividers: dividersVisible,
158
160
  odysseyDesignTokens: odysseyDesignTokens,
159
161
  children: children
160
162
  })]
161
163
  }), hasFooter && _jsxs(DrawerFooter, {
162
164
  odysseyDesignTokens: odysseyDesignTokens,
163
- showDividers: dividersVisible,
165
+ hasDividers: dividersVisible,
164
166
  children: [tertiaryCallToActionComponent, secondaryCallToActionComponent, primaryCallToActionComponent]
165
167
  })]
166
168
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","names":["memo","useEffect","useMemo","useRef","useState","styled","useTranslation","Button","CloseIcon","useOdysseyDesignTokens","Heading5","jsx","_jsx","jsxs","_jsxs","variantValues","DrawerHeader","shouldForwardProp","prop","odysseyDesignTokens","Spacing4","Spacing5","HueNeutral900","HueNeutralWhite","showDividers","HueNeutral200","DrawerContentWrapper","DrawerContent","DrawerFooter","Drawer","ariaLabel","children","isOpen","onClose","primaryCallToActionComponent","secondaryCallToActionComponent","tertiaryCallToActionComponent","testId","title","translate","variant","isContentScrollable","setIsContentScrollable","drawerContentRef","i18n","anchorDirection","dir","frameId","handleContentScroll","drawerContentElement","current","cancelAnimationFrame","scrollHeight","clientHeight","requestAnimationFrame","dividersVisible","hasFooter","_Drawer","anchor","open","sx","transition","tabIndex","ref","onClick","size","startIcon","MemoizedDrawer","displayName"],"sources":["../../src/Drawer.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n ReactElement,\n ReactNode,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { Drawer as MuiDrawer } from \"@mui/material\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Button } from \"./Buttons/index.js\";\nimport { CloseIcon } from \"./icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\nimport { Heading5 } from \"./Typography.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nexport const variantValues = [\"temporary\", \"persistent\"] as const;\n\nexport type DrawerProps = {\n /**\n * An optional Button object to be situated in the Drawerfooter. Should almost always be of variant `primary`.\n */\n primaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the `callToActionPrimaryComponent`.\n */\n secondaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the other two `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Drawer. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children?: ReactNode;\n /**\n * When set to `true`, the Drawer will be visible.\n */\n isOpen?: boolean;\n /**\n * Callback that controls what happens when the Drawer is dismissed\n */\n onClose: () => void;\n /**\n * Shows divider lines separating header, content, and footer (if using action buttons)\n */\n showDividers: boolean;\n /**\n * The title of the Drawer\n */\n title?: string;\n /**\n * Type of Drawer\n */\n variant?: (typeof variantValues)[number];\n} & Pick<HtmlProps, \"ariaLabel\" | \"testId\" | \"translate\">;\n\ninterface DrawerStyleProps {\n odysseyDesignTokens: DesignTokens;\n showDividers: boolean;\n}\nconst DrawerHeader = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<DrawerStyleProps>`\n position: sticky;\n top: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4}\n ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing5};\n color: ${({ odysseyDesignTokens }) => odysseyDesignTokens.HueNeutral900};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n border-bottom: ${({ showDividers, odysseyDesignTokens }) =>\n showDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n`;\n\nconst DrawerContentWrapper = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>`\n overflow-y: auto;\n`;\n\nconst DrawerContent = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<DrawerStyleProps>`\n padding: ${({ showDividers, odysseyDesignTokens }) =>\n showDividers\n ? `${odysseyDesignTokens.Spacing5}`\n : `0 ${odysseyDesignTokens.Spacing5}`};\n`;\n\nconst DrawerFooter = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<DrawerStyleProps>`\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n align-content: center;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4};\n border-top: ${({ showDividers, odysseyDesignTokens }) =>\n showDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n`;\n\nconst Drawer = ({\n ariaLabel,\n children,\n isOpen,\n onClose,\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n showDividers = false,\n tertiaryCallToActionComponent,\n testId,\n title,\n translate,\n variant = \"temporary\",\n}: DrawerProps) => {\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const drawerContentRef = useRef<HTMLDivElement>(null);\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n //If RTL is set in the theme, align the drawer on the left side of the screen, uses right by default.\n const { i18n } = useTranslation();\n const anchorDirection = i18n.dir() === \"rtl\" ? \"left\" : \"right\";\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const drawerContentElement = drawerContentRef.current;\n if (drawerContentElement) {\n cancelAnimationFrame(frameId);\n setIsContentScrollable(\n drawerContentElement.scrollHeight > drawerContentElement.clientHeight,\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const dividersVisible = useMemo(() => {\n return showDividers || isContentScrollable;\n }, [showDividers, isContentScrollable]);\n\n const hasFooter = useMemo(\n () =>\n primaryCallToActionComponent ||\n secondaryCallToActionComponent ||\n tertiaryCallToActionComponent,\n [\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n ],\n );\n\n return (\n <MuiDrawer\n data-se={testId}\n anchor={anchorDirection}\n open={isOpen}\n onClose={onClose}\n variant={variant}\n sx={{\n //Overrides default MUI inline style\n ...(variant === \"persistent\" && {\n \"& .MuiDrawer-paper\": {\n transition: \"none\",\n },\n }),\n }}\n >\n <DrawerContentWrapper\n {...(isContentScrollable && {\n //Sets tabIndex on content element if scrollable so content is easier to navigate with the keyboard\n tabIndex: 0,\n })}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={drawerContentRef}\n >\n <DrawerHeader\n translate={translate}\n odysseyDesignTokens={odysseyDesignTokens}\n showDividers={dividersVisible}\n >\n <Heading5>{title}</Heading5>\n <Button\n ariaLabel={ariaLabel}\n onClick={onClose}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DrawerHeader>\n <DrawerContent\n showDividers={dividersVisible}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {children}\n </DrawerContent>\n </DrawerContentWrapper>\n {hasFooter && (\n <DrawerFooter\n odysseyDesignTokens={odysseyDesignTokens}\n showDividers={dividersVisible}\n >\n {tertiaryCallToActionComponent}\n {secondaryCallToActionComponent}\n {primaryCallToActionComponent}\n </DrawerFooter>\n )}\n </MuiDrawer>\n );\n};\n\nconst MemoizedDrawer = memo(Drawer);\nMemoizedDrawer.displayName = \"Drawer\";\n\nexport { MemoizedDrawer as Drawer };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,IAAI,EAGJC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAGd,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,cAAc,QAAQ,eAAe;AAE9C,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAEEC,sBAAsB,QACjB,iCAAiC;AACxC,SAASC,QAAQ,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG3C,OAAO,MAAMC,aAAa,GAAG,CAAC,WAAW,EAAE,YAAY,CAAU;AA6CjE,MAAMC,YAAY,GAAGX,MAAM,CAAC,KAAK,EAAE;EACjCY,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAoB,CAAC,KAAKA,mBAAmB,CAACC,QAAQ;A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AAxB,QAAA,GAE7BK,6BAA6B,EAC7BD,8BAA8B,EAC9BD,4BAA4B;IAAA,CACjB,CACf;EAAA,CACQ,CAAC;AAEhB,CAAC;AAED,MAAMiC,cAAc,GAAGnE,IAAI,CAAC6B,MAAM,CAAC;AACnCsC,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAItC,MAAM","ignoreList":[]}
1
+ {"version":3,"file":"Drawer.js","names":["memo","useEffect","useMemo","useRef","useState","styled","useTranslation","Button","CloseIcon","useOdysseyDesignTokens","Heading5","jsx","_jsx","jsxs","_jsxs","variantValues","DrawerHeader","shouldForwardProp","prop","odysseyDesignTokens","Spacing4","Spacing5","HueNeutral900","HueNeutralWhite","hasDividers","HueNeutral200","DrawerContentWrapper","DrawerContent","DrawerFooter","Drawer","ariaLabel","children","hasDividersProp","isOpen","onClose","primaryCallToActionComponent","secondaryCallToActionComponent","showDividers","tertiaryCallToActionComponent","testId","title","translate","variant","isContentScrollable","setIsContentScrollable","drawerContentRef","i18n","anchorDirection","dir","frameId","handleContentScroll","drawerContentElement","current","cancelAnimationFrame","scrollHeight","clientHeight","requestAnimationFrame","dividersVisible","hasFooter","_Drawer","anchor","open","sx","transition","tabIndex","ref","onClick","size","startIcon","MemoizedDrawer","displayName"],"sources":["../../src/Drawer.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n ReactElement,\n ReactNode,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { Drawer as MuiDrawer } from \"@mui/material\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Button } from \"./Buttons/index.js\";\nimport { CloseIcon } from \"./icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\nimport { Heading5 } from \"./Typography.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nexport const variantValues = [\"temporary\", \"persistent\"] as const;\n\nexport type DrawerProps = {\n /**\n * An optional Button object to be situated in the Drawerfooter. Should almost always be of variant `primary`.\n */\n primaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the `callToActionPrimaryComponent`.\n */\n secondaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the other two `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Drawer. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children?: ReactNode;\n /**\n * When set to `true`, the Drawer will be visible.\n */\n isOpen?: boolean;\n /**\n * Callback that controls what happens when the Drawer is dismissed\n */\n onClose: () => void;\n /**\n * The title of the Drawer\n */\n title?: string;\n /**\n * Type of Drawer\n */\n variant?: (typeof variantValues)[number];\n} & Pick<HtmlProps, \"ariaLabel\" | \"testId\" | \"translate\"> &\n (\n | {\n /**\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n hasDividers?: never;\n /**\n * @deprecated use `hasDividers` instead.\n *\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n showDividers: boolean;\n }\n | {\n /**\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n hasDividers: boolean;\n /**\n * @deprecated use `hasDividers` instead.\n *\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n showDividers?: never;\n }\n );\n\ninterface DrawerStyleProps {\n odysseyDesignTokens: DesignTokens;\n hasDividers: boolean;\n}\nconst DrawerHeader = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasDividers\",\n})<DrawerStyleProps>`\n position: sticky;\n top: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4}\n ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing5};\n color: ${({ odysseyDesignTokens }) => odysseyDesignTokens.HueNeutral900};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n border-bottom: ${({ hasDividers, odysseyDesignTokens }) =>\n hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n`;\n\nconst DrawerContentWrapper = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>`\n overflow-y: auto;\n`;\n\nconst DrawerContent = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasDividers\",\n})<DrawerStyleProps>`\n padding: ${({ hasDividers, odysseyDesignTokens }) =>\n hasDividers\n ? `${odysseyDesignTokens.Spacing5}`\n : `0 ${odysseyDesignTokens.Spacing5}`};\n`;\n\nconst DrawerFooter = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasDividers\",\n})<DrawerStyleProps>`\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n align-content: center;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4};\n border-top: ${({ hasDividers, odysseyDesignTokens }) =>\n hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n`;\n\nconst Drawer = ({\n ariaLabel,\n children,\n hasDividers: hasDividersProp = false,\n isOpen,\n onClose,\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n showDividers = false,\n tertiaryCallToActionComponent,\n testId,\n title,\n translate,\n variant = \"temporary\",\n}: DrawerProps) => {\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const drawerContentRef = useRef<HTMLDivElement>(null);\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const hasDividers = hasDividersProp || showDividers;\n\n //If RTL is set in the theme, align the drawer on the left side of the screen, uses right by default.\n const { i18n } = useTranslation();\n const anchorDirection = i18n.dir() === \"rtl\" ? \"left\" : \"right\";\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const drawerContentElement = drawerContentRef.current;\n if (drawerContentElement) {\n cancelAnimationFrame(frameId);\n setIsContentScrollable(\n drawerContentElement.scrollHeight > drawerContentElement.clientHeight,\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const dividersVisible = useMemo(() => {\n return hasDividers || isContentScrollable;\n }, [hasDividers, isContentScrollable]);\n\n const hasFooter = useMemo(\n () =>\n primaryCallToActionComponent ||\n secondaryCallToActionComponent ||\n tertiaryCallToActionComponent,\n [\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n ],\n );\n\n return (\n <MuiDrawer\n data-se={testId}\n anchor={anchorDirection}\n open={isOpen}\n onClose={onClose}\n variant={variant}\n sx={{\n //Overrides default MUI inline style\n ...(variant === \"persistent\" && {\n \"& .MuiDrawer-paper\": {\n transition: \"none\",\n },\n }),\n }}\n >\n <DrawerContentWrapper\n {...(isContentScrollable && {\n //Sets tabIndex on content element if scrollable so content is easier to navigate with the keyboard\n tabIndex: 0,\n })}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={drawerContentRef}\n >\n <DrawerHeader\n translate={translate}\n odysseyDesignTokens={odysseyDesignTokens}\n hasDividers={dividersVisible}\n >\n <Heading5>{title}</Heading5>\n <Button\n ariaLabel={ariaLabel}\n onClick={onClose}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DrawerHeader>\n <DrawerContent\n hasDividers={dividersVisible}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {children}\n </DrawerContent>\n </DrawerContentWrapper>\n {hasFooter && (\n <DrawerFooter\n odysseyDesignTokens={odysseyDesignTokens}\n hasDividers={dividersVisible}\n >\n {tertiaryCallToActionComponent}\n {secondaryCallToActionComponent}\n {primaryCallToActionComponent}\n </DrawerFooter>\n )}\n </MuiDrawer>\n );\n};\n\nconst MemoizedDrawer = memo(Drawer);\nMemoizedDrawer.displayName = \"Drawer\";\n\nexport { MemoizedDrawer as Drawer };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,IAAI,EAGJC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAGd,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,cAAc,QAAQ,eAAe;AAE9C,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAEEC,sBAAsB,QACjB,iCAAiC;AACxC,SAASC,QAAQ,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG3C,OAAO,MAAMC,aAAa,GAAG,CAAC,WAAW,EAAE,YAAY,CAAU;AAmEjE,MAAMC,YAAY,GAAGX,MAAM,CAAC,KAAK,EAAE;EACjCY,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAAIA,IAAI,KAAK;AAC/C,CAAC,CAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAoB,CAAC,KAAKA,mBAAmB,CAACC,QAAQ;AACtE,MAAM,CAAC;EAAED;AAAoB,CAAC,KAAKA,mBAAmB,CAACE,QAAQ;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KAAA,CAACc,YAAY;MACXT,mBAAmB,EAAEA,mBAAoB;MACzCK,WAAW,EAAEiC,eAAgB;MAAA1B,QAAA,GAE5BO,6BAA6B,EAC7BF,8BAA8B,EAC9BD,4BAA4B;IAAA,CACjB,CACf;EAAA,CACQ,CAAC;AAEhB,CAAC;AAED,MAAMkC,cAAc,GAAGrE,IAAI,CAAC6B,MAAM,CAAC;AACnCwC,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIxC,MAAM","ignoreList":[]}
@@ -84,7 +84,7 @@ const PasswordField = forwardRef(({
84
84
  position: "end",
85
85
  children: _jsx(_IconButton, {
86
86
  "aria-controls": id,
87
- "aria-label": inputType === "password" ? t("passwordfield.icon.label.show") : t("passwordfield.icon.label.hide"),
87
+ "aria-label": t("passwordfield.icon.label.show"),
88
88
  "aria-pressed": inputType === "text",
89
89
  onClick: togglePasswordVisibility,
90
90
  children: inputType === "password" ? _jsx(ShowIcon, {}) : _jsx(HideIcon, {})
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordField.js","names":["forwardRef","memo","useCallback","useImperativeHandle","useRef","useState","ShowIcon","HideIcon","Field","useTranslation","getControlState","useInputValues","jsx","_jsx","PasswordField","ariaDescribedBy","autoCompleteType","defaultValue","errorMessage","errorMessageList","hasInitialFocus","hint","id","idOverride","inputRef","isDisabled","isFullWidth","isOptional","hasShowPassword","isReadOnly","label","name","nameOverride","onChange","onChangeProp","onFocus","onBlur","placeholder","testId","translate","value","ref","t","inputType","setInputType","togglePasswordVisibility","controlledStateRef","controlledValue","uncontrolledValue","inputValues","controlState","current","localInputRef","focus","event","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase","autoComplete","autoFocus","endAdornment","_InputAdornment","position","children","_IconButton","onClick","inputProps","role","readOnly","required","type","fieldType","hasVisibleLabel","MemoizedPasswordField","displayName"],"sources":["../../src/PasswordField.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { InputAdornment, InputBase, IconButton } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n memo,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\n\nimport { ShowIcon, HideIcon } from \"./icons.generated/index.js\";\nimport { Field } from \"./Field.js\";\nimport {\n FieldComponentProps,\n FieldComponentRenderProps,\n} from \"./FieldComponentProps.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\nimport { useTranslation } from \"react-i18next\";\nimport { FocusHandle, getControlState, useInputValues } from \"./inputUtils.js\";\n\nexport type PasswordFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: \"current-password\" | \"new-password\";\n /**\n * initial value for input. Use when component in uncontrolled.\n */\n defaultValue?: string;\n /**\n * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the show/hide icon is not shown to the user\n */\n hasShowPassword?: boolean;\n /**\n * The ref forwarded to the TextField\n */\n inputRef?: React.RefObject<FocusHandle>;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * The value of the `input` element. Use when component is controlled.\n */\n value?: string;\n} & FieldComponentProps &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\ntype FieldRenderProps = Partial<\n Pick<FieldComponentRenderProps, \"ariaDescribedBy\" | \"errorMessageElementId\">\n> &\n Pick<FieldComponentRenderProps, \"id\" | \"labelElementId\">;\n\nconst PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n (\n {\n ariaDescribedBy,\n autoCompleteType,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasInitialFocus,\n hint,\n id: idOverride,\n inputRef,\n isDisabled = false,\n isFullWidth = false,\n isOptional = false,\n hasShowPassword = true,\n isReadOnly,\n label,\n name: nameOverride,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n placeholder,\n testId,\n translate,\n value,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const [inputType, setInputType] = useState(\"password\");\n\n const togglePasswordVisibility = useCallback(() => {\n setInputType((inputType) =>\n inputType === \"password\" ? \"text\" : \"password\",\n );\n }, []);\n\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const localInputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(inputRef, () => {\n return {\n focus: () => {\n localInputRef.current?.focus();\n },\n };\n }, []);\n\n const onChange = useCallback<\n ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>\n >(\n (event) => {\n onChangeProp?.(event);\n },\n [onChangeProp],\n );\n\n const renderFieldComponent = useCallback(\n ({\n ariaDescribedBy,\n errorMessageElementId,\n id,\n labelElementId,\n }: FieldRenderProps) => (\n <InputBase\n {...inputValues}\n aria-describedby={ariaDescribedBy}\n autoComplete={inputType === \"password\" ? autoCompleteType : \"off\"}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n endAdornment={\n hasShowPassword && (\n <InputAdornment position=\"end\">\n <IconButton\n aria-controls={id}\n aria-label={\n inputType === \"password\"\n ? t(\"passwordfield.icon.label.show\")\n : t(\"passwordfield.icon.label.hide\")\n }\n aria-pressed={inputType === \"text\"}\n onClick={togglePasswordVisibility}\n >\n {inputType === \"password\" ? <ShowIcon /> : <HideIcon />}\n </IconButton>\n </InputAdornment>\n )\n }\n id={id}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n // role: \"textbox\" Added because password inputs don't have an implicit role assigned. This causes problems with element selection.\n role: \"textbox\",\n }}\n inputRef={localInputRef}\n name={nameOverride ?? id}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n required={!isOptional}\n translate={translate}\n type={inputType}\n />\n ),\n [\n autoCompleteType,\n hasInitialFocus,\n inputValues,\n t,\n togglePasswordVisibility,\n inputType,\n nameOverride,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n isOptional,\n isReadOnly,\n hasShowPassword,\n ref,\n testId,\n translate,\n ],\n );\n\n return (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n },\n);\n\nconst MemoizedPasswordField = memo(PasswordField);\nMemoizedPasswordField.displayName = \"PasswordField\";\n\nexport { MemoizedPasswordField as PasswordField };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAGEA,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ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E;IACF5C,QAAQ,EAAE4B,aAAc;IACxBrB,IAAI,EAAEC,YAAY,IAAIV,EAAG;IACzBW,QAAQ,EAAEA,QAAS;IACnBE,OAAO,EAAEA,OAAQ;IACjBC,MAAM,EAAEA,MAAO;IACfC,WAAW,EAAEA,WAAY;IACzBgC,QAAQ,EAAExC,UAAW;IACrBY,GAAG,EAAEA,GAAI;IACT6B,QAAQ,EAAE,CAAC3C,UAAW;IACtBY,SAAS,EAAEA,SAAU;IACrBgC,IAAI,EAAE5B;EAAU,CACjB,CACF,EACD,CACE3B,gBAAgB,EAChBI,eAAe,EACf6B,WAAW,EACXP,CAAC,EACDG,wBAAwB,EACxBF,SAAS,EACTX,YAAY,EACZC,QAAQ,EACRE,OAAO,EACPC,MAAM,EACNC,WAAW,EACXV,UAAU,EACVE,UAAU,EACVD,eAAe,EACfa,GAAG,EACHH,MAAM,EACNC,SAAS,CAEb,CAAC;EAED,OACE1B,IAAA,CAACL,KAAK;IACJO,eAAe,EAAEA,eAAgB;IACjCG,YAAY,EAAEA,YAAa;IAC3BC,gBAAgB,EAAEA,gBAAiB;IACnCqD,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACfpD,IAAI,EAAEA,IAAK;IACXC,EAAE,EAAEC,UAAW;IACfE,UAAU,EAAEA,UAAW;IACvBC,WAAW,EAAEA,WAAY;IACzBC,UAAU,EAAEA,UAAW;IACvBG,KAAK,EAAEA,KAAM;IACbyB,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMmB,qBAAqB,GAAGzE,IAAI,CAACa,aAAa,CAAC;AACjD4D,qBAAqB,CAACC,WAAW,GAAG,eAAe;AAEnD,SAASD,qBAAqB,IAAI5D,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"PasswordField.js","names":["forwardRef","memo","useCallback","useImperativeHandle","useRef","useState","ShowIcon","HideIcon","Field","useTranslation","getControlState","useInputValues","jsx","_jsx","PasswordField","ariaDescribedBy","autoCompleteType","defaultValue","errorMessage","errorMessageList","hasInitialFocus","hint","id","idOverride","inputRef","isDisabled","isFullWidth","isOptional","hasShowPassword","isReadOnly","label","name","nameOverride","onChange","onChangeProp","onFocus","onBlur","placeholder","testId","translate","value","ref","t","inputType","setInputType","togglePasswordVisibility","controlledStateRef","controlledValue","uncontrolledValue","inputValues","controlState","current","localInputRef","focus","event","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase","autoComplete","autoFocus","endAdornment","_InputAdornment","position","children","_IconButton","onClick","inputProps","role","readOnly","required","type","fieldType","hasVisibleLabel","MemoizedPasswordField","displayName"],"sources":["../../src/PasswordField.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { InputAdornment, InputBase, IconButton } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n memo,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\n\nimport { ShowIcon, HideIcon } from \"./icons.generated/index.js\";\nimport { Field } from \"./Field.js\";\nimport {\n FieldComponentProps,\n FieldComponentRenderProps,\n} from \"./FieldComponentProps.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\nimport { useTranslation } from \"react-i18next\";\nimport { FocusHandle, getControlState, useInputValues } from \"./inputUtils.js\";\n\nexport type PasswordFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: \"current-password\" | \"new-password\";\n /**\n * initial value for input. Use when component in uncontrolled.\n */\n defaultValue?: string;\n /**\n * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the show/hide icon is not shown to the user\n */\n hasShowPassword?: boolean;\n /**\n * The ref forwarded to the TextField\n */\n inputRef?: React.RefObject<FocusHandle>;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * The value of the `input` element. Use when component is controlled.\n */\n value?: string;\n} & FieldComponentProps &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\ntype FieldRenderProps = Partial<\n Pick<FieldComponentRenderProps, \"ariaDescribedBy\" | \"errorMessageElementId\">\n> &\n Pick<FieldComponentRenderProps, \"id\" | \"labelElementId\">;\n\nconst PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n (\n {\n ariaDescribedBy,\n autoCompleteType,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasInitialFocus,\n hint,\n id: idOverride,\n inputRef,\n isDisabled = false,\n isFullWidth = false,\n isOptional = false,\n hasShowPassword = true,\n isReadOnly,\n label,\n name: nameOverride,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n placeholder,\n testId,\n translate,\n value,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const [inputType, setInputType] = useState(\"password\");\n\n const togglePasswordVisibility = useCallback(() => {\n setInputType((inputType) =>\n inputType === \"password\" ? \"text\" : \"password\",\n );\n }, []);\n\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const localInputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(inputRef, () => {\n return {\n focus: () => {\n localInputRef.current?.focus();\n },\n };\n }, []);\n\n const onChange = useCallback<\n ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>\n >(\n (event) => {\n onChangeProp?.(event);\n },\n [onChangeProp],\n );\n\n const renderFieldComponent = useCallback(\n ({\n ariaDescribedBy,\n errorMessageElementId,\n id,\n labelElementId,\n }: FieldRenderProps) => (\n <InputBase\n {...inputValues}\n aria-describedby={ariaDescribedBy}\n autoComplete={inputType === \"password\" ? autoCompleteType : \"off\"}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n endAdornment={\n hasShowPassword && (\n <InputAdornment position=\"end\">\n <IconButton\n aria-controls={id}\n aria-label={t(\"passwordfield.icon.label.show\")}\n aria-pressed={inputType === \"text\"}\n onClick={togglePasswordVisibility}\n >\n {inputType === \"password\" ? <ShowIcon /> : <HideIcon />}\n </IconButton>\n </InputAdornment>\n )\n }\n id={id}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n // role: \"textbox\" Added because password inputs don't have an implicit role assigned. This causes problems with element selection.\n role: \"textbox\",\n }}\n inputRef={localInputRef}\n name={nameOverride ?? id}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n required={!isOptional}\n translate={translate}\n type={inputType}\n />\n ),\n [\n autoCompleteType,\n hasInitialFocus,\n inputValues,\n t,\n togglePasswordVisibility,\n inputType,\n nameOverride,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n isOptional,\n isReadOnly,\n hasShowPassword,\n ref,\n testId,\n translate,\n ],\n );\n\n return (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n },\n);\n\nconst MemoizedPasswordField = memo(PasswordField);\nMemoizedPasswordField.displayName = \"PasswordField\";\n\nexport { MemoizedPasswordField as PasswordField };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAGEA,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,4BAA4B;AAC/D,SAASC,KAAK,QAAQ,YAAY;AAMlC,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAAsBC,eAAe,EAAEC,cAAc,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAyD/E,MAAMC,aAAa,GAAGd,UAAU,CAC9B,CACE;EACEe,eAAe;EACfC,gBAAgB;EAChBC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,eAAe;EACfC,IAAI;EACJC,EAAE,EAAEC,UAAU;EACdC,QAAQ;EACRC,UAAU,GAAG,KAAK;EAClBC,WAAW,GAAG,KAAK;EACnBC,UAAU,GAAG,KAAK;EAClBC,eAAe,GAAG,IAAI;EACtBC,UAAU;EACVC,KAAK;EACLC,IAAI,EAAEC,YAAY;EAClBC,QAAQ,EAAEC,YAAY;EACtBC,OAAO;EACPC,MAAM;EACNC,WAAW;EACXC,MAAM;EACNC,SAAS;EACTC;AACF,CAAC,EACDC,GAAG,KACA;EACH,MAAM;IAAEC;EAAE,CAAC,GAAGjC,cAAc,CAAC,CAAC;EAC9B,MAAM,CAACkC,SAAS,EAAEC,YAAY,CAAC,GAAGvC,QAAQ,CAAC,UAAU,CAAC;EAEtD,MAAMwC,wBAAwB,GAAG3C,W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B,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMmB,qBAAqB,GAAGzE,IAAI,CAACa,aAAa,CAAC;AACjD4D,qBAAqB,CAACC,WAAW,GAAG,eAAe;AAEnD,SAASD,qBAAqB,IAAI5D,aAAa","ignoreList":[]}
@@ -68,57 +68,48 @@ const SelectContainer = styled.div`
68
68
  `;
69
69
  const ChipsPositioningContainer = styled("div", {
70
70
  shouldForwardProp: prop => prop !== "odysseyDesignTokens"
71
- })`
72
- display: flex;
73
- align-items: center;
74
- position: absolute;
75
- top: ${({
76
- odysseyDesignTokens
77
- }) => odysseyDesignTokens.Spacing0};
78
- right: ${({
79
- odysseyDesignTokens
80
- }) => odysseyDesignTokens.Spacing5};
81
- bottom: ${({
71
+ })(({
82
72
  odysseyDesignTokens
83
- }) => odysseyDesignTokens.Spacing0};
84
- left: ${({
85
- odysseyDesignTokens
86
- }) => odysseyDesignTokens.Spacing1};
87
- margin-inline-start: ${({
88
- odysseyDesignTokens
89
- }) => odysseyDesignTokens.BorderWidthMain};
90
- opacity: 1;
91
- pointer-events: none;
92
- `;
73
+ }) => {
74
+ return {
75
+ alignItems: "center",
76
+ display: "flex",
77
+ insetBlockEnd: 0,
78
+ insetBlockStart: 0,
79
+ insetInlineEnd: "25px",
80
+ insetInlineStart: "4px",
81
+ marginInlineStart: odysseyDesignTokens.BorderWidthMain,
82
+ opacity: 1,
83
+ pointerEvents: "none",
84
+ position: "absolute"
85
+ };
86
+ });
93
87
  const NonInteractiveIcon = styled(CloseCircleFilledIcon, {
94
88
  shouldForwardProp: prop => prop !== "odysseyDesignTokens"
95
- })`
96
- font-size: 1em;
97
- margin-inline-start: ${({
98
- odysseyDesignTokens
99
- }) => odysseyDesignTokens.Spacing2};
100
- margin-inline-end: -${({
89
+ })(({
101
90
  odysseyDesignTokens
102
- }) => odysseyDesignTokens.Spacing1};
103
- margin-block-end: -1px;
104
- `;
91
+ }) => ({
92
+ fontSize: "1em",
93
+ marginBlockEnd: "-1px",
94
+ marginInlineEnd: `-${odysseyDesignTokens.Spacing1}`,
95
+ marginInlineStart: odysseyDesignTokens.Spacing2
96
+ }));
105
97
  const ChipsInnerContainer = styled(_Box, {
106
98
  shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "isInteractive" && prop !== "isReadOnly"
107
- })`
108
- display: flex;
109
- flex-wrap: wrap;
110
- gap: ${({
111
- odysseyDesignTokens
112
- }) => odysseyDesignTokens.Spacing1};
113
- pointer-events: none;
114
- opacity: ${({
99
+ })(({
115
100
  isInteractive,
116
- isReadOnly
117
- }) => isInteractive || isReadOnly ? 1 : 0};
118
- min-height: ${({
101
+ isReadOnly,
119
102
  odysseyDesignTokens
120
- }) => odysseyDesignTokens.Spacing6};
121
- `;
103
+ }) => ({
104
+ display: "flex",
105
+ flexWrap: "wrap",
106
+ gap: odysseyDesignTokens.Spacing1,
107
+ marginBlock: `-${odysseyDesignTokens.Spacing2}`,
108
+ marginInlineEnd: odysseyDesignTokens.Spacing1,
109
+ minHeight: odysseyDesignTokens.Spacing6,
110
+ opacity: isInteractive || isReadOnly ? 1 : 0,
111
+ pointerEvents: "none"
112
+ }));
122
113
  const {
123
114
  CONTROLLED
124
115
  } = ComponentControlledState;