@okta/odyssey-react-mui 1.0.2 → 1.2.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 (274) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +1 -1
  3. package/dist/Autocomplete.js +20 -3
  4. package/dist/Autocomplete.js.map +1 -1
  5. package/dist/Banner.js +3 -1
  6. package/dist/Banner.js.map +1 -1
  7. package/dist/Box.js +8 -4
  8. package/dist/Box.js.map +1 -1
  9. package/dist/Button.js +3 -1
  10. package/dist/Button.js.map +1 -1
  11. package/dist/Callout.js +2 -0
  12. package/dist/Callout.js.map +1 -1
  13. package/dist/Checkbox.js +6 -2
  14. package/dist/Checkbox.js.map +1 -1
  15. package/dist/CheckboxGroup.js +5 -7
  16. package/dist/CheckboxGroup.js.map +1 -1
  17. package/dist/CircularProgress.js +2 -0
  18. package/dist/CircularProgress.js.map +1 -1
  19. package/dist/Dialog.js +2 -0
  20. package/dist/Dialog.js.map +1 -1
  21. package/dist/Field.js.map +1 -1
  22. package/dist/FieldError.js +2 -0
  23. package/dist/FieldError.js.map +1 -1
  24. package/dist/FieldHint.js +2 -0
  25. package/dist/FieldHint.js.map +1 -1
  26. package/dist/FieldLabel.js +3 -1
  27. package/dist/FieldLabel.js.map +1 -1
  28. package/dist/Fieldset.js +3 -1
  29. package/dist/Fieldset.js.map +1 -1
  30. package/dist/Form.js +5 -3
  31. package/dist/Form.js.map +1 -1
  32. package/dist/Link.js +3 -1
  33. package/dist/Link.js.map +1 -1
  34. package/dist/MenuButton.js +8 -2
  35. package/dist/MenuButton.js.map +1 -1
  36. package/dist/MenuItem.js +6 -2
  37. package/dist/MenuItem.js.map +1 -1
  38. package/dist/NativeSelect.js +3 -1
  39. package/dist/NativeSelect.js.map +1 -1
  40. package/dist/OdysseyCacheProvider.js +4 -1
  41. package/dist/OdysseyCacheProvider.js.map +1 -1
  42. package/dist/OdysseyProvider.js +12 -5
  43. package/dist/OdysseyProvider.js.map +1 -1
  44. package/dist/OdysseyThemeProvider.js +8 -7
  45. package/dist/OdysseyThemeProvider.js.map +1 -1
  46. package/dist/OdysseyTranslationProvider.js +1 -1
  47. package/dist/OdysseyTranslationProvider.js.map +1 -1
  48. package/dist/OdysseyTranslationProvider.types.js +1 -1
  49. package/dist/OdysseyTranslationProvider.types.js.map +1 -1
  50. package/dist/PasswordField.js +18 -9
  51. package/dist/PasswordField.js.map +1 -1
  52. package/dist/Radio.js +2 -0
  53. package/dist/Radio.js.map +1 -1
  54. package/dist/RadioGroup.js +5 -2
  55. package/dist/RadioGroup.js.map +1 -1
  56. package/dist/SearchField.js +11 -10
  57. package/dist/SearchField.js.map +1 -1
  58. package/dist/Select.js +39 -35
  59. package/dist/Select.js.map +1 -1
  60. package/dist/SeleniumProps.js +2 -0
  61. package/dist/SeleniumProps.js.map +1 -0
  62. package/dist/Status.js +4 -2
  63. package/dist/Status.js.map +1 -1
  64. package/dist/Tabs.js +11 -4
  65. package/dist/Tabs.js.map +1 -1
  66. package/dist/Tag.js +4 -2
  67. package/dist/Tag.js.map +1 -1
  68. package/dist/TagList.js +3 -1
  69. package/dist/TagList.js.map +1 -1
  70. package/dist/TextField.js +6 -2
  71. package/dist/TextField.js.map +1 -1
  72. package/dist/Toast.js +2 -0
  73. package/dist/Toast.js.map +1 -1
  74. package/dist/Tooltip.js +2 -0
  75. package/dist/Tooltip.js.map +1 -1
  76. package/dist/Typography.js +71 -59
  77. package/dist/Typography.js.map +1 -1
  78. package/dist/createShadowDom.js +26 -0
  79. package/dist/createShadowDom.js.map +1 -0
  80. package/dist/{OdysseyI18n.js → i18n.js} +5 -2
  81. package/dist/i18n.js.map +1 -0
  82. package/dist/index.js +1 -0
  83. package/dist/index.js.map +1 -1
  84. package/dist/labs/DatePicker.js +4 -2
  85. package/dist/labs/DatePicker.js.map +1 -1
  86. package/dist/labs/PaginatedTable.js +6 -4
  87. package/dist/labs/PaginatedTable.js.map +1 -1
  88. package/dist/labs/StaticTable.js +9 -4
  89. package/dist/labs/StaticTable.js.map +1 -1
  90. package/dist/labs/datePickerTheme.js +4 -2
  91. package/dist/labs/datePickerTheme.js.map +1 -1
  92. package/dist/properties/ts/odyssey-react-mui.js +2 -0
  93. package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
  94. package/dist/src/Autocomplete.d.ts +29 -4
  95. package/dist/src/Autocomplete.d.ts.map +1 -1
  96. package/dist/src/Banner.d.ts +3 -2
  97. package/dist/src/Banner.d.ts.map +1 -1
  98. package/dist/src/Box.d.ts +9 -2
  99. package/dist/src/Box.d.ts.map +1 -1
  100. package/dist/src/Button.d.ts +3 -2
  101. package/dist/src/Button.d.ts.map +1 -1
  102. package/dist/src/Callout.d.ts +3 -2
  103. package/dist/src/Callout.d.ts.map +1 -1
  104. package/dist/src/Checkbox.d.ts +8 -3
  105. package/dist/src/Checkbox.d.ts.map +1 -1
  106. package/dist/src/CheckboxGroup.d.ts +3 -6
  107. package/dist/src/CheckboxGroup.d.ts.map +1 -1
  108. package/dist/src/CircularProgress.d.ts +3 -2
  109. package/dist/src/CircularProgress.d.ts.map +1 -1
  110. package/dist/src/Dialog.d.ts +3 -2
  111. package/dist/src/Dialog.d.ts.map +1 -1
  112. package/dist/src/Field.d.ts +2 -1
  113. package/dist/src/Field.d.ts.map +1 -1
  114. package/dist/src/FieldError.d.ts +3 -2
  115. package/dist/src/FieldError.d.ts.map +1 -1
  116. package/dist/src/FieldHint.d.ts +3 -2
  117. package/dist/src/FieldHint.d.ts.map +1 -1
  118. package/dist/src/FieldLabel.d.ts +3 -2
  119. package/dist/src/FieldLabel.d.ts.map +1 -1
  120. package/dist/src/Fieldset.d.ts +3 -2
  121. package/dist/src/Fieldset.d.ts.map +1 -1
  122. package/dist/src/Form.d.ts +3 -2
  123. package/dist/src/Form.d.ts.map +1 -1
  124. package/dist/src/Link.d.ts +3 -2
  125. package/dist/src/Link.d.ts.map +1 -1
  126. package/dist/src/MenuButton.d.ts +12 -3
  127. package/dist/src/MenuButton.d.ts.map +1 -1
  128. package/dist/src/MenuItem.d.ts +5 -4
  129. package/dist/src/MenuItem.d.ts.map +1 -1
  130. package/dist/src/NativeSelect.d.ts +56 -2
  131. package/dist/src/NativeSelect.d.ts.map +1 -1
  132. package/dist/src/OdysseyCacheProvider.d.ts +6 -1
  133. package/dist/src/OdysseyCacheProvider.d.ts.map +1 -1
  134. package/dist/src/OdysseyProvider.d.ts +1 -1
  135. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  136. package/dist/src/OdysseyThemeProvider.d.ts +2 -1
  137. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  138. package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
  139. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
  140. package/dist/src/OdysseyTranslationProvider.types.d.ts +1 -1
  141. package/dist/src/OdysseyTranslationProvider.types.d.ts.map +1 -1
  142. package/dist/src/PasswordField.d.ts +78 -2
  143. package/dist/src/PasswordField.d.ts.map +1 -1
  144. package/dist/src/Radio.d.ts +3 -2
  145. package/dist/src/Radio.d.ts.map +1 -1
  146. package/dist/src/RadioGroup.d.ts +8 -3
  147. package/dist/src/RadioGroup.d.ts.map +1 -1
  148. package/dist/src/SearchField.d.ts +58 -2
  149. package/dist/src/SearchField.d.ts.map +1 -1
  150. package/dist/src/Select.d.ts +7 -2
  151. package/dist/src/Select.d.ts.map +1 -1
  152. package/dist/src/SeleniumProps.d.ts +20 -0
  153. package/dist/src/SeleniumProps.d.ts.map +1 -0
  154. package/dist/src/Status.d.ts +3 -2
  155. package/dist/src/Status.d.ts.map +1 -1
  156. package/dist/src/Tabs.d.ts +9 -3
  157. package/dist/src/Tabs.d.ts.map +1 -1
  158. package/dist/src/Tag.d.ts +3 -2
  159. package/dist/src/Tag.d.ts.map +1 -1
  160. package/dist/src/TagList.d.ts +3 -2
  161. package/dist/src/TagList.d.ts.map +1 -1
  162. package/dist/src/TextField.d.ts +86 -2
  163. package/dist/src/TextField.d.ts.map +1 -1
  164. package/dist/src/Toast.d.ts +3 -2
  165. package/dist/src/Toast.d.ts.map +1 -1
  166. package/dist/src/Tooltip.d.ts +3 -2
  167. package/dist/src/Tooltip.d.ts.map +1 -1
  168. package/dist/src/Typography.d.ts +14 -49
  169. package/dist/src/Typography.d.ts.map +1 -1
  170. package/dist/src/createShadowDom.d.ts +16 -0
  171. package/dist/src/createShadowDom.d.ts.map +1 -0
  172. package/dist/src/{OdysseyI18n.d.ts → i18n.d.ts} +20 -2
  173. package/dist/src/i18n.d.ts.map +1 -0
  174. package/dist/src/index.d.ts +1 -0
  175. package/dist/src/index.d.ts.map +1 -1
  176. package/dist/src/labs/DatePicker.d.ts +5 -1
  177. package/dist/src/labs/DatePicker.d.ts.map +1 -1
  178. package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
  179. package/dist/src/labs/StaticTable.d.ts.map +1 -1
  180. package/dist/src/properties/ts/odyssey-react-mui.d.ts +2 -0
  181. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  182. package/dist/src/theme/components.d.ts +4 -1
  183. package/dist/src/theme/components.d.ts.map +1 -1
  184. package/dist/src/theme/createOdysseyMuiTheme.d.ts +23 -0
  185. package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -0
  186. package/dist/src/theme/mixins.d.ts +3 -1
  187. package/dist/src/theme/mixins.d.ts.map +1 -1
  188. package/dist/src/theme/palette.d.ts +3 -1
  189. package/dist/src/theme/palette.d.ts.map +1 -1
  190. package/dist/src/theme/shape.d.ts +3 -1
  191. package/dist/src/theme/shape.d.ts.map +1 -1
  192. package/dist/src/theme/spacing.d.ts +3 -1
  193. package/dist/src/theme/spacing.d.ts.map +1 -1
  194. package/dist/src/theme/theme.d.ts +1 -8
  195. package/dist/src/theme/theme.d.ts.map +1 -1
  196. package/dist/src/theme/typography.d.ts +3 -1
  197. package/dist/src/theme/typography.d.ts.map +1 -1
  198. package/dist/theme/components.js +118 -73
  199. package/dist/theme/components.js.map +1 -1
  200. package/dist/theme/createOdysseyMuiTheme.js +51 -0
  201. package/dist/theme/createOdysseyMuiTheme.js.map +1 -0
  202. package/dist/theme/mixins.js +4 -1
  203. package/dist/theme/mixins.js.map +1 -1
  204. package/dist/theme/palette.js +4 -1
  205. package/dist/theme/palette.js.map +1 -1
  206. package/dist/theme/shape.js +4 -1
  207. package/dist/theme/shape.js.map +1 -1
  208. package/dist/theme/spacing.js +4 -1
  209. package/dist/theme/spacing.js.map +1 -1
  210. package/dist/theme/theme.js +1 -20
  211. package/dist/theme/theme.js.map +1 -1
  212. package/dist/theme/typography.js +4 -1
  213. package/dist/theme/typography.js.map +1 -1
  214. package/dist/tsconfig.production.tsbuildinfo +1 -1
  215. package/package.json +7 -6
  216. package/src/Autocomplete.tsx +56 -4
  217. package/src/Banner.tsx +11 -2
  218. package/src/Box.tsx +11 -5
  219. package/src/Button.tsx +6 -1
  220. package/src/Callout.tsx +5 -3
  221. package/src/Checkbox.tsx +14 -4
  222. package/src/CheckboxGroup.tsx +6 -10
  223. package/src/CircularProgress.tsx +5 -1
  224. package/src/Dialog.tsx +5 -2
  225. package/src/Field.tsx +2 -0
  226. package/src/FieldError.tsx +5 -3
  227. package/src/FieldHint.tsx +9 -3
  228. package/src/FieldLabel.tsx +5 -3
  229. package/src/Fieldset.tsx +4 -1
  230. package/src/Form.tsx +7 -4
  231. package/src/Link.tsx +18 -3
  232. package/src/MenuButton.tsx +33 -4
  233. package/src/MenuItem.tsx +11 -6
  234. package/src/NativeSelect.tsx +7 -2
  235. package/src/OdysseyCacheProvider.tsx +9 -1
  236. package/src/OdysseyProvider.tsx +18 -8
  237. package/src/OdysseyThemeProvider.tsx +12 -8
  238. package/src/OdysseyTranslationProvider.test.tsx +2 -2
  239. package/src/OdysseyTranslationProvider.tsx +1 -1
  240. package/src/OdysseyTranslationProvider.types.ts +1 -0
  241. package/src/PasswordField.tsx +37 -13
  242. package/src/Radio.tsx +5 -1
  243. package/src/RadioGroup.tsx +12 -4
  244. package/src/SearchField.tsx +23 -15
  245. package/src/Select.tsx +154 -149
  246. package/src/SeleniumProps.ts +20 -0
  247. package/src/Status.tsx +15 -3
  248. package/src/Tabs.tsx +18 -4
  249. package/src/Tag.tsx +12 -3
  250. package/src/TagList.tsx +4 -2
  251. package/src/TextField.tsx +14 -2
  252. package/src/Toast.tsx +4 -1
  253. package/src/Tooltip.tsx +4 -1
  254. package/src/Typography.tsx +76 -54
  255. package/src/createShadowDom.ts +46 -0
  256. package/src/{OdysseyI18n.ts → i18n.ts} +4 -2
  257. package/src/index.ts +1 -0
  258. package/src/labs/DatePicker.tsx +15 -7
  259. package/src/labs/PaginatedTable.tsx +12 -3
  260. package/src/labs/README.md +2 -2
  261. package/src/labs/StaticTable.tsx +13 -3
  262. package/src/labs/datePickerTheme.tsx +2 -2
  263. package/src/properties/odyssey-react-mui.properties +2 -0
  264. package/src/properties/ts/odyssey-react-mui.ts +1 -1
  265. package/src/theme/components.tsx +69 -18
  266. package/src/theme/createOdysseyMuiTheme.ts +47 -0
  267. package/src/theme/mixins.ts +5 -1
  268. package/src/theme/palette.ts +5 -3
  269. package/src/theme/shape.ts +5 -1
  270. package/src/theme/spacing.ts +5 -3
  271. package/src/theme/theme.ts +1 -26
  272. package/src/theme/typography.ts +5 -3
  273. package/dist/OdysseyI18n.js.map +0 -1
  274. package/dist/src/OdysseyI18n.d.ts.map +0 -1
