@okta/odyssey-react-mui 0.20.0 → 0.21.1

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 (322) hide show
  1. package/CHANGELOG.md +56 -5
  2. package/dist/Checkbox.js +39 -0
  3. package/dist/Checkbox.js.map +1 -0
  4. package/dist/CheckboxGroup.js +53 -0
  5. package/dist/CheckboxGroup.js.map +1 -0
  6. package/dist/OdysseyThemeProvider.js +4 -4
  7. package/dist/OdysseyThemeProvider.js.map +1 -1
  8. package/dist/Radio.js +11 -13
  9. package/dist/Radio.js.map +1 -1
  10. package/dist/RadioGroup.js +4 -14
  11. package/dist/RadioGroup.js.map +1 -1
  12. package/dist/TextField.js +25 -27
  13. package/dist/TextField.js.map +1 -1
  14. package/dist/index.js +4 -2
  15. package/dist/index.js.map +1 -1
  16. package/dist/src/Banner.d.ts.map +1 -0
  17. package/dist/src/Checkbox.d.ts +28 -0
  18. package/dist/src/Checkbox.d.ts.map +1 -0
  19. package/dist/src/CheckboxGroup.d.ts +24 -0
  20. package/dist/src/CheckboxGroup.d.ts.map +1 -0
  21. package/dist/src/Icon.d.ts +28 -0
  22. package/dist/src/Icon.d.ts.map +1 -0
  23. package/dist/src/Infobox.d.ts.map +1 -0
  24. package/dist/src/Link.d.ts +18 -0
  25. package/dist/src/Link.d.ts.map +1 -0
  26. package/dist/src/MenuButton.d.ts.map +1 -0
  27. package/dist/{MenuItem.d.ts → src/MenuItem.d.ts} +1 -1
  28. package/dist/src/MenuItem.d.ts.map +1 -0
  29. package/dist/src/OdysseyCacheProvider.d.ts.map +1 -0
  30. package/dist/{OdysseyThemeProvider.d.ts → src/OdysseyThemeProvider.d.ts} +3 -3
  31. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -0
  32. package/dist/{PasswordInput.d.ts → src/PasswordInput.d.ts} +1 -1
  33. package/dist/src/PasswordInput.d.ts.map +1 -0
  34. package/dist/{Radio.d.ts → src/Radio.d.ts} +6 -1
  35. package/dist/src/Radio.d.ts.map +1 -0
  36. package/dist/{RadioGroup.d.ts → src/RadioGroup.d.ts} +12 -5
  37. package/dist/src/RadioGroup.d.ts.map +1 -0
  38. package/dist/src/Status.d.ts.map +1 -0
  39. package/dist/{TextField.d.ts → src/TextField.d.ts} +23 -14
  40. package/dist/src/TextField.d.ts.map +1 -0
  41. package/dist/src/ThemeProvider.d.ts.map +1 -0
  42. package/dist/src/a11yCheck.d.ts.map +1 -0
  43. package/dist/src/createUniqueAlphabeticalId.d.ts.map +1 -0
  44. package/dist/src/createUniqueId.d.ts.map +1 -0
  45. package/dist/src/iconDictionary/Add.d.ts +16 -0
  46. package/dist/src/iconDictionary/Add.d.ts.map +1 -0
  47. package/dist/src/iconDictionary/AddCircle.d.ts +16 -0
  48. package/dist/src/iconDictionary/AddCircle.d.ts.map +1 -0
  49. package/dist/src/iconDictionary/AlertCircle.d.ts +16 -0
  50. package/dist/src/iconDictionary/AlertCircle.d.ts.map +1 -0
  51. package/dist/src/iconDictionary/AlertCircleFilled.d.ts +16 -0
  52. package/dist/src/iconDictionary/AlertCircleFilled.d.ts.map +1 -0
  53. package/dist/src/iconDictionary/AlertTriangleFilled.d.ts +16 -0
  54. package/dist/src/iconDictionary/AlertTriangleFilled.d.ts.map +1 -0
  55. package/dist/src/iconDictionary/Anchor.d.ts +16 -0
  56. package/dist/src/iconDictionary/Anchor.d.ts.map +1 -0
  57. package/dist/src/iconDictionary/ArrowDown.d.ts +16 -0
  58. package/dist/src/iconDictionary/ArrowDown.d.ts.map +1 -0
  59. package/dist/src/iconDictionary/ArrowLeft.d.ts +16 -0
  60. package/dist/src/iconDictionary/ArrowLeft.d.ts.map +1 -0
  61. package/dist/src/iconDictionary/ArrowRight.d.ts +16 -0
  62. package/dist/src/iconDictionary/ArrowRight.d.ts.map +1 -0
  63. package/dist/src/iconDictionary/ArrowUp.d.ts +16 -0
  64. package/dist/src/iconDictionary/ArrowUp.d.ts.map +1 -0
  65. package/dist/src/iconDictionary/ArrowUpDown.d.ts +16 -0
  66. package/dist/src/iconDictionary/ArrowUpDown.d.ts.map +1 -0
  67. package/dist/src/iconDictionary/Calendar.d.ts +16 -0
  68. package/dist/src/iconDictionary/Calendar.d.ts.map +1 -0
  69. package/dist/src/iconDictionary/Check.d.ts +16 -0
  70. package/dist/src/iconDictionary/Check.d.ts.map +1 -0
  71. package/dist/src/iconDictionary/CheckCircleFilled.d.ts +16 -0
  72. package/dist/src/iconDictionary/CheckCircleFilled.d.ts.map +1 -0
  73. package/dist/src/iconDictionary/ChevronDown.d.ts +16 -0
  74. package/dist/src/iconDictionary/ChevronDown.d.ts.map +1 -0
  75. package/dist/src/iconDictionary/ChevronUp.d.ts +16 -0
  76. package/dist/src/iconDictionary/ChevronUp.d.ts.map +1 -0
  77. package/dist/src/iconDictionary/Close.d.ts +16 -0
  78. package/dist/src/iconDictionary/Close.d.ts.map +1 -0
  79. package/dist/src/iconDictionary/CloseCircleFilled.d.ts +16 -0
  80. package/dist/src/iconDictionary/CloseCircleFilled.d.ts.map +1 -0
  81. package/dist/src/iconDictionary/Copy.d.ts +16 -0
  82. package/dist/src/iconDictionary/Copy.d.ts.map +1 -0
  83. package/dist/src/iconDictionary/Delete.d.ts +16 -0
  84. package/dist/src/iconDictionary/Delete.d.ts.map +1 -0
  85. package/dist/src/iconDictionary/Download.d.ts +16 -0
  86. package/dist/src/iconDictionary/Download.d.ts.map +1 -0
  87. package/dist/src/iconDictionary/DragHandle.d.ts +16 -0
  88. package/dist/src/iconDictionary/DragHandle.d.ts.map +1 -0
  89. package/dist/src/iconDictionary/Edit.d.ts +16 -0
  90. package/dist/src/iconDictionary/Edit.d.ts.map +1 -0
  91. package/dist/src/iconDictionary/ExternalLink.d.ts +16 -0
  92. package/dist/src/iconDictionary/ExternalLink.d.ts.map +1 -0
  93. package/dist/src/iconDictionary/Eye.d.ts +16 -0
  94. package/dist/src/iconDictionary/Eye.d.ts.map +1 -0
  95. package/dist/src/iconDictionary/EyeOff.d.ts +16 -0
  96. package/dist/src/iconDictionary/EyeOff.d.ts.map +1 -0
  97. package/dist/src/iconDictionary/Filter.d.ts +16 -0
  98. package/dist/src/iconDictionary/Filter.d.ts.map +1 -0
  99. package/dist/src/iconDictionary/Globe.d.ts +16 -0
  100. package/dist/src/iconDictionary/Globe.d.ts.map +1 -0
  101. package/dist/src/iconDictionary/Home.d.ts +16 -0
  102. package/dist/src/iconDictionary/Home.d.ts.map +1 -0
  103. package/dist/src/iconDictionary/InformationCircle.d.ts +16 -0
  104. package/dist/src/iconDictionary/InformationCircle.d.ts.map +1 -0
  105. package/dist/src/iconDictionary/InformationCircleFilled.d.ts +16 -0
  106. package/dist/src/iconDictionary/InformationCircleFilled.d.ts.map +1 -0
  107. package/dist/src/iconDictionary/Notification.d.ts +16 -0
  108. package/dist/src/iconDictionary/Notification.d.ts.map +1 -0
  109. package/dist/src/iconDictionary/OverflowVertical.d.ts +16 -0
  110. package/dist/src/iconDictionary/OverflowVertical.d.ts.map +1 -0
  111. package/dist/src/iconDictionary/QuestionCircle.d.ts +16 -0
  112. package/dist/src/iconDictionary/QuestionCircle.d.ts.map +1 -0
  113. package/dist/src/iconDictionary/QuestionCircleFilled.d.ts +16 -0
  114. package/dist/src/iconDictionary/QuestionCircleFilled.d.ts.map +1 -0
  115. package/dist/src/iconDictionary/Search.d.ts +16 -0
  116. package/dist/src/iconDictionary/Search.d.ts.map +1 -0
  117. package/dist/src/iconDictionary/Settings.d.ts +16 -0
  118. package/dist/src/iconDictionary/Settings.d.ts.map +1 -0
  119. package/dist/src/iconDictionary/Subtract.d.ts +16 -0
  120. package/dist/src/iconDictionary/Subtract.d.ts.map +1 -0
  121. package/dist/src/iconDictionary/SvgIcon.d.ts.map +1 -0
  122. package/dist/src/iconDictionary/User.d.ts +16 -0
  123. package/dist/src/iconDictionary/User.d.ts.map +1 -0
  124. package/dist/src/iconDictionary/UserGroup.d.ts +16 -0
  125. package/dist/src/iconDictionary/UserGroup.d.ts.map +1 -0
  126. package/dist/src/iconDictionary/index.d.ts +94 -0
  127. package/dist/src/iconDictionary/index.d.ts.map +1 -0
  128. package/dist/src/iconDictionary/types.d.ts.map +1 -0
  129. package/dist/src/index.d.ts +50 -0
  130. package/dist/src/index.d.ts.map +1 -0
  131. package/dist/src/theme/OdysseyTheme.d.ts +23 -0
  132. package/dist/src/theme/OdysseyTheme.d.ts.map +1 -0
  133. package/dist/src/theme/components.d.ts.map +1 -0
  134. package/dist/src/theme/components.types.d.ts.map +1 -0
  135. package/dist/{theme → src/theme}/index.d.ts +1 -0
  136. package/dist/src/theme/index.d.ts.map +1 -0
  137. package/dist/src/theme/mixins.d.ts.map +1 -0
  138. package/dist/src/theme/mixins.types.d.ts.map +1 -0
  139. package/dist/src/theme/palette.d.ts.map +1 -0
  140. package/dist/src/theme/palette.types.d.ts.map +1 -0
  141. package/dist/src/theme/shape.d.ts.map +1 -0
  142. package/dist/src/theme/spacing.d.ts.map +1 -0
  143. package/dist/src/theme/temp.d.ts +16 -0
  144. package/dist/src/theme/temp.d.ts.map +1 -0
  145. package/dist/{theme → src/theme}/theme.d.ts +2 -1
  146. package/dist/src/theme/theme.d.ts.map +1 -0
  147. package/dist/src/theme/typography.d.ts.map +1 -0
  148. package/dist/src/theme/typography.types.d.ts.map +1 -0
  149. package/dist/src/theme/useTheme.d.ts +14 -0
  150. package/dist/src/theme/useTheme.d.ts.map +1 -0
  151. package/dist/src/useUniqueAlphabeticalId.d.ts.map +1 -0
  152. package/dist/src/useUniqueId.d.ts.map +1 -0
  153. package/dist/theme/OdysseyTheme.js +2 -0
  154. package/dist/theme/OdysseyTheme.js.map +1 -0
  155. package/dist/theme/components.js +12 -4
  156. package/dist/theme/components.js.map +1 -1
  157. package/dist/theme/index.js +1 -0
  158. package/dist/theme/index.js.map +1 -1
  159. package/dist/theme/temp.js +15 -0
  160. package/dist/theme/temp.js.map +1 -0
  161. package/dist/theme/theme.js +2 -0
  162. package/dist/theme/theme.js.map +1 -1
  163. package/dist/theme/useTheme.js +16 -0
  164. package/dist/theme/useTheme.js.map +1 -0
  165. package/dist/tsconfig.production.tsbuildinfo +1 -0
  166. package/package.json +6 -5
  167. package/src/Checkbox.tsx +62 -0
  168. package/src/CheckboxGroup.tsx +73 -0
  169. package/src/OdysseyThemeProvider.tsx +6 -10
  170. package/src/Radio.tsx +26 -3
  171. package/src/RadioGroup.tsx +16 -5
  172. package/src/TextField.tsx +134 -115
  173. package/src/index.ts +10 -5
  174. package/src/theme/OdysseyTheme.ts +25 -0
  175. package/src/theme/components.tsx +10 -2
  176. package/src/theme/index.ts +1 -0
  177. package/src/theme/temp.ts +19 -0
  178. package/src/theme/theme.ts +4 -1
  179. package/src/theme/useTheme.ts +18 -0
  180. package/tsconfig.production.json +3 -2
  181. package/dist/Banner.d.ts.map +0 -1
  182. package/dist/Icon.d.ts +0 -28
  183. package/dist/Icon.d.ts.map +0 -1
  184. package/dist/Infobox.d.ts.map +0 -1
  185. package/dist/Link.d.ts +0 -18
  186. package/dist/Link.d.ts.map +0 -1
  187. package/dist/MenuButton.d.ts.map +0 -1
  188. package/dist/MenuItem.d.ts.map +0 -1
  189. package/dist/OdysseyCacheProvider.d.ts.map +0 -1
  190. package/dist/OdysseyThemeProvider.d.ts.map +0 -1
  191. package/dist/PasswordInput.d.ts.map +0 -1
  192. package/dist/Radio.d.ts.map +0 -1
  193. package/dist/RadioGroup.d.ts.map +0 -1
  194. package/dist/Status.d.ts.map +0 -1
  195. package/dist/TextField.d.ts.map +0 -1
  196. package/dist/ThemeProvider.d.ts.map +0 -1
  197. package/dist/a11yCheck.d.ts.map +0 -1
  198. package/dist/createUniqueAlphabeticalId.d.ts.map +0 -1
  199. package/dist/createUniqueId.d.ts.map +0 -1
  200. package/dist/iconDictionary/Add.d.ts +0 -16
  201. package/dist/iconDictionary/Add.d.ts.map +0 -1
  202. package/dist/iconDictionary/AddCircle.d.ts +0 -16
  203. package/dist/iconDictionary/AddCircle.d.ts.map +0 -1
  204. package/dist/iconDictionary/AlertCircle.d.ts +0 -16
  205. package/dist/iconDictionary/AlertCircle.d.ts.map +0 -1
  206. package/dist/iconDictionary/AlertCircleFilled.d.ts +0 -16
  207. package/dist/iconDictionary/AlertCircleFilled.d.ts.map +0 -1
  208. package/dist/iconDictionary/AlertTriangleFilled.d.ts +0 -16
  209. package/dist/iconDictionary/AlertTriangleFilled.d.ts.map +0 -1
  210. package/dist/iconDictionary/Anchor.d.ts +0 -16
  211. package/dist/iconDictionary/Anchor.d.ts.map +0 -1
  212. package/dist/iconDictionary/ArrowDown.d.ts +0 -16
  213. package/dist/iconDictionary/ArrowDown.d.ts.map +0 -1
  214. package/dist/iconDictionary/ArrowLeft.d.ts +0 -16
  215. package/dist/iconDictionary/ArrowLeft.d.ts.map +0 -1
  216. package/dist/iconDictionary/ArrowRight.d.ts +0 -16
  217. package/dist/iconDictionary/ArrowRight.d.ts.map +0 -1
  218. package/dist/iconDictionary/ArrowUp.d.ts +0 -16
  219. package/dist/iconDictionary/ArrowUp.d.ts.map +0 -1
  220. package/dist/iconDictionary/ArrowUpDown.d.ts +0 -16
  221. package/dist/iconDictionary/ArrowUpDown.d.ts.map +0 -1
  222. package/dist/iconDictionary/Calendar.d.ts +0 -16
  223. package/dist/iconDictionary/Calendar.d.ts.map +0 -1
  224. package/dist/iconDictionary/Check.d.ts +0 -16
  225. package/dist/iconDictionary/Check.d.ts.map +0 -1
  226. package/dist/iconDictionary/CheckCircleFilled.d.ts +0 -16
  227. package/dist/iconDictionary/CheckCircleFilled.d.ts.map +0 -1
  228. package/dist/iconDictionary/ChevronDown.d.ts +0 -16
  229. package/dist/iconDictionary/ChevronDown.d.ts.map +0 -1
  230. package/dist/iconDictionary/ChevronUp.d.ts +0 -16
  231. package/dist/iconDictionary/ChevronUp.d.ts.map +0 -1
  232. package/dist/iconDictionary/Close.d.ts +0 -16
  233. package/dist/iconDictionary/Close.d.ts.map +0 -1
  234. package/dist/iconDictionary/CloseCircleFilled.d.ts +0 -16
  235. package/dist/iconDictionary/CloseCircleFilled.d.ts.map +0 -1
  236. package/dist/iconDictionary/Copy.d.ts +0 -16
  237. package/dist/iconDictionary/Copy.d.ts.map +0 -1
  238. package/dist/iconDictionary/Delete.d.ts +0 -16
  239. package/dist/iconDictionary/Delete.d.ts.map +0 -1
  240. package/dist/iconDictionary/Download.d.ts +0 -16
  241. package/dist/iconDictionary/Download.d.ts.map +0 -1
  242. package/dist/iconDictionary/DragHandle.d.ts +0 -16
  243. package/dist/iconDictionary/DragHandle.d.ts.map +0 -1
  244. package/dist/iconDictionary/Edit.d.ts +0 -16
  245. package/dist/iconDictionary/Edit.d.ts.map +0 -1
  246. package/dist/iconDictionary/ExternalLink.d.ts +0 -16
  247. package/dist/iconDictionary/ExternalLink.d.ts.map +0 -1
  248. package/dist/iconDictionary/Eye.d.ts +0 -16
  249. package/dist/iconDictionary/Eye.d.ts.map +0 -1
  250. package/dist/iconDictionary/EyeOff.d.ts +0 -16
  251. package/dist/iconDictionary/EyeOff.d.ts.map +0 -1
  252. package/dist/iconDictionary/Filter.d.ts +0 -16
  253. package/dist/iconDictionary/Filter.d.ts.map +0 -1
  254. package/dist/iconDictionary/Globe.d.ts +0 -16
  255. package/dist/iconDictionary/Globe.d.ts.map +0 -1
  256. package/dist/iconDictionary/Home.d.ts +0 -16
  257. package/dist/iconDictionary/Home.d.ts.map +0 -1
  258. package/dist/iconDictionary/InformationCircle.d.ts +0 -16
  259. package/dist/iconDictionary/InformationCircle.d.ts.map +0 -1
  260. package/dist/iconDictionary/InformationCircleFilled.d.ts +0 -16
  261. package/dist/iconDictionary/InformationCircleFilled.d.ts.map +0 -1
  262. package/dist/iconDictionary/Notification.d.ts +0 -16
  263. package/dist/iconDictionary/Notification.d.ts.map +0 -1
  264. package/dist/iconDictionary/OverflowVertical.d.ts +0 -16
  265. package/dist/iconDictionary/OverflowVertical.d.ts.map +0 -1
  266. package/dist/iconDictionary/QuestionCircle.d.ts +0 -16
  267. package/dist/iconDictionary/QuestionCircle.d.ts.map +0 -1
  268. package/dist/iconDictionary/QuestionCircleFilled.d.ts +0 -16
  269. package/dist/iconDictionary/QuestionCircleFilled.d.ts.map +0 -1
  270. package/dist/iconDictionary/Search.d.ts +0 -16
  271. package/dist/iconDictionary/Search.d.ts.map +0 -1
  272. package/dist/iconDictionary/Settings.d.ts +0 -16
  273. package/dist/iconDictionary/Settings.d.ts.map +0 -1
  274. package/dist/iconDictionary/Subtract.d.ts +0 -16
  275. package/dist/iconDictionary/Subtract.d.ts.map +0 -1
  276. package/dist/iconDictionary/SvgIcon.d.ts.map +0 -1
  277. package/dist/iconDictionary/User.d.ts +0 -16
  278. package/dist/iconDictionary/User.d.ts.map +0 -1
  279. package/dist/iconDictionary/UserGroup.d.ts +0 -16
  280. package/dist/iconDictionary/UserGroup.d.ts.map +0 -1
  281. package/dist/iconDictionary/index.d.ts +0 -94
  282. package/dist/iconDictionary/index.d.ts.map +0 -1
  283. package/dist/iconDictionary/types.d.ts.map +0 -1
  284. package/dist/index.d.ts +0 -36
  285. package/dist/index.d.ts.map +0 -1
  286. package/dist/theme/components.d.ts.map +0 -1
  287. package/dist/theme/components.types.d.ts.map +0 -1
  288. package/dist/theme/index.d.ts.map +0 -1
  289. package/dist/theme/mixins.d.ts.map +0 -1
  290. package/dist/theme/mixins.types.d.ts.map +0 -1
  291. package/dist/theme/palette.d.ts.map +0 -1
  292. package/dist/theme/palette.types.d.ts.map +0 -1
  293. package/dist/theme/shape.d.ts.map +0 -1
  294. package/dist/theme/spacing.d.ts.map +0 -1
  295. package/dist/theme/theme.d.ts.map +0 -1
  296. package/dist/theme/typography.d.ts.map +0 -1
  297. package/dist/theme/typography.types.d.ts.map +0 -1
  298. package/dist/useUniqueAlphabeticalId.d.ts.map +0 -1
  299. package/dist/useUniqueId.d.ts.map +0 -1
  300. /package/dist/{Banner.d.ts → src/Banner.d.ts} +0 -0
  301. /package/dist/{Infobox.d.ts → src/Infobox.d.ts} +0 -0
  302. /package/dist/{MenuButton.d.ts → src/MenuButton.d.ts} +0 -0
  303. /package/dist/{OdysseyCacheProvider.d.ts → src/OdysseyCacheProvider.d.ts} +0 -0
  304. /package/dist/{Status.d.ts → src/Status.d.ts} +0 -0
  305. /package/dist/{ThemeProvider.d.ts → src/ThemeProvider.d.ts} +0 -0
  306. /package/dist/{a11yCheck.d.ts → src/a11yCheck.d.ts} +0 -0
  307. /package/dist/{createUniqueAlphabeticalId.d.ts → src/createUniqueAlphabeticalId.d.ts} +0 -0
  308. /package/dist/{createUniqueId.d.ts → src/createUniqueId.d.ts} +0 -0
  309. /package/dist/{iconDictionary → src/iconDictionary}/SvgIcon.d.ts +0 -0
  310. /package/dist/{iconDictionary → src/iconDictionary}/types.d.ts +0 -0
  311. /package/dist/{theme → src/theme}/components.d.ts +0 -0
  312. /package/dist/{theme → src/theme}/components.types.d.ts +0 -0
  313. /package/dist/{theme → src/theme}/mixins.d.ts +0 -0
  314. /package/dist/{theme → src/theme}/mixins.types.d.ts +0 -0
  315. /package/dist/{theme → src/theme}/palette.d.ts +0 -0
  316. /package/dist/{theme → src/theme}/palette.types.d.ts +0 -0
  317. /package/dist/{theme → src/theme}/shape.d.ts +0 -0
  318. /package/dist/{theme → src/theme}/spacing.d.ts +0 -0
  319. /package/dist/{theme → src/theme}/typography.d.ts +0 -0
  320. /package/dist/{theme → src/theme}/typography.types.d.ts +0 -0
  321. /package/dist/{useUniqueAlphabeticalId.d.ts → src/useUniqueAlphabeticalId.d.ts} +0 -0
  322. /package/dist/{useUniqueId.d.ts → src/useUniqueId.d.ts} +0 -0
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "0.20.0",
3
+ "version": "0.21.1",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
7
7
  "sideEffects": false,
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
10
- "types": "dist/index.d.ts",
10
+ "types": "dist/src/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
- "default": "./dist/index.js"
13
+ "default": "./dist/index.js",
14
+ "types": "./dist/src/index.d.ts"
14
15
  }
