@okta/odyssey-react-mui 1.9.11 → 1.9.13
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.
- package/CHANGELOG.md +8 -0
- package/dist/Accordion.js +3 -1
- package/dist/Accordion.js.map +1 -1
- package/dist/AllowedProps.js +2 -0
- package/dist/AllowedProps.js.map +1 -0
- package/dist/Autocomplete.js +4 -2
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Badge.js +35 -30
- package/dist/Badge.js.map +1 -1
- package/dist/Banner.js +5 -1
- package/dist/Banner.js.map +1 -1
- package/dist/Box.js +4 -2
- package/dist/Box.js.map +1 -1
- package/dist/Breadcrumbs.js +5 -1
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Button.js +3 -1
- package/dist/Button.js.map +1 -1
- package/dist/Callout.js +4 -1
- package/dist/Callout.js.map +1 -1
- package/dist/Checkbox.js +5 -2
- package/dist/Checkbox.js.map +1 -1
- package/dist/CheckboxGroup.js +4 -2
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/CircularProgress.js.map +1 -1
- package/dist/Dialog.js +2 -0
- package/dist/Dialog.js.map +1 -1
- package/dist/FieldError.js +4 -1
- package/dist/FieldError.js.map +1 -1
- package/dist/FieldHint.js +3 -1
- package/dist/FieldHint.js.map +1 -1
- package/dist/FieldLabel.js +4 -1
- package/dist/FieldLabel.js.map +1 -1
- package/dist/Fieldset.js +4 -1
- package/dist/Fieldset.js.map +1 -1
- package/dist/Form.js +4 -1
- package/dist/Form.js.map +1 -1
- package/dist/Link.js +2 -0
- package/dist/Link.js.map +1 -1
- package/dist/MenuButton.js +3 -1
- package/dist/MenuButton.js.map +1 -1
- package/dist/MenuItem.js.map +1 -1
- package/dist/NativeSelect.js +4 -2
- package/dist/NativeSelect.js.map +1 -1
- package/dist/PasswordField.js +3 -1
- package/dist/PasswordField.js.map +1 -1
- package/dist/Radio.js +2 -0
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +3 -1
- package/dist/RadioGroup.js.map +1 -1
- package/dist/ScreenReaderText.js +3 -1
- package/dist/ScreenReaderText.js.map +1 -1
- package/dist/SearchField.js +3 -1
- package/dist/SearchField.js.map +1 -1
- package/dist/Select.js +4 -2
- package/dist/Select.js.map +1 -1
- package/dist/Status.js +2 -0
- package/dist/Status.js.map +1 -1
- package/dist/Tabs.js +54 -10
- package/dist/Tabs.js.map +1 -1
- package/dist/Tag.js +5 -3
- package/dist/Tag.js.map +1 -1
- package/dist/TagList.js.map +1 -1
- package/dist/TextField.js +6 -2
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +4 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Tooltip.js +3 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/Typography.js +32 -10
- package/dist/Typography.js.map +1 -1
- package/dist/labs/Switch.js.map +1 -1
- package/dist/labs/VirtualizedAutocomplete.js +4 -2
- package/dist/labs/VirtualizedAutocomplete.js.map +1 -1
- package/dist/src/Accordion.d.ts +3 -3
- package/dist/src/Accordion.d.ts.map +1 -1
- package/dist/src/{SeleniumProps.d.ts → AllowedProps.d.ts} +6 -2
- package/dist/src/AllowedProps.d.ts.map +1 -0
- package/dist/src/Autocomplete.d.ts +3 -3
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Badge.d.ts +3 -3
- package/dist/src/Badge.d.ts.map +1 -1
- package/dist/src/Banner.d.ts +3 -3
- package/dist/src/Banner.d.ts.map +1 -1
- package/dist/src/Box.d.ts +3 -3
- package/dist/src/Box.d.ts.map +1 -1
- package/dist/src/Breadcrumbs.d.ts +3 -2
- package/dist/src/Breadcrumbs.d.ts.map +1 -1
- package/dist/src/Button.d.ts +3 -3
- package/dist/src/Button.d.ts.map +1 -1
- package/dist/src/Callout.d.ts +3 -3
- package/dist/src/Callout.d.ts.map +1 -1
- package/dist/src/Checkbox.d.ts +3 -3
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/CheckboxGroup.d.ts +3 -3
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/CircularProgress.d.ts +2 -2
- package/dist/src/CircularProgress.d.ts.map +1 -1
- package/dist/src/Dialog.d.ts +3 -3
- package/dist/src/Dialog.d.ts.map +1 -1
- package/dist/src/FieldError.d.ts +3 -3
- package/dist/src/FieldError.d.ts.map +1 -1
- package/dist/src/FieldHint.d.ts +3 -3
- package/dist/src/FieldHint.d.ts.map +1 -1
- package/dist/src/FieldLabel.d.ts +3 -3
- package/dist/src/FieldLabel.d.ts.map +1 -1
- package/dist/src/Fieldset.d.ts +3 -3
- package/dist/src/Fieldset.d.ts.map +1 -1
- package/dist/src/Form.d.ts +3 -3
- package/dist/src/Form.d.ts.map +1 -1
- package/dist/src/Link.d.ts +3 -3
- package/dist/src/Link.d.ts.map +1 -1
- package/dist/src/MenuButton.d.ts +3 -3
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/MenuItem.d.ts +2 -2
- package/dist/src/MenuItem.d.ts.map +1 -1
- package/dist/src/NativeSelect.d.ts +2 -2
- package/dist/src/NativeSelect.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +3 -3
- package/dist/src/PasswordField.d.ts.map +1 -1
- package/dist/src/Radio.d.ts +3 -3
- package/dist/src/Radio.d.ts.map +1 -1
- package/dist/src/RadioGroup.d.ts +3 -3
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/ScreenReaderText.d.ts +3 -2
- package/dist/src/ScreenReaderText.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +3 -3
- package/dist/src/SearchField.d.ts.map +1 -1
- package/dist/src/Select.d.ts +3 -3
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/Status.d.ts +3 -3
- package/dist/src/Status.d.ts.map +1 -1
- package/dist/src/Tabs.d.ts +7 -3
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/src/Tag.d.ts +3 -3
- package/dist/src/Tag.d.ts.map +1 -1
- package/dist/src/TagList.d.ts +2 -2
- package/dist/src/TagList.d.ts.map +1 -1
- package/dist/src/TextField.d.ts +3 -3
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/Toast.d.ts +3 -3
- package/dist/src/Toast.d.ts.map +1 -1
- package/dist/src/Tooltip.d.ts +3 -3
- package/dist/src/Tooltip.d.ts.map +1 -1
- package/dist/src/Typography.d.ts +13 -13
- package/dist/src/Typography.d.ts.map +1 -1
- package/dist/src/labs/Switch.d.ts +2 -2
- package/dist/src/labs/Switch.d.ts.map +1 -1
- package/dist/src/labs/VirtualizedAutocomplete.d.ts +3 -3
- package/dist/src/labs/VirtualizedAutocomplete.d.ts.map +1 -1
- package/dist/theme/components.js +1 -1
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Accordion.tsx +6 -3
- package/src/{SeleniumProps.ts → AllowedProps.ts} +5 -1
- package/src/Autocomplete.tsx +4 -2
- package/src/Badge.tsx +37 -27
- package/src/Banner.tsx +8 -5
- package/src/Box.tsx +4 -3
- package/src/Breadcrumbs.tsx +6 -1
- package/src/Button.tsx +5 -2
- package/src/Callout.tsx +14 -5
- package/src/Checkbox.tsx +6 -4
- package/src/CheckboxGroup.tsx +5 -3
- package/src/CircularProgress.tsx +2 -2
- package/src/Dialog.tsx +4 -3
- package/src/FieldError.tsx +5 -5
- package/src/FieldHint.tsx +10 -4
- package/src/FieldLabel.tsx +11 -5
- package/src/Fieldset.tsx +5 -4
- package/src/Form.tsx +9 -4
- package/src/Link.tsx +4 -2
- package/src/MenuButton.tsx +4 -2
- package/src/MenuItem.tsx +2 -2
- package/src/NativeSelect.tsx +5 -2
- package/src/PasswordField.tsx +5 -2
- package/src/Radio.tsx +4 -2
- package/src/RadioGroup.tsx +5 -3
- package/src/ScreenReaderText.tsx +4 -3
- package/src/SearchField.tsx +5 -2
- package/src/Select.tsx +5 -2
- package/src/Status.tsx +4 -2
- package/src/Tabs.tsx +87 -19
- package/src/Tag.tsx +14 -3
- package/src/TagList.tsx +2 -2
- package/src/TextField.tsx +11 -4
- package/src/Toast.tsx +5 -4
- package/src/Tooltip.tsx +4 -2
- package/src/Typography.tsx +24 -2
- package/src/labs/Switch.tsx +2 -2
- package/src/labs/VirtualizedAutocomplete.tsx +4 -2
- package/src/theme/components.tsx +1 -1
- package/dist/SeleniumProps.js +0 -2
- package/dist/SeleniumProps.js.map +0 -1
- package/dist/src/SeleniumProps.d.ts.map +0 -1
package/dist/Checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["useTranslation","memo","useCallback","useMemo","useRef","useImperativeHandle","Typography","ComponentControlledState","getControlState","jsxs","_jsxs","Fragment","_Fragment","jsx","_jsx","checkboxValidityValues","Checkbox","_ref","ariaLabel","ariaLabelledBy","id","idOverride","inputFocusRef","isChecked","isDefaultChecked","isDisabled","isIndeterminate","isRequired","label","labelProp","hint","name","nameOverride","onChange","onChangeProp","onBlur","onBlurProp","testId","validity","value","t","controlledStateRef","controlledValue","uncontrolledValue","inputValues","current","CONTROLLED","checked","defaultChecked","inputRef","element","focus","children","component","color","_FormHelperText","event","_FormControlLabel","sx","alignItems","className","control","_Checkbox","indeterminate","required","marginBlockStart","disabled","MemoizedCheckbox","displayName"],"sources":["../src/Checkbox.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 { useTranslation } from \"react-i18next\";\nimport { memo, useCallback, useMemo, useRef, useImperativeHandle } from \"react\";\nimport {\n Checkbox as MuiCheckbox,\n CheckboxProps as MuiCheckboxProps,\n FormControlLabel,\n FormControlLabelProps as MuiFormControlLabelProps,\n FormHelperText,\n} from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { Typography } from \"./Typography\";\nimport type {
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["useTranslation","memo","useCallback","useMemo","useRef","useImperativeHandle","Typography","ComponentControlledState","getControlState","jsxs","_jsxs","Fragment","_Fragment","jsx","_jsx","checkboxValidityValues","Checkbox","_ref","ariaLabel","ariaLabelledBy","id","idOverride","inputFocusRef","isChecked","isDefaultChecked","isDisabled","isIndeterminate","isRequired","label","labelProp","hint","name","nameOverride","onChange","onChangeProp","onBlur","onBlurProp","testId","translate","validity","value","t","controlledStateRef","controlledValue","uncontrolledValue","inputValues","current","CONTROLLED","checked","defaultChecked","inputRef","element","focus","children","component","color","_FormHelperText","event","_FormControlLabel","sx","alignItems","className","control","_Checkbox","indeterminate","required","marginBlockStart","disabled","MemoizedCheckbox","displayName"],"sources":["../src/Checkbox.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 { useTranslation } from \"react-i18next\";\nimport { memo, useCallback, useMemo, useRef, useImperativeHandle } from \"react\";\nimport {\n Checkbox as MuiCheckbox,\n CheckboxProps as MuiCheckboxProps,\n FormControlLabel,\n FormControlLabelProps as MuiFormControlLabelProps,\n FormHelperText,\n} from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { Typography } from \"./Typography\";\nimport type { AllowedProps } from \"./AllowedProps\";\nimport { ComponentControlledState, getControlState } from \"./inputUtils\";\nimport { CheckedFieldProps } from \"./FormCheckedProps\";\nimport { FocusHandle } from \"./@types/react-augment\";\n\nexport const checkboxValidityValues = [\"valid\", \"invalid\", \"inherit\"] as const;\n\nexport type CheckboxProps = {\n /**\n * The ARIA label for the Checkbox\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Checkbox\n */\n ariaLabelledBy?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * The ref forwarded to the Checkbox to expose focus()\n */\n inputFocusRef?: React.RefObject<FocusHandle>;\n /**\n * Determines whether the Checkbox is disabled\n */\n isDisabled?: boolean;\n /**\n * Determines whether the Checkbox is in an indeterminate state\n */\n isIndeterminate?: boolean;\n /**\n * Determines whether the Checkbox is required\n */\n isRequired?: boolean;\n /**\n * The label text for the Checkbox\n */\n label?: string;\n /**\n * The helper text content\n */\n hint?: string;\n /**\n * The checkbox validity, if different from its enclosing group. Defaults to \"inherit\".\n */\n validity?: (typeof checkboxValidityValues)[number];\n /**\n * The value attribute of the Checkbox\n */\n value?: string;\n /**\n * Callback fired when the blur event happens. Provides event value.\n */\n onBlur?: MuiFormControlLabelProps[\"onBlur\"];\n} & Pick<FieldComponentProps, \"id\" | \"isDisabled\" | \"name\"> &\n CheckedFieldProps<MuiCheckboxProps> &\n AllowedProps;\n\nconst Checkbox = ({\n ariaLabel,\n ariaLabelledBy,\n id: idOverride,\n inputFocusRef,\n isChecked,\n isDefaultChecked,\n isDisabled,\n isIndeterminate,\n isRequired,\n label: labelProp,\n hint,\n name: nameOverride,\n onChange: onChangeProp,\n onBlur: onBlurProp,\n testId,\n translate,\n validity = \"inherit\",\n value,\n}: CheckboxProps) => {\n const { t } = useTranslation();\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: isChecked,\n uncontrolledValue: isDefaultChecked,\n })\n );\n const inputValues = useMemo(() => {\n if (controlledStateRef.current === ComponentControlledState.CONTROLLED) {\n return { checked: isChecked };\n }\n return { defaultChecked: isDefaultChecked };\n }, [isDefaultChecked, isChecked]);\n\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(\n inputFocusRef,\n () => {\n const element = inputRef.current;\n return {\n focus: () => {\n element && element.focus();\n },\n };\n },\n []\n );\n\n const label = useMemo(() => {\n return (\n <>\n {labelProp}\n {isRequired && (\n <>\n {\" \"}\n <Typography component=\"span\" color=\"textSecondary\">\n ({t(\"fieldlabel.required.text\")})\n </Typography>\n </>\n )}\n {hint && <FormHelperText translate={translate}>{hint}</FormHelperText>}\n </>\n );\n }, [isRequired, labelProp, hint, t, translate]);\n\n const onChange = useCallback<NonNullable<MuiCheckboxProps[\"onChange\"]>>(\n (event, checked) => {\n onChangeProp?.(event, checked);\n },\n [onChangeProp]\n );\n\n const onBlur = useCallback<NonNullable<MuiFormControlLabelProps[\"onBlur\"]>>(\n (event) => {\n onBlurProp?.(event);\n },\n [onBlurProp]\n );\n\n return (\n <FormControlLabel\n sx={{ alignItems: \"flex-start\" }}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n className={\n validity === \"invalid\"\n ? \"Mui-error\"\n : validity === \"valid\"\n ? \"Mui-valid\"\n : \"\"\n }\n control={\n <MuiCheckbox\n {...inputValues}\n indeterminate={isIndeterminate}\n onChange={onChange}\n required={isRequired}\n inputRef={inputRef}\n sx={() => ({\n marginBlockStart: \"2px\",\n })}\n />\n }\n data-se={testId}\n disabled={isDisabled}\n id={idOverride}\n label={label}\n name={nameOverride ?? idOverride}\n value={value}\n required={isRequired}\n onBlur={onBlur}\n translate={translate}\n />\n );\n};\n\nconst MemoizedCheckbox = memo(Checkbox);\nMemoizedCheckbox.displayName = \"Checkbox\";\n\nexport { MemoizedCheckbox as Checkbox };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,eAAe;AAC9C,SAASC,IAAI,EAAEC,WAAW,EAAEC,OAAO,EA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OAAO,GACpB,WAAW,GACX,EACL;IACDuB,OAAO,EACLhD,IAAA,CAAAiD,SAAA;MAAA,GACMlB,WAAW;MACfmB,aAAa,EAAEtC,eAAgB;MAC/BO,QAAQ,EAAEA,QAAS;MACnBgC,QAAQ,EAAEtC,UAAW;MACrBuB,QAAQ,EAAEA,QAAS;MACnBS,EAAE,EAAEA,CAAA,MAAO;QACTO,gBAAgB,EAAE;MACpB,CAAC;IAAE,CACJ,CACF;IACD,WAAS7B,MAAO;IAChB8B,QAAQ,EAAE1C,UAAW;IACrBL,EAAE,EAAEC,UAAW;IACfO,KAAK,EAAEA,KAAM;IACbG,IAAI,EAAEC,YAAY,IAAIX,UAAW;IACjCmB,KAAK,EAAEA,KAAM;IACbyB,QAAQ,EAAEtC,UAAW;IACrBQ,MAAM,EAAEA,MAAO;IACfG,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAED,MAAM8B,gBAAgB,GAAGnE,IAAI,CAACe,QAAQ,CAAC;AACvCoD,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIpD,QAAQ"}
|
package/dist/CheckboxGroup.js
CHANGED
|
@@ -22,7 +22,8 @@ const CheckboxGroup = _ref => {
|
|
|
22
22
|
isDisabled,
|
|
23
23
|
isRequired = false,
|
|
24
24
|
label,
|
|
25
|
-
testId
|
|
25
|
+
testId,
|
|
26
|
+
translate
|
|
26
27
|
} = _ref;
|
|
27
28
|
const renderFieldComponent = useCallback(_ref2 => {
|
|
28
29
|
let {
|
|
@@ -35,9 +36,10 @@ const CheckboxGroup = _ref => {
|
|
|
35
36
|
"aria-errormessage": errorMessageElementId,
|
|
36
37
|
"aria-labelledby": labelElementId,
|
|
37
38
|
"data-se": testId,
|
|
39
|
+
translate: translate,
|
|
38
40
|
children: children
|
|
39
41
|
});
|
|
40
|
-
}, [children, testId]);
|
|
42
|
+
}, [children, testId, translate]);
|
|
41
43
|
return _jsx(Field, {
|
|
42
44
|
errorMessage: errorMessage,
|
|
43
45
|
fieldType: "group",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","names":["memo","useCallback","Field","jsx","_jsx","CheckboxGroup","_ref","children","errorMessage","hint","HintLinkComponent","isDisabled","isRequired","label","testId","renderFieldComponent","_ref2","ariaDescribedBy","errorMessageElementId","labelElementId","_FormGroup","fieldType","hasVisibleLabel","isOptional","MemoizedCheckboxGroup","displayName"],"sources":["../src/CheckboxGroup.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 { FormGroup as MuiFormGroup } from \"@mui/material\";\nimport { memo, ReactElement, useCallback } from \"react\";\n\nimport { Checkbox } from \"./Checkbox\";\nimport { Field } from \"./Field\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type {
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","names":["memo","useCallback","Field","jsx","_jsx","CheckboxGroup","_ref","children","errorMessage","hint","HintLinkComponent","isDisabled","isRequired","label","testId","translate","renderFieldComponent","_ref2","ariaDescribedBy","errorMessageElementId","labelElementId","_FormGroup","fieldType","hasVisibleLabel","isOptional","MemoizedCheckboxGroup","displayName"],"sources":["../src/CheckboxGroup.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 { FormGroup as MuiFormGroup } from \"@mui/material\";\nimport { memo, ReactElement, useCallback } from \"react\";\n\nimport { Checkbox } from \"./Checkbox\";\nimport { Field } from \"./Field\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { AllowedProps } from \"./AllowedProps\";\n\nexport type CheckboxGroupProps = {\n /**\n * A single Checkbox element or an array of Checkbox elements\n */\n children:\n | ReactElement<typeof Checkbox>\n | Array<ReactElement<typeof Checkbox>>;\n /**\n * If `true`, the CheckboxGroup is required\n */\n isRequired?: boolean;\n /**\n * The label text for the CheckboxGroup\n */\n label: string;\n} & Pick<\n FieldComponentProps,\n \"errorMessage\" | \"hint\" | \"HintLinkComponent\" | \"isDisabled\"\n> &\n AllowedProps;\n\nconst CheckboxGroup = ({\n children,\n errorMessage,\n hint,\n HintLinkComponent,\n isDisabled,\n isRequired = false,\n label,\n testId,\n translate,\n}: CheckboxGroupProps) => {\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, errorMessageElementId, labelElementId }) => (\n <MuiFormGroup\n aria-describedby={ariaDescribedBy}\n aria-errormessage={errorMessageElementId}\n aria-labelledby={labelElementId}\n data-se={testId}\n translate={translate}\n >\n {children}\n </MuiFormGroup>\n ),\n [children, testId, translate]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n fieldType=\"group\"\n hasVisibleLabel={true}\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n isDisabled={isDisabled}\n isOptional={!isRequired}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n};\n\nconst MemoizedCheckboxGroup = memo(CheckboxGroup);\nMemoizedCheckboxGroup.displayName = \"CheckboxGroup\";\n\nexport { MemoizedCheckboxGroup as CheckboxGroup };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,WAAW,QAAQ,OAAO;AAAC,SAG/CC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAyBd,MAAMC,aAAa,GAAGC,IAAA,IAUI;EAAA,IAVH;IACrBC,QAAQ;IACRC,YAAY;IACZC,IAAI;IACJC,iBAAiB;IACjBC,UAAU;IACVC,UAAU,GAAG,KAAK;IAClBC,KAAK;IACLC,MAAM;IACNC;EACkB,CAAC,GAAAT,IAAA;EACnB,MAAMU,oBAAoB,GAAGf,WAAW,CACtCgB,KAAA;IAAA,IAAC;MAAEC,eAAe;MAAEC,qBAAqB;MAAEC;IAAe,CAAC,GAAAH,KAAA;IAAA,OACzDb,IAAA,CAAAiB,UAAA;MACE,oBAAkBH,eAAgB;MAClC,qBAAmBC,qBAAsB;MACzC,mBAAiBC,cAAe;MAChC,WAASN,MAAO;MAChBC,SAAS,EAAEA,SAAU;MAAAR,QAAA,EAEpBA;IAAQ,CACG,CAAC;EAAA,CAChB,EACD,CAACA,QAAQ,EAAEO,MAAM,EAAEC,SAAS,CAC9B,CAAC;EAED,OACEX,IAAA,CAACF,KAAK;IACJM,YAAY,EAAEA,YAAa;IAC3Bc,SAAS,EAAC,OAAO;IACjBC,eAAe,EAAE,IAAK;IACtBd,IAAI,EAAEA,IAAK;IACXC,iBAAiB,EAAEA,iBAAkB;IACrCC,UAAU,EAAEA,UAAW;IACvBa,UAAU,EAAE,CAACZ,UAAW;IACxBC,KAAK,EAAEA,KAAM;IACbG,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CAAC;AAED,MAAMS,qBAAqB,GAAGzB,IAAI,CAACK,aAAa,CAAC;AACjDoB,qBAAqB,CAACC,WAAW,GAAG,eAAe;AAEnD,SAASD,qBAAqB,IAAIpB,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularProgress.js","names":["jsx","_jsx","CircularProgress","_ref","ariaLabel","testId","value","_CircularProgress","variant"],"sources":["../src/CircularProgress.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 { CircularProgress as MuiCircularProgress } from \"@mui/material\";\n\nimport type {
|
|
1
|
+
{"version":3,"file":"CircularProgress.js","names":["jsx","_jsx","CircularProgress","_ref","ariaLabel","testId","value","_CircularProgress","variant"],"sources":["../src/CircularProgress.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 { CircularProgress as MuiCircularProgress } from \"@mui/material\";\n\nimport type { AllowedProps } from \"./AllowedProps\";\n\nexport type CircularProgressProps = {\n /**\n * The ARIA label for the progress spinner\n */\n ariaLabel?: string;\n /**\n * The percentage filled the spinner should be, as an integer.\n * If undefined, the spinner will spin perpetually.\n */\n value?: number;\n} & AllowedProps;\n\nexport const CircularProgress = ({\n ariaLabel,\n testId,\n value,\n}: CircularProgressProps) => (\n <MuiCircularProgress\n data-se={testId}\n value={value}\n variant={value ? \"determinate\" : \"indeterminate\"}\n aria-label={ariaLabel}\n />\n);\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAAAA,GAAA,IAAAC,IAAA;AA4BA,OAAO,MAAMC,gBAAgB,GAAGC,IAAA;EAAA,IAAC;IAC/BC,SAAS;IACTC,MAAM;IACNC;EACqB,CAAC,GAAAH,IAAA;EAAA,OACtBF,IAAA,CAAAM,iBAAA;IACE,WAASF,MAAO;IAChBC,KAAK,EAAEA,KAAM;IACbE,OAAO,EAAEF,KAAK,GAAG,aAAa,GAAG,eAAgB;IACjD,cAAYF;EAAU,CACvB,CAAC;AAAA,CACH"}
|
package/dist/Dialog.js
CHANGED
|
@@ -29,6 +29,7 @@ const Dialog = _ref => {
|
|
|
29
29
|
onClose,
|
|
30
30
|
testId,
|
|
31
31
|
title,
|
|
32
|
+
translate,
|
|
32
33
|
ariaLabel
|
|
33
34
|
} = _ref;
|
|
34
35
|
const [isContentScrollable, setIsContentScrollable] = useState(false);
|
|
@@ -57,6 +58,7 @@ const Dialog = _ref => {
|
|
|
57
58
|
open: isOpen,
|
|
58
59
|
onClose: onClose,
|
|
59
60
|
children: [_jsxs(_DialogTitle, {
|
|
61
|
+
translate: translate,
|
|
60
62
|
children: [title, _jsx(Button, {
|
|
61
63
|
ariaLabel: ariaLabel,
|
|
62
64
|
label: "",
|
package/dist/Dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["Button","CloseIcon","memo","useState","useEffect","useRef","jsx","_jsx","jsxs","_jsxs","Dialog","_ref","callToActionFirstComponent","callToActionSecondComponent","callToActionLastComponent","children","isOpen","onClose","testId","title","ariaLabel","isContentScrollable","setIsContentScrollable","dialogContentRef","frameId","handleContentScroll","dialogContentElement","current","scrollHeight","clientHeight","requestAnimationFrame","cancelAnimationFrame","content","_DialogContentText","_Dialog","open","_DialogTitle","label","onClick","size","startIcon","variant","_DialogContent","dividers","ref","tabIndex","_DialogActions","MemoizedDialog","displayName"],"sources":["../src/Dialog.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 { Dialog as MuiDialog } from \"@mui/material\";\nimport {\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n} from \"@mui/material\";\nimport { Button } from \"./Button\";\nimport { CloseIcon } from \"./icons.generated\";\nimport {\n memo,\n ReactNode,\n useState,\n useEffect,\n useRef,\n ReactElement,\n} from \"react\";\n\nimport type {
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["Button","CloseIcon","memo","useState","useEffect","useRef","jsx","_jsx","jsxs","_jsxs","Dialog","_ref","callToActionFirstComponent","callToActionSecondComponent","callToActionLastComponent","children","isOpen","onClose","testId","title","translate","ariaLabel","isContentScrollable","setIsContentScrollable","dialogContentRef","frameId","handleContentScroll","dialogContentElement","current","scrollHeight","clientHeight","requestAnimationFrame","cancelAnimationFrame","content","_DialogContentText","_Dialog","open","_DialogTitle","label","onClick","size","startIcon","variant","_DialogContent","dividers","ref","tabIndex","_DialogActions","MemoizedDialog","displayName"],"sources":["../src/Dialog.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 { Dialog as MuiDialog } from \"@mui/material\";\nimport {\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n} from \"@mui/material\";\nimport { Button } from \"./Button\";\nimport { CloseIcon } from \"./icons.generated\";\nimport {\n memo,\n ReactNode,\n useState,\n useEffect,\n useRef,\n ReactElement,\n} from \"react\";\n\nimport type { AllowedProps } from \"./AllowedProps\";\n\nexport type DialogProps = {\n /**\n * An optional Button object to be situated in the Dialog footer. Should almost always be of variant `primary`.\n */\n callToActionFirstComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer, alongside the `callToActionPrimaryComponent`.\n */\n callToActionSecondComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer, alongside the other two `callToAction` components.\n */\n callToActionLastComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Dialog. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children: ReactNode;\n /**\n * When set to `true`, the Dialog will be visible.\n */\n isOpen: boolean;\n /**\n * Callback that controls what happens when the Dialog is dismissed\n */\n onClose: () => void;\n /**\n * The title of the Dialog\n */\n title: string;\n ariaLabel: string;\n} & AllowedProps;\n\nconst Dialog = ({\n callToActionFirstComponent,\n callToActionSecondComponent,\n callToActionLastComponent,\n children,\n isOpen,\n onClose,\n testId,\n title,\n translate,\n ariaLabel,\n}: DialogProps) => {\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const dialogContentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const dialogContentElement = dialogContentRef.current;\n if (dialogContentElement) {\n setIsContentScrollable(\n dialogContentElement.scrollHeight > dialogContentElement.clientHeight\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const content =\n typeof children === \"string\" ? (\n <DialogContentText>{children}</DialogContentText>\n ) : (\n children\n );\n\n return (\n <MuiDialog data-se={testId} open={isOpen} onClose={onClose}>\n <DialogTitle translate={translate}>\n {title}\n <Button\n ariaLabel={ariaLabel}\n label=\"\"\n onClick={onClose}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DialogTitle>\n <DialogContent\n dividers={isContentScrollable}\n ref={dialogContentRef}\n {...(isContentScrollable && {\n tabIndex: 0,\n })}\n >\n {content}\n </DialogContent>\n\n {(callToActionFirstComponent ||\n callToActionSecondComponent ||\n callToActionLastComponent) && (\n <DialogActions>\n {callToActionLastComponent}\n {callToActionSecondComponent}\n {callToActionFirstComponent}\n </DialogActions>\n )}\n </MuiDialog>\n );\n};\n\nconst MemoizedDialog = memo(Dialog);\nMemoizedDialog.displayName = \"Dialog\";\n\nexport { MemoizedDialog as Dialog };\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAmBSA,MAAM;AAAA,SACNC,SAAS;AAClB,SACEC,IAAI,EAEJC,QAAQ,EACRC,SAAS,EACTC,MAAM,QAED,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAoCf,MAAMC,MAAM,GAAGC,IAAA,IAWI;EAAA,IAXH;IACdC,0BAA0B;IAC1BC,2BAA2B;IAC3BC,yBAAyB;IACzBC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACPC,MAAM;IACNC,KAAK;IACLC,SAAS;IACTC;EACW,CAAC,GAAAV,IAAA;EACZ,MAAM,CAACW,mBAAmB,EAAEC,sBAAsB,CAAC,GAAGpB,QAAQ,CAAC,KAAK,CAAC;EACrE,MAAMqB,gBAAgB,GAAGnB,MAAM,CAAiB,IAAI,CAAC;EAErDD,SAAS,CAAC,MAAM;IACd,IAAIqB,OAAe;IAEnB,MAAMC,mBAAmB,GAAGA,CAAA,KAAM;MAChC,MAAMC,oBAAoB,GAAGH,gBAAgB,CAACI,OAAO;MACrD,IAAID,oBAAoB,EAAE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D,0BAA0B;IAAA,CACd,CAChB;EAAA,CACQ,CAAC;AAEhB,CAAC;AAED,MAAMoC,cAAc,GAAG9C,IAAI,CAACQ,MAAM,CAAC;AACnCsC,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAItC,MAAM"}
|
package/dist/FieldError.js
CHANGED
|
@@ -20,7 +20,8 @@ const FieldError = _ref => {
|
|
|
20
20
|
let {
|
|
21
21
|
id,
|
|
22
22
|
testId,
|
|
23
|
-
text
|
|
23
|
+
text,
|
|
24
|
+
translate
|
|
24
25
|
} = _ref;
|
|
25
26
|
const {
|
|
26
27
|
t
|
|
@@ -29,7 +30,9 @@ const FieldError = _ref => {
|
|
|
29
30
|
"data-se": testId,
|
|
30
31
|
error: true,
|
|
31
32
|
id: id,
|
|
33
|
+
translate: translate,
|
|
32
34
|
children: [_jsx(ScreenReaderText, {
|
|
35
|
+
translate: translate,
|
|
33
36
|
children: `${t("fielderror.screenreader.text")}:`
|
|
34
37
|
}), text]
|
|
35
38
|
});
|
package/dist/FieldError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 {
|
|
1
|
+
{"version":3,"file":"FieldError.js","names":["memo","ScreenReaderText","useTranslation","jsx","_jsx","jsxs","_jsxs","FieldError","_ref","id","testId","text","translate","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 { AllowedProps } from \"./AllowedProps\";\n\nexport type FieldErrorProps = {\n id?: string;\n text: string;\n} & AllowedProps;\n\nconst FieldError = ({ id, testId, text, translate }: FieldErrorProps) => {\n const { t } = useTranslation();\n\n return (\n <FormHelperText data-se={testId} error id={id} translate={translate}>\n <ScreenReaderText translate={translate}>{`${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,IAAsD;EAAA,IAArD;IAAEC,EAAE;IAAEC,MAAM;IAAEC,IAAI;IAAEC;EAA2B,CAAC,GAAAJ,IAAA;EAClE,MAAM;IAAEK;EAAE,CAAC,GAAGX,cAAc,CAAC,CAAC;EAE9B,OACEI,KAAA,CAAAQ,eAAA;IAAgB,WAASJ,MAAO;IAACK,KAAK;IAACN,EAAE,EAAEA,EAAG;IAACG,SAAS,EAAEA,SAAU;IAAAI,QAAA,GAClEZ,IAAA,CAACH,gBAAgB;MAACW,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAAG,GAAEH,CAAC,CAC3C,8BACF,CAAE;IAAE,CAAmB,CAAC,EACvBF,IAAI;EAAA,CACS,CAAC;AAErB,CAAC;AAED,MAAMM,kBAAkB,GAAGjB,IAAI,CAACO,UAAU,CAAC;AAC3CU,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIV,UAAU"}
|
package/dist/FieldHint.js
CHANGED
|
@@ -20,11 +20,13 @@ const FieldHint = _ref => {
|
|
|
20
20
|
id,
|
|
21
21
|
LinkComponent,
|
|
22
22
|
testId,
|
|
23
|
-
text
|
|
23
|
+
text,
|
|
24
|
+
translate
|
|
24
25
|
} = _ref;
|
|
25
26
|
return _jsxs(_FormHelperText, {
|
|
26
27
|
"data-se": testId,
|
|
27
28
|
id: id,
|
|
29
|
+
translate: translate,
|
|
28
30
|
children: [text, LinkComponent && _jsx(_Fragment, {
|
|
29
31
|
children: _jsxs("span", {
|
|
30
32
|
children: ["\xA0", LinkComponent]
|
package/dist/FieldHint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHint.js","names":["memo","jsxs","_jsxs","Fragment","_Fragment","jsx","_jsx","FieldHint","_ref","id","LinkComponent","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 { FieldComponentProps } from \"./FieldComponentProps\";\nimport type {
|
|
1
|
+
{"version":3,"file":"FieldHint.js","names":["memo","jsxs","_jsxs","Fragment","_Fragment","jsx","_jsx","FieldHint","_ref","id","LinkComponent","testId","text","translate","_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 { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { AllowedProps } from \"./AllowedProps\";\n\nexport type FieldHintProps = {\n LinkComponent?: FieldComponentProps[\"HintLinkComponent\"];\n id?: string;\n text: string;\n} & AllowedProps;\n\nconst FieldHint = ({\n id,\n LinkComponent,\n testId,\n text,\n translate,\n}: FieldHintProps) => {\n return (\n <FormHelperText data-se={testId} id={id} translate={translate}>\n {text}\n {LinkComponent && (\n <>\n <span> {LinkComponent}</span>\n </>\n )}\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,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAa7B,MAAMC,SAAS,GAAGC,IAAA,IAMI;EAAA,IANH;IACjBC,EAAE;IACFC,aAAa;IACbC,MAAM;IACNC,IAAI;IACJC;EACc,CAAC,GAAAL,IAAA;EACf,OACEN,KAAA,CAAAY,eAAA;IAAgB,WAASH,MAAO;IAACF,EAAE,EAAEA,EAAG;IAACI,SAAS,EAAEA,SAAU;IAAAE,QAAA,GAC3DH,IAAI,EACJF,aAAa,IACZJ,IAAA,CAAAF,SAAA;MAAAW,QAAA,EACEb,KAAA;QAAAa,QAAA,GAAM,MAAM,EAACL,aAAa;MAAA,CAAO;IAAC,CAClC,CACH;EAAA,CACa,CAAC;AAErB,CAAC;AAED,MAAMM,iBAAiB,GAAGhB,IAAI,CAACO,SAAS,CAAC;AACzCS,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIT,SAAS"}
|
package/dist/FieldLabel.js
CHANGED
|
@@ -23,6 +23,7 @@ const FieldLabel = _ref => {
|
|
|
23
23
|
inputId,
|
|
24
24
|
isOptional,
|
|
25
25
|
testId,
|
|
26
|
+
translate,
|
|
26
27
|
text
|
|
27
28
|
} = _ref;
|
|
28
29
|
const {
|
|
@@ -32,13 +33,15 @@ const FieldLabel = _ref => {
|
|
|
32
33
|
"data-se": testId,
|
|
33
34
|
htmlFor: inputId,
|
|
34
35
|
id: id,
|
|
36
|
+
translate: translate,
|
|
35
37
|
children: [_jsx("span", {
|
|
36
38
|
children: text
|
|
37
39
|
}), isOptional && _jsx(Subordinate, {
|
|
38
40
|
children: t("fieldlabel.optional.text")
|
|
39
41
|
})]
|
|
40
|
-
}), [id, inputId, isOptional, testId, text, t]);
|
|
42
|
+
}), [id, inputId, isOptional, testId, translate, text, t]);
|
|
41
43
|
return hasVisibleLabel ? inputLabel : _jsx(ScreenReaderText, {
|
|
44
|
+
translate: translate,
|
|
42
45
|
children: inputLabel
|
|
43
46
|
});
|
|
44
47
|
};
|
package/dist/FieldLabel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 {
|
|
1
|
+
{"version":3,"file":"FieldLabel.js","names":["memo","useMemo","useTranslation","ScreenReaderText","Subordinate","jsx","_jsx","jsxs","_jsxs","FieldLabel","_ref","hasVisibleLabel","id","inputId","isOptional","testId","translate","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 { AllowedProps } from \"./AllowedProps\";\n\nexport type FieldLabelProps = {\n hasVisibleLabel: boolean;\n id: string;\n inputId: string;\n isOptional: boolean;\n text: string;\n} & AllowedProps;\n\nconst FieldLabel = ({\n hasVisibleLabel,\n id,\n inputId,\n isOptional,\n testId,\n translate,\n text,\n}: FieldLabelProps) => {\n const { t } = useTranslation();\n\n const inputLabel = useMemo(\n () => (\n <MuiInputLabel\n data-se={testId}\n htmlFor={inputId}\n id={id}\n translate={translate}\n >\n <span>{text}</span>\n {isOptional && (\n <Subordinate>{t(\"fieldlabel.optional.text\")}</Subordinate>\n )}\n </MuiInputLabel>\n ),\n [id, inputId, isOptional, testId, translate, text, t]\n );\n\n return hasVisibleLabel ? (\n inputLabel\n ) : (\n <ScreenReaderText translate={translate}>{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,IAQI;EAAA,IARH;IAClBC,eAAe;IACfC,EAAE;IACFC,OAAO;IACPC,UAAU;IACVC,MAAM;IACNC,SAAS;IACTC;EACe,CAAC,GAAAP,IAAA;EAChB,MAAM;IAAEQ;EAAE,CAAC,GAAGhB,cAAc,CAAC,CAAC;EAE9B,MAAMiB,UAAU,GAAGlB,OAAO,CACxB,MACEO,KAAA,CAAAY,WAAA;IACE,WAASL,MAAO;IAChBM,OAAO,EAAER,OAAQ;IACjBD,EAAE,EAAEA,EAAG;IACPI,SAAS,EAAEA,SAAU;IAAAM,QAAA,GAErBhB,IAAA;MAAAgB,QAAA,EAAOL;IAAI,CAAO,CAAC,EAClBH,UAAU,IACTR,IAAA,CAACF,WAAW;MAAAkB,QAAA,EAAEJ,CAAC,CAAC,0BAA0B;IAAC,CAAc,CAC1D;EAAA,CACY,CAChB,EACD,CAACN,EAAE,EAAEC,OAAO,EAAEC,UAAU,EAAEC,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,CAAC,CACtD,CAAC;EAED,OAAOP,eAAe,GACpBQ,UAAU,GAEVb,IAAA,CAACH,gBAAgB;IAACa,SAAS,EAAEA,SAAU;IAAAM,QAAA,EAAEH;EAAU,CAAmB,CACvE;AACH,CAAC;AAED,MAAMI,kBAAkB,GAAGvB,IAAI,CAACS,UAAU,CAAC;AAC3Cc,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAId,UAAU"}
|
package/dist/Fieldset.js
CHANGED
|
@@ -26,7 +26,8 @@ const Fieldset = _ref => {
|
|
|
26
26
|
isDisabled = false,
|
|
27
27
|
legend,
|
|
28
28
|
name,
|
|
29
|
-
testId
|
|
29
|
+
testId,
|
|
30
|
+
translate
|
|
30
31
|
} = _ref;
|
|
31
32
|
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
32
33
|
const id = useUniqueId(idOverride);
|
|
@@ -50,8 +51,10 @@ const Fieldset = _ref => {
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
children: [_jsx(Legend, {
|
|
54
|
+
translate: translate,
|
|
53
55
|
children: legend
|
|
54
56
|
}), description && _jsx(Support, {
|
|
57
|
+
translate: translate,
|
|
55
58
|
children: description
|
|
56
59
|
}), alert, _jsx(FieldsetContext.Provider, {
|
|
57
60
|
value: fieldsetContextValue,
|
package/dist/Fieldset.js.map
CHANGED
|
@@ -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","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 {
|
|
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","translate","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 { AllowedProps } from \"./AllowedProps\";\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} & AllowedProps;\n\nconst Fieldset = ({\n alert,\n children,\n description,\n id: idOverride,\n isDisabled = false,\n legend,\n name,\n testId,\n translate,\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 translate={translate}>{legend}</Legend>\n\n {description && <Support translate={translate}>{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,IAUI;EAAA,IAVH;IAChBC,KAAK;IACLC,QAAQ;IACRC,WAAW;IACXC,EAAE,EAAEC,UAAU;IACdC,UAAU,GAAG,KAAK;IAClBC,MAAM;IACNC,IAAI;IACJC,MAAM;IACNC;EACa,CAAC,GAAAV,IAAA;EACd,MAAMW,mBAAmB,GAAGlB,sBAAsB,CAAC,CAAC;EACpD,MAAMW,EAAE,GAAGV,WAAW,CAACW,UAAU,CAAC;EAElC,MAAMO,oBAAoB,GAAGvB,OAAO,CAClC,OAAO;IACLiB;EACF,CAAC,CAAC,EACF,CAACA,UAAU,CACb,CAAC;EAED,OACER,KAAA,CAAAe,IAAA;IACEC,SAAS,EAAC,UAAU;IACpB,WAASL,MAAO;IAChBM,QAAQ,EAAET,UAAW;IACrBE,IAAI,EAAEA,IAAK;IACXJ,EAAE,EAAEA,EAAG;IACPY,EAAE,EAAE;MACFC,MAAM,EAAE,GAAG;MACXC,MAAM,EAAEP,mBAAmB,CAACQ,QAAQ;MACpCC,cAAc,EAAET,mBAAmB,CAACU,QAAQ;MAC5CC,QAAQ,EAAEX,mBAAmB,CAACY,uBAAuB;MACrDC,OAAO,EAAEb,mBAAmB,CAACQ,QAAQ;MAErC,cAAc,EAAE;QACdC,cAAc,EAAET,mBAAmB,CAACQ;MACtC;IACF,CAAE;IAAAjB,QAAA,GAEFN,IAAA,CAACL,MAAM;MAACmB,SAAS,EAAEA,SAAU;MAAAR,QAAA,EAAEK;IAAM,CAAS,CAAC,EAE9CJ,WAAW,IAAIP,IAAA,CAACJ,OAAO;MAACkB,SAAS,EAAEA,SAAU;MAAAR,QAAA,EAAEC;IAAW,CAAU,CAAC,EAErEF,KAAK,EAENL,IAAA,CAACN,eAAe,CAACmC,QAAQ;MAACC,KAAK,EAAEd,oBAAqB;MAAAV,QAAA,EACnDA;IAAQ,CACe,CAAC;EAAA,CACxB,CAAC;AAEV,CAAC;AAED,MAAMyB,gBAAgB,GAAGvC,IAAI,CAACW,QAAQ,CAAC;AACvC4B,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAI5B,QAAQ"}
|
package/dist/Form.js
CHANGED
|
@@ -33,7 +33,8 @@ const Form = _ref => {
|
|
|
33
33
|
noValidate = false,
|
|
34
34
|
target,
|
|
35
35
|
testId,
|
|
36
|
-
title
|
|
36
|
+
title,
|
|
37
|
+
translate
|
|
37
38
|
} = _ref;
|
|
38
39
|
const id = useUniqueId(idOverride);
|
|
39
40
|
return _jsxs(_Box, {
|
|
@@ -58,8 +59,10 @@ const Form = _ref => {
|
|
|
58
59
|
},
|
|
59
60
|
children: [title && _jsx(Heading4, {
|
|
60
61
|
component: "h1",
|
|
62
|
+
translate: translate,
|
|
61
63
|
children: title
|
|
62
64
|
}), description && _jsx(Support, {
|
|
65
|
+
translate: translate,
|
|
63
66
|
children: description
|
|
64
67
|
}), alert]
|
|
65
68
|
}), _jsx(_Box, {
|
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","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 {
|
|
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","translate","_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 { AllowedProps } from \"./AllowedProps\";\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} & AllowedProps;\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 translate,\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 && (\n <Heading4 component=\"h1\" translate={translate}>\n {title}\n </Heading4>\n )}\n {description && <Support translate={translate}>{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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
variant,
|
|
29
30
|
onClick
|
|
30
31
|
} = _ref;
|
|
@@ -43,6 +44,7 @@ const Link = _ref => {
|
|
|
43
44
|
ref: ref,
|
|
44
45
|
rel: rel,
|
|
45
46
|
target: target,
|
|
47
|
+
translate: translate,
|
|
46
48
|
variant: variant,
|
|
47
49
|
onClick: onClick,
|
|
48
50
|
children: [icon && _jsx("span", {
|
package/dist/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","names":["memo","useImperativeHandle","useRef","ExternalLinkIcon","jsx","_jsx","jsxs","_jsxs","linkVariantValues","Link","_ref","children","href","icon","linkFocusRef","rel","target","testId","variant","onClick","ref","element","current","focus","_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, useImperativeHandle, useRef } from \"react\";\nimport { ExternalLinkIcon } from \"./icons.generated\";\nimport type {
|
|
1
|
+
{"version":3,"file":"Link.js","names":["memo","useImperativeHandle","useRef","ExternalLinkIcon","jsx","_jsx","jsxs","_jsxs","linkVariantValues","Link","_ref","children","href","icon","linkFocusRef","rel","target","testId","translate","variant","onClick","ref","element","current","focus","_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, useImperativeHandle, useRef } from \"react\";\nimport { ExternalLinkIcon } from \"./icons.generated\";\nimport type { AllowedProps } from \"./AllowedProps\";\n\nimport { Link as MuiLink, LinkProps as MuiLinkProps } from \"@mui/material\";\nimport { FocusHandle } from \"./@types/react-augment\";\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 ref forwarded to the TextField to expose focus()\n */\n linkFocusRef?: React.RefObject<FocusHandle>;\n /**\n * The click event handler for the Link\n */\n onClick?: MuiLinkProps[\"onClick\"];\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} & AllowedProps;\n\nconst Link = ({\n children,\n href,\n icon,\n linkFocusRef,\n rel,\n target,\n testId,\n translate,\n variant,\n onClick,\n}: LinkProps) => {\n const ref = useRef<HTMLAnchorElement>(null);\n useImperativeHandle(\n linkFocusRef,\n () => {\n const element = ref.current;\n return {\n focus: () => {\n element && element.focus();\n },\n };\n },\n []\n );\n\n return (\n <MuiLink\n data-se={testId}\n href={href}\n ref={ref}\n rel={rel}\n target={target}\n translate={translate}\n variant={variant}\n onClick={onClick}\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};\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,EAAgBC,mBAAmB,EAAEC,MAAM,QAAQ,OAAO;AAAC,SAC/DC,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAMzB,OAAO,MAAMC,iBAAiB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU;AA0CnE,MAAMC,IAAI,GAAGC,IAAA,IAWI;EAAA,IAXH;IACZC,QAAQ;IACRC,IAAI;IACJC,IAAI;IACJC,YAAY;IACZC,GAAG;IACHC,MAAM;IACNC,MAAM;IACNC,SAAS;IACTC,OAAO;IACPC;EACS,CAAC,GAAAV,IAAA;EACV,MAAMW,GAAG,GAAGnB,MAAM,CAAoB,IAAI,CAAC;EAC3CD,mBAAmB,CACjBa,YAAY,EACZ,MAAM;IACJ,MAAMQ,OAAO,GAAGD,GAAG,CAACE,OAAO;IAC3B,OAAO;MACLC,KAAK,EAAEA,CAAA,KAAM;QACXF,OAAO,IAAIA,OAAO,CAACE,KAAK,CAAC,CAAC;MAC5B;IACF,CAAC;EACH,CAAC,EACD,EACF,CAAC;EAED,OACEjB,KAAA,CAAAkB,KAAA;IACE,WAASR,MAAO;IAChBL,IAAI,EAAEA,IAAK;IACXS,GAAG,EAAEA,GAAI;IACTN,GAAG,EAAEA,GAAI;IACTC,MAAM,EAAEA,MAAO;IACfE,SAAS,EAAEA,SAAU;IACrBC,OAAO,EAAEA,OAAQ;IACjBC,OAAO,EAAEA,OAAQ;IAAAT,QAAA,GAEhBE,IAAI,IAAIR,IAAA;MAAMqB,SAAS,EAAC,WAAW;MAAAf,QAAA,EAAEE;IAAI,CAAO,CAAC,EAEjDF,QAAQ,EAERK,MAAM,KAAK,QAAQ,IAClBX,IAAA;MAAMqB,SAAS,EAAC,gBAAgB;MAACC,IAAI,EAAC,cAAc;MAAAhB,QAAA,EAClDN,IAAA,CAACF,gBAAgB,IAAE;IAAC,CAChB,CACP;EAAA,CACM,CAAC;AAEd,CAAC;AAED,MAAMyB,YAAY,GAAG5B,IAAI,CAACS,IAAI,CAAC;AAE/BmB,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAInB,IAAI"}
|
package/dist/MenuButton.js
CHANGED
|
@@ -32,7 +32,8 @@ const MenuButton = _ref => {
|
|
|
32
32
|
menuAlignment = "left",
|
|
33
33
|
size,
|
|
34
34
|
testId,
|
|
35
|
-
tooltipText
|
|
35
|
+
tooltipText,
|
|
36
|
+
translate
|
|
36
37
|
} = _ref;
|
|
37
38
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
38
39
|
const isOpen = Boolean(anchorEl);
|
|
@@ -75,6 +76,7 @@ const MenuButton = _ref => {
|
|
|
75
76
|
onClick: openMenu,
|
|
76
77
|
size: size,
|
|
77
78
|
tooltipText: tooltipText,
|
|
79
|
+
translate: translate,
|
|
78
80
|
variant: buttonVariant
|
|
79
81
|
}), _jsx(_Menu, {
|
|
80
82
|
anchorOrigin: anchorOrigin,
|
package/dist/MenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.js","names":["Button","useUniqueId","ChevronDownIcon","MoreIcon","memo","useCallback","useMemo","useState","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isOverflow","menuAlignment","size","testId","tooltipText","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","anchorOrigin","horizontal","vertical","transformOrigin","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 {\n Divider,\n ListSubheader,\n Menu as MuiMenu,\n PopoverOrigin,\n} 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 {
|
|
1
|
+
{"version":3,"file":"MenuButton.js","names":["Button","useUniqueId","ChevronDownIcon","MoreIcon","memo","useCallback","useMemo","useState","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isOverflow","menuAlignment","size","testId","tooltipText","translate","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","anchorOrigin","horizontal","vertical","transformOrigin","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 {\n Divider,\n ListSubheader,\n Menu as MuiMenu,\n PopoverOrigin,\n} 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 { AllowedProps } from \"./AllowedProps\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\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:\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | Array<\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | NullElement\n >\n | NullElement;\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 horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: 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 AllowedProps;\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n shouldCloseOnSelect = true,\n endIcon: endIconProp,\n id: idOverride,\n isOverflow,\n menuAlignment = \"left\",\n size,\n testId,\n tooltipText,\n translate,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\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 shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect]\n );\n\n const endIcon = endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n } as PopoverOrigin),\n [menuAlignment]\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 translate={translate}\n variant={buttonVariant}\n />\n\n <MuiMenu\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\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 </MuiMenu>\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,SAQJC,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;AAIpB,OAAO,MAAMC,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU;AAiF7D,MAAMC,UAAU,GAAGC,IAAA,IAgBI;EAAA,IAhBH;IAClBC,SAAS;IACTC,cAAc;IACdC,eAAe;IACfC,WAAW,GAAG,EAAE;IAChBC,aAAa,GAAG,WAAW;IAC3BC,QAAQ;IACRC,mBAAmB,GAAG,IAAI;IAC1BC,OAAO,EAAEC,WAAW;IACpBC,EAAE,EAAEC,UAAU;IACdC,UAAU;IACVC,aAAa,GAAG,MAAM;IACtBC,IAAI;IACJC,MAAM;IACNC,WAAW;IACXC;EACe,CAAC,GAAAjB,IAAA;EAChB,MAAM,CAACkB,QAAQ,EAAEC,WAAW,CAAC,GA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AM,GAAGa,SAAU;MAC3C,iBAAc,MAAM;MACpB9B,eAAe,EAAEA,eAAgB;MACjCF,SAAS,EAAEA,SAAU;MACrBC,cAAc,EAAEA,cAAe;MAC/B,WAASa,MAAO;MAChBP,OAAO,EAAEA,OAAQ;MACjBE,EAAE,EAAG,GAAEgB,QAAS,SAAS;MACzBQ,KAAK,EAAE9B,WAAY;MACnB+B,OAAO,EAAEZ,QAAS;MAClBT,IAAI,EAAEA,IAAK;MACXE,WAAW,EAAEA,WAAY;MACzBC,SAAS,EAAEA,SAAU;MACrBmB,OAAO,EAAE/B;IAAc,CACxB,CAAC,EAEFV,IAAA,CAAA0C,KAAA;MACER,YAAY,EAAEA,YAAa;MAC3BG,eAAe,EAAEA,eAAgB;MACjCd,QAAQ,EAAEA,QAAS;MACnBR,EAAE,EAAG,GAAEgB,QAAS,OAAO;MACvBY,aAAa,EAAEX,aAAc;MAC7BY,OAAO,EAAEjB,SAAU;MACnBkB,IAAI,EAAEpB,MAAO;MAAAd,QAAA,EAEbX,IAAA,CAACF,WAAW,CAACgD,QAAQ;QAACC,KAAK,EAAEd,aAAc;QAAAtB,QAAA,EACxCA;MAAQ,CACW;IAAC,CAChB,CAAC;EAAA,CACP,CAAC;AAEV,CAAC;AAED,MAAMqC,kBAAkB,GAAGtD,IAAI,CAACU,UAAU,CAAC;AAC3C4C,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAI5C,UAAU"}
|
package/dist/MenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","shouldCloseOnSelect","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 {
|
|
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","shouldCloseOnSelect","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 { AllowedProps } from \"./AllowedProps\";\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} & AllowedProps;\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, shouldCloseOnSelect } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n if (shouldCloseOnSelect) {\n closeMenu();\n }\n },\n [onClickProp, closeMenu, shouldCloseOnSelect]\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,SAAS;IAAEC;EAAoB,CAAC,GAAGhB,UAAU,CAACC,WAAW,CAAC;EAElE,MAAMS,OAAO,GAAGX,WAAW,CACxBkB,KAAK,IAAK;IACTN,WAAW,GAAGM,KAAK,CAAC;IACpB,IAAID,mBAAmB,EAAE;MACvBD,SAAS,CAAC,CAAC;IACb;EACF,CAAC,EACD,CAACJ,WAAW,EAAEI,SAAS,EAAEC,mBAAmB,CAC9C,CAAC;EAED,OACEb,IAAA,CAAAe,SAAA;IAEEC,SAAS,EAAEZ,eAAgB;IAC3Ba,SAAS,EACPN,OAAO,KAAK,aAAa,GACpB,GAAEjB,eAAe,CAACwB,IAAK,cAAa,GACrCC,SACL;IACD,WAASV,MAAO;IAChBW,QAAQ,EAAEd,UAAW;IACrBC,OAAO,EAAEA,OAAQ;IACjBc,QAAQ,EAAEhB,UAAW;IACrBK,KAAK,EAAEA,KAAM;IAAAP,QAAA,EAEZA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMmB,gBAAgB,GAAG3B,IAAI,CAACM,QAAQ,CAAC;AACvCqB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIrB,QAAQ"}
|
package/dist/NativeSelect.js
CHANGED
|
@@ -32,6 +32,7 @@ const NativeSelect = forwardRef((_ref, ref) => {
|
|
|
32
32
|
onChange: onChangeProp,
|
|
33
33
|
onFocus,
|
|
34
34
|
testId,
|
|
35
|
+
translate,
|
|
35
36
|
value,
|
|
36
37
|
children
|
|
37
38
|
} = _ref;
|
|
@@ -70,9 +71,10 @@ const NativeSelect = forwardRef((_ref, ref) => {
|
|
|
70
71
|
onBlur: onBlur,
|
|
71
72
|
onChange: onChange,
|
|
72
73
|
onFocus: onFocus,
|
|
73
|
-
ref: ref
|
|
74
|
+
ref: ref,
|
|
75
|
+
translate: translate
|
|
74
76
|
});
|
|
75
|
-
}, [children, idOverride, inputValues, hasMultipleChoices, onBlur, onChange, onFocus, ref, testId]);
|
|
77
|
+
}, [children, idOverride, inputValues, hasMultipleChoices, onBlur, onChange, onFocus, ref, testId, translate]);
|
|
76
78
|
return _jsx(Field, {
|
|
77
79
|
errorMessage: errorMessage,
|
|
78
80
|
fieldType: "single",
|