@availity/mui-spaces 0.7.6 → 1.0.0-alpha.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 CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.0.0-alpha.0](https://github.com/Availity/element/compare/@availity/mui-spaces@0.7.6...@availity/mui-spaces@1.0.0-alpha.0) (2025-02-24)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * upgraded to @mui/material v6
11
+ * **element:** upgraded to @mui/material v6
12
+
13
+ ### Features
14
+
15
+ * **element:** upgrade to @mui/material v6 ([cb958bb](https://github.com/Availity/element/commit/cb958bba99a4f1ee6dab323f0ff54b69e6fd3493))
16
+ * upgrade @mui/material ([571453a](https://github.com/Availity/element/commit/571453a34b21c344594ab4c03bc497d19aba942b))
17
+ * upgrade to MUI v6 ([7febd6f](https://github.com/Availity/element/commit/7febd6fd4fd58e87e1c97a832cea3b4595a35d58))
18
+
5
19
  ## [0.7.6](https://github.com/Availity/element/compare/@availity/mui-spaces@0.7.5...@availity/mui-spaces@0.7.6) (2025-02-24)
6
20
 
7
21
  ## [0.7.5](https://github.com/Availity/element/compare/@availity/mui-spaces@0.7.4...@availity/mui-spaces@0.7.5) (2025-02-20)
package/dist/index.js CHANGED
@@ -77,8 +77,8 @@ var __async = (__this, __arguments, generator) => {
77
77
  };
78
78
 
79
79
  // src/index.ts
80
- var src_exports = {};
81
- __export(src_exports, {
80
+ var index_exports = {};
81
+ __export(index_exports, {
82
82
  INITIAL_STATE: () => INITIAL_STATE,
83
83
  Spaces: () => Spaces,
84
84
  SpacesAgreement: () => SpacesAgreement,
@@ -90,7 +90,7 @@ __export(src_exports, {
90
90
  useSpaces: () => useSpaces,
91
91
  useSpacesContext: () => useSpacesContext
92
92
  });
93
- module.exports = __toCommonJS(src_exports);
93
+ module.exports = __toCommonJS(index_exports);
94
94
 
95
95
  // src/lib/Spaces.tsx
96
96
  var import_react3 = require("react");
@@ -285,8 +285,7 @@ var updateUrl = (url, key, value) => {
285
285
  return `${uri}?${newParams}`;
286
286
  };
287
287
  var getUrl = (url = "", loadApp, absolute) => {
288
- if (absolute || !loadApp)
289
- return url;
288
+ if (absolute || !loadApp) return url;
290
289
  return `/public/apps/home/#!/loadApp?appUrl=${encodeURIComponent(url)}`;
291
290
  };
292
291
  var getTarget = (target) => {
@@ -332,8 +331,7 @@ var getLocalStorageTopApps = (akaname) => {
332
331
  return topAppsValues;
333
332
  };
334
333
  var updateTopApps = (space, akaname) => __async(void 0, null, function* () {
335
- if (!space.configurationId || !space.type)
336
- return;
334
+ if (!space.configurationId || !space.type) return;
337
335
  if (canTrackSpace(space.configurationId, space.type)) {
338
336
  const today = (0, import_dayjs.default)();
339
337
  const topApps = (yield getLocalStorageTopApps(akaname)) || {};
@@ -423,8 +421,7 @@ var SpacesImage = (_a) => {
423
421
  if (!url && !loading && fallback) {
424
422
  url = fallback;
425
423
  }
426
- if (!url || !id)
427
- return null;
424
+ if (!url || !id) return null;
428
425
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
429
426
  import_react_image.Img,
430
427
  __spreadValues({
@@ -458,8 +455,7 @@ var MODAL_INITIAL_STATE = {
458
455
  var ModalContext = (0, import_react2.createContext)(null);
459
456
  var useModal = () => {
460
457
  const ctx = (0, import_react2.useContext)(ModalContext);
461
- if (!ctx)
462
- throw new Error("ModalContext be used inside a Provider");
458
+ if (!ctx) throw new Error("ModalContext be used inside a Provider");
463
459
  return ctx;
464
460
  };
465
461
  var MODAL_TYPES = {
@@ -514,16 +510,12 @@ var modalActions = {
514
510
  };
515
511
  var modalReducer = (state, _a) => {
516
512
  var _b = _a, { type } = _b, action = __objRest(_b, ["type"]);
517
- if (type === "RESET")
518
- return modalActions.RESET();
513
+ if (type === "RESET") return modalActions.RESET();
519
514
  if (isModalOptions(action)) {
520
- if (type === "OPEN_MULTI_PAYER_MODAL")
521
- return modalActions.OPEN_MULTI_PAYER_MODAL(state, action);
522
- else if (type === "OPEN_DISCLAIMER_MODAL")
523
- return modalActions.OPEN_DISCLAIMER_MODAL(state, action);
515
+ if (type === "OPEN_MULTI_PAYER_MODAL") return modalActions.OPEN_MULTI_PAYER_MODAL(state, action);
516
+ else if (type === "OPEN_DISCLAIMER_MODAL") return modalActions.OPEN_DISCLAIMER_MODAL(state, action);
524
517
  } else if (isModalState(action)) {
525
- if (type === "UPDATE_MODAL_STATE")
526
- return modalActions.UPDATE_MODAL_STATE(state, action);
518
+ if (type === "UPDATE_MODAL_STATE") return modalActions.UPDATE_MODAL_STATE(state, action);
527
519
  }
528
520
  return state;
529
521
  };
@@ -793,8 +785,7 @@ var openLink = (space, params) => __async(void 0, null, function* () {
793
785
  if (!((_a = space == null ? void 0 : space.link) == null ? void 0 : _a.url)) {
794
786
  return;
795
787
  }
796
- if (params == null ? void 0 : params.akaname)
797
- yield updateTopApps(space, params.akaname);
788
+ if (params == null ? void 0 : params.akaname) yield updateTopApps(space, params.akaname);
798
789
  const url = !(0, import_resolve_url2.isAbsoluteUrl)(space.link.url) ? getUrl(updateUrl(space.link.url, "spaceId", (params == null ? void 0 : params.payerSpaceId) || ((_c = (_b = space.parents) == null ? void 0 : _b[0]) == null ? void 0 : _c.id)), false, false) : space.link.url;
799
790
  const target = getTarget(space.link.target);
800
791
  window.open(url, target);
@@ -811,8 +802,7 @@ var openLinkWithSso = (_0, _1) => __async(void 0, [_0, _1], function* (space, {
811
802
  attributes.X_Client_ID = clientId;
812
803
  }
813
804
  try {
814
- if (akaname)
815
- yield updateTopApps(space, akaname);
805
+ if (akaname) yield updateTopApps(space, akaname);
816
806
  yield (0, import_native_form.default)(space.meta.ssoId, attributes, options, space.type);
817
807
  } catch (e) {
818
808
  console.warn("Something went wrong");
@@ -900,20 +890,17 @@ var useLink = (spaceOrSpaceId, options) => {
900
890
  } else if ((_c = space == null ? void 0 : space.meta) == null ? void 0 : _c.disclaimerId) {
901
891
  mediaProps.onClick = legacySso;
902
892
  mediaProps.onKeyDown = (event) => {
903
- if (event.key === "Enter")
904
- return legacySso();
893
+ if (event.key === "Enter") return legacySso();
905
894
  };
906
895
  } else if (parentPayerSpaces && parentPayerSpaces.length > 1 && !((_d = options == null ? void 0 : options.linkAttributes) == null ? void 0 : _d.spaceId)) {
907
896
  mediaProps.onClick = openMultiPayerModal;
908
897
  mediaProps.onKeyDown = (event) => {
909
- if (event.key === "Enter")
910
- return openMultiPayerModal();
898
+ if (event.key === "Enter") return openMultiPayerModal();
911
899
  };
912
900
  } else {
913
901
  mediaProps.onClick = () => {
914
902
  var _a2;
915
- if (space)
916
- return openLink(space, { akaname: user == null ? void 0 : user.akaname, payerSpaceId: (_a2 = options == null ? void 0 : options.linkAttributes) == null ? void 0 : _a2.spaceId });
903
+ if (space) return openLink(space, { akaname: user == null ? void 0 : user.akaname, payerSpaceId: (_a2 = options == null ? void 0 : options.linkAttributes) == null ? void 0 : _a2.spaceId });
917
904
  };
918
905
  mediaProps.onKeyDown = (event) => {
919
906
  var _a2;
@@ -932,23 +919,19 @@ var SpacesLinkFavoriteHeart = (0, import_styles.styled)(import_mui_layout2.Grid,
932
919
  var IconLink = (0, import_styles.styled)(import_Link.default, { name: "AvSpacesLink", slot: "IconLink" })({});
933
920
  var getDisplayDate = (date) => (0, import_dayjs2.default)(date).format("MM/DD/YYYY");
934
921
  var getContainerTag = (propTag, variant) => {
935
- if (variant && variant !== "default")
936
- return { card: import_mui_card.Card, list: import_mui_list.ListItem }[variant];
922
+ if (variant && variant !== "default") return { card: import_mui_card.Card, list: import_mui_list.ListItem }[variant];
937
923
  return propTag || "div";
938
924
  };
939
925
  var getBodyTag = (propTag, variant) => {
940
- if (variant && variant !== "default")
941
- return { card: import_mui_card.CardContent, list: "div" }[variant];
926
+ if (variant && variant !== "default") return { card: import_mui_card.CardContent, list: "div" }[variant];
942
927
  return propTag || "div";
943
928
  };
944
929
  var getTitleTag = (propTag, variant) => {
945
- if (variant && variant !== "default")
946
- return import_Link.default;
930
+ if (variant && variant !== "default") return import_Link.default;
947
931
  return propTag || import_Link.default;
948
932
  };
949
933
  var getTextTag = (propTag, variant) => {
950
- if (variant && variant !== "default")
951
- return { card: import_mui_typography2.Typography, list: import_mui_list.ListItemText }[variant];
934
+ if (variant && variant !== "default") return { card: import_mui_typography2.Typography, list: import_mui_list.ListItemText }[variant];
952
935
  return propTag || "div";
953
936
  };
954
937
  var SpacesLink = (_a) => {
@@ -1046,8 +1029,10 @@ var SpacesLink = (_a) => {
1046
1029
  () => customBadgeText && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1047
1030
  import_mui_layout2.Box,
1048
1031
  {
1049
- textAlign: stacked ? "center" : "inherit",
1050
- marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 1 : void 0,
1032
+ sx: {
1033
+ textAlign: stacked ? "center" : "inherit",
1034
+ marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 1 : void 0
1035
+ },
1051
1036
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1052
1037
  import_mui_chip.StatusChip,
1053
1038
  {
@@ -1099,10 +1084,12 @@ var SpacesLink = (_a) => {
1099
1084
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BodyTag, { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1100
1085
  import_mui_layout2.Grid,
1101
1086
  {
1102
- alignItems: !showDescription || stacked ? "center" : "start",
1087
+ sx: {
1088
+ alignItems: !showDescription || stacked ? "center" : "start",
1089
+ flexWrap: "nowrap"
1090
+ },
1103
1091
  direction: stacked ? "column" : "row",
1104
1092
  container: true,
1105
- flexWrap: "nowrap",
1106
1093
  children: [
1107
1094
  !stacked && favoriteIcon,
1108
1095
  FileIcon && (linkSpace == null ? void 0 : linkSpace.url) && ((_b2 = linkSpace == null ? void 0 : linkSpace.type) == null ? void 0 : _b2.toUpperCase()) === "FILE" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
@@ -1115,13 +1102,15 @@ var SpacesLink = (_a) => {
1115
1102
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FileIcon, { "data-testid": "icon" })
1116
1103
  }
1117
1104
  ) : null,
1118
- children ? renderChildren() : body && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_mui_layout2.Grid, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, flexGrow: 1, children: [
1105
+ children ? renderChildren() : body && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_mui_layout2.Grid, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, sx: { flexGrow: 1 }, children: [
1119
1106
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1120
1107
  import_mui_layout2.Box,
1121
1108
  {
1122
- marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1123
- paddingTop: stacked ? 3 : void 0,
1124
- textAlign: stacked ? "center" : void 0,
1109
+ sx: {
1110
+ marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1111
+ paddingTop: stacked ? 3 : void 0,
1112
+ textAlign: stacked ? "center" : void 0
1113
+ },
1125
1114
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1126
1115
  TitleTag,
1127
1116
  __spreadProps(__spreadValues(__spreadValues({
package/dist/index.mjs CHANGED
@@ -243,8 +243,7 @@ var updateUrl = (url, key, value) => {
243
243
  return `${uri}?${newParams}`;
244
244
  };
245
245
  var getUrl = (url = "", loadApp, absolute) => {
246
- if (absolute || !loadApp)
247
- return url;
246
+ if (absolute || !loadApp) return url;
248
247
  return `/public/apps/home/#!/loadApp?appUrl=${encodeURIComponent(url)}`;
249
248
  };
250
249
  var getTarget = (target) => {
@@ -290,8 +289,7 @@ var getLocalStorageTopApps = (akaname) => {
290
289
  return topAppsValues;
291
290
  };
292
291
  var updateTopApps = (space, akaname) => __async(void 0, null, function* () {
293
- if (!space.configurationId || !space.type)
294
- return;
292
+ if (!space.configurationId || !space.type) return;
295
293
  if (canTrackSpace(space.configurationId, space.type)) {
296
294
  const today = dayjs();
297
295
  const topApps = (yield getLocalStorageTopApps(akaname)) || {};
@@ -381,8 +379,7 @@ var SpacesImage = (_a) => {
381
379
  if (!url && !loading && fallback) {
382
380
  url = fallback;
383
381
  }
384
- if (!url || !id)
385
- return null;
382
+ if (!url || !id) return null;
386
383
  return /* @__PURE__ */ jsx2(
387
384
  Img,
388
385
  __spreadValues({
@@ -416,8 +413,7 @@ var MODAL_INITIAL_STATE = {
416
413
  var ModalContext = createContext(null);
417
414
  var useModal = () => {
418
415
  const ctx = useContext(ModalContext);
419
- if (!ctx)
420
- throw new Error("ModalContext be used inside a Provider");
416
+ if (!ctx) throw new Error("ModalContext be used inside a Provider");
421
417
  return ctx;
422
418
  };
423
419
  var MODAL_TYPES = {
@@ -472,16 +468,12 @@ var modalActions = {
472
468
  };
473
469
  var modalReducer = (state, _a) => {
474
470
  var _b = _a, { type } = _b, action = __objRest(_b, ["type"]);
475
- if (type === "RESET")
476
- return modalActions.RESET();
471
+ if (type === "RESET") return modalActions.RESET();
477
472
  if (isModalOptions(action)) {
478
- if (type === "OPEN_MULTI_PAYER_MODAL")
479
- return modalActions.OPEN_MULTI_PAYER_MODAL(state, action);
480
- else if (type === "OPEN_DISCLAIMER_MODAL")
481
- return modalActions.OPEN_DISCLAIMER_MODAL(state, action);
473
+ if (type === "OPEN_MULTI_PAYER_MODAL") return modalActions.OPEN_MULTI_PAYER_MODAL(state, action);
474
+ else if (type === "OPEN_DISCLAIMER_MODAL") return modalActions.OPEN_DISCLAIMER_MODAL(state, action);
482
475
  } else if (isModalState(action)) {
483
- if (type === "UPDATE_MODAL_STATE")
484
- return modalActions.UPDATE_MODAL_STATE(state, action);
476
+ if (type === "UPDATE_MODAL_STATE") return modalActions.UPDATE_MODAL_STATE(state, action);
485
477
  }
486
478
  return state;
487
479
  };
@@ -751,8 +743,7 @@ var openLink = (space, params) => __async(void 0, null, function* () {
751
743
  if (!((_a = space == null ? void 0 : space.link) == null ? void 0 : _a.url)) {
752
744
  return;
753
745
  }
754
- if (params == null ? void 0 : params.akaname)
755
- yield updateTopApps(space, params.akaname);
746
+ if (params == null ? void 0 : params.akaname) yield updateTopApps(space, params.akaname);
756
747
  const url = !isAbsoluteUrl2(space.link.url) ? getUrl(updateUrl(space.link.url, "spaceId", (params == null ? void 0 : params.payerSpaceId) || ((_c = (_b = space.parents) == null ? void 0 : _b[0]) == null ? void 0 : _c.id)), false, false) : space.link.url;
757
748
  const target = getTarget(space.link.target);
758
749
  window.open(url, target);
@@ -769,8 +760,7 @@ var openLinkWithSso = (_0, _1) => __async(void 0, [_0, _1], function* (space, {
769
760
  attributes.X_Client_ID = clientId;
770
761
  }
771
762
  try {
772
- if (akaname)
773
- yield updateTopApps(space, akaname);
763
+ if (akaname) yield updateTopApps(space, akaname);
774
764
  yield nativeForm(space.meta.ssoId, attributes, options, space.type);
775
765
  } catch (e) {
776
766
  console.warn("Something went wrong");
@@ -858,20 +848,17 @@ var useLink = (spaceOrSpaceId, options) => {
858
848
  } else if ((_c = space == null ? void 0 : space.meta) == null ? void 0 : _c.disclaimerId) {
859
849
  mediaProps.onClick = legacySso;
860
850
  mediaProps.onKeyDown = (event) => {
861
- if (event.key === "Enter")
862
- return legacySso();
851
+ if (event.key === "Enter") return legacySso();
863
852
  };
864
853
  } else if (parentPayerSpaces && parentPayerSpaces.length > 1 && !((_d = options == null ? void 0 : options.linkAttributes) == null ? void 0 : _d.spaceId)) {
865
854
  mediaProps.onClick = openMultiPayerModal;
866
855
  mediaProps.onKeyDown = (event) => {
867
- if (event.key === "Enter")
868
- return openMultiPayerModal();
856
+ if (event.key === "Enter") return openMultiPayerModal();
869
857
  };
870
858
  } else {
871
859
  mediaProps.onClick = () => {
872
860
  var _a2;
873
- if (space)
874
- return openLink(space, { akaname: user == null ? void 0 : user.akaname, payerSpaceId: (_a2 = options == null ? void 0 : options.linkAttributes) == null ? void 0 : _a2.spaceId });
861
+ if (space) return openLink(space, { akaname: user == null ? void 0 : user.akaname, payerSpaceId: (_a2 = options == null ? void 0 : options.linkAttributes) == null ? void 0 : _a2.spaceId });
875
862
  };
876
863
  mediaProps.onKeyDown = (event) => {
877
864
  var _a2;
@@ -890,23 +877,19 @@ var SpacesLinkFavoriteHeart = styled(Grid2, { name: "AvSpacesLink", slot: "AvFav
890
877
  var IconLink = styled(Link, { name: "AvSpacesLink", slot: "IconLink" })({});
891
878
  var getDisplayDate = (date) => dayjs2(date).format("MM/DD/YYYY");
892
879
  var getContainerTag = (propTag, variant) => {
893
- if (variant && variant !== "default")
894
- return { card: Card, list: ListItem }[variant];
880
+ if (variant && variant !== "default") return { card: Card, list: ListItem }[variant];
895
881
  return propTag || "div";
896
882
  };
897
883
  var getBodyTag = (propTag, variant) => {
898
- if (variant && variant !== "default")
899
- return { card: CardContent, list: "div" }[variant];
884
+ if (variant && variant !== "default") return { card: CardContent, list: "div" }[variant];
900
885
  return propTag || "div";
901
886
  };
902
887
  var getTitleTag = (propTag, variant) => {
903
- if (variant && variant !== "default")
904
- return Link;
888
+ if (variant && variant !== "default") return Link;
905
889
  return propTag || Link;
906
890
  };
907
891
  var getTextTag = (propTag, variant) => {
908
- if (variant && variant !== "default")
909
- return { card: Typography2, list: ListItemText }[variant];
892
+ if (variant && variant !== "default") return { card: Typography2, list: ListItemText }[variant];
910
893
  return propTag || "div";
911
894
  };
912
895
  var SpacesLink = (_a) => {
@@ -1004,8 +987,10 @@ var SpacesLink = (_a) => {
1004
987
  () => customBadgeText && /* @__PURE__ */ jsx6(
1005
988
  Box2,
1006
989
  {
1007
- textAlign: stacked ? "center" : "inherit",
1008
- marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 1 : void 0,
990
+ sx: {
991
+ textAlign: stacked ? "center" : "inherit",
992
+ marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 1 : void 0
993
+ },
1009
994
  children: /* @__PURE__ */ jsx6(
1010
995
  StatusChip,
1011
996
  {
@@ -1057,10 +1042,12 @@ var SpacesLink = (_a) => {
1057
1042
  children: /* @__PURE__ */ jsx6(BodyTag, { style: { width: "100%" }, children: /* @__PURE__ */ jsxs3(
1058
1043
  Grid2,
1059
1044
  {
1060
- alignItems: !showDescription || stacked ? "center" : "start",
1045
+ sx: {
1046
+ alignItems: !showDescription || stacked ? "center" : "start",
1047
+ flexWrap: "nowrap"
1048
+ },
1061
1049
  direction: stacked ? "column" : "row",
1062
1050
  container: true,
1063
- flexWrap: "nowrap",
1064
1051
  children: [
1065
1052
  !stacked && favoriteIcon,
1066
1053
  FileIcon && (linkSpace == null ? void 0 : linkSpace.url) && ((_b2 = linkSpace == null ? void 0 : linkSpace.type) == null ? void 0 : _b2.toUpperCase()) === "FILE" ? /* @__PURE__ */ jsx6(
@@ -1073,13 +1060,15 @@ var SpacesLink = (_a) => {
1073
1060
  children: /* @__PURE__ */ jsx6(FileIcon, { "data-testid": "icon" })
1074
1061
  }
1075
1062
  ) : null,
1076
- children ? renderChildren() : body && /* @__PURE__ */ jsxs3(Grid2, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, flexGrow: 1, children: [
1063
+ children ? renderChildren() : body && /* @__PURE__ */ jsxs3(Grid2, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, sx: { flexGrow: 1 }, children: [
1077
1064
  /* @__PURE__ */ jsx6(
1078
1065
  Box2,
1079
1066
  {
1080
- marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1081
- paddingTop: stacked ? 3 : void 0,
1082
- textAlign: stacked ? "center" : void 0,
1067
+ sx: {
1068
+ marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1069
+ paddingTop: stacked ? 3 : void 0,
1070
+ textAlign: stacked ? "center" : void 0
1071
+ },
1083
1072
  children: /* @__PURE__ */ jsx6(
1084
1073
  TitleTag,
1085
1074
  __spreadProps(__spreadValues(__spreadValues({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-spaces",
3
- "version": "0.7.6",
3
+ "version": "1.0.0-alpha.0",
4
4
  "description": "Availity MUI Spaces Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -40,53 +40,55 @@
40
40
  "publish:canary": "yarn npm publish --access public --tag canary"
41
41
  },
42
42
  "devDependencies": {
43
- "@availity/mui-button": "^0.7.0",
44
- "@availity/mui-card": "^0.3.2",
45
- "@availity/mui-chip": "^0.3.0",
46
- "@availity/mui-dialog": "^0.3.1",
47
- "@availity/mui-disclaimer": "^0.2.0",
48
- "@availity/mui-favorites": "^0.3.2",
49
- "@availity/mui-icon": "^0.14.0",
50
- "@availity/mui-layout": "^0.3.0",
51
- "@availity/mui-list": "^0.3.0",
52
- "@availity/mui-modal": "^0.2.2",
53
- "@availity/mui-paper": "^0.2.0",
54
- "@availity/mui-progress": "^0.5.1",
55
- "@availity/mui-typography": "^0.3.0",
56
- "@mui/material": "^5.15.15",
43
+ "@availity/mui-button": "^1.0.0-alpha.0",
44
+ "@availity/mui-card": "^1.0.0-alpha.0",
45
+ "@availity/mui-chip": "^1.0.0-alpha.0",
46
+ "@availity/mui-dialog": "^1.0.0-alpha.0",
47
+ "@availity/mui-disclaimer": "^1.0.0-alpha.0",
48
+ "@availity/mui-favorites": "^1.0.0-alpha.0",
49
+ "@availity/mui-icon": "^1.0.0-alpha.0",
50
+ "@availity/mui-layout": "^1.0.0-alpha.0",
51
+ "@availity/mui-list": "^1.0.0-alpha.0",
52
+ "@availity/mui-modal": "^1.0.0-alpha.0",
53
+ "@availity/mui-paper": "^1.0.0-alpha.0",
54
+ "@availity/mui-progress": "^1.0.0-alpha.0",
55
+ "@availity/mui-typography": "^1.0.0-alpha.0",
56
+ "@mui/material": "^6.4.5",
57
57
  "react": "18.2.0",
58
58
  "react-dom": "18.2.0",
59
- "tsup": "^8.0.2",
59
+ "react-router-dom": "^6.26.0",
60
+ "tsup": "^8.3.6",
60
61
  "typescript": "^5.4.5"
61
62
  },
62
63
  "peerDependencies": {
63
- "@availity/mui-button": "^0.7.0",
64
- "@availity/mui-card": "^0.3.2",
65
- "@availity/mui-chip": "^0.3.0",
66
- "@availity/mui-dialog": "^0.3.1",
67
- "@availity/mui-disclaimer": "^0.2.0",
68
- "@availity/mui-favorites": "^0.3.2",
69
- "@availity/mui-icon": "^0.14.0",
70
- "@availity/mui-layout": "^0.3.0",
71
- "@availity/mui-list": "^0.3.0",
72
- "@availity/mui-modal": "^0.2.2",
73
- "@availity/mui-progress": "^0.5.1",
74
- "@availity/mui-typography": "^0.3.0",
75
- "@mui/material": "^5.11.9",
76
- "react": ">=16.3.0"
64
+ "@availity/mui-button": "^1.0.0-alpha.0",
65
+ "@availity/mui-card": "^1.0.0-alpha.0",
66
+ "@availity/mui-chip": "^1.0.0-alpha.0",
67
+ "@availity/mui-dialog": "^1.0.0-alpha.0",
68
+ "@availity/mui-disclaimer": "^1.0.0-alpha.0",
69
+ "@availity/mui-favorites": "^1.0.0-alpha.0",
70
+ "@availity/mui-icon": "^1.0.0-alpha.0",
71
+ "@availity/mui-layout": "^1.0.0-alpha.0",
72
+ "@availity/mui-list": "^1.0.0-alpha.0",
73
+ "@availity/mui-modal": "^1.0.0-alpha.0",
74
+ "@availity/mui-progress": "^1.0.0-alpha.0",
75
+ "@availity/mui-typography": "^1.0.0-alpha.0",
76
+ "@mui/material": "^6.4.5",
77
+ "react": ">=16.3.0",
78
+ "react-router-dom": "^6.26.0"
77
79
  },
78
80
  "publishConfig": {
79
81
  "access": "public"
80
82
  },
81
83
  "dependencies": {
82
- "@availity/api-axios": "^9.0.6",
83
- "@availity/hooks": "^5.0.2",
84
+ "@availity/api-axios": "^10.0.0",
85
+ "@availity/hooks": "^5.1.2",
84
86
  "@availity/message-core": "^7.0.2",
85
- "@availity/native-form": "^5.0.6",
86
- "@availity/resolve-url": "^2.0.6",
87
+ "@availity/native-form": "^6.0.8",
88
+ "@availity/resolve-url": "^3.0.0",
87
89
  "@tanstack/react-query": "^4.36.1",
88
90
  "dayjs": "^1.11.13",
89
- "qs": "^6.13.1",
91
+ "qs": "^6.14.0",
90
92
  "react-image": "^4.1.0",
91
93
  "react-markdown": "^6.0.3"
92
94
  }
@@ -8,6 +8,7 @@ import { CircularProgress } from '@availity/mui-progress';
8
8
  import Link from '@mui/material/Link';
9
9
  import { FavoriteHeart } from '@availity/mui-favorites';
10
10
  import { Grid, Box } from '@availity/mui-layout';
11
+ import MuiBox from '@mui/material/Box';
11
12
  import { ListItem, ListItemText } from '@availity/mui-list';
12
13
  import ReactMarkdown from 'react-markdown';
13
14
  import { styled } from '@mui/material/styles';
@@ -16,7 +17,7 @@ import { useLink } from './useLink';
16
17
  import type { SpacesLinkWithSpace, SpacesLinkWithSpaceId, SpacesLinkVariants } from './spaces-link-types';
17
18
  import { isFunction } from '../helpers';
18
19
 
19
- const SpacesLinkContainer = styled(Box, { name: 'AvSpacesLink', slot: 'root' })({});
20
+ const SpacesLinkContainer = styled(Box, { name: 'AvSpacesLink', slot: 'root' })({}) as typeof MuiBox;
20
21
  const DateInfo = styled(Grid, { name: 'AvSpacesLink', slot: 'AvDateInfo' })({});
21
22
  const SpacesLinkFavoriteHeart = styled(Grid, { name: 'AvSpacesLink', slot: 'AvFavoriteHeart' })({});
22
23
  const IconLink = styled(Link, { name: 'AvSpacesLink', slot: 'IconLink' })({});
@@ -133,8 +134,10 @@ export const SpacesLink = ({
133
134
  () =>
134
135
  customBadgeText && (
135
136
  <Box
136
- textAlign={stacked ? 'center' : 'inherit'}
137
- marginRight={variant !== 'card' && (showDate || (showNew && linkSpace?.isNew)) ? 1 : undefined}
137
+ sx={{
138
+ textAlign: stacked ? 'center' : 'inherit',
139
+ marginRight: variant !== 'card' && (showDate || (showNew && linkSpace?.isNew)) ? 1 : undefined,
140
+ }}
138
141
  >
139
142
  <StatusChip
140
143
  color={customBadgeColor || 'info'}
@@ -195,10 +198,12 @@ export const SpacesLink = ({
195
198
  >
196
199
  <BodyTag style={{ width: '100%' }}>
197
200
  <Grid
198
- alignItems={!showDescription || stacked ? 'center' : 'start'}
201
+ sx={{
202
+ alignItems: !showDescription || stacked ? 'center' : 'start',
203
+ flexWrap: 'nowrap',
204
+ }}
199
205
  direction={stacked ? 'column' : 'row'}
200
206
  container
201
- flexWrap="nowrap"
202
207
  >
203
208
  {!stacked && favoriteIcon}
204
209
  {FileIcon && linkSpace?.url && linkSpace?.type?.toUpperCase() === 'FILE' ? (
@@ -214,11 +219,14 @@ export const SpacesLink = ({
214
219
  {children
215
220
  ? renderChildren()
216
221
  : body && (
217
- <Grid id={`${idPrefix}${linkSpace?.type}-${linkSpace?.configurationId}`} flexGrow={1}>
222
+ <Grid id={`${idPrefix}${linkSpace?.type}-${linkSpace?.configurationId}`} sx={{ flexGrow: 1 }}>
218
223
  <Box
219
- marginBottom={!customBadgeDisplay && (!showDescription || !linkSpace?.description) ? 0 : undefined}
220
- paddingTop={stacked ? 3 : undefined}
221
- textAlign={stacked ? 'center' : undefined}
224
+ sx={{
225
+ marginBottom:
226
+ !customBadgeDisplay && (!showDescription || !linkSpace?.description) ? 0 : undefined,
227
+ paddingTop: stacked ? 3 : undefined,
228
+ textAlign: stacked ? 'center' : undefined,
229
+ }}
222
230
  >
223
231
  <TitleTag
224
232
  id={`${idPrefix}app-title-${linkSpace?.configurationId}`}
File without changes