@okta/odyssey-react-mui 1.13.7 → 1.13.8
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 +4 -0
- package/dist/Accordion.js +0 -2
- package/dist/Accordion.js.map +1 -1
- package/dist/src/Accordion.d.ts +1 -5
- package/dist/src/Accordion.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +15 -29
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Accordion.tsx +0 -6
- package/src/theme/components.tsx +15 -34
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.13.8](https://github.com/okta/odyssey/compare/v1.13.7...v1.13.8) (2024-02-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @okta/odyssey-react-mui
|
|
9
|
+
|
|
6
10
|
## [1.13.7](https://github.com/okta/odyssey/compare/v1.13.6...v1.13.7) (2024-02-13)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @okta/odyssey-react-mui
|
package/dist/Accordion.js
CHANGED
|
@@ -22,7 +22,6 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
const Accordion = ({
|
|
23
23
|
children,
|
|
24
24
|
label,
|
|
25
|
-
hasShadow = true,
|
|
26
25
|
id: idOverride,
|
|
27
26
|
isDefaultExpanded,
|
|
28
27
|
isDisabled,
|
|
@@ -39,7 +38,6 @@ const Accordion = ({
|
|
|
39
38
|
disableGutters: true,
|
|
40
39
|
expanded: isExpanded,
|
|
41
40
|
onChange: onChange,
|
|
42
|
-
className: hasShadow ? `hasShadow` : undefined,
|
|
43
41
|
children: [_jsx(_AccordionSummary, {
|
|
44
42
|
"aria-controls": contentId,
|
|
45
43
|
expandIcon: _jsx(ChevronDownIcon, {}),
|
package/dist/Accordion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","Accordion","children","label","
|
|
1
|
+
{"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","Accordion","children","label","id","idOverride","isDefaultExpanded","isDisabled","isExpanded","onChange","translate","headerId","contentId","_Accordion","defaultExpanded","disabled","disableGutters","expanded","_AccordionSummary","expandIcon","component","_AccordionDetails","MemoizedAccordion","displayName"],"sources":["../src/Accordion.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 { ReactNode, memo } from \"react\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport {\n Accordion as MuiAccordion,\n AccordionDetails as MuiAccordionDetails,\n AccordionSummary as MuiAccordionSummary,\n AccordionProps as MuiAccordionProps,\n} from \"@mui/material\";\nimport { ChevronDownIcon } from \"./icons.generated\";\nimport { Support } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport type AccordionProps = {\n /**\n * The content of the Accordion itself\n */\n children: ReactNode;\n /**\n * Defines IDs for the header and the content of the Accordion\n */\n id?: string;\n /**\n * The label text for the AccordionSummary\n */\n label: string;\n /**\n * Whether the item is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * Whether the item is disabled\n */\n isDisabled?: boolean;\n /**\n * Whether the item is expanded\n */\n isExpanded?: boolean;\n /**\n * Event fired when the expansion state of the accordion is changed\n */\n onChange?: MuiAccordionProps[\"onChange\"];\n} & (\n | {\n isExpanded: boolean;\n isDefaultExpanded?: never;\n }\n | {\n isDefaultExpanded?: boolean;\n isExpanded?: never;\n }\n) &\n HtmlProps;\n\nconst Accordion = ({\n children,\n label,\n id: idOverride,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n onChange,\n translate,\n}: AccordionProps) => {\n const id = useUniqueId(idOverride);\n const headerId = `${id}-header`;\n const contentId = `${id}-content`;\n return (\n <MuiAccordion\n defaultExpanded={isDefaultExpanded}\n disabled={isDisabled}\n disableGutters\n expanded={isExpanded}\n onChange={onChange}\n >\n <MuiAccordionSummary\n aria-controls={contentId}\n expandIcon={<ChevronDownIcon />}\n id={headerId}\n >\n <Support component=\"div\" translate={translate}>\n {label}\n </Support>\n </MuiAccordionSummary>\n <MuiAccordionDetails aria-labelledby={headerId}>\n {children}\n </MuiAccordionDetails>\n </MuiAccordion>\n );\n};\n\nconst MemoizedAccordion = memo(Accordion);\nMemoizedAccordion.displayName = \"Accordion\";\n\nexport { MemoizedAccordion as Accordion };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAoBA,IAAI,QAAQ,OAAO;AAAC,SAQ/BC,eAAe;AAAA,SACfC,OAAO;AAAA,SACPC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA2CpB,MAAMC,SAAS,GAAGA,CAAC;EACjBC,QAAQ;EACRC,KAAK;EACLC,EAAE,EAAEC,UAAU;EACdC,iBAAiB;EACjBC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC;AACc,CAAC,KAAK;EACpB,MAAMN,EAAE,GAAGR,WAAW,CAACS,UAAU,CAAC;EAClC,MAAMM,QAAQ,GAAI,GAAEP,EAAG,SAAQ;EAC/B,MAAMQ,SAAS,GAAI,GAAER,EAAG,UAAS;EACjC,OACEJ,KAAA,CAAAa,UAAA;IACEC,eAAe,EAAER,iBAAkB;IACnCS,QAAQ,EAAER,UAAW;IACrBS,cAAc;IACdC,QAAQ,EAAET,UAAW;IACrBC,QAAQ,EAAEA,QAAS;IAAAP,QAAA,GAEnBJ,IAAA,CAAAoB,iBAAA;MACE,iBAAeN,SAAU;MACzBO,UAAU,EAAErB,IAAA,CAACJ,eAAe,IAAE,CAAE;MAChCU,EAAE,EAAEO,QAAS;MAAAT,QAAA,EAEbJ,IAAA,CAACH,OAAO;QAACyB,SAAS,EAAC,KAAK;QAACV,SAAS,EAAEA,SAAU;QAAAR,QAAA,EAC3CC;MAAK,CACC;IAAC,CACS,CAAC,EACtBL,IAAA,CAAAuB,iBAAA;MAAqB,mBAAiBV,QAAS;MAAAT,QAAA,EAC5CA;IAAQ,CACU,CAAC;EAAA,CACV,CAAC;AAEnB,CAAC;AAED,MAAMoB,iBAAiB,GAAG7B,IAAI,CAACQ,SAAS,CAAC;AACzCqB,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIrB,SAAS"}
|
package/dist/src/Accordion.d.ts
CHANGED
|
@@ -25,10 +25,6 @@ export type AccordionProps = {
|
|
|
25
25
|
* The label text for the AccordionSummary
|
|
26
26
|
*/
|
|
27
27
|
label: string;
|
|
28
|
-
/**
|
|
29
|
-
* If true, the Accordion item will have a shadow.
|
|
30
|
-
*/
|
|
31
|
-
hasShadow?: boolean;
|
|
32
28
|
/**
|
|
33
29
|
* Whether the item is expanded by default
|
|
34
30
|
*/
|
|
@@ -52,6 +48,6 @@ export type AccordionProps = {
|
|
|
52
48
|
isDefaultExpanded?: boolean;
|
|
53
49
|
isExpanded?: never;
|
|
54
50
|
}) & HtmlProps;
|
|
55
|
-
declare const MemoizedAccordion: import("react").MemoExoticComponent<({ children, label,
|
|
51
|
+
declare const MemoizedAccordion: import("react").MemoExoticComponent<({ children, label, id: idOverride, isDefaultExpanded, isDisabled, isExpanded, onChange, translate, }: AccordionProps) => JSX.Element>;
|
|
56
52
|
export { MemoizedAccordion as Accordion };
|
|
57
53
|
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../src/Accordion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAQ,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAIL,cAAc,IAAI,iBAAiB,EACpC,MAAM,eAAe,CAAC;AAKvB,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../src/Accordion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAQ,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAIL,cAAc,IAAI,iBAAiB,EACpC,MAAM,eAAe,CAAC;AAKvB,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C,GAAG,CACA;IACE,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B,GACD;IACE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CACJ,GACC,SAAS,CAAC;AAuCZ,QAAA,MAAM,iBAAiB,6IA5BpB,cAAc,iBA4BwB,CAAC;AAG1C,OAAO,EAAE,iBAAiB,IAAI,SAAS,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;AAqC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,eAAO,MAAM,UAAU;mBAIN,YAAY;;MAEzB,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;AAqC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,eAAO,MAAM,UAAU;mBAIN,YAAY;;MAEzB,YAAY,CAAC,YAAY,CA+mF5B,CAAC"}
|
package/dist/theme/components.js
CHANGED
|
@@ -45,13 +45,12 @@ export const components = ({
|
|
|
45
45
|
styleOverrides: {
|
|
46
46
|
root: () => ({
|
|
47
47
|
backgroundColor: odysseyTokens.HueNeutralWhite,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
border: 0,
|
|
49
|
+
borderBottomColor: odysseyTokens.BorderColorDisplay,
|
|
50
|
+
borderBottomStyle: "solid",
|
|
51
|
+
borderBottomWidth: odysseyTokens.BorderWidthMain,
|
|
52
|
+
borderRadius: 0,
|
|
51
53
|
boxShadow: "none",
|
|
52
|
-
"&.hasShadow": {
|
|
53
|
-
boxShadow: odysseyTokens.DepthLow
|
|
54
|
-
},
|
|
55
54
|
"&.Mui-disabled": {
|
|
56
55
|
backgroundColor: odysseyTokens.HueNeutralWhite,
|
|
57
56
|
color: odysseyTokens.TypographyColorDisabled,
|
|
@@ -60,19 +59,17 @@ export const components = ({
|
|
|
60
59
|
color: odysseyTokens.TypographyColorDisabled
|
|
61
60
|
}
|
|
62
61
|
},
|
|
63
|
-
"&::before": {
|
|
64
|
-
backgroundColor: odysseyTokens.BorderColorDisplay,
|
|
65
|
-
opacity: "1 !important"
|
|
66
|
-
},
|
|
67
62
|
"&:first-of-type": {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
borderRadius: 0,
|
|
64
|
+
borderTopColor: odysseyTokens.BorderColorDisplay,
|
|
65
|
+
borderTopStyle: "solid",
|
|
66
|
+
borderTopWidth: odysseyTokens.BorderWidthMain
|
|
71
67
|
},
|
|
72
68
|
"&:last-of-type": {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
borderRadius: 0,
|
|
70
|
+
borderBottomColor: odysseyTokens.BorderColorDisplay,
|
|
71
|
+
borderBottomStyle: "solid",
|
|
72
|
+
borderBottomWidth: odysseyTokens.BorderWidthMain
|
|
76
73
|
}
|
|
77
74
|
})
|
|
78
75
|
}
|
|
@@ -82,22 +79,11 @@ export const components = ({
|
|
|
82
79
|
root: () => ({
|
|
83
80
|
paddingBlock: odysseyTokens.Spacing4,
|
|
84
81
|
paddingInline: odysseyTokens.Spacing3,
|
|
85
|
-
"
|
|
86
|
-
borderTopLeftRadius: odysseyTokens.BorderRadiusMain,
|
|
87
|
-
borderTopRightRadius: odysseyTokens.BorderRadiusMain
|
|
88
|
-
},
|
|
89
|
-
".MuiAccordion-root:last-of-type &": {
|
|
90
|
-
borderBottomLeftRadius: odysseyTokens.BorderRadiusMain,
|
|
91
|
-
borderBottomRightRadius: odysseyTokens.BorderRadiusMain
|
|
92
|
-
},
|
|
93
|
-
".MuiAccordion-root.Mui-expanded &": {
|
|
94
|
-
borderBottomLeftRadius: 0,
|
|
95
|
-
borderBottomRightRadius: 0
|
|
96
|
-
},
|
|
97
|
-
"&:hover, &:focus": {
|
|
82
|
+
"&:hover": {
|
|
98
83
|
backgroundColor: odysseyTokens.HueNeutral50
|
|
99
84
|
},
|
|
100
85
|
"&:focus-visible": {
|
|
86
|
+
backgroundColor: odysseyTokens.HueNeutral50,
|
|
101
87
|
outlineColor: odysseyTokens.PalettePrimaryMain,
|
|
102
88
|
outlineWidth: 2,
|
|
103
89
|
outlineStyle: "solid",
|