15
16
  },
16
17
  "repository": {
@@ -24,7 +25,7 @@
24
25
  "@mui/lab": "^5.0.0-alpha.117",
25
26
  "@mui/material": "^5.11.6",
26
27
  "@mui/utils": "^5.11.2",
27
- "@okta/odyssey-design-tokens": "0.20.0"
28
+ "@okta/odyssey-design-tokens": "0.21.1"
28
29
  },
29
30
  "peerDependencies": {
30
31
  "@emotion/react": "^11",
@@ -32,5 +33,5 @@
32
33
  "react": ">=17 <19",
33
34
  "react-dom": ">=17 <19"
34
35
  },
35
- "gitHead": "382b19347c2f403f081d4e6a5efcee732c81aacc"
36
+ "gitHead": "721bec01e965f923e751749922e1073f63066783"
36
37
  }
@@ -0,0 +1,62 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { Checkbox as MuiCheckbox } from "@mui/material";
14
+ import { ChangeEventHandler, memo } from "react";
15
+
16
+ import { FormControlLabel } from ".";
17
+
18
+ export type CheckboxProps = {
19
+ ariaLabel?: string;
20
+ ariaLabelledBy?: string;
21
+ isChecked?: boolean;
22
+ isDefaultChecked?: boolean;
23
+ isDisabled?: boolean;
24
+ hasError?: boolean;
25
+ isIndeterminate?: boolean;
26
+ label?: string;
27
+ name?: string;
28
+ onChange?: ChangeEventHandler<EventTarget>;
29
+ value?: string;
30
+ };
31
+
32
+ const Checkbox = ({
33
+ ariaLabel,
34
+ ariaLabelledBy,
35
+ isChecked,
36
+ isDefaultChecked,
37
+ isDisabled,
38
+ isIndeterminate,
39
+ hasError,
40
+ label,
41
+ name,
42
+ onChange,
43
+ value,
44
+ }: CheckboxProps) => (
45
+ <FormControlLabel
46
+ aria-label={ariaLabel}
47
+ aria-labelledby={ariaLabelledBy}
48
+ checked={isChecked}
49
+ className={hasError ? "Mui-error" : ""}
50
+ control={<MuiCheckbox indeterminate={isIndeterminate} />}
51
+ defaultChecked={isDefaultChecked}
52
+ disabled={isDisabled}
53
+ label={label}
54
+ name={name}
55
+ onChange={onChange}
56
+ value={value}
57
+ />
58
+ );
59
+
60
+ const MemoizedCheckbox = memo(Checkbox);
61
+
62
+ export { MemoizedCheckbox as Checkbox };
@@ -0,0 +1,73 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { memo, ReactElement, useMemo } from "react";
14
+
15
+ import {
16
+ Checkbox,
17
+ FormControl,
18
+ FormGroup,
19
+ FormHelperText,
20
+ FormLabel,
21
+ visuallyHidden,
22
+ } from ".";
23
+
24
+ export type CheckboxGroupProps = {
25
+ children:
26
+ | ReactElement<typeof Checkbox>
27
+ | Array<ReactElement<typeof Checkbox>>;
28
+ errorMessage?: string;
29
+ hint?: string;
30
+ isDisabled?: boolean;
31
+ label?: string;
32
+ name?: string;
33
+ };
34
+
35
+ const CheckboxGroup = ({
36
+ children,
37
+ isDisabled,
38
+ errorMessage,
39
+ hint,
40
+ label,
41
+ name,
42
+ }: CheckboxGroupProps) => {
43
+ const ariaDescribedBy = useMemo(
44
+ () =>
45
+ errorMessage || hint
46
+ ? [hint && `${name}-hint`, errorMessage && `${name}-error`]
47
+ .filter(Boolean)
48
+ .join(" ")
49
+ : undefined,
50
+ [errorMessage, hint, name]
51
+ );
52
+
53
+ return (
54
+ <FormControl
55
+ component="fieldset"
56
+ disabled={isDisabled}
57
+ error={Boolean(errorMessage)}
58
+ >
59
+ {label && <FormLabel component="legend">{label}</FormLabel>}
60
+ {hint && <FormHelperText id={`${name}-hint`}>{hint}</FormHelperText>}
61
+ <FormGroup aria-describedby={ariaDescribedBy}>{children}</FormGroup>
62
+ {errorMessage && (
63
+ <FormHelperText id={`${name}-error`} error>
64
+ <span style={visuallyHidden}>Error:</span> {errorMessage}
65
+ </FormHelperText>
66
+ )}
67
+ </FormControl>
68
+ );
69
+ };
70
+
71
+ const MemoizedCheckboxGroup = memo(CheckboxGroup);
72
+
73
+ export { MemoizedCheckboxGroup as CheckboxGroup };
@@ -10,26 +10,22 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {
14
- createTheme,
15
- ThemeOptions,
16
- ThemeProvider as MuiThemeProvider,
17
- } from "@mui/material/styles";
18
- import { deepmerge } from "@mui/utils";
13
+ import { ThemeProvider as MuiThemeProvider } from "@mui/material/styles";
19
14
  import { memo, ReactElement, useMemo } from "react";
