@mitodl/smoot-design 3.5.0 → 3.6.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.
@@ -15156,8 +15156,8 @@ const Yu = {
15156
15156
  modeStorageKey: "mui-mode"
15157
15157
  }, {
15158
15158
  CssVarsProvider: QT,
15159
- useColorScheme: s6,
15160
- getInitColorSchemeScript: c6
15159
+ useColorScheme: c6,
15160
+ getInitColorSchemeScript: f6
15161
15161
  } = FC({
15162
15162
  themeId: Rr,
15163
15163
  // @ts-ignore ignore module augmentation tests
@@ -27298,9 +27298,9 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27298
27298
  ...R,
27299
27299
  children: F
27300
27300
  });
27301
- }), JO = ({
27301
+ }), JO = (e) => e, e6 = ({
27302
27302
  messageOrigin: e,
27303
- transformBody: r,
27303
+ transformBody: r = JO,
27304
27304
  className: l
27305
27305
  }) => {
27306
27306
  const [a, u] = M.useState(!1), [s, f] = M.useState(null);
@@ -27308,7 +27308,7 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27308
27308
  const d = (m) => {
27309
27309
  m.origin === e && m.data.type === "smoot-design::chat-open" && (u(!0), f(m.data.payload));
27310
27310
  };
27311
- return console.log("Attaching listener"), window.addEventListener("message", d), () => {
27311
+ return window.addEventListener("message", d), () => {
27312
27312
  window.removeEventListener("message", d);
27313
27313
  };
27314
27314
  }, [e]), /* @__PURE__ */ M.createElement(
@@ -27335,14 +27335,17 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27335
27335
  {
27336
27336
  ...s,
27337
27337
  requestOpts: {
27338
- transformBody: r,
27338
+ transformBody: (d) => ({
27339
+ ...s.requestBody,
27340
+ ...r == null ? void 0 : r(d)
27341
+ }),
27339
27342
  apiUrl: s == null ? void 0 : s.apiUrl
27340
27343
  },
27341
27344
  onClose: () => u(!1)
27342
27345
  }
27343
27346
  ) : null
27344
27347
  );
27345
- }, e6 = {
27348
+ }, t6 = {
27346
27349
  defaultProps: {
27347
27350
  disableRipple: !0
27348
27351
  },
@@ -27383,7 +27386,7 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27383
27386
  lightRed: "#D02E44",
27384
27387
  orange: "#FAB005",
27385
27388
  yellow: "#FFEB00"
27386
- }, t6 = {
27389
+ }, n6 = {
27387
27390
  defaultProps: {
27388
27391
  size: "medium",
27389
27392
  color: "default",
@@ -27544,13 +27547,13 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27544
27547
  }
27545
27548
  }
27546
27549
  ]
27547
- }, n6 = {
27550
+ }, r6 = {
27548
27551
  colors: Ve,
27549
27552
  dimensions: {
27550
27553
  headerHeight: "72px",
27551
27554
  headerHeightSm: "60px"
27552
27555
  }
27553
- }, r6 = {
27556
+ }, i6 = {
27554
27557
  values: {
27555
27558
  xs: 0,
27556
27559
  sm: 600,
@@ -27558,8 +27561,8 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27558
27561
  lg: 1320,
27559
27562
  xl: 1536
27560
27563
  }
27561
- }, i6 = {
27562
- custom: n6,
27564
+ }, l6 = {
27565
+ custom: r6,
27563
27566
  palette: {
27564
27567
  primary: {
27565
27568
  main: Ve.mitRed,
@@ -27579,9 +27582,9 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27579
27582
  },
27580
27583
  spacing: 8,
27581
27584
  typography: fb,
27582
- breakpoints: r6,
27585
+ breakpoints: i6,
27583
27586
  components: {
27584
- MuiButtonBase: e6,
27587
+ MuiButtonBase: t6,
27585
27588
  MuiTypography: WT,
27586
27589
  MuiMenu: {
27587
27590
  styleOverrides: { paper: { borderRadius: "4px" } }
@@ -27595,17 +27598,17 @@ const WO = /* @__PURE__ */ M.forwardRef(function(r, l) {
27595
27598
  popupIndicator: { paddingRight: 0, marginRight: 0 }
27596
27599
  }
27597
27600
  },
27598
- MuiChip: t6
27601
+ MuiChip: n6
27599
27602
  }
27600
- }, l6 = (e) => Ms(un(i6, e)), a6 = l6(), o6 = ({
27603
+ }, a6 = (e) => Ms(un(l6, e)), o6 = a6(), u6 = ({
27601
27604
  children: e,
27602
- theme: r = a6
27603
- }) => /* @__PURE__ */ M.createElement(ZT, { theme: r }, e), f6 = (e) => {
27605
+ theme: r = o6
27606
+ }) => /* @__PURE__ */ M.createElement(ZT, { theme: r }, e), d6 = (e) => {
27604
27607
  const r = document.createElement("div");
27605
27608
  r.id = "smoot-chat-drawer-root", document.body.append(r), Jx.createRoot(r).render(
27606
- /* @__PURE__ */ M.createElement(o6, null, /* @__PURE__ */ M.createElement(JO, { ...e }))
27609
+ /* @__PURE__ */ M.createElement(u6, null, /* @__PURE__ */ M.createElement(e6, { ...e }))
27607
27610
  );
27608
27611
  };
27609
27612
  export {
27610
- f6 as init
27613
+ d6 as init
27611
27614
  };