package/dist/Field.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","names":["memo","useMemo","FieldError","FieldHint","FieldLabel","Typography","useFieldset","useTranslation","useUniqueId","jsxs","_jsxs","jsx","_jsx","fieldTypeValues","Field","_ref","errorMessage","fieldType","hasVisibleLabel","hint","id","idOverride","isDisabled","isDisabledProp","isRadioGroup","isOptional","label","renderFieldComponent","t","hintId","undefined","errorId","labelId","ariaDescribedBy","join","trim","isFieldsetDisabled","_FormControl","component","disabled","error","Boolean","role","children","_FormLabel","color","inputId","text","MemoizedField","displayName"],"sources":["../src/Field.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 { memo, ReactElement, useMemo } from \"react\";\n\nimport {\n FormControl as MuiFormControl,\n FormLabel as MuiFormLabel,\n} from \"@mui/material\";\nimport { FieldError } from \"./FieldError\";\nimport { FieldHint } from \"./FieldHint\";\nimport { FieldLabel } from \"./FieldLabel\";\nimport { Typography } from \"./Typography\";\nimport { useFieldset } from \"./FieldsetContext\";\nimport { useTranslation } from \"react-i18next\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const fieldTypeValues = [\"single\", \"group\"] as const;\n\nexport type FieldProps = {\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The field type determines how ARIA components are setup. It's important to use this to denote if you expect only one component (like a text field) or multiple (like a radio group).\n */\n fieldType: (typeof fieldTypeValues)[number];\n /**\n * If `true`, the Field label will be shown\n */\n hasVisibleLabel: boolean;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * Important for narrowing down the `fieldset` role to \"radiogroup\".\n */\n isRadioGroup?: boolean;\n /**\n * Important for determining if children inherit error state\n */\n isCheckboxGroup?: boolean;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the `input` element is not required.\n */\n isOptional?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Render-props function that sends back ARIA props to your field component.\n */\n renderFieldComponent: ({\n ariaDescribedBy,\n id,\n }: {\n ariaDescribedBy?: string;\n id: string;\n }) => ReactElement;\n};\n\nconst Field = ({\n errorMessage,\n fieldType,\n hasVisibleLabel,\n hint,\n id: idOverride,\n isDisabled: isDisabledProp = false,\n isRadioGroup = false,\n isOptional = false,\n label,\n renderFieldComponent,\n}: FieldProps) => {\n const { t } = useTranslation();\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorId = errorMessage ? `${id}-error` : undefined;\n const labelId = `${id}-label`;\n\n const ariaDescribedBy = useMemo(\n () => [hintId, errorId].join(\" \").trim() || undefined,\n [errorId, hintId]\n );\n\n const { isDisabled: isFieldsetDisabled } = useFieldset();\n\n const isDisabled = useMemo(\n () => isDisabledProp || isFieldsetDisabled,\n [isDisabledProp, isFieldsetDisabled]\n );\n\n return (\n <MuiFormControl\n component={fieldType === \"group\" ? \"fieldset\" : \"div\"}\n disabled={isDisabled}\n error={Boolean(errorMessage)}\n role={isRadioGroup ? \"radiogroup\" : undefined}\n >\n {fieldType === \"group\" ? (\n <MuiFormLabel component=\"legend\">\n {label}{\" \"}\n {isOptional && label && (\n <Typography component=\"span\" color=\"textSecondary\">\n ({t(\"fieldlabel.optional.text\")})\n </Typography>\n )}\n </MuiFormLabel>\n ) : (\n <FieldLabel\n hasVisibleLabel={hasVisibleLabel}\n id={labelId}\n inputId={id}\n isOptional={isOptional}\n text={label}\n />\n )}\n\n {hint && <FieldHint id={hintId} text={hint} />}\n\n {renderFieldComponent({\n ariaDescribedBy,\n id,\n })}\n\n {errorMessage && <FieldError id={errorId} text={errorMessage} />}\n </MuiFormControl>\n );\n};\n\nconst MemoizedField = memo(Field);\nMemoizedField.displayName = \"Field\";\n\nexport { MemoizedField as Field };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAM3CC,UAAU;AAAA,SACVC,SAAS;AAAA,SACTC,U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G,UAAU,GAAG,KAAM;IACtDsB,QAAQ,EAAEjB,UAAW;IACrBkB,KAAK,EAAEC,OAAO,CAACzB,YAAY,CAAE;IAC7B0B,IAAI,EAAElB,YAAY,GAAG,YAAY,GAAGM,SAAU;IAAAa,QAAA,GAE7C1B,SAAS,KAAK,OAAO,GACpBP,KAAA,CAAAkC,UAAA;MAAcN,SAAS,EAAC,QAAQ;MAAAK,QAAA,GAC7BjB,KAAK,EAAE,GAAG,EACVD,UAAU,IAAIC,KAAK,IAClBhB,KAAA,CAACL,UAAU;QAACiC,SAAS,EAAC,MAAM;QAACO,KAAK,EAAC,eAAe;QAAAF,QAAA,GAAC,GAChD,EAACf,CAAC,CAAC,0BAA0B,CAAC,EAAC,GAClC;MAAA,CAAY,CACb;IAAA,CACW,CAAC,GAEfhB,IAAA,CAACR,UAAU;MACTc,eAAe,EAAEA,eAAgB;MACjCE,EAAE,EAAEY,OAAQ;MACZc,OAAO,EAAE1B,EAAG;MACZK,UAAU,EAAEA,UAAW;MACvBsB,IAAI,EAAErB;IAAM,CACb,CACF,EAEAP,IAAI,IAAIP,IAAA,CAACT,SAAS;MAACiB,EAAE,EAAES,MAAO;MAACkB,IAAI,EAAE5B;IAAK,CAAE,CAAC,EAE7CQ,oBAAoB,CAAC;MACpBM,eAAe;MACfb;IACF,CAAC,CAAC,EAEDJ,YAAY,IAAIJ,IAAA,CAACV,UAAU;MAACkB,EAAE,EAAEW,OAAQ;MAACgB,IAAI,EAAE/B;IAAa,CAAE,CAAC;EAAA,CAClD,CAAC;AAErB,CAAC;AAED,MAAMgC,aAAa,GAAGhD,IAAI,CAACc,KAAK,CAAC;AACjCkC,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAIlC,KAAK"}
1
+ {"version":3,"file":"Field.js","names":["memo","useMemo","FieldError","FieldHint","FieldLabel","Typography","useFieldset","useTranslation","useUniqueId","jsxs","_jsxs","jsx","_jsx","fieldTypeValues","Field","_ref","errorMessage","fieldType","hasVisibleLabel","hint","id","idOverride","isDisabled","isDisabledProp","isRadioGroup","isOptional","label","renderFieldComponent","t","hintId","undefined","errorId","labelId","ariaDescribedBy","join","trim","isFieldsetDisabled","_FormControl","component","disabled","error","Boolean","role","children","_FormLabel","color","inputId","text","MemoizedField","displayName"],"sources":["../src/Field.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 { memo, ReactElement, useMemo } from \"react\";\n\nimport {\n FormControl as MuiFormControl,\n FormLabel as MuiFormLabel,\n} from \"@mui/material\";\nimport { FieldError } from \"./FieldError\";\nimport { FieldHint } from \"./FieldHint\";\nimport { FieldLabel } from \"./FieldLabel\";\nimport { Typography } from \"./Typography\";\nimport { useFieldset } from \"./FieldsetContext\";\nimport { useTranslation } from \"react-i18next\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const fieldTypeValues = [\"single\", \"group\"] as const;\n\nexport type FieldProps = {\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The field type determines how ARIA components are setup. It's important to use this to denote if you expect only one component (like a text field) or multiple (like a radio group).\n */\n fieldType: (typeof fieldTypeValues)[number];\n /**\n * If `true`, the Field label will be shown\n */\n hasVisibleLabel: boolean;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * Important for narrowing down the `fieldset` role to \"radiogroup\".\n */\n isRadioGroup?: boolean;\n /**\n * Important for determining if children inherit error state\n */\n isCheckboxGroup?: boolean;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the `input` element is not required.\n */\n isOptional?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Render-props function that sends back ARIA props to your field component.\n */\n renderFieldComponent: ({\n ariaDescribedBy,\n dataSe,\n id,\n }: {\n ariaDescribedBy?: string;\n dataSe?: string;\n id: string;\n }) => ReactElement;\n};\n\nconst Field = ({\n errorMessage,\n fieldType,\n hasVisibleLabel,\n hint,\n id: idOverride,\n isDisabled: isDisabledProp = false,\n isRadioGroup = false,\n isOptional = false,\n label,\n renderFieldComponent,\n}: FieldProps) => {\n const { t } = useTranslation();\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorId = errorMessage ? `${id}-error` : undefined;\n const labelId = `${id}-label`;\n\n const ariaDescribedBy = useMemo(\n () => [hintId, errorId].join(\" \").trim() || undefined,\n [errorId, hintId]\n );\n\n const { isDisabled: isFieldsetDisabled } = useFieldset();\n\n const isDisabled = useMemo(\n () => isDisabledProp || isFieldsetDisabled,\n [isDisabledProp, isFieldsetDisabled]\n );\n\n return (\n <MuiFormControl\n component={fieldType === \"group\" ? \"fieldset\" : \"div\"}\n disabled={isDisabled}\n error={Boolean(errorMessage)}\n role={isRadioGroup ? \"radiogroup\" : undefined}\n >\n {fieldType === \"group\" ? (\n <MuiFormLabel component=\"legend\">\n {label}{\" \"}\n {isOptional && label && (\n <Typography component=\"span\" color=\"textSecondary\">\n ({t(\"fieldlabel.optional.text\")})\n </Typography>\n )}\n </MuiFormLabel>\n ) : (\n <FieldLabel\n hasVisibleLabel={hasVisibleLabel}\n id={labelId}\n inputId={id}\n isOptional={isOptional}\n text={label}\n />\n )}\n\n {hint && <FieldHint id={hintId} text={hint} />}\n\n {renderFieldComponent({\n ariaDescribedBy,\n id,\n })}\n\n {errorMessage && <FieldError id={errorId} text={errorMessage} />}\n </MuiFormControl>\n );\n};\n\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KAAK,CAAC;AACjCkC,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAIlC,KAAK"}
@@ -19,12 +19,14 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
19
19
  const FieldError = _ref => {
20
20
  let {
21
21
  id,
22
+ testId,
22
23
  text
23
24
  } = _ref;
24
25
  const {
25
26
  t
26
27
  } = useTranslation();
27
28
  return _jsxs(_FormHelperText, {
29
+ "data-se": testId,
28
30
  error: true,
29
31
  id: id,
30
32
  children: [_jsx(ScreenReaderText, {
@@ -1 +1 @@
1
- {"version":3,"file":"FieldError.js","names":["memo","ScreenReaderText","useTranslation","jsx","_jsx","jsxs","_jsxs","FieldError","_ref","id","text","t","_FormHelperText","error","children","MemoizedFieldError","displayName"],"sources":["../src/FieldError.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 { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { useTranslation } from \"react-i18next\";\n\nexport type FieldErrorProps = {\n id?: string;\n text: string;\n};\n\nconst FieldError = ({ id, text }: FieldErrorProps) => {\n const { t } = useTranslation();\n\n return (\n <FormHelperText error id={id}>\n <ScreenReaderText>{`${t(\n \"fielderror.screenreader.text\"\n )}:`}</ScreenReaderText>\n {text}\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldError = memo(FieldError);\nMemoizedFieldError.displayName = \"FieldError\";\n\nexport { MemoizedFieldError as FieldError };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAGpBC,gBAAgB;AACzB,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAO/C,MAAMC,UAAU,GAAGC,IAAA,IAAmC;EAAA,IAAlC;IAAEC,EAAE;IAAEC;EAAsB,CAAC,GAAAF,IAAA;EAC/C,MAAM;IAAEG;EAAE,CAAC,GAAGT,cAAc,CAAC,CAAC;EAE9B,OACEI,KAAA,CAAAM,eAAA;IAAgBC,KAAK;IAACJ,EAAE,EAAEA,EAAG;IAAAK,QAAA,GAC3BV,IAAA,CAACH,gBAAgB;MAAAa,QAAA,EAAG,GAAEH,CAAC,CACrB,8BACF,CAAE;IAAE,CAAmB,CAAC,EACvBD,IAAI;EAAA,CACS,CAAC;AAErB,CAAC;AAED,MAAMK,kBAAkB,GAAGf,IAAI,CAACO,UAAU,CAAC;AAC3CQ,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIR,UAAU"}
1
+ {"version":3,"file":"FieldError.js","names":["memo","ScreenReaderText","useTranslation","jsx","_jsx","jsxs","_jsxs","FieldError","_ref","id","testId","text","t","_FormHelperText","error","children","MemoizedFieldError","displayName"],"sources":["../src/FieldError.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 { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type FieldErrorProps = {\n id?: string;\n text: string;\n} & SeleniumProps;\n\nconst FieldError = ({ id, testId, text }: FieldErrorProps) => {\n const { t } = useTranslation();\n\n return (\n <FormHelperText data-se={testId} error id={id}>\n <ScreenReaderText>{`${t(\n \"fielderror.screenreader.text\"\n )}:`}</ScreenReaderText>\n {text}\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldError = memo(FieldError);\nMemoizedFieldError.displayName = \"FieldError\";\n\nexport { MemoizedFieldError as FieldError };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAGpBC,gBAAgB;AACzB,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAS/C,MAAMC,UAAU,GAAGC,IAAA,IAA2C;EAAA,IAA1C;IAAEC,EAAE;IAAEC,MAAM;IAAEC;EAAsB,CAAC,GAAAH,IAAA;EACvD,MAAM;IAAEI;EAAE,CAAC,GAAGV,cAAc,CAAC,CAAC;EAE9B,OACEI,KAAA,CAAAO,eAAA;IAAgB,WAASH,MAAO;IAACI,KAAK;IAACL,EAAE,EAAEA,EAAG;IAAAM,QAAA,GAC5CX,IAAA,CAACH,gBAAgB;MAAAc,QAAA,EAAG,GAAEH,CAAC,CACrB,8BACF,CAAE;IAAE,CAAmB,CAAC,EACvBD,IAAI;EAAA,CACS,CAAC;AAErB,CAAC;AAED,MAAMK,kBAAkB,GAAGhB,IAAI,CAACO,UAAU,CAAC;AAC3CS,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIT,UAAU"}
package/dist/FieldHint.js CHANGED
@@ -16,9 +16,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  const FieldHint = _ref => {
17
17
  let {
18
18
  id,
19
+ testId,
19
20
  text
20
21
  } = _ref;
21
22
  return _jsx(_FormHelperText, {
23
+ "data-se": testId,
22
24
  id: id,
23
25
  children: text
24
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"FieldHint.js","names":["memo","jsx","_jsx","FieldHint","_ref","id","text","_FormHelperText","children","MemoizedFieldHint","displayName"],"sources":["../src/FieldHint.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 { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\n\nexport type FieldHintProps = {\n id?: string;\n text: string;\n};\n\nconst FieldHint = ({ id, text }: FieldHintProps) => {\n return <FormHelperText id={id}>{text}</FormHelperText>;\n};\n\nconst MemoizedFieldHint = memo(FieldHint);\nMemoizedFieldHint.displayName = \"FieldHint\";\n\nexport { MemoizedFieldHint as FieldHint };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS7B,MAAMC,SAAS,GAAGC,IAAA,IAAkC;EAAA,IAAjC;IAAEC,EAAE;IAAEC;EAAqB,CAAC,GAAAF,IAAA;EAC7C,OAAOF,IAAA,CAAAK,eAAA;IAAgBF,EAAE,EAAEA,EAAG;IAAAG,QAAA,EAAEF;EAAI,CAAiB,CAAC;AACxD,CAAC;AAED,MAAMG,iBAAiB,GAAGT,IAAI,CAACG,SAAS,CAAC;AACzCM,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIN,SAAS"}
1
+ {"version":3,"file":"FieldHint.js","names":["memo","jsx","_jsx","FieldHint","_ref","id","testId","text","_FormHelperText","children","MemoizedFieldHint","displayName"],"sources":["../src/FieldHint.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 { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\n\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type FieldHintProps = {\n id?: string;\n text: string;\n} & SeleniumProps;\n\nconst FieldHint = ({ id, testId, text }: FieldHintProps) => {\n return (\n <FormHelperText data-se={testId} id={id}>\n {text}\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldHint = memo(FieldHint);\nMemoizedFieldHint.displayName = \"FieldHint\";\n\nexport { MemoizedFieldHint as FieldHint };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW7B,MAAMC,SAAS,GAAGC,IAAA,IAA0C;EAAA,IAAzC;IAAEC,EAAE;IAAEC,MAAM;IAAEC;EAAqB,CAAC,GAAAH,IAAA;EACrD,OACEF,IAAA,CAAAM,eAAA;IAAgB,WAASF,MAAO;IAACD,EAAE,EAAEA,EAAG;IAAAI,QAAA,EACrCF;EAAI,CACS,CAAC;AAErB,CAAC;AAED,MAAMG,iBAAiB,GAAGV,IAAI,CAACG,SAAS,CAAC;AACzCO,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIP,SAAS"}
@@ -22,12 +22,14 @@ const FieldLabel = _ref => {
22
22
  id,
23
23
  inputId,
24
24
  isOptional,
25
+ testId,
25
26
  text
26
27
  } = _ref;
27
28
  const {
28
29
  t
29
30
  } = useTranslation();
30
31
  const inputLabel = useMemo(() => _jsxs(_InputLabel, {
32
+ "data-se": testId,
31
33
  htmlFor: inputId,
32
34
  id: id,
33
35
  children: [_jsx("span", {
@@ -35,7 +37,7 @@ const FieldLabel = _ref => {
35
37
  }), isOptional && _jsx(Subordinate, {
36
38
  children: t("fieldlabel.optional.text")
37
39
  })]
38
- }), [id, inputId, isOptional, text, t]);
40
+ }), [id, inputId, isOptional, testId, text, t]);
39
41
  return hasVisibleLabel ? inputLabel : _jsx(ScreenReaderText, {
40
42
  children: inputLabel
41
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel.js","names":["memo","useMemo","useTranslation","ScreenReaderText","Subordinate","jsx","_jsx","jsxs","_jsxs","FieldLabel","_ref","hasVisibleLabel","id","inputId","isOptional","text","t","inputLabel","_InputLabel","htmlFor","children","MemoizedFieldLabel","displayName"],"sources":["../src/FieldLabel.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 { InputLabel as MuiInputLabel } from \"@mui/material\";\nimport { memo, useMemo } from \"react\";\n\nimport { useTranslation } from \"react-i18next\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { Subordinate } from \"./Typography\";\n\nexport type FieldLabelProps = {\n hasVisibleLabel: boolean;\n id: string;\n inputId: string;\n isOptional: boolean;\n text: string;\n};\n\nconst FieldLabel = ({\n hasVisibleLabel,\n id,\n inputId,\n isOptional,\n text,\n}: FieldLabelProps) => {\n const { t } = useTranslation();\n\n const inputLabel = useMemo(\n () => (\n <MuiInputLabel htmlFor={inputId} id={id}>\n <span>{text}</span>\n {isOptional && (\n <Subordinate>{t(\"fieldlabel.optional.text\")}</Subordinate>\n )}\n </MuiInputLabel>\n ),\n [id, inputId, isOptional, text, t]\n );\n\n return hasVisibleLabel ? (\n inputLabel\n ) : (\n <ScreenReaderText>{inputLabel}</ScreenReaderText>\n );\n};\n\nconst MemoizedFieldLabel = memo(FieldLabel);\nMemoizedFieldLabel.displayName = \"FieldLabel\";\n\nexport { MemoizedFieldLabel as FieldLabel };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAErC,SAASC,cAAc,QAAQ,eAAe;AAAC,SACtCC,gBAAgB;AAAA,SAChBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAUpB,MAAMC,UAAU,GAAGC,IAAA,IAMI;EAAA,IANH;IAClBC,eAAe;IACfC,EAAE;IACFC,OAAO;IACPC,UAAU;IACVC;EACe,CAAC,GAAAL,IAAA;EAChB,MAAM;IAAEM;EAAE,CAAC,GAAGd,cAAc,CAAC,CAAC;EAE9B,MAAMe,UAAU,GAAGhB,OAAO,CACxB,MACEO,KAAA,CAAAU,WAAA;IAAeC,OAAO,EAAEN,OAAQ;IAACD,EAAE,EAAEA,EAAG;IAAAQ,QAAA,GACtCd,IAAA;MAAAc,QAAA,EAAOL;IAAI,CAAO,CAAC,EAClBD,UAAU,IACTR,IAAA,CAACF,WAAW;MAAAgB,QAAA,EAAEJ,CAAC,CAAC,0BAA0B;IAAC,CAAc,CAC1D;EAAA,CACY,CAChB,EACD,CAACJ,EAAE,EAAEC,OAAO,EAAEC,UAAU,EAAEC,IAAI,EAAEC,CAAC,CACnC,CAAC;EAED,OAAOL,eAAe,GACpBM,UAAU,GAEVX,IAAA,CAACH,gBAAgB;IAAAiB,QAAA,EAAEH;EAAU,CAAmB,CACjD;AACH,CAAC;AAED,MAAMI,kBAAkB,GAAGrB,IAAI,CAACS,UAAU,CAAC;AAC3CY,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIZ,UAAU"}
1
+ {"version":3,"file":"FieldLabel.js","names":["memo","useMemo","useTranslation","ScreenReaderText","Subordinate","jsx","_jsx","jsxs","_jsxs","FieldLabel","_ref","hasVisibleLabel","id","inputId","isOptional","testId","text","t","inputLabel","_InputLabel","htmlFor","children","MemoizedFieldLabel","displayName"],"sources":["../src/FieldLabel.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 { InputLabel as MuiInputLabel } from \"@mui/material\";\nimport { memo, useMemo } from \"react\";\n\nimport { useTranslation } from \"react-i18next\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { Subordinate } from \"./Typography\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type FieldLabelProps = {\n hasVisibleLabel: boolean;\n id: string;\n inputId: string;\n isOptional: boolean;\n text: string;\n} & SeleniumProps;\n\nconst FieldLabel = ({\n hasVisibleLabel,\n id,\n inputId,\n isOptional,\n testId,\n text,\n}: FieldLabelProps) => {\n const { t } = useTranslation();\n\n const inputLabel = useMemo(\n () => (\n <MuiInputLabel data-se={testId} htmlFor={inputId} id={id}>\n <span>{text}</span>\n {isOptional && (\n <Subordinate>{t(\"fieldlabel.optional.text\")}</Subordinate>\n )}\n </MuiInputLabel>\n ),\n [id, inputId, isOptional, testId, text, t]\n );\n\n return hasVisibleLabel ? (\n inputLabel\n ) : (\n <ScreenReaderText>{inputLabel}</ScreenReaderText>\n );\n};\n\nconst MemoizedFieldLabel = memo(FieldLabel);\nMemoizedFieldLabel.displayName = \"FieldLabel\";\n\nexport { MemoizedFieldLabel as FieldLabel };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAErC,SAASC,cAAc,QAAQ,eAAe;AAAC,SACtCC,gBAAgB;AAAA,SAChBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAWpB,MAAMC,UAAU,GAAGC,IAAA,IAOI;EAAA,IAPH;IAClBC,eAAe;IACfC,EAAE;IACFC,OAAO;IACPC,UAAU;IACVC,MAAM;IACNC;EACe,CAAC,GAAAN,IAAA;EAChB,MAAM;IAAEO;EAAE,CAAC,GAAGf,cAAc,CAAC,CAAC;EAE9B,MAAMgB,UAAU,GAAGjB,OAAO,CACxB,MACEO,KAAA,CAAAW,WAAA;IAAe,WAASJ,MAAO;IAACK,OAAO,EAAEP,OAAQ;IAACD,EAAE,EAAEA,EAAG;IAAAS,QAAA,GACvDf,IAAA;MAAAe,QAAA,EAAOL;IAAI,CAAO,CAAC,EAClBF,UAAU,IACTR,IAAA,CAACF,WAAW;MAAAiB,QAAA,EAAEJ,CAAC,CAAC,0BAA0B;IAAC,CAAc,CAC1D;EAAA,CACY,CAChB,EACD,CAACL,EAAE,EAAEC,OAAO,EAAEC,UAAU,EAAEC,MAAM,EAAEC,IAAI,EAAEC,CAAC,CAC3C,CAAC;EAED,OAAON,eAAe,GACpBO,UAAU,GAEVZ,IAAA,CAACH,gBAAgB;IAAAkB,QAAA,EAAEH;EAAU,CAAmB,CACjD;AACH,CAAC;AAED,MAAMI,kBAAkB,GAAGtB,IAAI,CAACS,UAAU,CAAC;AAC3Ca,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIb,UAAU"}
package/dist/Fieldset.js CHANGED
@@ -25,7 +25,8 @@ const Fieldset = _ref => {
25
25
  id: idOverride,
26
26
  isDisabled = false,
27
27
  legend,
28
- name
28
+ name,
29
+ testId
29
30
  } = _ref;
30
31
  const odysseyDesignTokens = useOdysseyDesignTokens();
31
32
  const id = useUniqueId(idOverride);
@@ -34,6 +35,7 @@ const Fieldset = _ref => {
34
35
  }), [isDisabled]);
35
36
  return _jsxs(_Box, {
36
37
  component: "fieldset",
38
+ "data-se": testId,
37
39
  disabled: isDisabled,
38
40
  name: name,
39
41
  id: id,
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.js","names":["memo","useMemo","FieldsetContext","Legend","Support","useOdysseyDesignTokens","useUniqueId","jsx","_jsx","jsxs","_jsxs","Fieldset","_ref","alert","children","description","id","idOverride","isDisabled","legend","name","odysseyDesignTokens","fieldsetContextValue","_Box","component","disabled","sx","border","margin","Spacing0","marginBlockEnd","Spacing6","maxWidth","TypographyLineLengthMax","padding","Provider","value","MemoizedFieldset","displayName"],"sources":["../src/Fieldset.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 { Box } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { Callout } from \"./Callout\";\nimport { FieldsetContext } from \"./FieldsetContext\";\nimport { Legend, Support } from \"./Typography\";\nimport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport type FieldsetProps = {\n /**\n * A Callout indicating a Fieldset-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * The Field components within the Fieldset\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * Disables the component and any wrapped input fields.\n */\n isDisabled?: boolean;\n /**\n * The title of the Fieldset\n */\n legend: string;\n /**\n * The name associated with the group.\n */\n name?: string;\n};\n\nconst Fieldset = ({\n alert,\n children,\n description,\n id: idOverride,\n isDisabled = false,\n legend,\n name,\n}: FieldsetProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const id = useUniqueId(idOverride);\n\n const fieldsetContextValue = useMemo(\n () => ({\n isDisabled,\n }),\n [isDisabled]\n );\n\n return (\n <Box\n component=\"fieldset\"\n disabled={isDisabled}\n name={name}\n id={id}\n sx={{\n border: \"0\",\n margin: odysseyDesignTokens.Spacing0,\n marginBlockEnd: odysseyDesignTokens.Spacing6,\n maxWidth: odysseyDesignTokens.TypographyLineLengthMax,\n padding: odysseyDesignTokens.Spacing0,\n\n \"&:last-child\": {\n marginBlockEnd: odysseyDesignTokens.Spacing0,\n },\n }}\n >\n <Legend>{legend}</Legend>\n\n {description && <Support>{description}</Support>}\n\n {alert}\n\n <FieldsetContext.Provider value={fieldsetContextValue}>\n {children}\n </FieldsetContext.Provider>\n </Box>\n );\n};\n\nconst MemoizedFieldset = memo(Fieldset);\nMemoizedFieldset.displayName = \"Fieldset\";\n\nexport { MemoizedFieldset as Fieldset };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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K,EAAEd,oBAAqB;MAAAR,QAAA,EACnDA;IAAQ,CACe,CAAC;EAAA,CACxB,CAAC;AAEV,CAAC;AAED,MAAMuB,gBAAgB,GAAGrC,IAAI,CAACW,QAAQ,CAAC;AACvC0B,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAI1B,QAAQ"}
1
+ {"version":3,"file":"Fieldset.js","names":["memo","useMemo","FieldsetContext","Legend","Support","useOdysseyDesignTokens","useUniqueId","jsx","_jsx","jsxs","_jsxs","Fieldset","_ref","alert","children","description","id","idOverride","isDisabled","legend","name","testId","odysseyDesignTokens","fieldsetContextValue","_Box","component","disabled","sx","border","margin","Spacing0","marginBlockEnd","Spacing6","maxWidth","TypographyLineLengthMax","padding","Provider","value","MemoizedFieldset","displayName"],"sources":["../src/Fieldset.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 { Box } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { Callout } from \"./Callout\";\nimport { FieldsetContext } from \"./FieldsetContext\";\nimport { Legend, Support } from \"./Typography\";\nimport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\nimport { useUniqueId } from \"./useUniqueId\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type FieldsetProps = {\n /**\n * A Callout indicating a Fieldset-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * The Field components within the Fieldset\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * Disables the component and any wrapped input fields.\n */\n isDisabled?: boolean;\n /**\n * The title of the Fieldset\n */\n legend: string;\n /**\n * The name associated with the group.\n */\n name?: string;\n} & SeleniumProps;\n\nconst Fieldset = ({\n alert,\n children,\n description,\n id: idOverride,\n isDisabled = false,\n legend,\n name,\n testId,\n}: FieldsetProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const id = useUniqueId(idOverride);\n\n const fieldsetContextValue = useMemo(\n () => ({\n isDisabled,\n }),\n [isDisabled]\n );\n\n return (\n <Box\n component=\"fieldset\"\n data-se={testId}\n disabled={isDisabled}\n name={name}\n id={id}\n sx={{\n border: \"0\",\n margin: odysseyDesignTokens.Spacing0,\n marginBlockEnd: odysseyDesignTokens.Spacing6,\n maxWidth: odysseyDesignTokens.TypographyLineLengthMax,\n padding: odysseyDesignTokens.Spacing0,\n\n \"&:last-child\": {\n marginBlockEnd: odysseyDesignTokens.Spacing0,\n },\n }}\n >\n <Legend>{legend}</Legend>\n\n {description && <Support>{description}</Support>}\n\n {alert}\n\n <FieldsetContext.Provider value={fieldsetContextValue}>\n {children}\n </FieldsetContext.Provider>\n </Box>\n );\n};\n\nconst MemoizedFieldset = memo(Fieldset);\nMemoizedFieldset.displayName = \"Fieldset\";\n\nexport { MemoizedFieldset as Fieldset };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAG3CC,eAAe;AAAA,SACfC,MAAM,EAAEC,OAAO;AAAA,SACfC,sBAAsB;AAAA,SACtBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAkCpB,MAAMC,QAAQ,GAAGC,IAAA,IASI;EAAA,IATH;IAChBC,KAAK;IACLC,QAAQ;IACRC,WAAW;IACXC,EAAE,EAAEC,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= false,
34
34
  target,
35
+ testId,
35
36
  title
36
37
  } = _ref;
37
38
  const id = useUniqueId(idOverride);
38
39
  return _jsxs(_Box, {
39
- component: "form",
40
40
  autoComplete: autoCompleteType,
41
- name: name,
41
+ component: "form",
42
+ "data-se": testId,
42
43
  encType: encodingType,
44
+ id: id,
43
45
  method: method,
46
+ name: name,
44
47
  noValidate: noValidate,
45
48
  target: target,
46
- id: id,
47
49
  sx: {
48
50
  maxWidth: theme => theme.mixins.maxWidth,
49
51
  margin: theme => theme.spacing(0),
package/dist/Form.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","names":["memo","Heading4","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","formEncodingTypeValues","formAutoCompleteTypeValues","formMethodValues","Form","_ref","alert","autoCompleteType","children","description","encodingType","formActions","id","idOverride","method","name","noValidate","target","title","_Box","component","autoComplete","encType","sx","maxWidth","theme","mixins","margin","spacing","padding","marginBlockEnd","display","justifyContent","gap","marginBlockStart","MemoizedForm","displayName"],"sources":["../src/Form.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 { memo, ReactElement } from \"react\";\n\nimport { Box } from \"@mui/material\";\nimport { Button } from \"./Button\";\nimport { Callout } from \"./Callout\";\nimport { Heading4, Support } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const formEncodingTypeValues = [\n \"application/x-www-form-urlencoded\",\n \"application/json\",\n \"multipart/form-data\",\n \"text/plain\",\n] as const;\nexport const formAutoCompleteTypeValues = [\"on\", \"off\"] as const;\nexport const formMethodValues = [\"post\", \"get\", \"dialog\"] as const;\n\nexport type FormProps = {\n /**\n * A Callout indicating a Form-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * Indicates whether input elements can by default have their values automatically completed by the browser.\n * `autocomplete` attributes on form elements override it on <form>\n */\n autoCompleteType?: (typeof formAutoCompleteTypeValues)[number];\n /**\n * The Field or FieldSet components within the Form\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * If the value of the method attribute is post, enctype is the MIME type of the form submission.\n * This value can be overridden by formenctype attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n encodingType?: (typeof formEncodingTypeValues)[number];\n /**\n * The Field or FieldGroup components within the Form\n */\n formActions?:\n | ReactElement<typeof Button>\n | Array<ReactElement<typeof Button>>;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * The HTTP method to submit the form with.\n * This value is overridden by formmethod attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n method?: (typeof formMethodValues)[number];\n /**\n * The name of the form. The value must not be the empty string, and must be unique among the form elements in the forms collection that it is in, if any.\n */\n name: string;\n /**\n * This Boolean attribute indicates that the form shouldn't be validated when submitted.\n * If this attribute is not set (and therefore the form is validated),\n * it can be overridden by a formnovalidate attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element belonging to the form.\n */\n noValidate?: boolean;\n /**\n * Indicates where to display the response after submitting the form. It is a name/keyword for a browsing context (for example, tab, window, or iframe).\n * This value can be overridden by a formtarget attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element.\n */\n target?: string;\n /**\n * The title of the Form\n */\n title?: string;\n};\n\nconst Form = ({\n alert,\n autoCompleteType,\n children,\n description,\n encodingType,\n formActions,\n id: idOverride,\n method,\n name,\n noValidate = false,\n target,\n title,\n}: FormProps) => {\n const id = useUniqueId(idOverride);\n\n return (\n <Box\n component=\"form\"\n autoComplete={autoCompleteType}\n name={name}\n encType={encodingType}\n method={method}\n noValidate={noValidate}\n target={target}\n id={id}\n sx={{\n maxWidth: (theme) => theme.mixins.maxWidth,\n margin: (theme) => theme.spacing(0),\n padding: (theme) => theme.spacing(0),\n }}\n >\n <Box\n component=\"div\"\n sx={{\n marginBlockEnd: (theme) => theme.spacing(4),\n }}\n >\n {title && <Heading4 component=\"h1\">{title}</Heading4>}\n {description && <Support>{description}</Support>}\n {alert}\n </Box>\n <Box component=\"div\">{children}</Box>\n {formActions && (\n <Box\n component=\"div\"\n sx={{\n display: \"flex\",\n justifyContent: \"flex-start\",\n gap: (theme) => theme.spacing(1),\n marginBlockStart: (theme) => theme.spacing(7),\n }}\n >\n {formActions}\n </Box>\n )}\n </Box>\n );\n};\n\nconst MemoizedForm = memo(Form);\nMemoizedForm.displayName = \"Form\";\n\nexport { MemoizedForm as Form };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAKlCC,QAAQ,EAAEC,OAAO;AAAA,SACjBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEpB,OAAO,MAAMC,sBAAsB,GAAG,CACpC,mCAAmC,EACnC,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,CACJ;AACV,OAAO,MAAMC,0BAA0B,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU;AAChE,OAAO,MAAMC,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAU;AA6DlE,MAAMC,IAAI,GAAGC,IAAA,IAaI;EAAA,IAbH;IACZC,KAAK;IACLC,gBAAgB;IAChBC,QAAQ;IACRC,WAAW;IACXC,YAAY;IACZC,WAAW;IACXC,EAAE,EAAEC,UAAU;IACdC,MAAM;IACNC,IAAI;IACJC,UAAU,GAAG,KAAK;IAClBC,MAAM;IACNC;EACS,CAAC,GA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AgB,EAAGT,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;MAC9C,CAAE;MAAApB,QAAA,EAEDG;IAAW,CACT,CACN;EAAA,CACE,CAAC;AAEV,CAAC;AAED,MAAMwB,YAAY,GAAG1C,IAAI,CAACW,IAAI,CAAC;AAC/B+B,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAI/B,IAAI"}
1
+ {"version":3,"file":"Form.js","names":["memo","Heading4","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","formEncodingTypeValues","formAutoCompleteTypeValues","formMethodValues","Form","_ref","alert","autoCompleteType","children","description","encodingType","formActions","id","idOverride","method","name","noValidate","target","testId","title","_Box","autoComplete","component","encType","sx","maxWidth","theme","mixins","margin","spacing","padding","marginBlockEnd","display","justifyContent","gap","marginBlockStart","MemoizedForm","displayName"],"sources":["../src/Form.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 { memo, ReactElement } from \"react\";\n\nimport { Box } from \"@mui/material\";\nimport { Button } from \"./Button\";\nimport { Callout } from \"./Callout\";\nimport { Heading4, Support } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport const formEncodingTypeValues = [\n \"application/x-www-form-urlencoded\",\n \"application/json\",\n \"multipart/form-data\",\n \"text/plain\",\n] as const;\nexport const formAutoCompleteTypeValues = [\"on\", \"off\"] as const;\nexport const formMethodValues = [\"post\", \"get\", \"dialog\"] as const;\n\nexport type FormProps = {\n /**\n * A Callout indicating a Form-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * Indicates whether input elements can by default have their values automatically completed by the browser.\n * `autocomplete` attributes on form elements override it on <form>\n */\n autoCompleteType?: (typeof formAutoCompleteTypeValues)[number];\n /**\n * The Field or FieldSet components within the Form\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * If the value of the method attribute is post, enctype is the MIME type of the form submission.\n * This value can be overridden by formenctype attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n encodingType?: (typeof formEncodingTypeValues)[number];\n /**\n * The Field or FieldGroup components within the Form\n */\n formActions?:\n | ReactElement<typeof Button>\n | Array<ReactElement<typeof Button>>;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * The HTTP method to submit the form with.\n * This value is overridden by formmethod attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n method?: (typeof formMethodValues)[number];\n /**\n * The name of the form. The value must not be the empty string, and must be unique among the form elements in the forms collection that it is in, if any.\n */\n name: string;\n /**\n * This Boolean attribute indicates that the form shouldn't be validated when submitted.\n * If this attribute is not set (and therefore the form is validated),\n * it can be overridden by a formnovalidate attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element belonging to the form.\n */\n noValidate?: boolean;\n /**\n * Indicates where to display the response after submitting the form. It is a name/keyword for a browsing context (for example, tab, window, or iframe).\n * This value can be overridden by a formtarget attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element.\n */\n target?: string;\n /**\n * The title of the Form\n */\n title?: string;\n} & SeleniumProps;\n\nconst Form = ({\n alert,\n autoCompleteType,\n children,\n description,\n encodingType,\n formActions,\n id: idOverride,\n method,\n name,\n noValidate = false,\n target,\n testId,\n title,\n}: FormProps) => {\n const id = useUniqueId(idOverride);\n\n return (\n <Box\n autoComplete={autoCompleteType}\n component=\"form\"\n data-se={testId}\n encType={encodingType}\n id={id}\n method={method}\n name={name}\n noValidate={noValidate}\n target={target}\n sx={{\n maxWidth: (theme) => theme.mixins.maxWidth,\n margin: (theme) => theme.spacing(0),\n padding: (theme) => theme.spacing(0),\n }}\n >\n <Box\n component=\"div\"\n sx={{\n marginBlockEnd: (theme) => theme.spacing(4),\n }}\n >\n {title && <Heading4 component=\"h1\">{title}</Heading4>}\n {description && <Support>{description}</Support>}\n {alert}\n </Box>\n <Box component=\"div\">{children}</Box>\n {formActions && (\n <Box\n component=\"div\"\n sx={{\n display: \"flex\",\n justifyContent: \"flex-start\",\n gap: (theme) => theme.spacing(1),\n marginBlockStart: (theme) => theme.spacing(7),\n }}\n >\n {formActions}\n </Box>\n )}\n </Box>\n );\n};\n\nconst MemoizedForm = memo(Form);\nMemoizedForm.displayName = \"Form\";\n\nexport { MemoizedForm as Form };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAKlCC,QAAQ,EAAEC,OAAO;AAAA,SACjBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAGpB,OAAO,MAAMC,sBAAsB,GAAG,CACpC,mCAAmC,EACnC,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,CACJ;AACV,OAAO,MAAMC,0BAA0B,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU;AAChE,OAAO,MAAMC,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAU;AA6DlE,MAAMC,IAAI,GAAGC,IAAA,IAcI;EAAA,IAdH;IACZC,KAAK;IACLC,gBAAgB;IAChBC,QAAQ;IACRC,WAAW;IACXC,YAAY;IACZC,WAAW;IACXC,EAAE,EAAEC,UAAU;IACdC,MAAM;IACNC,IAAI;IACJC,UAAU,GAAG,KAAK;IAClBC,MAAM;IACNC,MAAM;IACNC;EACS,CAAC,GAAAd,IAAA;EACV,MAAMO,EA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,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;MAC9C,CAAE;MAAArB,QAAA,EAEDG;IAAW,CACT,CACN;EAAA,CACE,CAAC;AAEV,CAAC;AAED,MAAMyB,YAAY,GAAG3C,IAAI,CAACW,IAAI,CAAC;AAC/BgC,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIhC,IAAI"}
package/dist/Link.js CHANGED
@@ -21,11 +21,13 @@ const Link = _ref => {
21
21
  children,
22
22
  href,
23
23
  icon,
24
- target,
25
24
  rel,
25
+ target,
26
+ testId,
26
27
  variant
27
28
  } = _ref;
28
29
  return _jsxs(_Link, {
30
+ "data-se": testId,
29
31
  href: href,
30
32
  rel: rel,
31
33
  target: target,
package/dist/Link.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","names":["memo","ExternalLinkIcon","jsx","_jsx","jsxs","_jsxs","linkVariantValues","Link","_ref","children","href","icon","target","rel","variant","_Link","className","role","MemoizedLink","displayName"],"sources":["../src/Link.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 { memo, ReactElement } from \"react\";\nimport { ExternalLinkIcon } from \"./icons.generated\";\n\nimport { Link as MuiLink } from \"@mui/material\";\n\nexport const linkVariantValues = [\"default\", \"monochrome\"] as const;\n\nexport type LinkProps = {\n /**\n * The content within the Link\n */\n children: React.ReactNode;\n /**\n * The Link destination\n */\n href: string;\n /**\n * An optional Icon component at the start of the Link\n */\n icon?: ReactElement;\n /**\n * The HTML `rel` attribute for the Link\n */\n rel?: string;\n /**\n * The HTML `target` attribute for the Link\n */\n target?:\n | \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | (string & NonNullable<unknown>);\n /**\n * The visual presentation of the Link (default or monochrome)\n */\n variant?: (typeof linkVariantValues)[number];\n};\n\nconst Link = ({ children, href, icon, target, rel, variant }: LinkProps) => (\n <MuiLink href={href} rel={rel} target={target} variant={variant}>\n {icon && <span className=\"Link-icon\">{icon}</span>}\n\n {children}\n\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <ExternalLinkIcon />\n </span>\n )}\n </MuiLink>\n);\n\nconst MemoizedLink = memo(Link);\n\nMemoizedLink.displayName = \"Link\";\n\nexport { MemoizedLink as Link };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAClCC,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAIzB,OAAO,MAAMC,iBAAiB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU;AAkCnE,MAAMC,IAAI,GAAGC,IAAA;EAAA,IAAC;IAAEC,QAAQ;IAAEC,IAAI;IAAEC,IAAI;IAAEC,MAAM;IAAEC,GAAG;IAAEC;EAAmB,CAAC,GAAAN,IAAA;EAAA,OACrEH,KAAA,CAAAU,KAAA;IAASL,IAAI,EAAEA,IAAK;IAACG,GAAG,EAAEA,GAAI;IAACD,MAAM,EAAEA,MAAO;IAACE,OAAO,EAAEA,OAAQ;IAAAL,QAAA,GAC7DE,IAAI,IAAIR,IAAA;MAAMa,SAAS,EAAC,WAAW;MAAAP,QAAA,EAAEE;IAAI,CAAO,CAAC,EAEjDF,QAAQ,EAERG,MAAM,KAAK,QAAQ,IAClBT,IAAA;MAAMa,SAAS,EAAC,gBAAgB;MAACC,IAAI,EAAC,cAAc;MAAAR,QAAA,EAClDN,IAAA,CAACF,gBAAgB,IAAE;IAAC,CAChB,CACP;EAAA,CACM,CAAC;AAAA,CACX;AAED,MAAMiB,YAAY,GAAGlB,IAAI,CAACO,IAAI,CAAC;AAE/BW,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIX,IAAI"}
1
+ {"version":3,"file":"Link.js","names":["memo","ExternalLinkIcon","jsx","_jsx","jsxs","_jsxs","linkVariantValues","Link","_ref","children","href","icon","rel","target","testId","variant","_Link","className","role","MemoizedLink","displayName"],"sources":["../src/Link.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 { memo, ReactElement } from \"react\";\nimport { ExternalLinkIcon } from \"./icons.generated\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nimport { Link as MuiLink } from \"@mui/material\";\n\nexport const linkVariantValues = [\"default\", \"monochrome\"] as const;\n\nexport type LinkProps = {\n /**\n * The content within the Link\n */\n children: React.ReactNode;\n /**\n * The Link destination\n */\n href: string;\n /**\n * An optional Icon component at the start of the Link\n */\n icon?: ReactElement;\n /**\n * The HTML `rel` attribute for the Link\n */\n rel?: string;\n /**\n * The HTML `target` attribute for the Link\n */\n target?:\n | \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | (string & NonNullable<unknown>);\n /**\n * The visual presentation of the Link (default or monochrome)\n */\n variant?: (typeof linkVariantValues)[number];\n} & SeleniumProps;\n\nconst Link = ({\n children,\n href,\n icon,\n rel,\n target,\n testId,\n variant,\n}: LinkProps) => (\n <MuiLink\n data-se={testId}\n href={href}\n rel={rel}\n target={target}\n variant={variant}\n >\n {icon && <span className=\"Link-icon\">{icon}</span>}\n\n {children}\n\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <ExternalLinkIcon />\n </span>\n )}\n </MuiLink>\n);\n\nconst MemoizedLink = memo(Link);\n\nMemoizedLink.displayName = \"Link\";\n\nexport { MemoizedLink as Link };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAClCC,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAKzB,OAAO,MAAMC,iBAAiB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU;AAkCnE,MAAMC,IAAI,GAAGC,IAAA;EAAA,IAAC;IACZC,QAAQ;IACRC,IAAI;IACJC,IAAI;IACJC,GAAG;IACHC,MAAM;IACNC,MAAM;IACNC;EACS,CAAC,GAAAP,IAAA;EAAA,OACVH,KAAA,CAAAW,KAAA;IACE,WAASF,MAAO;IAChBJ,IAAI,EAAEA,IAAK;IACXE,GAAG,EAAEA,GAAI;IACTC,MAAM,EAAEA,MAAO;IACfE,OAAO,EAAEA,OAAQ;IAAAN,QAAA,GAEhBE,IAAI,IAAIR,IAAA;MAAMc,SAAS,EAAC,WAAW;MAAAR,QAAA,EAAEE;IAAI,CAAO,CAAC,EAEjDF,QAAQ,EAERI,MAAM,KAAK,QAAQ,IAClBV,IAAA;MAAMc,SAAS,EAAC,gBAAgB;MAACC,IAAI,EAAC,cAAc;MAAAT,QAAA,EAClDN,IAAA,CAACF,gBAAgB,IAAE;IAAC,CAChB,CACP;EAAA,CACM,CAAC;AAAA,CACX;AAED,MAAMkB,YAAY,GAAGnB,IAAI,CAACO,IAAI,CAAC;AAE/BY,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIZ,IAAI"}
@@ -11,7 +11,7 @@ import _Menu from "@mui/material/Menu";
11
11
  * See the License for the specific language governing permissions and limitations under the License.
12
12
  */
13
13
  import { Button, useUniqueId } from "./index.js";
14
- import { ChevronDownIcon } from "./icons.generated/index.js";
14
+ import { ChevronDownIcon, MoreIcon } from "./icons.generated/index.js";
15
15
  import { memo, useCallback, useMemo, useState } from "react";
16
16
  import { MenuContext } from "./MenuContext.js";
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -24,8 +24,11 @@ const MenuButton = _ref => {
24
24
  buttonLabel = "",
25
25
  buttonVariant = "secondary",
26
26
  children,
27
- endIcon = _jsx(ChevronDownIcon, {}),
27
+ endIcon: endIconProp,
28
28
  id: idOverride,
29
+ isOverflow,
30
+ size,
31
+ testId,
29
32
  tooltipText
30
33
  } = _ref;
31
34
  const [anchorEl, setAnchorEl] = useState(null);
@@ -44,6 +47,7 @@ const MenuButton = _ref => {
44
47
  closeMenu,
45
48
  openMenu
46
49
  }), [closeMenu, openMenu]);
50
+ const endIcon = endIconProp ? endIconProp : isOverflow ? _jsx(MoreIcon, {}) : _jsx(ChevronDownIcon, {});
47
51
  return _jsxs("div", {
48
52
  children: [_jsx(Button, {
49
53
  "aria-controls": isOpen ? `${uniqueId}-menu` : undefined,
@@ -52,10 +56,12 @@ const MenuButton = _ref => {
52
56
  ariaDescribedBy: ariaDescribedBy,
53
57
  ariaLabel: ariaLabel,
54
58
  ariaLabelledBy: ariaLabelledBy,
59
+ "data-se": testId,
55
60
  endIcon: endIcon,
56
61
  id: `${uniqueId}-button`,
57
62
  label: buttonLabel,
58
63
  onClick: openMenu,
64
+ size: size,
59
65
  tooltipText: tooltipText,
60
66
  variant: buttonVariant
61
67
  }), _jsx(_Menu, {
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.js","names":["Button","useUniqueId","ChevronDownIcon","memo","useCallback","useMemo","useState","MenuContext","jsx","_jsx","jsxs","_jsxs","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","endIcon","id","idOverride","tooltipText","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","undefined","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.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 { Button, buttonVariantValues, MenuItem, useUniqueId } from \"./\";\nimport { Divider, ListSubheader, Menu } from \"@mui/material\";\nimport { ChevronDownIcon } from \"./icons.generated\";\nimport { memo, type ReactElement, useCallback, useMemo, useState } from \"react\";\n\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"./NullElement\";\n\nexport type MenuButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The <MenuItem> components within the Menu.\n */\n children: Array<\n ReactElement<\n typeof MenuItem | typeof Divider | typeof ListSubheader | NullElement\n >\n >;\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n} & (\n | {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n buttonLabel: string;\n }\n | {\n ariaLabel: string;\n ariaLabelledBy?: string;\n buttonLabel?: undefined | \"\";\n }\n | {\n ariaLabel?: string;\n ariaLabelledBy: string;\n buttonLabel?: undefined | \"\";\n }\n);\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n endIcon = <ChevronDownIcon />,\n id: idOverride,\n tooltipText,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback<MenuContextType[\"closeMenu\"]>(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n }),\n [closeMenu, openMenu]\n );\n\n return (\n <div>\n <Button\n aria-controls={isOpen ? `${uniqueId}-menu` : undefined}\n aria-expanded={isOpen ? \"true\" : undefined}\n aria-haspopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n label={buttonLabel}\n onClick={openMenu}\n tooltipText={tooltipText}\n variant={buttonVariant}\n />\n\n <Menu\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </Menu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA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ACT,MAAM;MACL,iBAAe0B,MAAM,GAAI,GAAEM,QAAS,OAAM,GAAGG,SAAU;MACvD,iBAAeT,MAAM,GAAG,MAAM,GAAGS,SAAU;MAC3C,iBAAc,MAAM;MACpBnB,eAAe,EAAEA,eAAgB;MACjCF,SAAS,EAAEA,SAAU;MACrBC,cAAc,EAAEA,cAAe;MAC/BK,OAAO,EAAEA,OAAQ;MACjBC,EAAE,EAAG,GAAEW,QAAS,SAAS;MACzBI,KAAK,EAAEnB,WAAY;MACnBoB,OAAO,EAAER,QAAS;MAClBN,WAAW,EAAEA,WAAY;MACzBe,OAAO,EAAEpB;IAAc,CACxB,CAAC,EAEFT,IAAA,CAAA8B,KAAA;MACEf,QAAQ,EAAEA,QAAS;MACnBH,EAAE,EAAG,GAAEW,QAAS,OAAO;MACvBQ,aAAa,EAAEP,aAAc;MAC7BQ,OAAO,EAAEb,SAAU;MACnBc,IAAI,EAAEhB,MAAO;MAAAP,QAAA,EAEbV,IAAA,CAACF,WAAW,CAACoC,QAAQ;QAACC,KAAK,EAAEV,aAAc;QAAAf,QAAA,EACxCA;MAAQ,CACW;IAAC,CACnB,CAAC;EAAA,CACJ,CAAC;AAEV,CAAC;AAED,MAAM0B,kBAAkB,GAAG1C,IAAI,CAACS,UAAU,CAAC;AAC3CiC,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIjC,UAAU"}
1
+ {"version":3,"file":"MenuButton.js","names":["Button","useUniqueId","ChevronDownIcon","MoreIcon","memo","useCallback","useMemo","useState","MenuContext","jsx","_jsx","jsxs","_jsxs","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","endIcon","endIconProp","id","idOverride","isOverflow","size","testId","tooltipText","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","undefined","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.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 {\n Button,\n buttonSizeValues,\n buttonVariantValues,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { Divider, ListSubheader, Menu } from \"@mui/material\";\nimport { ChevronDownIcon, MoreIcon } from \"./icons.generated\";\nimport { memo, type ReactElement, useCallback, useMemo, useState } from \"react\";\n\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"./NullElement\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type MenuButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The <MenuItem> components within the Menu.\n */\n children: Array<\n ReactElement<\n typeof MenuItem | typeof Divider | typeof ListSubheader | NullElement\n >\n >;\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n} & (\n | {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n buttonLabel: string;\n }\n | {\n ariaLabel: string;\n ariaLabelledBy?: string;\n buttonLabel?: undefined | \"\";\n }\n | {\n ariaLabel?: string;\n ariaLabelledBy: string;\n buttonLabel?: undefined | \"\";\n }\n) &\n SeleniumProps;\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n endIcon: endIconProp,\n id: idOverride,\n isOverflow,\n size,\n testId,\n tooltipText,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback<MenuContextType[\"closeMenu\"]>(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n }),\n [closeMenu, openMenu]\n );\n\n const endIcon = endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n return (\n <div>\n <Button\n aria-controls={isOpen ? `${uniqueId}-menu` : undefined}\n aria-expanded={isOpen ? \"true\" : undefined}\n aria-haspopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n tooltipText={tooltipText}\n variant={buttonVariant}\n />\n\n <Menu\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </Menu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaEA,MAAM,EAINC,WAAW;AAAA,SAGJC,eAAe,EAAEC,QAAQ;AAClC,SAASC,IAAI,EAAqBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAEvEC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAwEpB,MAAMC,UAAU,GAAGC,IAAA,IAaI;EAAA,IAbH;IAClBC,SAAS;IACTC,cAAc;IACdC,eAAe;IACfC,WAAW,GAAG,EAAE;IAChBC,aAAa,GAAG,WAAW;IAC3BC,QAAQ;IACRC,OAAO,EAAEC,WAAW;IACpBC,EAAE,EAAEC,UAAU;IACdC,UAAU;IACVC,IAAI;IACJC,MAAM;IACNC;EACe,CAAC,GAAAd,IAAA;EAChB,MAAM,CAACe,QAAQ,EAAEC,WAAW,CAAC,GAAGvB,QAAQ,CAAqB,IAAI,CAAC;EAElE,MAAMwB,MAAM,GAAGC,OAAO,CAACH,QAAQ,CAAC;EAEhC,MAAMI,SAAS,GAAG5B,WAAW,CAA+B,MAAM;IAChEyB,WAAW,CAAC,IAAI,CAAC;EACnB,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMI,QAAQ,GAAG7B,WAAW,CAA+B8B,KAAK,IAAK;IACnEL,WAAW,CAACK,KAAK,CAACC,aAAa,CAAC;EAClC,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,QAAQ,GAAGpC,WAAW,CAACuB,UAAU,CAAC;EAExC,MAAMc,aAAa,GAAGhC,OAAO,CAC3B,OAAO;IAAE,iBAAiB,EAAG,GAAE+B,QAAS;EAAS,CAAC,CAAC,EACnD,CAACA,QAAQ,CACX,CAAC;EAED,MAAME,aAAa,GAAGjC,OAAO,C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Item = _ref => {
19
19
  children,
20
20
  hasInitialFocus,
21
21
  isSelected,
22
+ isDisabled,
22
23
  onClick: onClickProp,
24
+ testId,
23
25
  value,
24
26
  variant = "default"
25
27
  } = _ref;
@@ -32,10 +34,12 @@ const MenuItem = _ref => {
32
34
  }, [onClickProp, closeMenu]);
33
35
  return _jsx(_MenuItem, {
34
36
  autoFocus: hasInitialFocus,
37
+ className: variant === "destructive" ? `${menuItemClasses.root}-destructive` : undefined,
38
+ "data-se": testId,
39
+ disabled: isDisabled,
40
+ onClick: onClick,
35
41
  selected: isSelected,
36
42
  value: value,
37
- onClick: onClick,
38
- className: variant === "destructive" ? `${menuItemClasses.root}-destructive` : undefined,
39
43
  children: children
40
44
  });
41
45
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","_ref","children","hasInitialFocus","isSelected","onClick","onClickProp","value","variant","closeMenu","event","_MenuItem","autoFocus","selected","className","root","undefined","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.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 {\n MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, useCallback, useContext, type ReactNode } from \"react\";\n\nimport { MenuContext } from \"./MenuContext\";\n\nexport type MenuItemProps = {\n /**\n * The content of the menu item.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item will be visually marked as selected.\n */\n isSelected?: boolean;\n /**\n * If `true`, the menu item will be visually marked as destructive.\n */\n isDestructive?: boolean;\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * The variant of the menu item.\n * - \"default\": The default variant.\n * - \"destructive\": A variant indicating a destructive action.\n */\n variant?: \"default\" | \"destructive\";\n};\n\nconst MenuItem = ({\n children,\n hasInitialFocus,\n isSelected,\n onClick: onClickProp,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n closeMenu();\n },\n [onClickProp, closeMenu]\n );\n\n return (\n <MuiMenuItem\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n selected={isSelected}\n value={value}\n onClick={onClick}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAE7DC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAmCpB,MAAMC,QAAQ,GAAGC,IAAA,IAOI;EAAA,IAPH;IAChBC,QAAQ;IACRC,eAAe;IACfC,UAAU;IACVC,OAAO,EAAEC,WAAW;IACpBC,KAAK;IACLC,OAAO,GAAG;EACG,CAAC,GAAAP,IAAA;EACd,MAAM;IAAEQ;EAAU,CAAC,GAAGb,UAAU,CAACC,WAAW,CAAC;EAE7C,MAAMQ,OAAO,GAAGV,WAAW,CACxBe,KAAK,IAAK;IACTJ,WAAW,GAAGI,KAAK,CAAC;IACpBD,SAAS,CAAC,CAAC;EACb,CAAC,EACD,CAACH,WAAW,EAAEG,SAAS,CACzB,CAAC;EAED,OACEV,IAAA,CAAAY,SAAA;IAEEC,SAAS,EAAET,eAAgB;IAC3BU,QAAQ,EAAET,UAAW;IACrBG,KAAK,EAAEA,KAAM;IACbF,OAAO,EAAEA,OAAQ;IACjBS,SAAS,EACPN,OAAO,KAAK,aAAa,GACpB,GAAEf,eAAe,CAACsB,IAAK,cAAa,GACrCC,SACL;IAAAd,QAAA,EAEAA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMe,gBAAgB,GAAGvB,IAAI,CAACM,QAAQ,CAAC;AACvCiB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIjB,QAAQ"}
1
+ {"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","_ref","children","hasInitialFocus","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.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 {\n MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, useCallback, useContext, type ReactNode } from \"react\";\n\nimport { MenuContext } from \"./MenuContext\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type MenuItemProps = {\n /**\n * The content of the menu item.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item will be visually marked as selected.\n */\n isSelected?: boolean;\n /**\n * If `true`, the menu item will be visually marked as disabled.\n */\n isDisabled?: boolean;\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * The variant of the menu item.\n * - \"default\": The default variant.\n * - \"destructive\": A variant indicating a destructive action.\n */\n variant?: \"default\" | \"destructive\";\n} & SeleniumProps;\n\nconst MenuItem = ({\n children,\n hasInitialFocus,\n isSelected,\n isDisabled,\n onClick: onClickProp,\n testId,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n closeMenu();\n },\n [onClickProp, closeMenu]\n );\n\n return (\n <MuiMenuItem\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n data-se={testId}\n disabled={isDisabled}\n onClick={onClick}\n selected={isSelected}\n value={value}\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAE7DC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoCpB,MAAMC,QAAQ,GAAGC,IAAA,IASI;EAAA,IATH;IAChBC,QAAQ;IACRC,eAAe;IACfC,UAAU;IACVC,UAAU;IACVC,OAAO,EAAEC,WAAW;IACpBC,MAAM;IACNC,KAAK;IACLC,OAAO,GAAG;EACG,CAAC,GAAAT,IAAA;EACd,MAAM;IAAEU;EAAU,CAAC,GAAGf,UAAU,CAACC,WAAW,CAAC;EAE7C,MAAMS,OAAO,GAAGX,WAAW,CACxBiB,KAAK,IAAK;IACTL,WAAW,GAAGK,KAAK,CAAC;IACpBD,SAAS,CAAC,CAAC;EACb,CAAC,EACD,CAACJ,WAAW,EAAEI,SAAS,CACzB,CAAC;EAED,OACEZ,IAAA,CAAAc,SAAA;IAEEC,SAAS,EAAEX,eAAgB;IAC3BY,SAAS,EACPL,OAAO,KAAK,aAAa,GACpB,GAAEjB,eAAe,CAACuB,IAAK,cAAa,GACrCC,SACL;IACD,WAAST,MAAO;IAChBU,QAAQ,EAAEb,UAAW;IACrBC,OAAO,EAAEA,OAAQ;IACjBa,QAAQ,EAAEf,UAAW;IACrBK,KAAK,EAAEA,KAAM;IAAAP,QAAA,EAEZA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMkB,gBAAgB,GAAG1B,IAAI,CAACM,QAAQ,CAAC;AACvCoB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIpB,QAAQ"}
@@ -27,10 +27,12 @@ const NativeSelect = forwardRef((_ref, ref) => {
27
27
  onBlur,
28
28
  onChange,
29
29
  onFocus,
30
+ testId,
30
31
  value,
31
32
  children
32
33
  } = _ref;
33
34
  const renderFieldComponent = useCallback(() => _jsx(_Select, {
35
+ "data-se": testId,
34
36
  defaultValue: defaultValue,
35
37
  id: idOverride,
36
38
  name: idOverride,
@@ -42,7 +44,7 @@ const NativeSelect = forwardRef((_ref, ref) => {
42
44
  ref: ref,
43
45
  value: value,
44
46
  children: children
45
- }), [defaultValue, idOverride, isMultiSelect, onBlur, onChange, onFocus, ref, children, value]);
47
+ }), [children, defaultValue, idOverride, isMultiSelect, onBlur, onChange, onFocus, ref, testId, value]);
46
48
  return _jsx(Field, {
47
49
  errorMessage: errorMessage,
48
50
  fieldType: "single",
@@ -1 +1 @@
1
- {"version":3,"file":"NativeSelect.js","names":["forwardRef","memo","useCallback","Field","jsx","_jsx","NativeSelect","_ref","ref","defaultValue","errorMessage","hint","id","idOverride","isDisabled","isMultiSelect","isOptional","label","onBlur","onChange","onFocus","value","children","renderFieldComponent","_Select","name","multiple","native","fieldType","hasVisibleLabel","MemoizedNativeSelect","displayName"],"sources":["../src/NativeSelect.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 { ReactElement, forwardRef, memo, useCallback } from \"react\";\nimport { Select as MuiSelect } from \"@mui/material\";\nimport { SelectProps as MuiSelectProps } from \"@mui/material\";\nimport { Field } from \"./Field\";\n\nexport type NativeSelectOption = {\n text: string;\n value?: string;\n type?: \"heading\" | \"option\";\n};\n\nexport type NativeSelectProps = {\n /**\n * The options or optgroup elements within the NativeSelect\n */\n children?: ReactElement<\"option\"> | ReactElement<\"optgroup\">;\n /**\n * The default value of the NativeSelect. Only applicable if `value` is not provided\n */\n defaultValue?: string;\n /**\n * The error message for the NativeSelect\n */\n errorMessage?: string;\n /**\n * The hint text for the NativeSelect\n */\n hint?: string;\n /**\n * The id attribute of the NativeSelect\n */\n id?: string;\n /**\n * If `true`, the NativeSelect is disabled\n */\n isDisabled?: boolean;\n /**\n * If `true`, the NativeSelect allows multiple selections\n */\n isMultiSelect?: boolean;\n /**\n * If `true`, the NativeSelect is optional\n */\n isOptional?: boolean;\n /**\n * The label text for the NativeSelect\n */\n label: string;\n /**\n * Callback fired when the NativeSelect loses focus\n */\n onBlur?: MuiSelectProps[\"onBlur\"];\n /**\n * Callback fired when the value of the NativeSelect changes\n */\n onChange?: MuiSelectProps[\"onChange\"];\n /**\n * Callback fired when the NativeSelect gains focus\n */\n onFocus?: MuiSelectProps[\"onFocus\"];\n /**\n * The value or values selected in the NativeSelect\n */\n value?: string | string[];\n};\n\nconst NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n (\n {\n defaultValue,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiSelect = false,\n isOptional = false,\n label,\n onBlur,\n onChange,\n onFocus,\n value,\n children,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n () => (\n <MuiSelect\n defaultValue={defaultValue}\n id={idOverride}\n name={idOverride}\n multiple={isMultiSelect}\n native={true}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n ref={ref}\n value={value}\n children={children}\n />\n ),\n [\n defaultValue,\n idOverride,\n isMultiSelect,\n onBlur,\n onChange,\n onFocus,\n ref,\n children,\n value,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedNativeSelect = memo(NativeSelect);\nMemoizedNativeSelect.displayName = \"NativeSelect\";\n\nexport { MemoizedNativeSelect as NativeSelect };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAuBA,UAAU,EAAEC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAAC,SAG3DC,KAAK;AAAA,S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D,oBAAoB,IAAIxB,YAAY"}
1
+ {"version":3,"file":"NativeSelect.js","names":["forwardRef","memo","useCallback","Field","jsx","_jsx","NativeSelect","_ref","ref","defaultValue","errorMessage","hint","id","idOverride","isDisabled","isMultiSelect","isOptional","label","onBlur","onChange","onFocus","testId","value","children","renderFieldComponent","_Select","name","multiple","native","fieldType","hasVisibleLabel","MemoizedNativeSelect","displayName"],"sources":["../src/NativeSelect.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 { ReactElement, forwardRef, memo, useCallback } from \"react\";\nimport { Select as MuiSelect } from \"@mui/material\";\nimport { SelectProps as MuiSelectProps } from \"@mui/material\";\nimport { Field } from \"./Field\";\n\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type NativeSelectOption = {\n text: string;\n value?: string;\n type?: \"heading\" | \"option\";\n};\n\nexport type NativeSelectProps = {\n /**\n * The options or optgroup elements within the NativeSelect\n */\n children?: ReactElement<\"option\"> | ReactElement<\"optgroup\">;\n /**\n * The default value of the NativeSelect. Only applicable if `value` is not provided\n */\n defaultValue?: string;\n /**\n * The error message for the NativeSelect\n */\n errorMessage?: string;\n /**\n * The hint text for the NativeSelect\n */\n hint?: string;\n /**\n * The id attribute of the NativeSelect\n */\n id?: string;\n /**\n * If `true`, the NativeSelect is disabled\n */\n isDisabled?: boolean;\n /**\n * If `true`, the NativeSelect allows multiple selections\n */\n isMultiSelect?: boolean;\n /**\n * If `true`, the NativeSelect is optional\n */\n isOptional?: boolean;\n /**\n * The label text for the NativeSelect\n */\n label: string;\n /**\n * Callback fired when the NativeSelect loses focus\n */\n onBlur?: MuiSelectProps[\"onBlur\"];\n /**\n * Callback fired when the value of the NativeSelect changes\n */\n onChange?: MuiSelectProps[\"onChange\"];\n /**\n * Callback fired when the NativeSelect gains focus\n */\n onFocus?: MuiSelectProps[\"onFocus\"];\n /**\n * The value or values selected in the NativeSelect\n */\n value?: string | string[];\n} & SeleniumProps;\n\nconst NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n (\n {\n defaultValue,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiSelect = false,\n isOptional = false,\n label,\n onBlur,\n onChange,\n onFocus,\n testId,\n value,\n children,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n () => (\n <MuiSelect\n data-se={testId}\n defaultValue={defaultValue}\n id={idOverride}\n name={idOverride}\n multiple={isMultiSelect}\n native={true}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n ref={ref}\n value={value}\n children={children}\n />\n ),\n [\n children,\n defaultValue,\n idOverride,\n isMultiSelect,\n onBlur,\n onChange,\n onFocus,\n ref,\n testId,\n value,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedNativeSelect = memo(NativeSelect);\nMemoizedNativeSelect.displayName = \"NativeSelect\";\n\nexport { MemoizedNativeSelect as NativeSelect };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAuBA,UAAU,EAAEC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAAC,SAG3DC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAiEd,MAAMC,YAAY,GAAGN,UAAU,CAC7B,CAAAO,IAAA,EAiBEC,GAAG,KACA;EAAA,IAjBH;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sx-runtime";
18
18
  const OdysseyCacheProvider = _ref => {
19
19
  let {
20
20
  children,
21
+ emotionRootElement,
21
22
  nonce,
22
23
  stylisPlugins
23
24
  } = _ref;
24
25
  const uniqueAlphabeticalId = useUniqueAlphabeticalId();
25
26
  const emotionCache = useMemo(() => createCache({
27
+ container: emotionRootElement,
26
28
  key: uniqueAlphabeticalId,
27
29
  nonce: nonce || window.cspNonce,
30
+ prepend: Boolean(emotionRootElement),
28
31
  stylisPlugins
29
- }), [nonce, stylisPlugins, uniqueAlphabeticalId]);
32
+ }), [emotionRootElement, nonce, stylisPlugins, uniqueAlphabeticalId]);
30
33
  return _jsx(CacheProvider, {
31
34
  value: emotionCache,
32
35
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyCacheProvider.js","names":["createCache","CacheProvider","memo","useMemo","useUniqueAlphabeticalId","jsx","_jsx","OdysseyCacheProvider","_ref","children","nonce","stylisPlugins","uniqueAlphabeticalId","emotionCache","key","window","cspNonce","value","MemoizedOdysseyCacheProvider","displayName"],"sources":["../src/OdysseyCacheProvider.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\ndeclare global {\n interface Window {\n cspNonce: string;\n }\n}\n\nimport createCache, { StylisPlugin } from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactNode, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId\";\n\nexport type OdysseyCacheProviderProps = {\n children: ReactNode;\n nonce?: string;\n stylisPlugins?: StylisPlugin[];\n};\n\nconst OdysseyCacheProvider = ({\n children,\n nonce,\n stylisPlugins,\n}: OdysseyCacheProviderProps) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const emotionCache = useMemo(\n () =>\n createCache({\n key: uniqueAlphabeticalId,\n nonce: nonce || window.cspNonce,\n stylisPlugins,\n }),\n [nonce, stylisPlugins, uniqueAlphabeticalId]\n );\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\nMemoizedOdysseyCacheProvider.displayName = \"OdysseyCacheProvider\";\n\nexport { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,WAAW,MAAwB,gBAAgB;AAC1D,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,IAAI,EAAaC,OAAO,QAAQ,OAAO;AAAC,SAExCC,uBAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQhC,MAAMC,oBAAoB,GAAGC,IAAA,IAII;EAAA,IAJH;IAC5BC,QAAQ;IACRC,KAAK;IACLC;EACyB,CAAC,GAAAH,IAAA;EAC1B,MAAMI,oBAAoB,GAAGR,uBAAuB,CAAC,CAAC;EAEtD,MAAMS,YAAY,GAAGV,OAAO,CAC1B,MACEH,WAAW,CAAC;IACVc,GAAG,EAAEF,oBAAoB;IACzBF,KAAK,EAAEA,KAAK,IAAIK,MAAM,CAACC,QAAQ;IAC/BL;EACF,CAAC,CAAC,EACJ,CAACD,KAAK,EAAEC,aAAa,EAAEC,oBAAoB,CAC7C,CAAC;EAED,OAAON,IAAA,CAACL,aAAa;IAACgB,KAAK,EAAEJ,YAAa;IAAAJ,QAAA,EAAEA;EAAQ,CAAgB,CAAC;AACvE,CAAC;AAED,MAAMS,4BAA4B,GAAGhB,IAAI,CAACK,oBAAoB,CAAC;AAC/DW,4BAA4B,CAACC,WAAW,GAAG,sBAAsB;AAEjE,SAASD,4BAA4B,IAAIX,oBAAoB"}
1
+ {"version":3,"file":"OdysseyCacheProvider.js","names":["createCache","CacheProvider","memo","useMemo","useUniqueAlphabeticalId","jsx","_jsx","OdysseyCacheProvider","_ref","children","emotionRootElement","nonce","stylisPlugins","uniqueAlphabeticalId","emotionCache","container","key","window","cspNonce","prepend","Boolean","value","MemoizedOdysseyCacheProvider","displayName"],"sources":["../src/OdysseyCacheProvider.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\ndeclare global {\n interface Window {\n cspNonce: string;\n }\n}\n\nimport createCache, { StylisPlugin } from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactNode, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId\";\n\nexport type OdysseyCacheProviderProps = {\n children: ReactNode;\n /**\n * Emotion renders into this HTML element.\n * When enabling this prop, Emotion renders at the top of this component rather than the bottom like it does in the HTML `<head>`.\n */\n emotionRootElement?: HTMLStyleElement;\n nonce?: string;\n stylisPlugins?: StylisPlugin[];\n};\n\nconst OdysseyCacheProvider = ({\n children,\n emotionRootElement,\n nonce,\n stylisPlugins,\n}: OdysseyCacheProviderProps) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const emotionCache = useMemo(\n () =>\n createCache({\n container: emotionRootElement,\n key: uniqueAlphabeticalId,\n nonce: nonce || window.cspNonce,\n prepend: Boolean(emotionRootElement),\n stylisPlugins,\n }),\n [emotionRootElement, nonce, stylisPlugins, uniqueAlphabeticalId]\n );\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\nMemoizedOdysseyCacheProvider.displayName = \"OdysseyCacheProvider\";\n\nexport { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,WAAW,MAAwB,gBAAgB;AAC1D,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,IAAI,EAAaC,OAAO,QAAQ,OAAO;AAAC,SAExCC,uBAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAahC,MAAMC,oBAAoB,GAAGC,IAAA,IAKI;EAAA,IALH;IAC5BC,QAAQ;IACRC,kBAAkB;IAClBC,KAAK;IACLC;EACyB,CAAC,GAAAJ,IAAA;EAC1B,MAAMK,oBAAoB,GAAGT,uBAAuB,CAAC,CAAC;EAEtD,MAAMU,YAAY,GAAGX,OAAO,CAC1B,MACEH,WAAW,CAAC;IACVe,SAAS,EAAEL,kBAAkB;IAC7BM,GAAG,EAAEH,oBAAoB;IACzBF,KAAK,EAAEA,KAAK,IAAIM,MAAM,CAACC,QAAQ;IAC/BC,OAAO,EAAEC,OAAO,CAACV,kBAAkB,CAAC;IACpCE;EACF,CAAC,CAAC,EACJ,CAACF,kBAAkB,EAAEC,KAAK,EAAEC,aAAa,EAAEC,oBAAoB,CACjE,CAAC;EAED,OAAOP,IAAA,CAACL,aAAa;IAACoB,KAAK,EAAEP,YAAa;IAAAL,QAAA,EAAEA;EAAQ,CAAgB,CAAC;AACvE,CAAC;AAED,MAAMa,4BAA4B,GAAGpB,IAAI,CAACK,oBAAoB,CAAC;AAC/De,4BAA4B,CAACC,WAAW,GAAG,sBAAsB;AAEjE,SAASD,4BAA4B,IAAIf,oBAAoB"}
@@ -1,3 +1,4 @@
1
+ import _ScopedCssBaseline from "@mui/material/ScopedCssBaseline";
1
2
  /*!
2
3
  * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
4
  * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
@@ -19,6 +20,8 @@ const OdysseyProvider = _ref => {
19
20
  let {
20
21
  children,
21
22
  designTokensOverride,
23
+ emotionRootElement,
24
+ shadowRootElement,
22
25
  languageCode,
23
26
  nonce,
24
27
  stylisPlugins,
@@ -26,15 +29,19 @@ const OdysseyProvider = _ref => {
26
29
  translationOverrides
27
30
  } = _ref;
28
31
  return _jsx(OdysseyCacheProvider, {
32
+ emotionRootElement: emotionRootElement,
29
33
  nonce: nonce,
30
34
  stylisPlugins: stylisPlugins,
31
35
  children: _jsx(OdysseyThemeProvider, {
32
- themeOverride: themeOverride,
33
36
  designTokensOverride: designTokensOverride,
34
- children: _jsx(OdysseyTranslationProvider, {
35
- languageCode: languageCode,
36
- translationOverrides: translationOverrides,
37
- children: children
37
+ shadowRootElement: shadowRootElement,
38
+ themeOverride: themeOverride,
39
+ children: _jsx(_ScopedCssBaseline, {
40
+ children: _jsx(OdysseyTranslationProvider, {
41
+ languageCode: languageCode,
42
+ translationOverrides: translationOverrides,
43
+ children: children
44
+ })
38
45
  })
39
46
  })
40
47
  });
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyProvider.js","names":["memo","OdysseyCacheProvider","OdysseyThemeProvider","OdysseyTranslationProvider","jsx","_jsx","OdysseyProvider","_ref","children","designTokensOverride","languageCode","nonce","stylisPlugins","themeOverride","translationOverrides","MemoizedThemeProvider"],"sources":["../src/OdysseyProvider.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 { memo, ReactNode } from \"react\";\n\nimport {\n OdysseyCacheProvider,\n OdysseyCacheProviderProps,\n} from \"./OdysseyCacheProvider\";\nimport {\n OdysseyThemeProvider,\n OdysseyThemeProviderProps,\n} from \"./OdysseyThemeProvider\";\nimport {\n OdysseyTranslationProvider,\n OdysseyTranslationProviderProps,\n} from \"./OdysseyTranslationProvider\";\n\nexport type OdysseyProviderProps = OdysseyCacheProviderProps &\n OdysseyThemeProviderProps &\n OdysseyTranslationProviderProps & {\n children: ReactNode;\n };\n\nconst OdysseyProvider = ({\n children,\n designTokensOverride,\n languageCode,\n nonce,\n stylisPlugins,\n themeOverride,\n translationOverrides,\n}: OdysseyProviderProps) => (\n <OdysseyCacheProvider nonce={nonce} stylisPlugins={stylisPlugins}>\n <OdysseyThemeProvider\n themeOverride={themeOverride}\n designTokensOverride={designTokensOverride}\n >\n <OdysseyTranslationProvider\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n {children}\n </OdysseyTranslationProvider>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\n\nconst MemoizedThemeProvider = memo(OdysseyProvider);\n\nexport { MemoizedThemeProvider as OdysseyProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAmB,OAAO;AAAC,SAGtCC,oBAAoB;AAAA,SAIpBC,oBAAoB;AAAA,SAIpBC,0BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAU5B,MAAMC,eAAe,GAAGC,IAAA;EAAA,IAAC;IACvBC,QAAQ;IACRC,oBAAoB;IACpBC,YAAY;IACZC,KAAK;IACLC,aAAa;IACbC,aAAa;IACbC;EACoB,CAAC,GAAAP,IAAA;EAAA,OACrBF,IAAA,CAACJ,oBAAoB;IAACU,KAAK,EAAEA,KAAM;IAACC,aAAa,EAAEA,aAAc;IAAAJ,QAAA,EAC/DH,IAAA,CAACH,oBAAoB;MACnBW,aAAa,EAAEA,aAAc;MAC7BJ,oBAAoB,EAAEA,oBAAqB;MAAAD,QAAA,EAE3CH,IAAA,CAACF,0BAA0B;QACzBO,YAAY,EAAEA,YAAa;QAC3BI,oBAAoB,EAAEA,oBAAqB;QAAAN,QAAA,EAE1CA;MAAQ,CACiB;IAAC,CACT;EAAC,CACH,CAAC;AAAA,CACxB;AAED,MAAMO,qBAAqB,GAAGf,IAAI,CAACM,eAAe,CAAC;AAEnD,SAASS,qBAAqB,IAAIT,eAAe"}
1
+ {"version":3,"file":"OdysseyProvider.js","names":["memo","OdysseyCacheProvider","OdysseyThemeProvider","OdysseyTranslationProvider","jsx","_jsx","OdysseyProvider","_ref","children","designTokensOverride","emotionRootElement","shadowRootElement","languageCode","nonce","stylisPlugins","themeOverride","translationOverrides","_ScopedCssBaseline","MemoizedThemeProvider"],"sources":["../src/OdysseyProvider.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 { memo, ReactNode } from \"react\";\nimport { ScopedCssBaseline } from \"@mui/material\";\n\nimport {\n OdysseyCacheProvider,\n OdysseyCacheProviderProps,\n} from \"./OdysseyCacheProvider\";\nimport {\n OdysseyThemeProvider,\n OdysseyThemeProviderProps,\n} from \"./OdysseyThemeProvider\";\nimport {\n OdysseyTranslationProvider,\n OdysseyTranslationProviderProps,\n} from \"./OdysseyTranslationProvider\";\n\nexport type OdysseyProviderProps = OdysseyCacheProviderProps &\n OdysseyThemeProviderProps &\n OdysseyTranslationProviderProps & {\n children: ReactNode;\n };\n\nconst OdysseyProvider = ({\n children,\n designTokensOverride,\n emotionRootElement,\n shadowRootElement,\n languageCode,\n nonce,\n stylisPlugins,\n themeOverride,\n translationOverrides,\n}: OdysseyProviderProps) => (\n <OdysseyCacheProvider\n emotionRootElement={emotionRootElement}\n nonce={nonce}\n stylisPlugins={stylisPlugins}\n >\n <OdysseyThemeProvider\n designTokensOverride={designTokensOverride}\n shadowRootElement={shadowRootElement}\n themeOverride={themeOverride}\n >\n <ScopedCssBaseline>\n <OdysseyTranslationProvider\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n {children}\n </OdysseyTranslationProvider>\n </ScopedCssBaseline>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\n\nconst MemoizedThemeProvider = memo(OdysseyProvider);\n\nexport { MemoizedThemeProvider as OdysseyProvider };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAmB,OAAO;AAAC,SAItCC,oBAAoB;AAAA,SAIpBC,oBAAoB;AAAA,SAIpBC,0BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAU5B,MAAMC,eAAe,GAAGC,IAAA;EAAA,IAAC;IACvBC,QAAQ;IACRC,oBAAoB;IACpBC,kBAAkB;IAClBC,iBAAiB;IACjBC,YAAY;IACZC,KAAK;IACLC,aAAa;IACbC,aAAa;IACbC;EACoB,CAAC,GAAAT,IAAA;EAAA,OACrBF,IAAA,CAACJ,oBAAoB;IACnBS,kBAAkB,EAAEA,kBAAmB;IACvCG,KAAK,EAAEA,KAAM;IACbC,aAAa,EAAEA,aAAc;IAAAN,QAAA,EAE7BH,IAAA,CAACH,oBAAoB;MACnBO,oBAAoB,EAAEA,oBAAqB;MAC3CE,iBAAiB,EAAEA,iBAAkB;MACrCI,aAAa,EAAEA,aAAc;MAAAP,QAAA,EAE7BH,IAAA,CAAAY,kBAAA;QAAAT,QAAA,EACEH,IAAA,CAACF,0BAA0B;UACzBS,YAAY,EAAEA,YAAa;UAC3BI,oBAAoB,EAAEA,oBAAqB;UAAAR,QAAA,EAE1CA;QAAQ,CACiB;MAAC,CACZ;IAAC,CACA;EAAC,CACH,CAAC;AAAA,CACxB;AAED,MAAMU,qBAAqB,GAAGlB,IAAI,CAACM,eAAe,CAAC;AAEnD,SAASY,qBAAqB,IAAIZ,eAAe"}