@rnaga/wp-next-ui 1.1.9 → 1.1.10

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/Accordions.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JSX } from "react";
2
- import { Accordion, AccordionSummary as MuiAccodionSummary, SxProps } from "@mui/material";
2
+ import { Accordion, AccordionDetails, AccordionSummary as MuiAccodionSummary, SxProps } from "@mui/material";
3
3
  import { Typography } from "./Typography";
4
4
  export declare const Accordions: (props: {
5
5
  items: {
@@ -13,6 +13,7 @@ export declare const Accordions: (props: {
13
13
  slotProps?: {
14
14
  summary?: Parameters<typeof MuiAccodionSummary>[0];
15
15
  title?: Parameters<typeof Typography>[0];
16
+ details?: Parameters<typeof AccordionDetails>[0];
16
17
  };
17
18
  size?: "small" | "medium";
18
19
  } & Omit<Parameters<typeof Accordion>[0], "sx" | "defaultExpanded" | "children">) => import("react/jsx-runtime").JSX.Element[];
@@ -1 +1 @@
1
- {"version":3,"file":"Accordions.d.ts","sourceRoot":"","sources":["../src/Accordions.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAM,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,SAAS,EAET,gBAAgB,IAAI,kBAAkB,EACtC,OAAO,EACR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,eAAO,MAAM,UAAU,GACrB,OAAO;IACL,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC;KACtB,EAAE,CAAC;IACJ,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,UAAU,CAAC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,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,EAC/B,IAAI,GAAG,iBAAiB,GAAG,UAAU,CACtC,8CA8EF,CAAC"}
package/Accordions.js CHANGED
@@ -10,6 +10,7 @@ export const Accordions = (props) => {
10
10
  const { wpTheme } = useWPTheme();
11
11
  const { sx: summarySx, ...summarySlotProps } = slotProps?.summary || {};
12
12
  const { sx: titleSx, ...titleSlotProps } = slotProps?.title || {};
13
+ const { sx: detailsSx, ...detailsSlotProps } = slotProps?.details || {};
13
14
  return items.map((item, index) => {
14
15
  return (_jsxs(Accordion, { expanded: allowSingleExpanded ? expdanded === index : undefined, ...(!allowSingleExpanded && {
15
16
  defaultExpanded: defaultExpanded
@@ -34,6 +35,6 @@ export const Accordions = (props) => {
34
35
  lineHeight: "20px",
35
36
  my: 1,
36
37
  ...titleSx,
37
- }, ...titleSlotProps, children: item.title }) }), _jsx(AccordionDetails, { children: item.content })] }, index));
38
+ }, ...titleSlotProps, children: item.title }) }), _jsx(AccordionDetails, { sx: { ...detailsSx }, ...detailsSlotProps, children: item.content })] }, index));
38
39
  });
39
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnaga/wp-next-ui",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "scripts": {
5
5
  "build": "node ../../scripts/build-ui.mjs",
6
6
  "release-old": "node ../../scripts/release.mjs",