@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/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","names":["TabContext","MuiTabContext","TabList","MuiTabList","TabPanel","MuiTabPanel","
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":["memo","useCallback","useEffect","useState","TabContext","MuiTabContext","TabList","MuiTabList","TabPanel","MuiTabPanel","useOdysseyDesignTokens","Badge","Box","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","TabLabel","_ref","label","notificationCount","notificationCountMax","tabState","value","odysseyDesignTokens","children","undefined","sx","marginInlineStart","Spacing2","badgeContent","badgeContentMax","type","Tabs","_ref2","ariaLabel","initialValue","tabs","onChange","onChangeProp","setTabState","event","renderTab","tab","index","testId","isDisabled","startIcon","_Tab","disabled","icon","toString","map","MemoizedTabs","displayName"],"sources":["../src/Tabs.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 ReactElement,\n ReactNode,\n memo,\n useCallback,\n useEffect,\n useState,\n} from \"react\";\nimport {\n TabContext as MuiTabContext,\n TabList as MuiTabList,\n TabListProps as MuiTabListProps,\n TabPanel as MuiTabPanel,\n} from \"@mui/lab\";\nimport { Tab as MuiTab } from \"@mui/material\";\n\nimport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\nimport { Badge, BadgeProps } from \"./Badge\";\nimport { AllowedProps } from \"./AllowedProps\";\nimport { Box } from \"./Box\";\n\nexport type TabItemProps = {\n /**\n * The content of the Tab itself\n */\n children: ReactNode;\n /**\n * If `true`, the TabItem is disabled\n */\n isDisabled?: boolean;\n /**\n * The label text for the TabItem\n */\n label: string;\n /**\n * An optional icon to display at the start of the TabItem\n */\n startIcon?: ReactElement;\n /**\n * The value associated with the TabItem\n */\n value?: string;\n} & {\n notificationCount?: BadgeProps[\"badgeContent\"];\n notificationCountMax?: BadgeProps[\"badgeContentMax\"];\n} & AllowedProps;\n\nexport type TabsProps = {\n /**\n * The ARIA label for the full Tabs group\n */\n ariaLabel?: string;\n /**\n * @deprecated please use the `value` prop instead\n * When `value` is provided, `initialValue` isn't used.\n */\n initialValue?: string;\n /**\n * The TabItems to be included in the Tabs group\n */\n tabs: TabItemProps[];\n /**\n * Identifier for the selected tab.\n */\n value?: string;\n /**\n * Callback fired when the active tab is changed.\n */\n onChange?: MuiTabListProps[\"onChange\"];\n};\n\nconst TabLabel = ({\n label,\n notificationCount,\n notificationCountMax,\n tabState,\n value,\n}: Pick<\n TabItemProps,\n \"label\" | \"notificationCount\" | \"notificationCountMax\" | \"value\"\n> & {\n tabState: string;\n}) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n return (\n <>\n {label}\n {notificationCount !== undefined && notificationCount > 0 && (\n <Box\n sx={{\n marginInlineStart: notificationCount\n ? odysseyDesignTokens.Spacing2\n : 0,\n }}\n >\n <Badge\n badgeContent={notificationCount}\n badgeContentMax={notificationCountMax}\n type={value === tabState ? \"attention\" : \"default\"}\n />\n </Box>\n )}\n </>\n );\n};\n\nconst Tabs = ({\n ariaLabel,\n initialValue,\n tabs,\n value,\n onChange: onChangeProp,\n}: TabsProps) => {\n const [tabState, setTabState] = useState(initialValue ?? value ?? \"0\");\n\n const onChange = useCallback<NonNullable<MuiTabListProps[\"onChange\"]>>(\n (event, value: string) => {\n setTabState(value);\n onChangeProp?.(event, value);\n },\n [onChangeProp]\n );\n\n useEffect(() => {\n if (value !== undefined) {\n setTabState(value);\n }\n }, [value]);\n\n const renderTab = useCallback(\n (tab, index) => {\n const {\n testId,\n isDisabled,\n label,\n startIcon,\n value,\n notificationCount,\n notificationCountMax,\n } = tab;\n\n return (\n <MuiTab\n data-se={testId}\n disabled={isDisabled}\n icon={startIcon}\n label={\n <TabLabel\n label={label}\n notificationCount={notificationCount}\n notificationCountMax={notificationCountMax}\n tabState={tabState}\n value={value}\n />\n }\n value={value ? value : index.toString()}\n key={value ? value : index.toString()}\n />\n );\n },\n [tabState]\n );\n\n return (\n <MuiTabContext value={tabState}>\n <MuiTabList onChange={onChange} aria-label={ariaLabel}>\n {tabs.map((tab, index) => renderTab(tab, index))}\n </MuiTabList>\n {tabs.map((tab, index) => (\n <MuiTabPanel\n value={tab.value ? tab.value : index.toString()}\n key={tab.value ? tab.value : index.toString()}\n >\n {tab.children}\n </MuiTabPanel>\n ))}\n </MuiTabContext>\n );\n};\n\nconst MemoizedTabs = memo(Tabs);\nMemoizedTabs.displayName = \"Tabs\";\n\nexport { MemoizedTabs as Tabs };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,QAAQ,QACH,OAAO;AACd,SACEC,UAAU,IAAIC,aAAa,EAC3BC,OAAO,IAAIC,UAAU,EAErBC,QAAQ,IAAIC,WAAW,QAClB,UAAU;AAAC,SAGTC,sBAAsB;AAAA,SACtBC,KAAK;AAAA,SAELC,GAAG;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAA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GAAGoB,GAAG,CAACpB,KAAK,GAAGqB,KAAK,CAACO,QAAQ,CAAC,CAGjC,CACd,CAAC;EAAA,CACW,CAAC;AAEpB,CAAC;AAED,MAAME,YAAY,GAAGvD,IAAI,CAACmC,IAAI,CAAC;AAC/BoB,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIpB,IAAI"}
|
package/dist/Tag.js
CHANGED
|
@@ -21,7 +21,8 @@ const Tag = _ref => {
|
|
|
21
21
|
label,
|
|
22
22
|
onClick,
|
|
23
23
|
onRemove,
|
|
24
|
-
testId
|
|
24
|
+
testId,
|
|
25
|
+
translate
|
|
25
26
|
} = _ref;
|
|
26
27
|
const {
|
|
27
28
|
chipElementType
|
|
@@ -36,8 +37,9 @@ const Tag = _ref => {
|
|
|
36
37
|
icon: icon,
|
|
37
38
|
label: label,
|
|
38
39
|
onClick: onClick,
|
|
39
|
-
onDelete: onRemove
|
|
40
|
-
|
|
40
|
+
onDelete: onRemove,
|
|
41
|
+
translate: translate
|
|
42
|
+
}), [chipElementType, icon, isDisabled, label, onClick, onRemove, testId, translate]);
|
|
41
43
|
return _jsx(MuiPropsContext.Consumer, {
|
|
42
44
|
children: renderTag
|
|
43
45
|
});
|
package/dist/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","TagListContext","MuiPropsContext","jsx","_jsx","Tag","_ref","icon","isDisabled","label","onClick","onRemove","testId","chipElementType","renderTag","muiProps","_Chip","clickable","component","disabled","onDelete","Consumer","children","MemoizedTag","displayName"],"sources":["../src/Tag.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 { Chip as MuiChip, ChipProps as MuiChipProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback, useContext } from \"react\";\nimport { TagListContext } from \"./TagListContext\";\nimport { MuiPropsContext } from \"./MuiPropsContext\";\nimport {
|
|
1
|
+
{"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","TagListContext","MuiPropsContext","jsx","_jsx","Tag","_ref","icon","isDisabled","label","onClick","onRemove","testId","translate","chipElementType","renderTag","muiProps","_Chip","clickable","component","disabled","onDelete","Consumer","children","MemoizedTag","displayName"],"sources":["../src/Tag.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 { Chip as MuiChip, ChipProps as MuiChipProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback, useContext } from \"react\";\nimport { TagListContext } from \"./TagListContext\";\nimport { MuiPropsContext } from \"./MuiPropsContext\";\nimport { AllowedProps } from \"./AllowedProps\";\n\nexport type TagProps = {\n icon?: ReactElement;\n isDisabled?: boolean;\n /**\n * The label text for the Tag\n */\n label: string;\n /**\n * Callback fired when the Tag is clicked\n */\n onClick?: MuiChipProps[\"onClick\"];\n /**\n * Callback fired when the remove button of the Tag is clicked\n */\n onRemove?: MuiChipProps[\"onDelete\"];\n} & AllowedProps;\n\nconst Tag = ({\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n}: TagProps) => {\n const { chipElementType } = useContext(TagListContext);\n\n const renderTag = useCallback(\n (muiProps) => (\n <MuiChip\n {...muiProps}\n aria-disabled={isDisabled}\n clickable={onClick ? true : false}\n component={chipElementType}\n data-se={testId}\n disabled={isDisabled}\n icon={icon}\n label={label}\n onClick={onClick}\n onDelete={onRemove}\n translate={translate}\n />\n ),\n [\n chipElementType,\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n ]\n );\n\n return <MuiPropsContext.Consumer>{renderTag}</MuiPropsContext.Consumer>;\n};\n\nconst MemoizedTag = memo(Tag);\nMemoizedTag.displayName = \"Tag\";\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAAC,SAC3DC,cAAc;AAAA,SACdC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoBxB,MAAMC,GAAG,GAAGC,IAAA,IAQI;EAAA,IARH;IACXC,IAAI;IACJC,UAAU;IACVC,KAAK;IACLC,OAAO;IACPC,QAAQ;IACRC,MAAM;IACNC;EACQ,CAAC,GAAAP,IAAA;EACT,MAAM;IAAEQ;EAAgB,CAAC,GAAGd,UAAU,CAACC,cAAc,CAAC;EAEtD,MAAMc,SAAS,GAAGhB,WAAW,CAC1BiB,QAAQ,IACPZ,IAAA,CAAAa,KAAA;IAAA,GACMD,QAAQ;IACZ,iBAAeR,UAAW;IAC1BU,SAAS,EAAER,OAAO,GAAG,IAAI,GAAG,KAAM;IAClCS,SAAS,EAAEL,eAAgB;IAC3B,WAASF,MAAO;IAChBQ,QAAQ,EAAEZ,UAAW;IACrBD,IAAI,EAAEA,IAAK;IACXE,KAAK,EAAEA,KAAM;IACbC,OAAO,EAAEA,OAAQ;IACjBW,QAAQ,EAAEV,QAAS;IACnBE,SAAS,EAAEA;EAAU,CACtB,CACF,EACD,CACEC,eAAe,EACfP,IAAI,EACJC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,SAAS,CAEb,CAAC;EAED,OAAOT,IAAA,CAACF,eAAe,CAACoB,QAAQ;IAAAC,QAAA,EAAER;EAAS,CAA2B,CAAC;AACzE,CAAC;AAED,MAAMS,WAAW,GAAG1B,IAAI,CAACO,GAAG,CAAC;AAC7BmB,WAAW,CAACC,WAAW,GAAG,KAAK;AAE/B,SAASD,WAAW,IAAInB,GAAG"}
|
package/dist/TagList.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagList.js","names":["memo","useMemo","TagListContext","jsx","_jsx","TagList","_ref","children","testId","providerValue","chipElementType","_Stack","component","direction","spacing","useFlexGap","flexWrap","Provider","value","MemoizedTagList","displayName"],"sources":["../src/TagList.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 { Tag } from \"./Tag\";\nimport { Stack } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\nimport { ChipElementType, TagListContext } from \"./TagListContext\";\nimport {
|
|
1
|
+
{"version":3,"file":"TagList.js","names":["memo","useMemo","TagListContext","jsx","_jsx","TagList","_ref","children","testId","providerValue","chipElementType","_Stack","component","direction","spacing","useFlexGap","flexWrap","Provider","value","MemoizedTagList","displayName"],"sources":["../src/TagList.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 { Tag } from \"./Tag\";\nimport { Stack } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\nimport { ChipElementType, TagListContext } from \"./TagListContext\";\nimport { AllowedProps } from \"./AllowedProps\";\n\nexport type TagListProps = {\n /**\n * The Tag or array of Tags within the TagList\n */\n children: ReactElement<typeof Tag> | Array<ReactElement<typeof Tag>>;\n} & AllowedProps;\n\nconst TagList = ({ children, testId }: TagListProps) => {\n const providerValue = useMemo<{\n chipElementType: ChipElementType;\n }>(\n () => ({\n chipElementType: \"li\",\n }),\n []\n );\n\n return (\n <Stack\n component=\"ul\"\n data-se={testId}\n direction=\"row\"\n spacing={2}\n useFlexGap\n flexWrap=\"wrap\"\n >\n <TagListContext.Provider value={providerValue}>\n {children}\n </TagListContext.Provider>\n </Stack>\n );\n};\n\nconst MemoizedTagList = memo(TagList);\nMemoizedTagList.displayName = \"TagList\";\n\nexport { MemoizedTagList as TagList };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAC1BC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUxC,MAAMC,OAAO,GAAGC,IAAA,IAAwC;EAAA,IAAvC;IAAEC,QAAQ;IAAEC;EAAqB,CAAC,GAAAF,IAAA;EACjD,MAAMG,aAAa,GAAGR,OAAO,CAG3B,OAAO;IACLS,eAAe,EAAE;EACnB,CAAC,CAAC,EACF,EACF,CAAC;EAED,OACEN,IAAA,CAAAO,MAAA;IACEC,SAAS,EAAC,IAAI;IACd,WAASJ,MAAO;IAChBK,SAAS,EAAC,KAAK;IACfC,OAAO,EAAE,CAAE;IACXC,UAAU;IACVC,QAAQ,EAAC,MAAM;IAAAT,QAAA,EAEfH,IAAA,CAACF,cAAc,CAACe,QAAQ;MAACC,KAAK,EAAET,aAAc;MAAAF,QAAA,EAC3CA;IAAQ,CACc;EAAC,CACrB,CAAC;AAEZ,CAAC;AAED,MAAMY,eAAe,GAAGnB,IAAI,CAACK,OAAO,CAAC;AACrCc,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAId,OAAO"}
|
package/dist/TextField.js
CHANGED
|
@@ -41,6 +41,7 @@ const TextField = forwardRef((_ref, ref) => {
|
|
|
41
41
|
placeholder,
|
|
42
42
|
startAdornment,
|
|
43
43
|
testId,
|
|
44
|
+
translate,
|
|
44
45
|
type = "text",
|
|
45
46
|
value: value
|
|
46
47
|
} = _ref;
|
|
@@ -84,6 +85,7 @@ const TextField = forwardRef((_ref, ref) => {
|
|
|
84
85
|
"data-se": testId,
|
|
85
86
|
endAdornment: endAdornment && _jsx(_InputAdornment, {
|
|
86
87
|
position: "end",
|
|
88
|
+
translate: translate,
|
|
87
89
|
children: endAdornment
|
|
88
90
|
}),
|
|
89
91
|
id: id,
|
|
@@ -99,11 +101,13 @@ const TextField = forwardRef((_ref, ref) => {
|
|
|
99
101
|
required: !isOptional,
|
|
100
102
|
startAdornment: startAdornment && _jsx(_InputAdornment, {
|
|
101
103
|
position: "start",
|
|
104
|
+
translate: translate,
|
|
102
105
|
children: startAdornment
|
|
103
106
|
}),
|
|
104
|
-
type: type
|
|
107
|
+
type: type,
|
|
108
|
+
translate: translate
|
|
105
109
|
});
|
|
106
|
-
}, [autoCompleteType, inputValues, hasInitialFocus, endAdornment, isMultiline, nameOverride, onBlur, onChange, onFocus, placeholder, isOptional, isReadOnly, ref, startAdornment, testId, type]);
|
|
110
|
+
}, [autoCompleteType, inputValues, hasInitialFocus, endAdornment, isMultiline, nameOverride, onBlur, onChange, onFocus, placeholder, isOptional, isReadOnly, ref, startAdornment, testId, translate, type]);
|
|
107
111
|
return _jsx(Field, {
|
|
108
112
|
errorMessage: errorMessage,
|
|
109
113
|
fieldType: "single",
|
package/dist/TextField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","useImperativeHandle","useRef","Field","useInputValues","getControlState","jsx","_jsx","textFieldTypeValues","TextField","_ref","ref","autoCompleteType","defaultValue","hasInitialFocus","endAdornment","errorMessage","hint","HintLinkComponent","id","idOverride","inputFocusRef","isDisabled","isFullWidth","isMultiline","isOptional","isReadOnly","label","name","nameOverride","onBlur","onChange","onChangeProp","onFocus","placeholder","startAdornment","testId","type","value","controlledStateRef","controlledValue","uncontrolledValue","inputValues","controlState","current","inputRef","element","focus","event","renderFieldComponent","_ref2","ariaDescribedBy","errorMessageElementId","labelElementId","_InputBase","inputProps","autoComplete","autoFocus","_InputAdornment","position","children","multiline","readOnly","required","fieldType","hasVisibleLabel","MemoizedTextField","displayName"],"sources":["../src/TextField.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 ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useImperativeHandle,\n useRef,\n} from \"react\";\nimport { InputAdornment, InputBase } from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { Field } from \"./Field\";\nimport { SeleniumProps } from \"./SeleniumProps\";\nimport { useInputValues, getControlState } from \"./inputUtils\";\nimport { FocusHandle } from \"./@types/react-augment\";\n\nexport const textFieldTypeValues = [\n \"email\",\n \"number\",\n \"tel\",\n \"text\",\n \"url\",\n] as const;\n\nexport type TextFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: string;\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: string | ReactElement;\n /**\n * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * The ref forwarded to the TextField to expose focus()\n */\n inputFocusRef?: React.RefObject<FocusHandle>;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: string | ReactElement;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: (typeof textFieldTypeValues)[number];\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n} & FieldComponentProps &\n SeleniumProps;\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n autoCompleteType,\n defaultValue,\n hasInitialFocus,\n endAdornment,\n errorMessage,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputFocusRef,\n isDisabled = false,\n isFullWidth = false,\n isMultiline = false,\n isOptional = false,\n isReadOnly,\n label,\n name: nameOverride,\n onBlur,\n onChange: onChangeProp,\n onFocus,\n placeholder,\n startAdornment,\n testId,\n type = \"text\",\n value: value,\n },\n ref\n ) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n })\n );\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const 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 onChange = useCallback<\n NonNullable<ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>>\n >(\n (event) => {\n onChangeProp?.(event);\n },\n [onChangeProp]\n );\n\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, errorMessageElementId, id, labelElementId }) => (\n <InputBase\n {...inputValues}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n }}\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n data-se={testId}\n endAdornment={\n endAdornment && (\n <InputAdornment position=\"end\">{endAdornment}</InputAdornment>\n )\n }\n id={id}\n inputRef={inputRef}\n multiline={isMultiline}\n name={nameOverride ?? id}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n required={!isOptional}\n startAdornment={\n startAdornment && (\n <InputAdornment position=\"start\">{startAdornment}</InputAdornment>\n )\n }\n type={type}\n />\n ),\n [\n autoCompleteType,\n inputValues,\n hasInitialFocus,\n endAdornment,\n isMultiline,\n nameOverride,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n isOptional,\n isReadOnly,\n ref,\n startAdornment,\n testId,\n type,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedTextField = memo(TextField);\nMemoizedTextField.displayName = \"TextField\";\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,UAAU,EAEVC,IAAI,EAEJC,WAAW,EACXC,mBAAmB,EACnBC,MAAM,QACD,OAAO;AAAC,SAINC,KAAK;AAAA,SAELC,cAAc,EAAEC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGxC,OAAO,MAAMC,mBAAmB,GAAG,CACjC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAM,EACN,KAAK,CACG;AAgEV,MAAMC,SAAS,GAAGX,UAAU,CAC1B,CAAAY,IAAA,EA2BEC,GAAG,KACA;EAAA,IA3BH;IACEC,gBAAgB;IAChBC,YAAY;IACZC,eAAe;IACfC,YAAY;IACZC,YAAY;IACZC,IAAI;IACJC,iBAAiB;IACjBC,EAAE,EAAEC,UAAU;IACdC,aAAa;IACbC,UAAU,GAAG,KAAK;IAClBC,WAAW,GAAG,KAAK;IACnBC,WAAW,GAAG,KAAK;IACnBC,UAAU,GAAG,KAAK;IAClBC,UAAU;IACVC,KAAK;IACLC,IAAI,EAAEC,YAAY;IAClBC,MAAM;IACNC,QAAQ,EAAEC,YAAY;IACtBC,OAAO;IACPC,WAAW;IACXC,cAAc;IACdC,MAAM;IACNC,IAAI,GAAG,MAAM;IACbC,KAAK,EAAEA;EACT,CAAC,GAAA5B,IAAA;EAGD,MAAM6B,kBAAkB,GAAGrC,MAAM,CAC/BG,eAAe,CAAC;IACdmC,eAAe,EAAEF,KAAK;I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AAQ,EAAEA,QAAS;MACnBE,OAAO,EAAEA,OAAQ;MACjBC,WAAW,EAAEA,WAAY;MACzB4B,QAAQ,EAAEpC,UAAW;MACrBf,GAAG,EAAEA,GAAI;MACToD,QAAQ,EAAE,CAACtC,UAAW;MACtBU,cAAc,EACZA,cAAc,IACZ5B,IAAA,CAAAmD,eAAA;QAAgBC,QAAQ,EAAC,OAAO;QAAAC,QAAA,EAAEzB;MAAc,CAAiB,CAEpE;MACDE,IAAI,EAAEA;IAAK,CACZ,CAAC;EAAA,CACH,EACD,CACEzB,gBAAgB,EAChB8B,WAAW,EACX5B,eAAe,EACfC,YAAY,EACZS,WAAW,EACXK,YAAY,EACZC,MAAM,EACNC,QAAQ,EACRE,OAAO,EACPC,WAAW,EACXT,UAAU,EACVC,UAAU,EACVf,GAAG,EACHwB,cAAc,EACdC,MAAM,EACNC,IAAI,CAER,CAAC;EAED,OACE9B,IAAA,CAACJ,KAAK;IACJa,YAAY,EAAEA,YAAa;IAC3BgD,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACfhD,IAAI,EAAEA,IAAK;IACXC,iBAAiB,EAAEA,iBAAkB;IACrCC,EAAE,EAAEC,UAAW;IACfE,UAAU,EAAEA,UAAW;IACvBC,WAAW,EAAEA,WAAY;IACzBE,UAAU,EAAEA,UAAW;IACvBE,KAAK,EAAEA,KAAM;IACbsB,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMiB,iBAAiB,GAAGnE,IAAI,CAACU,SAAS,CAAC;AACzCyD,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIzD,SAAS"}
|
|
1
|
+
{"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","useImperativeHandle","useRef","Field","useInputValues","getControlState","jsx","_jsx","textFieldTypeValues","TextField","_ref","ref","autoCompleteType","defaultValue","hasInitialFocus","endAdornment","errorMessage","hint","HintLinkComponent","id","idOverride","inputFocusRef","isDisabled","isFullWidth","isMultiline","isOptional","isReadOnly","label","name","nameOverride","onBlur","onChange","onChangeProp","onFocus","placeholder","startAdornment","testId","translate","type","value","controlledStateRef","controlledValue","uncontrolledValue","inputValues","controlState","current","inputRef","element","focus","event","renderFieldComponent","_ref2","ariaDescribedBy","errorMessageElementId","labelElementId","_InputBase","inputProps","autoComplete","autoFocus","_InputAdornment","position","children","multiline","readOnly","required","fieldType","hasVisibleLabel","MemoizedTextField","displayName"],"sources":["../src/TextField.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 ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useImperativeHandle,\n useRef,\n} from \"react\";\nimport { InputAdornment, InputBase } from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { Field } from \"./Field\";\nimport { AllowedProps } from \"./AllowedProps\";\nimport { useInputValues, getControlState } from \"./inputUtils\";\nimport { FocusHandle } from \"./@types/react-augment\";\n\nexport const textFieldTypeValues = [\n \"email\",\n \"number\",\n \"tel\",\n \"text\",\n \"url\",\n] as const;\n\nexport type TextFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: string;\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: string | ReactElement;\n /**\n * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * The ref forwarded to the TextField to expose focus()\n */\n inputFocusRef?: React.RefObject<FocusHandle>;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: string | ReactElement;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: (typeof textFieldTypeValues)[number];\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n} & FieldComponentProps &\n AllowedProps;\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n autoCompleteType,\n defaultValue,\n hasInitialFocus,\n endAdornment,\n errorMessage,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputFocusRef,\n isDisabled = false,\n isFullWidth = false,\n isMultiline = false,\n isOptional = false,\n isReadOnly,\n label,\n name: nameOverride,\n onBlur,\n onChange: onChangeProp,\n onFocus,\n placeholder,\n startAdornment,\n testId,\n translate,\n type = \"text\",\n value: value,\n },\n ref\n ) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n })\n );\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const 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 onChange = useCallback<\n NonNullable<ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>>\n >(\n (event) => {\n onChangeProp?.(event);\n },\n [onChangeProp]\n );\n\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, errorMessageElementId, id, labelElementId }) => (\n <InputBase\n {...inputValues}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n }}\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n data-se={testId}\n endAdornment={\n endAdornment && (\n <InputAdornment position=\"end\" translate={translate}>\n {endAdornment}\n </InputAdornment>\n )\n }\n id={id}\n inputRef={inputRef}\n multiline={isMultiline}\n name={nameOverride ?? id}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n required={!isOptional}\n startAdornment={\n startAdornment && (\n <InputAdornment position=\"start\" translate={translate}>\n {startAdornment}\n </InputAdornment>\n )\n }\n type={type}\n translate={translate}\n />\n ),\n [\n autoCompleteType,\n inputValues,\n hasInitialFocus,\n endAdornment,\n isMultiline,\n nameOverride,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n isOptional,\n isReadOnly,\n ref,\n startAdornment,\n testId,\n translate,\n type,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedTextField = memo(TextField);\nMemoizedTextField.displayName = \"TextField\";\n\nexport { MemoizedTextField as Text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,SAAS,EAAEA,SAAU;QAAAwB,QAAA,EACnD1B;MAAc,CACD,CAEnB;MACDG,IAAI,EAAEA,IAAK;MACXD,SAAS,EAAEA;IAAU,CACtB,CAAC;EAAA,CACH,EACD,CACEzB,gBAAgB,EAChB+B,WAAW,EACX7B,eAAe,EACfC,YAAY,EACZS,WAAW,EACXK,YAAY,EACZC,MAAM,EACNC,QAAQ,EACRE,OAAO,EACPC,WAAW,EACXT,UAAU,EACVC,UAAU,EACVf,GAAG,EACHwB,cAAc,EACdC,MAAM,EACNC,SAAS,EACTC,IAAI,CAER,CAAC;EAED,OACE/B,IAAA,CAACJ,KAAK;IACJa,YAAY,EAAEA,YAAa;IAC3BiD,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACfjD,IAAI,EAAEA,IAAK;IACXC,iBAAiB,EAAEA,iBAAkB;IACrCC,EAAE,EAAEC,UAAW;IACfE,UAAU,EAAEA,UAAW;IACvBC,WAAW,EAAEA,WAAY;IACzBE,UAAU,EAAEA,UAAW;IACvBE,KAAK,EAAEA,KAAM;IACbuB,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMiB,iBAAiB,GAAGpE,IAAI,CAACU,SAAS,CAAC;AACzC0D,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAI1D,SAAS"}
|
package/dist/Toast.js
CHANGED
|
@@ -37,7 +37,8 @@ const Toast = _ref => {
|
|
|
37
37
|
role,
|
|
38
38
|
severity,
|
|
39
39
|
testId,
|
|
40
|
-
text
|
|
40
|
+
text,
|
|
41
|
+
translate
|
|
41
42
|
} = _ref;
|
|
42
43
|
const {
|
|
43
44
|
t
|
|
@@ -69,6 +70,7 @@ const Toast = _ref => {
|
|
|
69
70
|
severity: severity,
|
|
70
71
|
variant: "toast",
|
|
71
72
|
children: [_jsxs(_AlertTitle, {
|
|
73
|
+
translate: translate,
|
|
72
74
|
children: [_jsxs("span", {
|
|
73
75
|
style: visuallyHidden,
|
|
74
76
|
children: [severity, ":"]
|
|
@@ -76,6 +78,7 @@ const Toast = _ref => {
|
|
|
76
78
|
}), linkUrl && _jsx(Link, {
|
|
77
79
|
href: linkUrl,
|
|
78
80
|
variant: "monochrome",
|
|
81
|
+
translate: translate,
|
|
79
82
|
children: linkText
|
|
80
83
|
})]
|
|
81
84
|
})
|
package/dist/Toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","names":["useEffect","memo","useState","useCallback","visuallyHidden","Link","CloseIcon","Button","useTranslation","jsx","_jsx","jsxs","_jsxs","toastRoleValues","toastSeverityValues","ClickAwayListenerProps","onClickAway","Toast","_ref","autoHideDuration","isDismissable","linkText","linkUrl","isVisible","isVisibleProp","onHide","onHideProp","role","severity","testId","text","t","setIsVisible","_Snackbar","open","undefined","onClose","className","children","_Alert","action","ariaLabel","onClick","size","startIcon","variant","_AlertTitle","style","href","MemoizedToast","displayName"],"sources":["../src/Toast.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 { useEffect, memo, useState, useCallback } from \"react\";\nimport { Alert, AlertTitle, Snackbar } from \"@mui/material\";\nimport { visuallyHidden } from \"@mui/utils\";\nimport { Link } from \"./Link\";\nimport { CloseIcon } from \"./icons.generated\";\nimport { Button } from \"./Button\";\nimport { useTranslation } from \"react-i18next\";\nimport {
|
|
1
|
+
{"version":3,"file":"Toast.js","names":["useEffect","memo","useState","useCallback","visuallyHidden","Link","CloseIcon","Button","useTranslation","jsx","_jsx","jsxs","_jsxs","toastRoleValues","toastSeverityValues","ClickAwayListenerProps","onClickAway","Toast","_ref","autoHideDuration","isDismissable","linkText","linkUrl","isVisible","isVisibleProp","onHide","onHideProp","role","severity","testId","text","translate","t","setIsVisible","_Snackbar","open","undefined","onClose","className","children","_Alert","action","ariaLabel","onClick","size","startIcon","variant","_AlertTitle","style","href","MemoizedToast","displayName"],"sources":["../src/Toast.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 { useEffect, memo, useState, useCallback } from \"react\";\nimport { Alert, AlertTitle, Snackbar } from \"@mui/material\";\nimport { visuallyHidden } from \"@mui/utils\";\nimport { Link } from \"./Link\";\nimport { CloseIcon } from \"./icons.generated\";\nimport { Button } from \"./Button\";\nimport { useTranslation } from \"react-i18next\";\nimport { AllowedProps } from \"./AllowedProps\";\n\nexport const toastRoleValues = [\"status\", \"alert\"] as const;\nexport const toastSeverityValues = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n] as const;\n\nexport type ToastProps = {\n /**\n * If set, this determines how long the Toast should appear before automatically disappearing in milliseconds.\n * It will only take effect if the Toast is not dismissible.\n * If left blank, it defaults to 6000.\n */\n autoHideDuration?: number;\n /**\n * If `true`, the Toast will include a close button.\n */\n isDismissable?: boolean;\n /**\n * If true, the Toast is visible\n */\n isVisible?: boolean;\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkText?: string;\n /**\n * If defined, the Toast will include a link to the URL\n */\n linkUrl?: string;\n /**\n * An optional function to run when the Toast is closed.\n */\n onHide?: () => void;\n /**\n * Sets the ARIA role of the Toast\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: (typeof toastRoleValues)[number];\n /**\n * Determine the color and icon of the Toast\n */\n severity: (typeof toastSeverityValues)[number];\n /**\n * The text content of the Toast\n */\n text: string;\n} & AllowedProps;\n\nconst ClickAwayListenerProps = { onClickAway: () => false };\n\nconst Toast = ({\n autoHideDuration = 6000,\n isDismissable,\n linkText,\n linkUrl,\n isVisible: isVisibleProp,\n onHide: onHideProp,\n role,\n severity,\n testId,\n text,\n translate,\n}: ToastProps) => {\n const { t } = useTranslation();\n\n const [isVisible, setIsVisible] = useState(isVisibleProp);\n\n useEffect(() => {\n setIsVisible(isVisibleProp);\n }, [isVisibleProp]);\n\n const onHide = useCallback(() => {\n setIsVisible(false);\n onHideProp?.();\n }, [onHideProp]);\n\n return (\n <Snackbar\n open={isVisible}\n autoHideDuration={\n isDismissable || autoHideDuration <= 0 ? undefined : autoHideDuration\n }\n onClose={onHide}\n className=\"Toast\"\n ClickAwayListenerProps={ClickAwayListenerProps}\n >\n <Alert\n action={\n isDismissable === true && (\n <Button\n ariaLabel={t(\"toast.close.text\")}\n onClick={onHide}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n )\n }\n data-se={testId}\n role={role}\n severity={severity}\n variant=\"toast\"\n >\n <AlertTitle translate={translate}>\n <span style={visuallyHidden}>{severity}:</span>\n {text}\n </AlertTitle>\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\" translate={translate}>\n {linkText}\n </Link>\n )}\n </Alert>\n </Snackbar>\n );\n};\n\nconst MemoizedToast = memo(Toast);\nMemoizedToast.displayName = \"Toast\";\n\nexport { MemoizedToast as Toast };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,IAAI,EAAEC,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,EAAEZ,MAAO;IAChBa,SAAS,EAAC,OAAO;IACjBvB,sBAAsB,EAAEA,sBAAuB;IAAAwB,QAAA,EAE/C3B,KAAA,CAAA4B,MAAA;MACEC,MAAM,EACJrB,aAAa,KAAK,IAAI,IACpBV,IAAA,CAACH,MAAM;QACLmC,SAAS,EAAEV,CAAC,CAAC,kBAAkB,CAAE;QACjCW,OAAO,EAAElB,MAAO;QAChBmB,IAAI,EAAC,OAAO;QACZC,SAAS,EAAEnC,IAAA,CAACJ,SAAS,IAAE,CAAE;QACzBwC,OAAO,EAAC;MAAU,CACnB,CAEJ;MACD,WAASjB,MAAO;MAChBF,IAAI,EAAEA,IAAK;MACXC,QAAQ,EAAEA,QAAS;MACnBkB,OAAO,EAAC,OAAO;MAAAP,QAAA,GAEf3B,KAAA,CAAAmC,WAAA;QAAYhB,SAAS,EAAEA,SAAU;QAAAQ,QAAA,GAC/B3B,KAAA;UAAMoC,KAAK,EAAE5C,cAAe;UAAAmC,QAAA,GAAEX,QAAQ,EAAC,GAAC;QAAA,CAAM,CAAC,EAC9CE,IAAI;MAAA,CACK,CAAC,EACZR,OAAO,IACNZ,IAAA,CAACL,IAAI;QAAC4C,IAAI,EAAE3B,OAAQ;QAACwB,OAAO,EAAC,YAAY;QAACf,SAAS,EAAEA,SAAU;QAAAQ,QAAA,EAC5DlB;MAAQ,CACL,CACP;IAAA,CACI;EAAC,CACA,CAAC;AAEf,CAAC;AAED,MAAM6B,aAAa,GAAGjD,IAAI,CAACgB,KAAK,CAAC;AACjCiC,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAIjC,KAAK"}
|
package/dist/Tooltip.js
CHANGED
|
@@ -19,13 +19,15 @@ const Tooltip = _ref => {
|
|
|
19
19
|
children,
|
|
20
20
|
placement = "top",
|
|
21
21
|
testId,
|
|
22
|
-
text
|
|
22
|
+
text,
|
|
23
|
+
translate
|
|
23
24
|
} = _ref;
|
|
24
25
|
return _jsx(_Tooltip, {
|
|
25
26
|
"data-se": testId,
|
|
26
27
|
describeChild: ariaType === "description",
|
|
27
28
|
placement: placement,
|
|
28
29
|
title: text,
|
|
30
|
+
translate: translate,
|
|
29
31
|
children: _jsx(MuiPropsChild, {
|
|
30
32
|
children: children
|
|
31
33
|
})
|
package/dist/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["MuiPropsChild","memo","jsx","_jsx","Tooltip","_ref","ariaType","children","placement","testId","text","_Tooltip","describeChild","title","MemoizedTooltip","displayName"],"sources":["../src/Tooltip.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 { Tooltip as MuiTooltip } from \"@mui/material\";\nimport type { TooltipProps as MuiTooltipProps } from \"@mui/material\";\n\nimport { MuiPropsChild } from \"./MuiPropsChild\";\nimport { ReactElement, memo } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["MuiPropsChild","memo","jsx","_jsx","Tooltip","_ref","ariaType","children","placement","testId","text","translate","_Tooltip","describeChild","title","MemoizedTooltip","displayName"],"sources":["../src/Tooltip.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 { Tooltip as MuiTooltip } from \"@mui/material\";\nimport type { TooltipProps as MuiTooltipProps } from \"@mui/material\";\n\nimport { MuiPropsChild } from \"./MuiPropsChild\";\nimport { ReactElement, memo } from \"react\";\nimport { AllowedProps } from \"./AllowedProps\";\n\nexport type TooltipProps = {\n /**\n * The type of ARIA attribute to use\n */\n ariaType: \"description\" | \"label\";\n /**\n * The content that triggers the Tooltip when hovered\n */\n children: ReactElement;\n /**\n * The placement of the Tooltip\n */\n placement?: MuiTooltipProps[\"placement\"];\n /**\n * The text to display in the Tooltip\n */\n text: string;\n} & AllowedProps;\n\nconst Tooltip = ({\n ariaType,\n children,\n placement = \"top\",\n testId,\n text,\n translate,\n}: TooltipProps) => (\n <MuiTooltip\n data-se={testId}\n describeChild={ariaType === \"description\"}\n placement={placement}\n title={text}\n translate={translate}\n >\n <MuiPropsChild>{children}</MuiPropsChild>\n </MuiTooltip>\n);\n\nconst MemoizedTooltip = memo(Tooltip);\nMemoizedTooltip.displayName = \"Tooltip\";\n\nexport { MemoizedTooltip as Tooltip };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAeSA,aAAa;AACtB,SAAuBC,IAAI,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAsB3C,MAAMC,OAAO,GAAGC,IAAA;EAAA,IAAC;IACfC,QAAQ;IACRC,QAAQ;IACRC,SAAS,GAAG,KAAK;IACjBC,MAAM;IACNC,IAAI;IACJC;EACY,CAAC,GAAAN,IAAA;EAAA,OACbF,IAAA,CAAAS,QAAA;IACE,WAASH,MAAO;IAChBI,aAAa,EAAEP,QAAQ,KAAK,aAAc;IAC1CE,SAAS,EAAEA,SAAU;IACrBM,KAAK,EAAEJ,IAAK;IACZC,SAAS,EAAEA,SAAU;IAAAJ,QAAA,EAErBJ,IAAA,CAACH,aAAa;MAAAO,QAAA,EAAEA;IAAQ,CAAgB;EAAC,CAC/B,CAAC;AAAA,CACd;AAED,MAAMQ,eAAe,GAAGd,IAAI,CAACG,OAAO,CAAC;AACrCW,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAIX,OAAO"}
|
package/dist/Typography.js
CHANGED
|
@@ -34,6 +34,7 @@ const Typography = _ref => {
|
|
|
34
34
|
color,
|
|
35
35
|
component: componentProp,
|
|
36
36
|
testId,
|
|
37
|
+
translate,
|
|
37
38
|
typographyFocusRef,
|
|
38
39
|
variant = "body"
|
|
39
40
|
} = _ref;
|
|
@@ -68,6 +69,7 @@ const Typography = _ref => {
|
|
|
68
69
|
"data-se": testId,
|
|
69
70
|
ref: ref,
|
|
70
71
|
tabIndex: -1,
|
|
72
|
+
translate: translate,
|
|
71
73
|
variant: typographyVariantMapping[variant]
|
|
72
74
|
});
|
|
73
75
|
};
|
|
@@ -81,7 +83,8 @@ const Heading1 = _ref2 => {
|
|
|
81
83
|
children,
|
|
82
84
|
color,
|
|
83
85
|
component,
|
|
84
|
-
testId
|
|
86
|
+
testId,
|
|
87
|
+
translate
|
|
85
88
|
} = _ref2;
|
|
86
89
|
return _jsx(Typography, {
|
|
87
90
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -91,6 +94,7 @@ const Heading1 = _ref2 => {
|
|
|
91
94
|
color: color,
|
|
92
95
|
component: component,
|
|
93
96
|
"data-se": testId,
|
|
97
|
+
translate: translate,
|
|
94
98
|
variant: "h1"
|
|
95
99
|
});
|
|
96
100
|
};
|
|
@@ -104,7 +108,8 @@ const Heading2 = _ref3 => {
|
|
|
104
108
|
children,
|
|
105
109
|
color,
|
|
106
110
|
component,
|
|
107
|
-
testId
|
|
111
|
+
testId,
|
|
112
|
+
translate
|
|
108
113
|
} = _ref3;
|
|
109
114
|
return _jsx(Typography, {
|
|
110
115
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -114,6 +119,7 @@ const Heading2 = _ref3 => {
|
|
|
114
119
|
color: color,
|
|
115
120
|
component: component,
|
|
116
121
|
"data-se": testId,
|
|
122
|
+
translate: translate,
|
|
117
123
|
variant: "h2"
|
|
118
124
|
});
|
|
119
125
|
};
|
|
@@ -127,7 +133,8 @@ const Heading3 = _ref4 => {
|
|
|
127
133
|
children,
|
|
128
134
|
color,
|
|
129
135
|
component,
|
|
130
|
-
testId
|
|
136
|
+
testId,
|
|
137
|
+
translate
|
|
131
138
|
} = _ref4;
|
|
132
139
|
return _jsx(Typography, {
|
|
133
140
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -137,6 +144,7 @@ const Heading3 = _ref4 => {
|
|
|
137
144
|
color: color,
|
|
138
145
|
component: component,
|
|
139
146
|
"data-se": testId,
|
|
147
|
+
translate: translate,
|
|
140
148
|
variant: "h3"
|
|
141
149
|
});
|
|
142
150
|
};
|
|
@@ -150,7 +158,8 @@ const Heading4 = _ref5 => {
|
|
|
150
158
|
children,
|
|
151
159
|
color,
|
|
152
160
|
component,
|
|
153
|
-
testId
|
|
161
|
+
testId,
|
|
162
|
+
translate
|
|
154
163
|
} = _ref5;
|
|
155
164
|
return _jsx(Typography, {
|
|
156
165
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -160,6 +169,7 @@ const Heading4 = _ref5 => {
|
|
|
160
169
|
color: color,
|
|
161
170
|
component: component,
|
|
162
171
|
"data-se": testId,
|
|
172
|
+
translate: translate,
|
|
163
173
|
variant: "h4"
|
|
164
174
|
});
|
|
165
175
|
};
|
|
@@ -173,7 +183,8 @@ const Heading5 = _ref6 => {
|
|
|
173
183
|
children,
|
|
174
184
|
color,
|
|
175
185
|
component,
|
|
176
|
-
testId
|
|
186
|
+
testId,
|
|
187
|
+
translate
|
|
177
188
|
} = _ref6;
|
|
178
189
|
return _jsx(Typography, {
|
|
179
190
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -183,6 +194,7 @@ const Heading5 = _ref6 => {
|
|
|
183
194
|
color: color,
|
|
184
195
|
component: component,
|
|
185
196
|
"data-se": testId,
|
|
197
|
+
translate: translate,
|
|
186
198
|
variant: "h5"
|
|
187
199
|
});
|
|
188
200
|
};
|
|
@@ -196,7 +208,8 @@ const Heading6 = _ref7 => {
|
|
|
196
208
|
children,
|
|
197
209
|
color,
|
|
198
210
|
component,
|
|
199
|
-
testId
|
|
211
|
+
testId,
|
|
212
|
+
translate
|
|
200
213
|
} = _ref7;
|
|
201
214
|
return _jsx(Typography, {
|
|
202
215
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -206,6 +219,7 @@ const Heading6 = _ref7 => {
|
|
|
206
219
|
color: color,
|
|
207
220
|
component: component,
|
|
208
221
|
"data-se": testId,
|
|
222
|
+
translate: translate,
|
|
209
223
|
variant: "h6"
|
|
210
224
|
});
|
|
211
225
|
};
|
|
@@ -219,7 +233,8 @@ const Paragraph = _ref8 => {
|
|
|
219
233
|
children,
|
|
220
234
|
color,
|
|
221
235
|
component,
|
|
222
|
-
testId
|
|
236
|
+
testId,
|
|
237
|
+
translate
|
|
223
238
|
} = _ref8;
|
|
224
239
|
return _jsx(Typography, {
|
|
225
240
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -229,6 +244,7 @@ const Paragraph = _ref8 => {
|
|
|
229
244
|
color: color,
|
|
230
245
|
component: component,
|
|
231
246
|
"data-se": testId,
|
|
247
|
+
translate: translate,
|
|
232
248
|
variant: "body"
|
|
233
249
|
});
|
|
234
250
|
};
|
|
@@ -242,7 +258,8 @@ const Subordinate = _ref9 => {
|
|
|
242
258
|
children,
|
|
243
259
|
color,
|
|
244
260
|
component,
|
|
245
|
-
testId
|
|
261
|
+
testId,
|
|
262
|
+
translate
|
|
246
263
|
} = _ref9;
|
|
247
264
|
return _jsx(Typography, {
|
|
248
265
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -252,6 +269,7 @@ const Subordinate = _ref9 => {
|
|
|
252
269
|
color: color,
|
|
253
270
|
component: component,
|
|
254
271
|
"data-se": testId,
|
|
272
|
+
translate: translate,
|
|
255
273
|
variant: "subordinate"
|
|
256
274
|
});
|
|
257
275
|
};
|
|
@@ -265,7 +283,8 @@ const Support = _ref10 => {
|
|
|
265
283
|
children,
|
|
266
284
|
color,
|
|
267
285
|
component,
|
|
268
|
-
testId
|
|
286
|
+
testId,
|
|
287
|
+
translate
|
|
269
288
|
} = _ref10;
|
|
270
289
|
return _jsx(Typography, {
|
|
271
290
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -275,6 +294,7 @@ const Support = _ref10 => {
|
|
|
275
294
|
color: color,
|
|
276
295
|
component: component,
|
|
277
296
|
"data-se": testId,
|
|
297
|
+
translate: translate,
|
|
278
298
|
variant: "support"
|
|
279
299
|
});
|
|
280
300
|
};
|
|
@@ -288,7 +308,8 @@ const Legend = _ref11 => {
|
|
|
288
308
|
children,
|
|
289
309
|
color,
|
|
290
310
|
component,
|
|
291
|
-
testId
|
|
311
|
+
testId,
|
|
312
|
+
translate
|
|
292
313
|
} = _ref11;
|
|
293
314
|
return _jsx(Typography, {
|
|
294
315
|
ariaDescribedBy: ariaDescribedBy,
|
|
@@ -298,6 +319,7 @@ const Legend = _ref11 => {
|
|
|
298
319
|
color: color,
|
|
299
320
|
component: component,
|
|
300
321
|
"data-se": testId,
|
|
322
|
+
translate: translate,
|
|
301
323
|
variant: "legend"
|
|
302
324
|
});
|
|
303
325
|
};
|
package/dist/Typography.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","names":["memo","useMemo","useRef","useImperativeHandle","jsx","_jsx","typographyVariantMapping","h1","h2","h3","h4","h5","h6","body","subordinate","support","legend","typographyColorValues","Typography","_ref","ariaDescribedBy","ariaLabel","ariaLabelledBy","children","color","component","componentProp","testId","typographyFocusRef","variant","ref","element","current","focus","_Typography","tabIndex","MemoizedTypography","displayName","Heading1","_ref2","MemoizedHeading1","Heading2","_ref3","MemoizedHeading2","Heading3","_ref4","MemoizedHeading3","Heading4","_ref5","MemoizedHeading4","Heading5","_ref6","MemoizedHeading5","Heading6","_ref7","MemoizedHeading6","Paragraph","_ref8","MemoizedParagraph","Subordinate","_ref9","MemoizedSubordinate","Support","_ref10","MemoizedSupport","Legend","_ref11","MemoizedLegend"],"sources":["../src/Typography.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n Typography as MuiTypography,\n TypographyProps as MuiTypographyProps,\n} from \"@mui/material\";\nimport {\n ElementType,\n ReactNode,\n memo,\n useMemo,\n useRef,\n useImperativeHandle,\n} from \"react\";\nimport { SeleniumProps } from \"./SeleniumProps\";\nimport { FocusHandle } from \"./@types/react-augment\";\n\nexport type TypographyVariantValue =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"body\"\n | \"subordinate\"\n | \"support\"\n | \"legend\";\n\nexport const typographyVariantMapping: Record<\n TypographyVariantValue,\n MuiTypographyProps[\"variant\"]\n> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n h6: \"h6\",\n body: \"body1\",\n subordinate: \"subtitle1\",\n support: \"subtitle2\",\n legend: \"legend\",\n} as const;\n\nexport const typographyColorValues = [\n \"primary\",\n \"textPrimary\",\n \"secondary\",\n \"textSecondary\",\n \"error\",\n] as const;\n\nexport type TypographyProps = {\n /**\n * The ID of the element that describes the component.\n */\n ariaDescribedBy?: string;\n /**\n * The ARIA label for the component.\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the component.\n */\n ariaLabelledBy?: string;\n /**\n * The text content of the component.\n */\n children: ReactNode;\n /**\n * The color of the text.\n */\n color?: (typeof typographyColorValues)[number];\n /**\n * The HTML element the component should render, if different from the default.\n */\n component?: ElementType;\n /**\n * The ref forwarded to the Typography to expose focus()\n */\n typographyFocusRef?: React.RefObject<FocusHandle>;\n /**\n * The variant of Typography to render.\n */\n variant?: keyof typeof typographyVariantMapping;\n} & SeleniumProps;\n\nconst Typography = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component: componentProp,\n testId,\n typographyFocusRef,\n variant = \"body\",\n}: TypographyProps) => {\n const component = useMemo(() => {\n if (!componentProp) {\n if (variant === \"body\") {\n return \"p\";\n } else if (variant === \"subordinate\" || variant === \"support\") {\n return \"p\";\n } else {\n return variant;\n }\n }\n return componentProp;\n }, [componentProp, variant]);\n\n const ref = useRef<HTMLElement>(null);\n useImperativeHandle(\n typographyFocusRef,\n () => {\n const element = ref.current;\n return {\n focus: () => {\n element && element.focus();\n },\n };\n },\n []\n );\n\n return (\n <MuiTypography\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n ref={ref}\n tabIndex={-1}\n variant={typographyVariantMapping[variant]}\n />\n );\n};\n\nconst MemoizedTypography = memo(Typography);\nMemoizedTypography.displayName = \"Typography\";\n\nconst Heading1 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"h1\"\n />\n);\n\nconst MemoizedHeading1 = memo(Heading1);\nMemoizedHeading1.displayName = \"Heading1\";\n\nconst Heading2 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"h2\"\n />\n);\n\nconst MemoizedHeading2 = memo(Heading2);\nMemoizedHeading2.displayName = \"Heading2\";\n\nconst Heading3 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"h3\"\n />\n);\n\nconst MemoizedHeading3 = memo(Heading3);\nMemoizedHeading3.displayName = \"Heading3\";\n\nconst Heading4 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"h4\"\n />\n);\n\nconst MemoizedHeading4 = memo(Heading4);\nMemoizedHeading4.displayName = \"Heading4\";\n\nconst Heading5 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"h5\"\n />\n);\n\nconst MemoizedHeading5 = memo(Heading5);\nMemoizedHeading5.displayName = \"Heading5\";\n\nconst Heading6 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"h6\"\n />\n);\n\nconst MemoizedHeading6 = memo(Heading6);\nMemoizedHeading6.displayName = \"Heading6\";\n\nconst Paragraph = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"body\"\n />\n);\n\nconst MemoizedParagraph = memo(Paragraph);\nMemoizedParagraph.displayName = \"Paragraph\";\n\nconst Subordinate = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"subordinate\"\n />\n);\n\nconst MemoizedSubordinate = memo(Subordinate);\nMemoizedSubordinate.displayName = \"Subordinate\";\n\nconst Support = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"support\"\n />\n);\n\nconst MemoizedSupport = memo(Support);\nMemoizedSupport.displayName = \"Support\";\n\nconst Legend = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n variant=\"legend\"\n />\n);\n\nconst MemoizedLegend = memo(Legend);\nMemoizedLegend.displayName = \"Legend\";\n\nexport {\n MemoizedTypography as Typography,\n MemoizedHeading1 as Heading1,\n MemoizedHeading2 as Heading2,\n MemoizedHeading3 as Heading3,\n MemoizedHeading4 as Heading4,\n MemoizedHeading5 as Heading5,\n MemoizedHeading6 as Heading6,\n MemoizedLegend as Legend,\n MemoizedParagraph as Paragraph,\n MemoizedSubordinate as Subordinate,\n MemoizedSupport as Support,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAGEA,IAAI,EACJC,OAAO,EACPC,MAAM,EACNC,mBAAmB,QACd,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgBf,OAAO,MAAMC,wBAGZ,GAAG;EACFC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,OAAO;EACbC,WAAW,EAAE,WAAW;EACxBC,OAAO,EAAE,WAAW;EACpBC,MAAM,EAAE;AACV,CAAU;AAEV,OAAO,MAAMC,qBAAqB,GAAG,CACnC,SAAS,EACT,aAAa,EACb,WAAW,EACX,eAAe,EACf,OAAO,CACC;AAqCV,MAAMC,UAAU,GAAGC,IAAA,IAUI;EAAA,IAVH;IAClBC,eAAe;IACfC,SAAS;IACTC,cAAc;IACdC,QAAQ;IACRC,KAAK;IACLC,SAAS,EAAEC,aAAa;IACxBC,MAAM;IACNC,kBAAkB;IAClBC,OAAO,GAAG;EACK,CAAC,GAAAV,IAAA;EAChB,MAAMM,SAAS,GAAGxB,OAAO,CAAC,MAAM;IAC9B,IAAI,CAACyB,aAAa,EAAE;MAClB,IAAIG,OAAO,KAAK,MAAM,EAAE;QACtB,OAAO,GAAG;MACZ,CAAC,MAAM,IAAIA,OAAO,KAAK,aAAa,IAAIA,OAAO,KAAK,SAAS,EAAE;QAC7D,OAAO,GAAG;MACZ,CAAC,MAAM;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AC9BK,mBAAmB,IAAIF,WAAW,EAClCK,eAAe,IAAIF,OAAO"}
|
|
1
|
+
{"version":3,"file":"Typography.js","names":["memo","useMemo","useRef","useImperativeHandle","jsx","_jsx","typographyVariantMapping","h1","h2","h3","h4","h5","h6","body","subordinate","support","legend","typographyColorValues","Typography","_ref","ariaDescribedBy","ariaLabel","ariaLabelledBy","children","color","component","componentProp","testId","translate","typographyFocusRef","variant","ref","element","current","focus","_Typography","tabIndex","MemoizedTypography","displayName","Heading1","_ref2","MemoizedHeading1","Heading2","_ref3","MemoizedHeading2","Heading3","_ref4","MemoizedHeading3","Heading4","_ref5","MemoizedHeading4","Heading5","_ref6","MemoizedHeading5","Heading6","_ref7","MemoizedHeading6","Paragraph","_ref8","MemoizedParagraph","Subordinate","_ref9","MemoizedSubordinate","Support","_ref10","MemoizedSupport","Legend","_ref11","MemoizedLegend"],"sources":["../src/Typography.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n Typography as MuiTypography,\n TypographyProps as MuiTypographyProps,\n} from \"@mui/material\";\nimport {\n ElementType,\n ReactNode,\n memo,\n useMemo,\n useRef,\n useImperativeHandle,\n} from \"react\";\nimport { AllowedProps } from \"./AllowedProps\";\nimport { FocusHandle } from \"./@types/react-augment\";\n\nexport type TypographyVariantValue =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"body\"\n | \"subordinate\"\n | \"support\"\n | \"legend\";\n\nexport const typographyVariantMapping: Record<\n TypographyVariantValue,\n MuiTypographyProps[\"variant\"]\n> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n h6: \"h6\",\n body: \"body1\",\n subordinate: \"subtitle1\",\n support: \"subtitle2\",\n legend: \"legend\",\n} as const;\n\nexport const typographyColorValues = [\n \"primary\",\n \"textPrimary\",\n \"secondary\",\n \"textSecondary\",\n \"error\",\n] as const;\n\nexport type TypographyProps = {\n /**\n * The ID of the element that describes the component.\n */\n ariaDescribedBy?: string;\n /**\n * The ARIA label for the component.\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the component.\n */\n ariaLabelledBy?: string;\n /**\n * The text content of the component.\n */\n children: ReactNode;\n /**\n * The color of the text.\n */\n color?: (typeof typographyColorValues)[number];\n /**\n * The HTML element the component should render, if different from the default.\n */\n component?: ElementType;\n /**\n * The ref forwarded to the Typography to expose focus()\n */\n typographyFocusRef?: React.RefObject<FocusHandle>;\n /**\n * The variant of Typography to render.\n */\n variant?: keyof typeof typographyVariantMapping;\n} & AllowedProps;\n\nconst Typography = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component: componentProp,\n testId,\n translate,\n typographyFocusRef,\n variant = \"body\",\n}: TypographyProps) => {\n const component = useMemo(() => {\n if (!componentProp) {\n if (variant === \"body\") {\n return \"p\";\n } else if (variant === \"subordinate\" || variant === \"support\") {\n return \"p\";\n } else {\n return variant;\n }\n }\n return componentProp;\n }, [componentProp, variant]);\n\n const ref = useRef<HTMLElement>(null);\n useImperativeHandle(\n typographyFocusRef,\n () => {\n const element = ref.current;\n return {\n focus: () => {\n element && element.focus();\n },\n };\n },\n []\n );\n\n return (\n <MuiTypography\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n ref={ref}\n tabIndex={-1}\n translate={translate}\n variant={typographyVariantMapping[variant]}\n />\n );\n};\n\nconst MemoizedTypography = memo(Typography);\nMemoizedTypography.displayName = \"Typography\";\n\nconst Heading1 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"h1\"\n />\n);\n\nconst MemoizedHeading1 = memo(Heading1);\nMemoizedHeading1.displayName = \"Heading1\";\n\nconst Heading2 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"h2\"\n />\n);\n\nconst MemoizedHeading2 = memo(Heading2);\nMemoizedHeading2.displayName = \"Heading2\";\n\nconst Heading3 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"h3\"\n />\n);\n\nconst MemoizedHeading3 = memo(Heading3);\nMemoizedHeading3.displayName = \"Heading3\";\n\nconst Heading4 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"h4\"\n />\n);\n\nconst MemoizedHeading4 = memo(Heading4);\nMemoizedHeading4.displayName = \"Heading4\";\n\nconst Heading5 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"h5\"\n />\n);\n\nconst MemoizedHeading5 = memo(Heading5);\nMemoizedHeading5.displayName = \"Heading5\";\n\nconst Heading6 = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"h6\"\n />\n);\n\nconst MemoizedHeading6 = memo(Heading6);\nMemoizedHeading6.displayName = \"Heading6\";\n\nconst Paragraph = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"body\"\n />\n);\n\nconst MemoizedParagraph = memo(Paragraph);\nMemoizedParagraph.displayName = \"Paragraph\";\n\nconst Subordinate = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"subordinate\"\n />\n);\n\nconst MemoizedSubordinate = memo(Subordinate);\nMemoizedSubordinate.displayName = \"Subordinate\";\n\nconst Support = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"support\"\n />\n);\n\nconst MemoizedSupport = memo(Support);\nMemoizedSupport.displayName = \"Support\";\n\nconst Legend = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n translate={translate}\n variant=\"legend\"\n />\n);\n\nconst MemoizedLegend = memo(Legend);\nMemoizedLegend.displayName = \"Legend\";\n\nexport {\n MemoizedTypography as Typography,\n MemoizedHeading1 as Heading1,\n MemoizedHeading2 as Heading2,\n MemoizedHeading3 as Heading3,\n MemoizedHeading4 as Heading4,\n MemoizedHeading5 as Heading5,\n MemoizedHeading6 as Heading6,\n MemoizedLegend as Legend,\n MemoizedParagraph as Paragraph,\n MemoizedSubordinate as Subordinate,\n MemoizedSupport as Support,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAGEA,IAAI,EACJC,OAAO,EACPC,MAAM,EACNC,mBAAmB,QACd,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgBf,OAAO,MAAMC,wBAGZ,GAAG;EACFC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,OAAO;EACbC,WAAW,EAAE,WAAW;EACxBC,OAAO,EAAE,WAAW;EACpBC,MAAM,EAA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