@okta/odyssey-react-mui 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/OdysseyProvider.js +20 -40
- package/dist/OdysseyProvider.js.map +1 -1
- package/dist/OdysseyThemeProvider.js +2 -1
- package/dist/OdysseyThemeProvider.js.map +1 -1
- package/dist/OdysseyTranslationProvider.types.js +1 -1
- package/dist/OdysseyTranslationProvider.types.js.map +1 -1
- package/dist/Select.js +10 -2
- package/dist/Select.js.map +1 -1
- package/dist/Tag.js +58 -23
- package/dist/Tag.js.map +1 -1
- package/dist/i18n.js +2 -0
- package/dist/i18n.js.map +1 -1
- package/dist/index.scss +1 -1
- package/dist/src/OdysseyProvider.d.ts +3 -5
- package/dist/src/OdysseyProvider.d.ts.map +1 -1
- package/dist/src/OdysseyThemeProvider.d.ts +8 -0
- package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/src/OdysseyTranslationProvider.types.d.ts +1 -1
- package/dist/src/OdysseyTranslationProvider.types.d.ts.map +1 -1
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/Tag.d.ts.map +1 -1
- package/dist/src/i18n.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts +2 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
- package/dist/theme/components.js +78 -18
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/createOdysseyMuiTheme.js +2 -0
- package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/jest.config.cjs +20 -1
- package/package.json +3 -3
- package/src/OdysseyProvider.tsx +27 -59
- package/src/OdysseyThemeProvider.tsx +10 -0
- package/src/OdysseyTranslationProvider.types.ts +1 -0
- package/src/Select.tsx +12 -3
- package/src/Tag.tsx +42 -6
- package/src/i18n.ts +2 -0
- package/src/theme/components.tsx +101 -18
- package/src/theme/createOdysseyMuiTheme.ts +3 -0
package/dist/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","styled","TagListContext","MuiPropsContext","useOdysseyDesignTokens","CloseCircleFilledIcon","useContrastContext","jsx","_jsx","tagColorVariants","getChipColors","colorVariant","odysseyDesignTokens","contrastMode","colors","default","background","HueNeutral200","text","HueNeutral700","HueNeutral100","hover","active","HueNeutral300","border","deleteIcon","HueNeutral500","deleteIconHover","info","HueBlue200","HueBlue700","HueBlue100","HueBlue300","HueBlue500","accentOne","HueAccentOne200","HueAccentOne700","HueAccentOne100","HueAccentOne300","HueAccentOne500","accentTwo","HueAccentTwo200","HueAccentTwo800","HueAccentTwo100","HueAccentTwo700","HueAccentTwo300","HueAccentTwo500","accentThree","HueAccentThree200","HueAccentThree700","HueAccentThree100","HueAccentThree300","HueAccentThree500","accentFour","HueAccentFour200","HueAccentFour700","HueAccentFour100","HueAccentFour300","HueAccentFour500","StyledTag","_Chip","shouldForwardProp","prop","includes","backgroundColor","color","borderColor","Tag","icon","isDisabled","label","onClick","onRemove","testId","translate","chipElementType","renderTag","muiProps","as","clickable","Boolean","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 styled from \"@emotion/styled\";\nimport { TagListContext } from \"./TagListContext\";\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { CloseCircleFilledIcon } from \"./icons.generated\";\nimport { useContrastContext, ContrastMode } from \"./ContrastModeProvider\";\n\nexport const tagColorVariants = [\n \"default\",\n \"info\",\n \"accentOne\",\n \"accentTwo\",\n \"accentThree\",\n \"accentFour\",\n] as const;\n\ntype TagColorVariant = (typeof tagColorVariants)[number];\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 /**\n * Color variant of the Tag, affecting its appearance\n */\n colorVariant?: TagColorVariant;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst getChipColors = (\n colorVariant: TagColorVariant,\n odysseyDesignTokens: DesignTokens,\n contrastMode: ContrastMode,\n) => {\n const colors = {\n default: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueNeutral200,\n text: odysseyDesignTokens.HueNeutral700,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueNeutral100,\n text: odysseyDesignTokens.HueNeutral700,\n }),\n hover: odysseyDesignTokens.HueNeutral200,\n active: odysseyDesignTokens.HueNeutral300,\n border: odysseyDesignTokens.HueNeutral200,\n deleteIcon: odysseyDesignTokens.HueNeutral500,\n deleteIconHover: odysseyDesignTokens.HueNeutral700,\n },\n info: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueBlue200,\n text: odysseyDesignTokens.HueBlue700,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueBlue100,\n text: odysseyDesignTokens.HueBlue700,\n }),\n hover: odysseyDesignTokens.HueBlue200,\n active: odysseyDesignTokens.HueBlue300,\n border: odysseyDesignTokens.HueBlue200,\n deleteIcon: odysseyDesignTokens.HueBlue500,\n deleteIconHover: odysseyDesignTokens.HueBlue700,\n },\n accentOne: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentOne200,\n text: odysseyDesignTokens.HueAccentOne700,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentOne100,\n text: odysseyDesignTokens.HueAccentOne700,\n }),\n hover: odysseyDesignTokens.HueAccentOne200,\n active: odysseyDesignTokens.HueAccentOne300,\n border: odysseyDesignTokens.HueAccentOne200,\n deleteIcon: odysseyDesignTokens.HueAccentOne500,\n deleteIconHover: odysseyDesignTokens.HueAccentOne700,\n },\n accentTwo: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo200,\n text: odysseyDesignTokens.HueAccentTwo800,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo100,\n text: odysseyDesignTokens.HueAccentTwo700,\n }),\n hover: odysseyDesignTokens.HueAccentTwo200,\n active: odysseyDesignTokens.HueAccentTwo300,\n border: odysseyDesignTokens.HueAccentTwo200,\n deleteIcon: odysseyDesignTokens.HueAccentTwo500,\n deleteIconHover: odysseyDesignTokens.HueAccentTwo700,\n },\n accentThree: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentThree200,\n text: odysseyDesignTokens.HueAccentThree700,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentThree100,\n text: odysseyDesignTokens.HueAccentThree700,\n }),\n hover: odysseyDesignTokens.HueAccentThree200,\n active: odysseyDesignTokens.HueAccentThree300,\n border: odysseyDesignTokens.HueAccentThree200,\n deleteIcon: odysseyDesignTokens.HueAccentThree500,\n deleteIconHover: odysseyDesignTokens.HueAccentThree700,\n },\n accentFour: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentFour200,\n text: odysseyDesignTokens.HueAccentFour700,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentFour100,\n text: odysseyDesignTokens.HueAccentFour700,\n }),\n hover: odysseyDesignTokens.HueAccentFour200,\n active: odysseyDesignTokens.HueAccentFour300,\n border: odysseyDesignTokens.HueAccentFour200,\n deleteIcon: odysseyDesignTokens.HueAccentFour500,\n deleteIconHover: odysseyDesignTokens.HueAccentFour700,\n },\n };\n\n return colors[colorVariant] || colors.default;\n};\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) =>\n ![\"colorVariant\", \"contrastMode\", \"odysseyDesignTokens\"].includes(\n prop as string,\n ),\n})<{\n colorVariant: TagColorVariant;\n contrastMode: ContrastMode;\n odysseyDesignTokens: DesignTokens;\n as?: React.ElementType; // Allow the 'as' prop to be forwarded\n}>(({ colorVariant, contrastMode, odysseyDesignTokens }) => {\n const colors = getChipColors(colorVariant, odysseyDesignTokens, contrastMode);\n\n return {\n backgroundColor: colors.background,\n color: colors.text,\n borderColor: colors.border,\n\n \"&.MuiChip-clickable:hover\": {\n backgroundColor: colors.hover,\n },\n\n \"&.MuiChip-clickable:active\": {\n backgroundColor: colors.active,\n },\n\n \"&.Mui-disabled\": {\n \"& .MuiChip-deleteIcon\": {\n color: odysseyDesignTokens.HueNeutral300,\n },\n },\n\n \"& .MuiChip-deleteIcon\": {\n color: colors.deleteIcon,\n\n \"&:hover\": {\n color: colors.deleteIconHover,\n },\n },\n };\n});\n\nconst Tag = ({\n colorVariant = \"default\",\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n}: TagProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { chipElementType } = useContext(TagListContext);\n const { contrastMode } = useContrastContext();\n\n const renderTag = useCallback(\n (muiProps: MuiPropsContextType) => (\n <StyledTag\n {...muiProps}\n as={chipElementType}\n aria-disabled={isDisabled}\n clickable={Boolean(onClick)}\n data-se={testId}\n colorVariant={colorVariant}\n odysseyDesignTokens={odysseyDesignTokens}\n contrastMode={contrastMode}\n disabled={isDisabled}\n icon={icon}\n label={label}\n onClick={onClick}\n onDelete={onRemove}\n deleteIcon={<CloseCircleFilledIcon />}\n translate={translate}\n />\n ),\n [\n chipElementType,\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n colorVariant,\n odysseyDesignTokens,\n contrastMode,\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;AACnE,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAC5BC,cAAc;AAAA,SACdC,eAAe;AAAA,SAItBC,sBAAsB;AAAA,SAEfC,qBAAqB;AAAA,SACrBC,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE3B,OAAO,MAAMC,gBAAgB,GAAG,CAC9B,SAAS,EACT,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,YAAY,CACJ;AAyBV,MAAMC,aAAa,GAAGA,CACpBC,YAA6B,EAC7BC,mBAAiC,EACjCC,YAA0B,KACvB;EACH,MAAMC,MAAM,GAAG;IACbC,OAAO,EAAE;MACP,IAAIF,YAAY,KAAK,aAAa,IAAI;QACpCG,UAAU,EAAEJ,mBAAmB,CAACK,aAAa;QAC7CC,IAAI,EAAEN,mBAAmB,CAACO;MAC5B,CAAC,CAAC;MACF,IAAIN,YAAY,KAAK,cAAc,IAAI;QACrCG,UAAU,EAAEJ,mBAAmB,CAACQ,aAAa;QAC7CF,IAAI,EAAEN,mBAAmB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AW,GAAGvF,IAAI,CAACqE,GAAG,CAAC;AAC7BkB,WAAW,CAACC,WAAW,GAAG,KAAK;AAE/B,SAASD,WAAW,IAAIlB,GAAG"}
|
|
1
|
+
{"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","styled","TagListContext","MuiPropsContext","useOdysseyDesignTokens","CloseCircleFilledIcon","useContrastContext","jsx","_jsx","tagColorVariants","getChipColors","colorVariant","odysseyDesignTokens","contrastMode","colors","default","background","HueNeutral200","text","HueNeutral700","textDisabled","HueNeutral400","HueNeutral100","HueNeutral300","hover","active","border","deleteIcon","HueNeutral500","deleteIconHover","icon","iconDisabled","info","HueBlue200","HueBlue700","HueBlue400","HueBlue100","HueBlue300","HueBlue500","accentOne","HueAccentOne200","HueAccentOne700","HueAccentOne400","HueAccentOne100","HueAccentOne300","HueAccentOne500","accentTwo","HueAccentTwo200","HueAccentTwo800","HueAccentTwo400","HueAccentTwo100","HueAccentTwo700","HueAccentTwo300","HueAccentTwo500","accentThree","HueAccentThree200","HueAccentThree700","HueAccentThree400","HueAccentThree100","HueAccentThree300","HueAccentThree500","accentFour","HueAccentFour200","HueAccentFour700","HueAccentFour400","HueAccentFour100","HueAccentFour300","HueAccentFour500","StyledTag","_Chip","shouldForwardProp","prop","includes","clickable","backgroundColor","color","borderColor","Tag","isDisabled","label","onClick","onRemove","testId","translate","chipElementType","renderTag","muiProps","as","Boolean","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 styled from \"@emotion/styled\";\nimport { TagListContext } from \"./TagListContext\";\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { CloseCircleFilledIcon } from \"./icons.generated\";\nimport { useContrastContext, ContrastMode } from \"./ContrastModeProvider\";\n\nexport const tagColorVariants = [\n \"default\",\n \"info\",\n \"accentOne\",\n \"accentTwo\",\n \"accentThree\",\n \"accentFour\",\n] as const;\n\ntype TagColorVariant = (typeof tagColorVariants)[number];\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 /**\n * Color variant of the Tag, affecting its appearance\n */\n colorVariant?: TagColorVariant;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst getChipColors = (\n colorVariant: TagColorVariant,\n odysseyDesignTokens: DesignTokens,\n contrastMode: ContrastMode,\n) => {\n const colors = {\n default: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueNeutral200,\n text: odysseyDesignTokens.HueNeutral700,\n textDisabled: odysseyDesignTokens.HueNeutral400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueNeutral100,\n text: odysseyDesignTokens.HueNeutral700,\n textDisabled: odysseyDesignTokens.HueNeutral300,\n }),\n hover: odysseyDesignTokens.HueNeutral200,\n active: odysseyDesignTokens.HueNeutral300,\n border: odysseyDesignTokens.HueNeutral200,\n deleteIcon: odysseyDesignTokens.HueNeutral500,\n deleteIconHover: odysseyDesignTokens.HueNeutral700,\n icon: odysseyDesignTokens.HueNeutral700,\n iconDisabled: odysseyDesignTokens.HueNeutral300,\n },\n info: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueBlue200,\n text: odysseyDesignTokens.HueBlue700,\n textDisabled: odysseyDesignTokens.HueBlue400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueBlue100,\n text: odysseyDesignTokens.HueBlue700,\n textDisabled: odysseyDesignTokens.HueBlue300,\n }),\n hover: odysseyDesignTokens.HueBlue200,\n active: odysseyDesignTokens.HueBlue300,\n border: odysseyDesignTokens.HueBlue200,\n deleteIcon: odysseyDesignTokens.HueBlue500,\n deleteIconHover: odysseyDesignTokens.HueBlue700,\n icon: odysseyDesignTokens.HueBlue700,\n iconDisabled: odysseyDesignTokens.HueBlue300,\n },\n accentOne: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentOne200,\n text: odysseyDesignTokens.HueAccentOne700,\n textDisabled: odysseyDesignTokens.HueAccentOne400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentOne100,\n text: odysseyDesignTokens.HueAccentOne700,\n textDisabled: odysseyDesignTokens.HueAccentOne300,\n }),\n hover: odysseyDesignTokens.HueAccentOne200,\n active: odysseyDesignTokens.HueAccentOne300,\n border: odysseyDesignTokens.HueAccentOne200,\n deleteIcon: odysseyDesignTokens.HueAccentOne500,\n deleteIconHover: odysseyDesignTokens.HueAccentOne700,\n icon: odysseyDesignTokens.HueAccentOne700,\n iconDisabled: odysseyDesignTokens.HueAccentOne300,\n },\n accentTwo: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo200,\n text: odysseyDesignTokens.HueAccentTwo800,\n textDisabled: odysseyDesignTokens.HueAccentTwo400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo100,\n text: odysseyDesignTokens.HueAccentTwo700,\n textDisabled: odysseyDesignTokens.HueAccentTwo300,\n }),\n hover: odysseyDesignTokens.HueAccentTwo200,\n active: odysseyDesignTokens.HueAccentTwo300,\n border: odysseyDesignTokens.HueAccentTwo200,\n deleteIcon: odysseyDesignTokens.HueAccentTwo500,\n deleteIconHover: odysseyDesignTokens.HueAccentTwo700,\n icon: odysseyDesignTokens.HueAccentTwo700,\n iconDisabled: odysseyDesignTokens.HueAccentTwo300,\n },\n accentThree: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentThree200,\n text: odysseyDesignTokens.HueAccentThree700,\n textDisabled: odysseyDesignTokens.HueAccentThree400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentThree100,\n text: odysseyDesignTokens.HueAccentThree700,\n textDisabled: odysseyDesignTokens.HueAccentThree300,\n }),\n hover: odysseyDesignTokens.HueAccentThree200,\n active: odysseyDesignTokens.HueAccentThree300,\n border: odysseyDesignTokens.HueAccentThree200,\n deleteIcon: odysseyDesignTokens.HueAccentThree500,\n deleteIconHover: odysseyDesignTokens.HueAccentThree700,\n icon: odysseyDesignTokens.HueAccentThree700,\n iconDisabled: odysseyDesignTokens.HueAccentThree300,\n },\n accentFour: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentFour200,\n text: odysseyDesignTokens.HueAccentFour700,\n textDisabled: odysseyDesignTokens.HueAccentFour400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentFour100,\n text: odysseyDesignTokens.HueAccentFour700,\n textDisabled: odysseyDesignTokens.HueAccentFour300,\n }),\n hover: odysseyDesignTokens.HueAccentFour200,\n active: odysseyDesignTokens.HueAccentFour300,\n border: odysseyDesignTokens.HueAccentFour200,\n deleteIcon: odysseyDesignTokens.HueAccentFour500,\n deleteIconHover: odysseyDesignTokens.HueAccentFour700,\n icon: odysseyDesignTokens.HueAccentFour700,\n iconDisabled: odysseyDesignTokens.HueAccentFour300,\n },\n };\n\n return colors[colorVariant] || colors.default;\n};\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) =>\n ![\"colorVariant\", \"contrastMode\", \"odysseyDesignTokens\"].includes(\n prop as string,\n ),\n})<{\n colorVariant: TagColorVariant;\n contrastMode: ContrastMode;\n odysseyDesignTokens: DesignTokens;\n as?: React.ElementType; // Allow the 'as' prop to be forwarded\n clickable?: boolean;\n}>(({ colorVariant, contrastMode, odysseyDesignTokens, clickable }) => {\n const colors = getChipColors(colorVariant, odysseyDesignTokens, contrastMode);\n\n return {\n backgroundColor: colors.background,\n color: colors.text,\n\n ...(clickable === true && {\n borderColor: colors.border,\n }),\n\n ...(clickable === false && {\n borderColor: \"transparent\",\n }),\n\n \"&.MuiChip-clickable:hover\": {\n backgroundColor: colors.hover,\n },\n\n \"&.MuiChip-clickable:active\": {\n backgroundColor: colors.active,\n },\n\n \"&.Mui-disabled\": {\n color: colors.textDisabled,\n borderColor: colors.border,\n \"& .MuiChip-icon, & .MuiChip-deleteIcon\": {\n color: colors.iconDisabled,\n },\n },\n\n \"& .MuiChip-icon\": {\n color: colors.icon,\n },\n \"& .MuiChip-deleteIcon\": {\n color: colors.deleteIcon,\n \"&:hover\": {\n color: colors.deleteIconHover,\n },\n },\n };\n});\n\nconst Tag = ({\n colorVariant = \"default\",\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n}: TagProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { chipElementType } = useContext(TagListContext);\n const { contrastMode } = useContrastContext();\n\n const renderTag = useCallback(\n (muiProps: MuiPropsContextType) => (\n <StyledTag\n {...muiProps}\n as={chipElementType}\n aria-disabled={isDisabled}\n clickable={Boolean(onClick)}\n data-se={testId}\n colorVariant={colorVariant}\n odysseyDesignTokens={odysseyDesignTokens}\n contrastMode=\"highContrast\"\n disabled={isDisabled}\n icon={icon}\n label={label}\n onClick={onClick}\n onDelete={onRemove}\n deleteIcon={<CloseCircleFilledIcon />}\n translate={translate}\n />\n ),\n [\n chipElementType,\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n colorVariant,\n odysseyDesignTokens,\n contrastMode,\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;AACnE,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAC5BC,cAAc;AAAA,SACdC,eAAe;AAAA,SAItBC,sBAAsB;AAAA,SAEfC,qBAAqB;AAAA,SACrBC,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE3B,OAAO,MAAMC,gBAAgB,GAAG,CAC9B,SAAS,EACT,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,YAAY,CACJ;AAyBV,MAAMC,aAAa,GAAGA,CACpBC,YAA6B,EAC7BC,mBAAiC,EACjCC,YAA0B,KACvB;EACH,MAAMC,MAAM,GAAG;IACbC,OAAO,EAAE;MACP,IAAIF,YAAY,KAAK,aAAa,IAAI;QACpCG,UAAU,EAAEJ,mBAAmB,CAACK,aAAa;QAC7CC,IAAI,EAAEN,mBAAmB,CAACO,aAAa;QACvCC,YAAY,EAAER,mBAAmB,CAACS;MACpC,CAAC,CAAC;MACF,IAAIR,YAAY,KAAK,cAAc,IAAI;QACrCG,UAAU,EAAEJ,mBAAmB,CAACU,aAAa;QAC7CJ,IAAI,EAAEN,mBAAmB,CAACO,aAAa;QACvCC,YAAY,EAAER,mBAAmB,CAACW;MACpC,CAAC,CAAC;MACFC,KAAK,EAAEZ,mBAAmB,CAACK,aAAa;MACxCQ,MAAM,EAAEb,mBAAmB,CAACW,aAAa;MACzCG,MAAM,EAAEd,mBAAmB,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IAAIhB,GAAG"}
|
package/dist/i18n.js
CHANGED
|
@@ -20,6 +20,7 @@ import { translation as en } from "./properties/ts/odyssey-react-mui.js";
|
|
|
20
20
|
import { translation as es } from "./properties/ts/odyssey-react-mui_es.js";
|
|
21
21
|
import { translation as fi } from "./properties/ts/odyssey-react-mui_fi.js";
|
|
22
22
|
import { translation as fr } from "./properties/ts/odyssey-react-mui_fr.js";
|
|
23
|
+
import { translation as ht } from "./properties/ts/odyssey-react-mui_ht.js";
|
|
23
24
|
import { translation as hu } from "./properties/ts/odyssey-react-mui_hu.js";
|
|
24
25
|
import { translation as id } from "./properties/ts/odyssey-react-mui_id.js";
|
|
25
26
|
import { translation as it } from "./properties/ts/odyssey-react-mui_it.js";
|
|
@@ -52,6 +53,7 @@ export const resources = {
|
|
|
52
53
|
es,
|
|
53
54
|
fi,
|
|
54
55
|
fr,
|
|
56
|
+
ht,
|
|
55
57
|
hu,
|
|
56
58
|
id,
|
|
57
59
|
it,
|
package/dist/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":["i18n","initReactI18next","translation","cs","da","de","el","en","es","fi","fr","hu","id","it","ja","ko","ms","nb","nlNL","okPL","okSK","pl","ptBR","ro","ru","sv","th","tr","uk","vi","zhCN","znTW","defaultLNG","defaultNS","resources","nl_NL","ok_PL","ok_SK","pt_BR","zh_CN","zh_TW","use","init","ns","fallbackLng","load","keySeparator","interpolation","escapeValue","skipOnVariables","react","useSuspense","bindI18nStore","Object","entries","forEach","locale","property","addResourceBundle","odysseyTranslate","t","bind"],"sources":["../src/i18n.ts"],"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 i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport { translation as cs } from \"./properties/ts/odyssey-react-mui_cs\";\nimport { translation as da } from \"./properties/ts/odyssey-react-mui_da\";\nimport { translation as de } from \"./properties/ts/odyssey-react-mui_de\";\nimport { translation as el } from \"./properties/ts/odyssey-react-mui_el\";\nimport { translation as en } from \"./properties/ts/odyssey-react-mui\";\nimport { translation as es } from \"./properties/ts/odyssey-react-mui_es\";\nimport { translation as fi } from \"./properties/ts/odyssey-react-mui_fi\";\nimport { translation as fr } from \"./properties/ts/odyssey-react-mui_fr\";\nimport { translation as hu } from \"./properties/ts/odyssey-react-mui_hu\";\nimport { translation as id } from \"./properties/ts/odyssey-react-mui_id\";\nimport { translation as it } from \"./properties/ts/odyssey-react-mui_it\";\nimport { translation as ja } from \"./properties/ts/odyssey-react-mui_ja\";\nimport { translation as ko } from \"./properties/ts/odyssey-react-mui_ko\";\nimport { translation as ms } from \"./properties/ts/odyssey-react-mui_ms\";\nimport { translation as nb } from \"./properties/ts/odyssey-react-mui_nb\";\nimport { translation as nlNL } from \"./properties/ts/odyssey-react-mui_nl_NL\";\nimport { translation as okPL } from \"./properties/ts/odyssey-react-mui_ok_PL\";\nimport { translation as okSK } from \"./properties/ts/odyssey-react-mui_ok_SK\";\nimport { translation as pl } from \"./properties/ts/odyssey-react-mui_pl\";\nimport { translation as ptBR } from \"./properties/ts/odyssey-react-mui_pt_BR\";\nimport { translation as ro } from \"./properties/ts/odyssey-react-mui_ro\";\nimport { translation as ru } from \"./properties/ts/odyssey-react-mui_ru\";\nimport { translation as sv } from \"./properties/ts/odyssey-react-mui_sv\";\nimport { translation as th } from \"./properties/ts/odyssey-react-mui_th\";\nimport { translation as tr } from \"./properties/ts/odyssey-react-mui_tr\";\nimport { translation as uk } from \"./properties/ts/odyssey-react-mui_uk\";\nimport { translation as vi } from \"./properties/ts/odyssey-react-mui_vi\";\nimport { translation as zhCN } from \"./properties/ts/odyssey-react-mui_zh_CN\";\nimport { translation as znTW } from \"./properties/ts/odyssey-react-mui_zh_TW\";\n\nexport const defaultLNG = \"en\";\nexport const defaultNS = \"odyssey\";\n\n// Note: This is type \"string\" to allow translation overrides from other languages\nexport type I18nResources = Record<string, Partial<typeof en>>;\nexport const resources: I18nResources = {\n cs,\n da,\n de,\n el,\n en,\n es,\n fi,\n fr,\n hu,\n id,\n it,\n ja,\n ko,\n ms,\n nb,\n nl_NL: nlNL,\n ok_PL: okPL,\n ok_SK: okSK,\n pl,\n pt_BR: ptBR,\n ro,\n ru,\n sv,\n th,\n tr,\n uk,\n vi,\n zh_CN: zhCN,\n zh_TW: znTW,\n} as const;\n\ni18n.use(initReactI18next).init({\n defaultNS,\n ns: [defaultNS],\n fallbackLng: defaultLNG,\n load: \"currentOnly\",\n keySeparator: false,\n interpolation: {\n escapeValue: false, // react already safe from xss\n skipOnVariables: false, // to handle translations that use nesting\n },\n react: {\n useSuspense: false,\n bindI18nStore: \"added\",\n },\n} as const);\n\nObject.entries(resources).forEach(([locale, property]) => {\n i18n.addResourceBundle(locale, defaultNS, property);\n});\n\nexport const odysseyTranslate = i18n.t.bind(i18n);\nexport { i18n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,SAAS;AAC1B,SAASC,gBAAgB,QAAQ,eAAe;AAAC,SAExCC,WAAW,IAAIC,EAAE;AAAA,SACjBD,WAAW,IAAIE,EAAE;AAAA,SACjBF,WAAW,IAAIG,EAAE;AAAA,SACjBH,WAAW,IAAII,EAAE;AAAA,SACjBJ,WAAW,IAAIK,EAAE;AAAA,SACjBL,WAAW,IAAIM,EAAE;AAAA,SACjBN,WAAW,IAAIO,EAAE;AAAA,SACjBP,WAAW,IAAIQ,EAAE;AAAA,SACjBR,WAAW,IAAIS,EAAE;AAAA,SACjBT,WAAW,IAAIU,EAAE;AAAA,SACjBV,WAAW,IAAIW,EAAE;AAAA,SACjBX,WAAW,IAAIY,EAAE;AAAA,SACjBZ,WAAW,IAAIa,EAAE;AAAA,SACjBb,WAAW,IAAIc,EAAE;AAAA,SACjBd,WAAW,IAAIe,EAAE;AAAA,SACjBf,WAAW,IAAIgB,
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["i18n","initReactI18next","translation","cs","da","de","el","en","es","fi","fr","ht","hu","id","it","ja","ko","ms","nb","nlNL","okPL","okSK","pl","ptBR","ro","ru","sv","th","tr","uk","vi","zhCN","znTW","defaultLNG","defaultNS","resources","nl_NL","ok_PL","ok_SK","pt_BR","zh_CN","zh_TW","use","init","ns","fallbackLng","load","keySeparator","interpolation","escapeValue","skipOnVariables","react","useSuspense","bindI18nStore","Object","entries","forEach","locale","property","addResourceBundle","odysseyTranslate","t","bind"],"sources":["../src/i18n.ts"],"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 i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport { translation as cs } from \"./properties/ts/odyssey-react-mui_cs\";\nimport { translation as da } from \"./properties/ts/odyssey-react-mui_da\";\nimport { translation as de } from \"./properties/ts/odyssey-react-mui_de\";\nimport { translation as el } from \"./properties/ts/odyssey-react-mui_el\";\nimport { translation as en } from \"./properties/ts/odyssey-react-mui\";\nimport { translation as es } from \"./properties/ts/odyssey-react-mui_es\";\nimport { translation as fi } from \"./properties/ts/odyssey-react-mui_fi\";\nimport { translation as fr } from \"./properties/ts/odyssey-react-mui_fr\";\nimport { translation as ht } from \"./properties/ts/odyssey-react-mui_ht\";\nimport { translation as hu } from \"./properties/ts/odyssey-react-mui_hu\";\nimport { translation as id } from \"./properties/ts/odyssey-react-mui_id\";\nimport { translation as it } from \"./properties/ts/odyssey-react-mui_it\";\nimport { translation as ja } from \"./properties/ts/odyssey-react-mui_ja\";\nimport { translation as ko } from \"./properties/ts/odyssey-react-mui_ko\";\nimport { translation as ms } from \"./properties/ts/odyssey-react-mui_ms\";\nimport { translation as nb } from \"./properties/ts/odyssey-react-mui_nb\";\nimport { translation as nlNL } from \"./properties/ts/odyssey-react-mui_nl_NL\";\nimport { translation as okPL } from \"./properties/ts/odyssey-react-mui_ok_PL\";\nimport { translation as okSK } from \"./properties/ts/odyssey-react-mui_ok_SK\";\nimport { translation as pl } from \"./properties/ts/odyssey-react-mui_pl\";\nimport { translation as ptBR } from \"./properties/ts/odyssey-react-mui_pt_BR\";\nimport { translation as ro } from \"./properties/ts/odyssey-react-mui_ro\";\nimport { translation as ru } from \"./properties/ts/odyssey-react-mui_ru\";\nimport { translation as sv } from \"./properties/ts/odyssey-react-mui_sv\";\nimport { translation as th } from \"./properties/ts/odyssey-react-mui_th\";\nimport { translation as tr } from \"./properties/ts/odyssey-react-mui_tr\";\nimport { translation as uk } from \"./properties/ts/odyssey-react-mui_uk\";\nimport { translation as vi } from \"./properties/ts/odyssey-react-mui_vi\";\nimport { translation as zhCN } from \"./properties/ts/odyssey-react-mui_zh_CN\";\nimport { translation as znTW } from \"./properties/ts/odyssey-react-mui_zh_TW\";\n\nexport const defaultLNG = \"en\";\nexport const defaultNS = \"odyssey\";\n\n// Note: This is type \"string\" to allow translation overrides from other languages\nexport type I18nResources = Record<string, Partial<typeof en>>;\nexport const resources: I18nResources = {\n cs,\n da,\n de,\n el,\n en,\n es,\n fi,\n fr,\n ht,\n hu,\n id,\n it,\n ja,\n ko,\n ms,\n nb,\n nl_NL: nlNL,\n ok_PL: okPL,\n ok_SK: okSK,\n pl,\n pt_BR: ptBR,\n ro,\n ru,\n sv,\n th,\n tr,\n uk,\n vi,\n zh_CN: zhCN,\n zh_TW: znTW,\n} as const;\n\ni18n.use(initReactI18next).init({\n defaultNS,\n ns: [defaultNS],\n fallbackLng: defaultLNG,\n load: \"currentOnly\",\n keySeparator: false,\n interpolation: {\n escapeValue: false, // react already safe from xss\n skipOnVariables: false, // to handle translations that use nesting\n },\n react: {\n useSuspense: false,\n bindI18nStore: \"added\",\n },\n} as const);\n\nObject.entries(resources).forEach(([locale, property]) => {\n i18n.addResourceBundle(locale, defaultNS, property);\n});\n\nexport const odysseyTranslate = i18n.t.bind(i18n);\nexport { i18n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,SAAS;AAC1B,SAASC,gBAAgB,QAAQ,eAAe;AAAC,SAExCC,WAAW,IAAIC,EAAE;AAAA,SACjBD,WAAW,IAAIE,EAAE;AAAA,SACjBF,WAAW,IAAIG,EAAE;AAAA,SACjBH,WAAW,IAAII,EAAE;AAAA,SACjBJ,WAAW,IAAIK,EAAE;AAAA,SACjBL,WAAW,IAAIM,EAAE;AAAA,SACjBN,WAAW,IAAIO,EAAE;AAAA,SACjBP,WAAW,IAAIQ,EAAE;AAAA,SACjBR,WAAW,IAAIS,EAAE;AAAA,SACjBT,WAAW,IAAIU,EAAE;AAAA,SACjBV,WAAW,IAAIW,EAAE;AAAA,SACjBX,WAAW,IAAIY,EAAE;AAAA,SACjBZ,WAAW,IAAIa,EAAE;AAAA,SACjBb,WAAW,IAAIc,EAAE;AAAA,SACjBd,WAAW,IAAIe,EAAE;AAAA,SACjBf,WAAW,IAAIgB,EAAE;AAAA,SACjBhB,WAAW,IAAIiB,IAAI;AAAA,SACnBjB,WAAW,IAAIkB,IAAI;AAAA,SACnBlB,WAAW,IAAImB,IAAI;AAAA,SACnBnB,WAAW,IAAIoB,EAAE;AAAA,SACjBpB,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;EACjB;AACF,CAAU,CAAC;AAEXC,MAAM,CAACC,OAAO,CAACpB,SAAS,CAAC,CAACqB,OAAO,CAAC,CAAC,CAACC,MAAM,EAAEC,QAAQ,CAAC,KAAK;EACxD1D,IAAI,CAAC2D,iBAAiB,CAACF,MAAM,EAAEvB,SAAS,EAAEwB,QAAQ,CAAC;AACrD,CAAC,CAAC;AAEF,OAAO,MAAME,gBAAgB,GAAG5D,IAAI,CAAC6D,CAAC,CAACC,IAAI,CAAC9D,IAAI,CAAC;AACjD,SAASA,IAAI"}
|
package/dist/index.scss
CHANGED
|
@@ -14,12 +14,10 @@ import { OdysseyCacheProviderProps } from "./OdysseyCacheProvider";
|
|
|
14
14
|
import { OdysseyThemeProviderProps } from "./OdysseyThemeProvider";
|
|
15
15
|
import { OdysseyTranslationProviderProps } from "./OdysseyTranslationProvider";
|
|
16
16
|
import { DefaultSupportedLanguages } from "./OdysseyTranslationProvider.types";
|
|
17
|
-
import { ContrastMode } from "./ContrastModeProvider";
|
|
18
17
|
export type OdysseyProviderProps<SupportedLanguages extends string = DefaultSupportedLanguages> = OdysseyCacheProviderProps & OdysseyThemeProviderProps & OdysseyTranslationProviderProps<SupportedLanguages> & {
|
|
19
18
|
children: ReactNode;
|
|
20
|
-
contrastMode?: ContrastMode;
|
|
21
19
|
};
|
|
22
|
-
declare const OdysseyProvider: <SupportedLanguages extends string>({
|
|
23
|
-
declare const
|
|
24
|
-
export {
|
|
20
|
+
declare const OdysseyProvider: <SupportedLanguages extends string>({ children, designTokensOverride, emotionRoot, emotionRootElement, shadowDomElement, shadowRootElement, languageCode, nonce, stylisPlugins, themeOverride, translationOverrides, }: OdysseyProviderProps<SupportedLanguages>) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const MemoizedThemeProvider: typeof OdysseyProvider;
|
|
22
|
+
export { MemoizedThemeProvider as OdysseyProvider };
|
|
25
23
|
//# sourceMappingURL=OdysseyProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdysseyProvider.d.ts","sourceRoot":"","sources":["../../src/OdysseyProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAQ,SAAS,
|
|
1
|
+
{"version":3,"file":"OdysseyProvider.d.ts","sourceRoot":"","sources":["../../src/OdysseyProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAQ,SAAS,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,+BAA+B,EAChC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAK/E,MAAM,MAAM,oBAAoB,CAC9B,kBAAkB,SAAS,MAAM,GAAG,yBAAyB,IAC3D,yBAAyB,GAC3B,yBAAyB,GACzB,+BAA+B,CAAC,kBAAkB,CAAC,GAAG;IACpD,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AACJ,QAAA,MAAM,eAAe,GAAI,kBAAkB,SAAS,MAAM,sLAYvD,oBAAoB,CAAC,kBAAkB,CAAC,4CAwB1C,CAAC;AACF,QAAA,MAAM,qBAAqB,EAA4B,OAAO,eAAe,CAAC;AAC9E,OAAO,EAAE,qBAAqB,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -20,6 +20,14 @@ export type OdysseyThemeProviderProps = {
|
|
|
20
20
|
shadowRootElement?: HTMLDivElement | HTMLElement;
|
|
21
21
|
themeOverride?: ThemeOptions;
|
|
22
22
|
};
|
|
23
|
+
declare module "@mui/material/styles" {
|
|
24
|
+
interface Theme {
|
|
25
|
+
contrastMode: string;
|
|
26
|
+
}
|
|
27
|
+
interface ThemeOptions {
|
|
28
|
+
contrastMode?: string;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
23
31
|
declare const MemoizedOdysseyThemeProvider: import("react").MemoExoticComponent<({ children, designTokensOverride, shadowDomElement, shadowRootElement, themeOverride, }: OdysseyThemeProviderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
24
32
|
export { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };
|
|
25
33
|
//# sourceMappingURL=OdysseyThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdysseyThemeProvider.d.ts","sourceRoot":"","sources":["../../src/OdysseyThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAAQ,SAAS,EAAW,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAyB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAItE,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,cAAc,GAAG,WAAW,GAAG,SAAS,CAAC;IAC5D,iBAAiB,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC;IACjD,aAAa,CAAC,EAAE,YAAY,CAAC;CAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"OdysseyThemeProvider.d.ts","sourceRoot":"","sources":["../../src/OdysseyThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAAQ,SAAS,EAAW,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAyB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAItE,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,cAAc,GAAG,WAAW,GAAG,SAAS,CAAC;IAC5D,iBAAiB,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC;IACjD,aAAa,CAAC,EAAE,YAAY,CAAC;CAC9B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,KAAK;QACb,YAAY,EAAE,MAAM,CAAC;KACtB;IACD,UAAU,YAAY;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;CACF;AA2CD,QAAA,MAAM,4BAA4B,gIA9B/B,yBAAyB,6CA8BmC,CAAC;AAEhE,OAAO,EAAE,4BAA4B,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export declare const defaultSupportedLanguages: readonly ["cs", "da", "de", "el", "en", "es", "fi", "fr", "hu", "id", "it", "ja", "ko", "ms", "nb", "nl_NL", "ok_PL", "ok_SK", "pl", "pt_BR", "ro", "ru", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_TW"];
|
|
12
|
+
export declare const defaultSupportedLanguages: readonly ["cs", "da", "de", "el", "en", "es", "fi", "fr", "ht", "hu", "id", "it", "ja", "ko", "ms", "nb", "nl_NL", "ok_PL", "ok_SK", "pl", "pt_BR", "ro", "ru", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_TW"];
|
|
13
13
|
export type DefaultSupportedLanguages = (typeof defaultSupportedLanguages)[number];
|
|
14
14
|
//# sourceMappingURL=OdysseyTranslationProvider.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdysseyTranslationProvider.types.d.ts","sourceRoot":"","sources":["../../src/OdysseyTranslationProvider.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"OdysseyTranslationProvider.types.d.ts","sourceRoot":"","sources":["../../src/OdysseyTranslationProvider.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,yBAAyB,iNA+B5B,CAAC;AAEX,MAAM,MAAM,yBAAyB,GACnC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/src/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Select.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Select.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH,OAAO,EAQL,WAAW,IAAI,cAAc,EAE9B,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,mBAAmB,EAEpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAEL,WAAW,EAGZ,MAAM,cAAc,CAAC;AAQtB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCE,CAAC;AAElC,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAyDF,MAAM,MAAM,eAAe,CAAC,kBAAkB,IAC5C,kBAAkB,SAAS,IAAI,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;AAEtD,MAAM,MAAM,WAAW,CACrB,KAAK,SAAS,eAAe,CAAC,kBAAkB,CAAC,EACjD,kBAAkB,SAAS,OAAO,IAChC;IACF;;OAEG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC;IACrD;;OAEG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;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AY,CAAC,UAAU,CAAC,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,WAAW,CAAC,CAAC;AAyO5C,QAAA,MAAM,WAAW,yHA3Cd,QAAQ,6CA2CkB,CAAC;AAG9B,OAAO,EAAE,WAAW,IAAI,GAAG,EAAE,CAAC"}
|
package/dist/src/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAO3B,OAAO,EAAE,WAAW,IAAI,EAAE,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAO3B,OAAO,EAAE,WAAW,IAAI,EAAE,EAAE,MAAM,mCAAmC,CAAC;AA2BtE,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,eAAO,MAAM,SAAS,YAAY,CAAC;AAGnC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAC/D,eAAO,MAAM,SAAS,EAAE,aA+Bd,CAAC;AAsBX,eAAO,MAAM,gBAAgB,qEAAoB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/theme/components.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAwC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASvC,eAAO,MAAM,UAAU,4DAIpB;IACD,aAAa,EAAE,YAAY,CAAC;IAC5B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,iBAAiB,CAAC,EAAE,WAAW,CAAC;CACjC,KAAG,YAAY,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/theme/components.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAwC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASvC,eAAO,MAAM,UAAU,4DAIpB;IACD,aAAa,EAAE,YAAY,CAAC;IAC5B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,iBAAiB,CAAC,EAAE,WAAW,CAAC;CACjC,KAAG,YAAY,CAAC,YAAY,CAmkG5B,CAAC"}
|
|
@@ -16,7 +16,8 @@ import "./palette.types";
|
|
|
16
16
|
import "./typography.types";
|
|
17
17
|
export type DesignTokens = typeof Tokens;
|
|
18
18
|
export type DesignTokensOverride = Partial<typeof Tokens>;
|
|
19
|
-
export declare const createOdysseyMuiTheme: ({ odysseyTokens, shadowDomElement, shadowRootElement, }: {
|
|
19
|
+
export declare const createOdysseyMuiTheme: ({ contrastMode, odysseyTokens, shadowDomElement, shadowRootElement, }: {
|
|
20
|
+
contrastMode?: string;
|
|
20
21
|
odysseyTokens: DesignTokens;
|
|
21
22
|
/** @deprecated Use `shadowRootElement` */
|
|
22
23
|
shadowDomElement?: HTMLElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOdysseyMuiTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/createOdysseyMuiTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAQtD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAE5B,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,CAAC;AACzC,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,OAAO,MAAM,CAAC,CAAC;AAE1D,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"createOdysseyMuiTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/createOdysseyMuiTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAQtD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAE5B,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,CAAC;AACzC,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,OAAO,MAAM,CAAC,CAAC;AAE1D,eAAO,MAAM,qBAAqB,0EAK/B;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,YAAY,CAAC;IAC5B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,iBAAiB,CAAC,EAAE,WAAW,CAAC;CACjC,yCAYG,CAAC"}
|
package/dist/theme/components.js
CHANGED
|
@@ -523,7 +523,7 @@ export const components = ({
|
|
|
523
523
|
ownerState,
|
|
524
524
|
theme
|
|
525
525
|
}) => {
|
|
526
|
-
const contrastMode = theme.
|
|
526
|
+
const contrastMode = theme.contrastMode;
|
|
527
527
|
return {
|
|
528
528
|
minWidth: "unset",
|
|
529
529
|
paddingBlock: odysseyTokens.Spacing3,
|
|
@@ -561,6 +561,25 @@ export const components = ({
|
|
|
561
561
|
fontSize: `${odysseyTokens.TypographyLineHeightUi}em`
|
|
562
562
|
}
|
|
563
563
|
},
|
|
564
|
+
...(ownerState.size === "small" && {
|
|
565
|
+
height: odysseyTokens.Spacing6,
|
|
566
|
+
paddingBlock: odysseyTokens.Spacing2,
|
|
567
|
+
paddingInline: odysseyTokens.Spacing3,
|
|
568
|
+
fontSize: odysseyTokens.TypographySizeBody
|
|
569
|
+
}),
|
|
570
|
+
...(ownerState.size === "large" && {
|
|
571
|
+
height: odysseyTokens.Spacing8,
|
|
572
|
+
paddingBlock: odysseyTokens.Spacing4,
|
|
573
|
+
paddingInline: odysseyTokens.Spacing4
|
|
574
|
+
}),
|
|
575
|
+
...(ownerState.fullWidth === true && {
|
|
576
|
+
width: "100%",
|
|
577
|
+
marginBlock: "0",
|
|
578
|
+
marginInline: "0",
|
|
579
|
+
"&:not(:last-child)": {
|
|
580
|
+
marginBlockEnd: odysseyTokens.Spacing4
|
|
581
|
+
}
|
|
582
|
+
}),
|
|
564
583
|
...(ownerState.variant === "primary" && {
|
|
565
584
|
color: odysseyTokens.HueNeutralWhite,
|
|
566
585
|
backgroundColor: odysseyTokens.PalettePrimaryMain,
|
|
@@ -649,29 +668,65 @@ export const components = ({
|
|
|
649
668
|
backgroundColor: "transparent",
|
|
650
669
|
color: odysseyTokens.TypographyColorDisabled
|
|
651
670
|
}
|
|
671
|
+
}),
|
|
672
|
+
...(ownerState.variant === "floatingAction" && {
|
|
673
|
+
backgroundColor: "transparent",
|
|
674
|
+
color: odysseyTokens.TypographyColorAction,
|
|
675
|
+
"&:hover": {
|
|
676
|
+
backgroundColor: odysseyTokens.HueNeutral100
|
|
677
|
+
},
|
|
678
|
+
"&:active": {
|
|
679
|
+
backgroundColor: odysseyTokens.HueNeutral200
|
|
680
|
+
},
|
|
681
|
+
"&:disabled": {
|
|
682
|
+
backgroundColor: "transparent",
|
|
683
|
+
color: odysseyTokens.TypographyColorDisabled
|
|
684
|
+
}
|
|
685
|
+
}),
|
|
686
|
+
...(ownerState.children === "" && {
|
|
687
|
+
minWidth: "auto",
|
|
688
|
+
padding: odysseyTokens.Spacing3,
|
|
689
|
+
[`.${buttonClasses.endIcon}, .${buttonClasses.startIcon}`]: {
|
|
690
|
+
margin: "0"
|
|
691
|
+
},
|
|
692
|
+
...(ownerState.size === "large" && {
|
|
693
|
+
padding: odysseyTokens.Spacing4
|
|
694
|
+
}),
|
|
695
|
+
...(ownerState.size === "small" && {
|
|
696
|
+
padding: odysseyTokens.Spacing2
|
|
697
|
+
}),
|
|
698
|
+
...(ownerState.size === "large" && {
|
|
699
|
+
padding: odysseyTokens.Spacing4
|
|
700
|
+
})
|
|
652
701
|
})
|
|
653
702
|
};
|
|
654
703
|
},
|
|
655
704
|
endIcon: ({
|
|
656
705
|
ownerState
|
|
657
|
-
}) =>
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
marginInlineStart:
|
|
663
|
-
|
|
664
|
-
|
|
706
|
+
}) => {
|
|
707
|
+
const hasNoChildren = ownerState.children === "" || ownerState.children === undefined || ownerState.children === null;
|
|
708
|
+
return {
|
|
709
|
+
display: "inline-flex",
|
|
710
|
+
margin: 0,
|
|
711
|
+
marginInlineStart: odysseyTokens.Spacing2,
|
|
712
|
+
...(hasNoChildren && {
|
|
713
|
+
marginInlineStart: 0
|
|
714
|
+
})
|
|
715
|
+
};
|
|
716
|
+
},
|
|
665
717
|
startIcon: ({
|
|
666
718
|
ownerState
|
|
667
|
-
}) =>
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
marginInlineEnd:
|
|
673
|
-
|
|
674
|
-
|
|
719
|
+
}) => {
|
|
720
|
+
const hasNoChildren = ownerState.children === "" || ownerState.children === undefined || ownerState.children === null;
|
|
721
|
+
return {
|
|
722
|
+
display: "inline-flex",
|
|
723
|
+
margin: 0,
|
|
724
|
+
marginInlineEnd: odysseyTokens.Spacing2,
|
|
725
|
+
...(hasNoChildren && {
|
|
726
|
+
marginInlineEnd: 0
|
|
727
|
+
})
|
|
728
|
+
};
|
|
729
|
+
}
|
|
675
730
|
}
|
|
676
731
|
},
|
|
677
732
|
MuiButtonBase: {
|
|
@@ -849,7 +904,7 @@ export const components = ({
|
|
|
849
904
|
ownerState,
|
|
850
905
|
theme
|
|
851
906
|
}) => {
|
|
852
|
-
const contrastMode = theme.
|
|
907
|
+
const contrastMode = theme.contrastMode;
|
|
853
908
|
return {
|
|
854
909
|
height: "auto",
|
|
855
910
|
paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
|
|
@@ -872,6 +927,9 @@ export const components = ({
|
|
|
872
927
|
color: odysseyTokens.TypographyColorDisabled,
|
|
873
928
|
[`& .${chipClasses.deleteIcon}`]: {
|
|
874
929
|
color: odysseyTokens.HueNeutral300
|
|
930
|
+
},
|
|
931
|
+
[`& .${chipClasses.icon}`]: {
|
|
932
|
+
color: odysseyTokens.HueNeutral300
|
|
875
933
|
}
|
|
876
934
|
},
|
|
877
935
|
...(ownerState.clickable && {
|
|
@@ -1899,9 +1957,11 @@ export const components = ({
|
|
|
1899
1957
|
}) => ({
|
|
1900
1958
|
gap: odysseyTokens.Spacing2,
|
|
1901
1959
|
minHeight: "unset",
|
|
1960
|
+
maxWidth: `calc(55ch - ${odysseyTokens.Spacing4})`,
|
|
1902
1961
|
paddingBlock: odysseyTokens.Spacing3,
|
|
1903
1962
|
paddingInline: odysseyTokens.Spacing4,
|
|
1904
1963
|
borderRadius: odysseyTokens.BorderRadiusMain,
|
|
1964
|
+
whiteSpace: "normal",
|
|
1905
1965
|
[`& .${formControlLabelClasses.root}`]: {
|
|
1906
1966
|
gap: "unset"
|
|
1907
1967
|
},
|