20
15
 
16
+ import { createTheme, deepmerge, ThemeOptions } from ".";
21
17
  import { odysseyTheme } from "./theme";
22
18
 
23
19
  const OdysseyThemeProvider = ({
24
20
  children,
25
- customTheme,
21
+ themeOverride,
26
22
  }: {
27
23
  children: ReactElement;
28
- customTheme?: ThemeOptions;
24
+ themeOverride?: ThemeOptions;
29
25
  }) => {
30
26
  const customOdysseyTheme = useMemo(
31
- () => customTheme && createTheme(deepmerge(odysseyTheme, customTheme)),
32
- [customTheme]
27
+ () => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)),
28
+ [themeOverride]
33
29
  );
34
30
 
35
31
  return (
package/src/Radio.tsx CHANGED
@@ -10,17 +10,40 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { FormControlLabel } from "./";
14
13
  import { Radio as MuiRadio } from "@mui/material";
15
14
  import { memo } from "react";
16
15
 
16
+ import { FormControlLabel } from ".";
17
+
17
18
  export type RadioProps = {
19
+ isChecked?: boolean;
20
+ isDefaultChecked?: boolean;
21
+ isDisabled?: boolean;
22
+ hasError?: boolean;
18
23
  label: string;
24
+ name?: string;
19
25
  value: string;
20
26
  };
21
27
 
22
- const Radio = ({ label, value }: RadioProps) => (
23
- <FormControlLabel control={<MuiRadio />} label={label} value={value} />
28
+ const Radio = ({
29
+ isChecked,
30
+ isDefaultChecked,
31
+ isDisabled,
32
+ hasError,
33
+ label,
34
+ name,
35
+ value,
36
+ }: RadioProps) => (
37
+ <FormControlLabel
38
+ checked={isChecked}
39
+ className={hasError ? "Mui-error" : ""}
40
+ control={<MuiRadio />}
41
+ defaultChecked={isDefaultChecked}
42
+ disabled={isDisabled}
43
+ label={label}
44
+ name={name}
45
+ value={value}
46
+ />
24
47
  );
25
48
 
26
49
  const MemoizedRadio = memo(Radio);
@@ -10,6 +10,9 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import { RadioGroup as MuiRadioGroup } from "@mui/material";
14
+ import { ChangeEventHandler, memo, ReactElement, useMemo } from "react";
15
+
13
16
  import {
14
17
  FormControl,
15
18
  FormLabel,
@@ -17,9 +20,8 @@ import {
17
20
  visuallyHidden,
18
21
  Radio,
19
22
  useUniqueId,
20
- } from "./";
21
- import { RadioGroup as MuiRadioGroup } from "@mui/material";
22
- import { memo, ReactElement, useMemo } from "react";
23
+ RadioProps,
24
+ } from ".";
23
25
 
24
26
  export interface RadioGroupProps {
25
27
  /**
@@ -47,10 +49,17 @@ export interface RadioGroupProps {
47
49
  */
48
50
  label: string;
49
51
  /**
50
- * The name of the radio group, which only needs to be changed
51
- * if there are multiple radio groups on the same screen
52
+ * The name of the radio group, which only needs to be changed if there are multiple radio groups on the same screen
52
53
  */
53
54
  name?: string;
55
+ /**
56
+ * Listen for changes in the browser that change `value`.
57
+ */
58
+ onChange?: ChangeEventHandler<EventTarget>;
59
+ /**
60
+ * The `value` on the selected radio button.
61
+ */
62
+ value?: RadioProps["value"];
54
63
  }
55
64
 
56
65
  const RadioGroup = ({
@@ -61,6 +70,7 @@ const RadioGroup = ({
61
70
  isDisabled,
62
71
  label,
63
72
  name,
73
+ onChange,
64
74
  }: RadioGroupProps) => {
65
75
  const ariaDescribedBy = useMemo(
66
76
  () =>
@@ -88,6 +98,7 @@ const RadioGroup = ({
88
98
  aria-describedby={ariaDescribedBy}
89
99
  defaultValue={defaultValue}
90
100
  name={uniqueName}
101
+ onChange={onChange}
91
102
  >
92
103
  {children}
93
104
  </MuiRadioGroup>
package/src/TextField.tsx CHANGED
@@ -10,6 +10,12 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import {
14
+ InputAdornment,
15
+ InputBase,
16
+ InputBaseProps,
17
+ InputLabel,
18
+ } from "@mui/material";
13
19
  import {
14
20
  ChangeEventHandler,
15
21
  FocusEventHandler,
@@ -22,19 +28,17 @@ import {
22
28
  useMemo,
23
29
  useState,
24
30
  } from "react";
31
+
25
32
  import {
26
33
  EyeIcon,
27
34
  EyeOffIcon,
28
35
  FormControl,
29
36
  FormHelperText,
30
37
  IconButton,
31
- InputAdornment,
32
- InputBase,
33
- InputLabel,
34
38
  SearchIcon,
35
39
  Typography,
36
- visuallyHidden,
37
40
  useUniqueId,
41
+ visuallyHidden,
38
42
  } from "./";
39
43
 
40
44
  export type TextFieldProps = {
@@ -44,10 +48,6 @@ export type TextFieldProps = {
44
48
  * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
45
49
  */
46
50
  autoCompleteType?: InputHTMLAttributes<HTMLInputElement>["autoComplete"];
47
- /**
48
- * If `true`, the component is disabled.
49
- */
50
- isDisabled?: boolean;
51
51
  /**
52
52
  * End `InputAdornment` for this component.
53
53
  */
@@ -65,13 +65,33 @@ export type TextFieldProps = {
65
65
  */
66
66
  id?: string;
67
67
  /**
68
- * The label for the `input` element.
68
+ * Props that go onto the HTML `input` element.
69
69
  */
70
- label?: string;
70
+ inputProps?: InputBaseProps["inputProps"];
71
+ /**
72
+ * If `true`, the component is disabled.
73
+ */
74
+ isDisabled?: boolean;
71
75
  /**
72
76
  * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
73
77
  */
74
78
  isMultiline?: boolean;
79
+ /**
80
+ * It prevents the user from changing the value of the field
81
+ */
82
+ isReadOnly?: boolean;
83
+ /**
84
+ * If `true`, the `input` element is required.
85
+ */
86
+ isRequired?: boolean;
87
+ /**
88
+ * The label for the `input` element.
89
+ */
90
+ label?: string;
91
+ /**
92
+ * Callback fired when the `input` element loses focus.
93
+ */
94
+ onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
75
95
  /**
76
96
  * Callback fired when the value is changed.
77
97
  */
@@ -88,14 +108,6 @@ export type TextFieldProps = {
88
108
  * The short hint displayed in the `input` before the user enters a value.
89
109
  */
90
110
  placeholder?: string;
91
- /**
92
- * It prevents the user from changing the value of the field
93
- */
94
- isReadOnly?: boolean;
95
- /**
96
- * If `true`, the `input` element is required.
97
- */
98
- isRequired?: boolean;
99
111
  /**
100
112
  * Start `InputAdornment` for this component.
101
113
  */
@@ -110,110 +122,117 @@ export type TextFieldProps = {
110
122
  value?: unknown;
111
123
  };
112
124
 
113
- const TextField = forwardRef<HTMLInputElement, TextFieldProps>((props, ref) => {
114
- const {
115
- autoCompleteType,
116
- isDisabled = false,
117
- endAdornment,
118
- errorMessage,
119
- hint,
120
- id: idOverride,
121
- label,
122
- isMultiline = false,
123
- onChange,
124
- onFocus,
125
- optionalLabel,
126
- placeholder,
127
- isReadOnly,
128
- isRequired = true,
129
- startAdornment,
130
- type = "text",
131
- value,
132
- } = props;
125
+ const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
126
+ (
127
+ {
128
+ autoCompleteType,
129
+ endAdornment,
130
+ errorMessage,
131
+ hint,
132
+ id: idOverride,
133
+ inputProps = {},
134
+ isDisabled = false,
135
+ isMultiline = false,
136
+ isReadOnly,
137
+ isRequired = true,
138
+ label,
139
+ onChange,
140
+ onFocus,
141
+ onBlur,
142
+ optionalLabel,
143
+ placeholder,
144
+ startAdornment,
145
+ type = "text",
146
+ value,
147
+ },
148
+ ref
149
+ ) => {
150
+ const [inputType, setInputType] = useState(type);
133
151
 
134
- const [inputType, setInputType] = useState(type);
152
+ useEffect(() => {
153
+ setInputType(type);
154
+ }, [type]);
135
155
 
136
- useEffect(() => {
137
- setInputType(type);
138
- }, [type]);
156
+ const togglePasswordVisibility = useCallback(() => {
157
+ setInputType((currentType) =>
158
+ currentType === "password" ? "text" : "password"
159
+ );
160
+ }, []);
139
161
 
140
- const togglePasswordVisibility = useCallback(() => {
141
- setInputType((currentType) =>
142
- currentType === "password" ? "text" : "password"
143
- );
144
- }, []);
162
+ const id = useUniqueId(idOverride);
163
+ const hintId = hint ? `${id}-hint` : undefined;
164
+ const errorId = errorMessage ? `${id}-error` : undefined;
165
+ const labelId = label ? `${id}-label` : undefined;
145
166
 
146
- const id = useUniqueId(idOverride);
147
- const hintId = hint ? `${id}-hint` : undefined;
148
- const errorId = errorMessage ? `${id}-error` : undefined;
149
- const labelId = label ? `${id}-label` : undefined;
167
+ const localInputProps = useMemo(() => {
168
+ const ariaDescribedBy =
169
+ errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId;
150
170
 
151
- const inputProps = useMemo(
152
- () =>
153
- errorId || hintId
154
- ? {
155
- "aria-describedby":
156
- errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId,
157
- }
158
- : undefined,
159
- [errorId, hintId]
160
- );
171
+ return {
172
+ ...inputProps,
173
+ "aria-describedby":
174
+ inputProps["aria-describedby"]?.concat(` ${ariaDescribedBy}`) ??
175
+ ariaDescribedBy,
176
+ };
177
+ }, [errorId, hintId, inputProps]);
161
178
 
162
- return (
163
- <FormControl disabled={isDisabled} error={Boolean(errorMessage)}>
164
- <InputLabel htmlFor={id} id={labelId}>
165
- {label}
166
- {!isRequired && (
167
- <Typography variant="subtitle1">{optionalLabel}</Typography>
179
+ return (
180
+ <FormControl disabled={isDisabled} error={Boolean(errorMessage)}>
181
+ <InputLabel htmlFor={id} id={labelId}>
182
+ {label}
183
+ {!isRequired && (
184
+ <Typography variant="subtitle1">{optionalLabel}</Typography>
185
+ )}
186
+ </InputLabel>
187
+ {hint && <FormHelperText id={hintId}>{hint}</FormHelperText>}
188
+ <InputBase
189
+ autoComplete={autoCompleteType}
190
+ endAdornment={
191
+ inputType === "password" ? (
192
+ <InputAdornment position="end">
193
+ <IconButton
194
+ aria-label="toggle password visibility"
195
+ edge="end"
196
+ onClick={togglePasswordVisibility}
197
+ >
198
+ {inputType === "password" ? <EyeIcon /> : <EyeOffIcon />}
199
+ </IconButton>
200
+ </InputAdornment>
201
+ ) : (
202
+ endAdornment
203
+ )
204
+ }
205
+ id={id}
206
+ inputProps={localInputProps}
207
+ multiline={isMultiline}
208
+ onChange={onChange}
209
+ onFocus={onFocus}
210
+ onBlur={onBlur}
211
+ placeholder={placeholder}
212
+ readOnly={isReadOnly}
213
+ ref={ref}
214
+ startAdornment={
215
+ inputType === "search" ? (
216
+ <InputAdornment position="start">
217
+ <SearchIcon />
218
+ </InputAdornment>
219
+ ) : (
220
+ startAdornment
221
+ )
222
+ }
223
+ type={inputType}
224
+ value={value}
225
+ />
226
+ {errorMessage && (
227
+ <FormHelperText error id={errorId}>
228
+ <span style={visuallyHidden}>Error:</span>
229
+ {errorMessage}
230
+ </FormHelperText>
168
231
  )}
169
- </InputLabel>
170
- {hint && <FormHelperText id={hintId}>{hint}</FormHelperText>}
171
- <InputBase
172
- autoComplete={autoCompleteType}
173
- endAdornment={
174
- inputType === "password" ? (
175
- <InputAdornment position="end">
176
- <IconButton
177
- aria-label="toggle password visibility"
178
- edge="end"
179
- onClick={togglePasswordVisibility}
180
- >
181
- {inputType === "password" ? <EyeIcon /> : <EyeOffIcon />}
182
- </IconButton>
183
- </InputAdornment>
184
- ) : (
185
- endAdornment
186
- )
187
- }
188
- id={id}
189
- inputProps={inputProps}
190
- multiline={isMultiline}
191
- onChange={onChange}
192
- onFocus={onFocus}
193
- placeholder={placeholder}
194
- readOnly={isReadOnly}
195
- ref={ref}
196
- startAdornment={
197
- inputType === "search" ? (
198
- <InputAdornment position="start">
199
- <SearchIcon />
200
- </InputAdornment>
201
- ) : (
202
- startAdornment
203
- )
204
- }
205
- type={inputType}
206
- value={value}
207
- />
208
- {errorMessage && (
209
- <FormHelperText error id={errorId}>
210
- <span style={visuallyHidden}>Error:</span>
211
- {errorMessage}
212
- </FormHelperText>
213
- )}
214
- </FormControl>
215
- );
216
- });
232
+ </FormControl>
233
+ );
234
+ }
235
+ );
217
236
 
218
237
  const MemoizedTextField = memo(TextField);
219
238
 
package/src/index.ts CHANGED
@@ -15,9 +15,9 @@ export {
15
15
  AlertTitle,
16
16
  Box,
17
17
  Button,
18
- Checkbox,
19
18
  Chip,
20
19
  CircularProgress,
20
+ createTheme,
21
21
  CssBaseline,
22
22
  Dialog,
23
23
  DialogActions,
@@ -31,8 +31,11 @@ export {
31
31
  FormHelperText,
32
32
  FormLabel,
33
33
  IconButton,
34
+ /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */
34
35
  InputAdornment,
36
+ /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */
35
37
  InputBase,
38
+ /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */
36
39
  InputLabel,
37
40
  List,
38
41
  ListItem,
@@ -58,7 +61,6 @@ export {
58
61
  ThemeProvider as MuiThemeProvider,
59
62
  Tooltip,
60
63
  Typography,
61
- useTheme,
62
64
  } from "@mui/material";
63
65
 
64
66
  export type {
@@ -66,7 +68,6 @@ export type {
66
68
  AlertTitleProps,
67
69
  BoxProps,
68
70
  ButtonProps,
69
- CheckboxProps,
70
71
  ChipProps,
71
72
  CircularProgressProps,
72
73
  CssBaselineProps,
@@ -82,8 +83,11 @@ export type {
82
83
  FormHelperTextProps,
83
84
  FormLabelProps,
84
85
  IconButtonProps,
86
+ /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */
85
87
  InputAdornmentProps,
88
+ /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */
86
89
  InputBaseProps,
90
+ /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */
87
91
  InputLabelProps,
88
92
  ListProps,
89
93
  ListItemProps,
@@ -110,7 +114,6 @@ export type {
110
114
  ThemeOptions,
111
115
  TooltipProps,
112
116
  TypographyProps,
113
- useThemeProps,
114
117
  } from "@mui/material";
115
118
 
116
119
  export { TabContext, TabList, TabPanel } from "@mui/lab";
@@ -119,9 +122,11 @@ export type { TabContextProps, TabListProps, TabPanelProps } from "@mui/lab";
119
122
 
120
123
  export { default as FavoriteIcon } from "@mui/icons-material/Favorite";
121
124
 
122
- export { visuallyHidden } from "@mui/utils";
125
+ export { deepmerge, visuallyHidden } from "@mui/utils";
123
126
 
124
127
  export * from "./Banner";
128
+ export * from "./Checkbox";
129
+ export * from "./CheckboxGroup";
125
130
  export * from "./createUniqueId";
126
131
  export * from "./Icon";
127
132
  export * from "./iconDictionary";