@availity/mui-spaces 0.3.3 → 0.3.4

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/dist/index.js CHANGED
@@ -842,27 +842,6 @@ var CardContent = (_a) => {
842
842
  var import_styles = require("@mui/material/styles");
843
843
  var import_CardHeader = __toESM(require("@mui/material/CardHeader"));
844
844
  var import_jsx_runtime11 = require("react/jsx-runtime");
845
- var CardHeader = (_a) => {
846
- var _b = _a, {
847
- titleTypographyProps,
848
- subheaderTypographyProps
849
- } = _b, rest = __objRest(_b, [
850
- "titleTypographyProps",
851
- "subheaderTypographyProps"
852
- ]);
853
- var _a2, _b2, _c, _d;
854
- const theme = (0, import_styles.useTheme)();
855
- const titleVariant = (_d = (_c = (_b2 = (_a2 = theme.components) == null ? void 0 : _a2.MuiCardHeader) == null ? void 0 : _b2.defaultProps) == null ? void 0 : _c.titleTypographyProps) == null ? void 0 : _d.variant;
856
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
857
- import_CardHeader.default,
858
- __spreadProps(__spreadValues({}, rest), {
859
- titleTypographyProps: __spreadValues({
860
- variant: titleVariant
861
- }, titleTypographyProps),
862
- subheaderTypographyProps: __spreadValues({ variant: "subtitle2" }, subheaderTypographyProps)
863
- })
864
- );
865
- };
866
845
 
867
846
  // ../card/src/lib/CardMedia.tsx
868
847
  var import_CardMedia = __toESM(require("@mui/material/CardMedia"));
@@ -870,15 +849,11 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
870
849
 
871
850
  // src/lib/SpacesLink/SpacesLink.tsx
872
851
  var import_mui_typography3 = require("@availity/mui-typography");
873
- var import_mui_icon4 = require("@availity/mui-icon");
874
- var import_react10 = require("react");
852
+ var import_react9 = require("react");
875
853
 
876
854
  // ../chip/src/lib/Chip.tsx
877
855
  var import_Chip = __toESM(require("@mui/material/Chip"));
878
856
  var import_jsx_runtime13 = require("react/jsx-runtime");
879
- var Chip = (props) => {
880
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Chip.default, __spreadProps(__spreadValues({}, props), { color: "default", size: "medium" }));
881
- };
882
857
 
883
858
  // ../chip/src/lib/StatusChip.tsx
884
859
  var import_Chip2 = __toESM(require("@mui/material/Chip"));
@@ -888,66 +863,11 @@ var StatusChip = (_a) => {
888
863
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_Chip2.default, __spreadProps(__spreadValues({ color }, rest), { size: "small" }));
889
864
  };
890
865
 
891
- // ../link/src/lib/Link.tsx
892
- var import_react5 = require("react");
866
+ // src/lib/SpacesLink/SpacesLink.tsx
893
867
  var import_Link = __toESM(require("@mui/material/Link"));
894
- var import_mui_icon2 = require("@availity/mui-icon");
895
- var import_jsx_runtime15 = require("react/jsx-runtime");
896
- var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
897
- var WINDOWS_PATH_REGEX = /^[a-zA-Z]:\\/;
898
- function isAbsoluteUrl2(url) {
899
- if (WINDOWS_PATH_REGEX.test(url)) {
900
- return false;
901
- }
902
- return ABSOLUTE_URL_REGEX.test(url);
903
- }
904
- var getUrl2 = (url = "") => {
905
- return `/public/apps/home/#!/loadApp?appUrl=${encodeURIComponent(url)}`;
906
- };
907
- var getLocation = (href) => {
908
- const location = document.createElement("a");
909
- location.href = href;
910
- return location;
911
- };
912
- var setRel = (url, target, absolute) => {
913
- if (target === "_blank" && absolute) {
914
- const dest = getLocation(url);
915
- if (dest.hostname !== window.location.hostname) {
916
- return "noopener noreferrer";
917
- }
918
- }
919
- return void 0;
920
- };
921
- var Link = (0, import_react5.forwardRef)((props, ref) => {
922
- const _a = props, { href, target = "_self", children, onClick, loadApp = true, rel, iconPosition = "start" } = _a, rest = __objRest(_a, ["href", "target", "children", "onClick", "loadApp", "rel", "iconPosition"]);
923
- const absolute = isAbsoluteUrl2(href);
924
- const encode = !(absolute || !loadApp);
925
- const url = encode ? getUrl2(href) : href;
926
- const NewWindowIcon = target === "_blank" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_mui_icon2.OpenInNewIcon, {}) : null;
927
- const startIcon = iconPosition === "start";
928
- const endIcon = iconPosition === "end";
929
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
930
- import_Link.default,
931
- __spreadProps(__spreadValues({
932
- href: url,
933
- target,
934
- onClick: (event) => onClick && onClick(event, url),
935
- rel: rel || setRel(url, target, absolute)
936
- }, rest), {
937
- ref,
938
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
939
- startIcon && NewWindowIcon,
940
- " ",
941
- children,
942
- " ",
943
- endIcon && NewWindowIcon
944
- ] })
945
- })
946
- );
947
- });
948
868
 
949
869
  // ../favorites/src/lib/Favorites.tsx
950
- var import_react6 = require("react");
870
+ var import_react5 = require("react");
951
871
  var import_react_query3 = require("@tanstack/react-query");
952
872
  var import_message_core3 = __toESM(require("@availity/message-core"));
953
873
 
@@ -957,18 +877,18 @@ var import_api_axios3 = require("@availity/api-axios");
957
877
  var import_react_query2 = require("@tanstack/react-query");
958
878
 
959
879
  // ../favorites/src/lib/Favorites.tsx
960
- var import_jsx_runtime16 = require("react/jsx-runtime");
961
- var FavoritesContext = (0, import_react6.createContext)(null);
880
+ var import_jsx_runtime15 = require("react/jsx-runtime");
881
+ var FavoritesContext = (0, import_react5.createContext)(null);
962
882
  var noOp = () => {
963
883
  };
964
884
  var useFavorites = (id) => {
965
- const context = (0, import_react6.useContext)(FavoritesContext);
885
+ const context = (0, import_react5.useContext)(FavoritesContext);
966
886
  if (context === null) {
967
887
  throw new Error("useFavorites must be used within a FavoritesProvider");
968
888
  }
969
889
  const { favorites, queryStatus, mutationStatus, lastClickedFavoriteId, deleteFavorite, addFavorite } = context;
970
890
  const isLastClickedFavorite = lastClickedFavoriteId === id;
971
- const isFavorited = (0, import_react6.useMemo)(() => {
891
+ const isFavorited = (0, import_react5.useMemo)(() => {
972
892
  const fav = favorites == null ? void 0 : favorites.find((f) => f.id === id);
973
893
  return !!fav;
974
894
  }, [favorites, id]);
@@ -993,10 +913,10 @@ var useFavorites = (id) => {
993
913
 
994
914
  // ../tooltip/src/lib/Tooltip.tsx
995
915
  var import_Tooltip = __toESM(require("@mui/material/Tooltip"));
996
- var import_jsx_runtime17 = require("react/jsx-runtime");
916
+ var import_jsx_runtime16 = require("react/jsx-runtime");
997
917
  var Tooltip = (props) => {
998
918
  const _a = props, { children, dangerouslySetTransitionTimer } = _a, rest = __objRest(_a, ["children", "dangerouslySetTransitionTimer"]);
999
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
919
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1000
920
  import_Tooltip.default,
1001
921
  __spreadProps(__spreadValues({}, rest), {
1002
922
  TransitionProps: { timeout: dangerouslySetTransitionTimer !== void 0 ? dangerouslySetTransitionTimer : 100 },
@@ -1007,16 +927,16 @@ var Tooltip = (props) => {
1007
927
  };
1008
928
 
1009
929
  // ../favorites/src/lib/FavoriteHeart.tsx
1010
- var import_mui_icon3 = require("@availity/mui-icon");
930
+ var import_mui_icon2 = require("@availity/mui-icon");
1011
931
  var import_styles2 = require("@mui/material/styles");
1012
- var import_jsx_runtime18 = require("react/jsx-runtime");
932
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1013
933
  var icons = {
1014
- spinner: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CircularProgress, { "aria-hidden": true, size: "small", loadingCaption: false }),
1015
- unknownDisabledHeart: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_mui_icon3.HeartIcon, { "aria-hidden": true, color: "disabled" }),
1016
- favoritedDisabledHeart: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_mui_icon3.HeartIcon, { "aria-hidden": true, color: "error", opacity: "0.6" }),
1017
- unfavoritedDisabledHeart: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_mui_icon3.HeartEmptyIcon, { "aria-hidden": true, color: "disabled", opacity: "0.6" }),
1018
- favoritedHeart: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_mui_icon3.HeartIcon, { "aria-hidden": true, color: "error" }),
1019
- unfavoritedHeart: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_mui_icon3.HeartEmptyIcon, { "aria-hidden": true, color: "secondary" })
934
+ spinner: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CircularProgress, { "aria-hidden": true, size: "small", loadingCaption: false }),
935
+ unknownDisabledHeart: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_mui_icon2.HeartIcon, { "aria-hidden": true, color: "disabled" }),
936
+ favoritedDisabledHeart: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_mui_icon2.HeartIcon, { "aria-hidden": true, color: "error", opacity: "0.6" }),
937
+ unfavoritedDisabledHeart: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_mui_icon2.HeartEmptyIcon, { "aria-hidden": true, color: "disabled", opacity: "0.6" }),
938
+ favoritedHeart: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_mui_icon2.HeartIcon, { "aria-hidden": true, color: "error" }),
939
+ unfavoritedHeart: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_mui_icon2.HeartEmptyIcon, { "aria-hidden": true, color: "secondary" })
1020
940
  };
1021
941
  var FavoriteHeartContainer = (0, import_styles2.styled)("div", { name: "AvFavoriteHeart", slot: "root" })({});
1022
942
  var FavoriteInput = (0, import_styles2.styled)("input", {
@@ -1073,9 +993,9 @@ var FavoriteHeart = ({
1073
993
  onMouseDown,
1074
994
  style: { cursor }
1075
995
  };
1076
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FavoriteHeartContainer, { children: [
1077
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FavoriteIcon, { children: icons[iconKey] }),
1078
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
996
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(FavoriteHeartContainer, { children: [
997
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FavoriteIcon, { children: icons[iconKey] }),
998
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1079
999
  "span",
1080
1000
  {
1081
1001
  style: {
@@ -1093,7 +1013,7 @@ var FavoriteHeart = ({
1093
1013
  children: isLastClickedFavorite && status === "reloading" ? "Loading..." : isLastClickedFavorite && status === "error" ? "An error has occurred. Please try again." : ""
1094
1014
  }
1095
1015
  ),
1096
- disabled ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FavoriteInput, __spreadValues({}, favoriteInputProps)) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tooltip, { title: tooltipContent, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FavoriteInput, __spreadValues({}, favoriteInputProps)) })
1016
+ disabled ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FavoriteInput, __spreadValues({}, favoriteInputProps)) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip, { title: tooltipContent, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FavoriteInput, __spreadValues({}, favoriteInputProps)) })
1097
1017
  ] });
1098
1018
  };
1099
1019
 
@@ -1102,37 +1022,37 @@ var import_mui_layout2 = require("@availity/mui-layout");
1102
1022
 
1103
1023
  // ../list/src/lib/List.tsx
1104
1024
  var import_List = __toESM(require("@mui/material/List"));
1105
- var import_jsx_runtime19 = require("react/jsx-runtime");
1025
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1106
1026
 
1107
1027
  // ../list/src/lib/ListItem.tsx
1108
1028
  var import_ListItem = __toESM(require("@mui/material/ListItem"));
1109
- var import_react7 = require("react");
1110
- var import_jsx_runtime20 = require("react/jsx-runtime");
1111
- var ListItem = (0, import_react7.forwardRef)((props, ref) => {
1112
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ListItem.default, __spreadProps(__spreadValues({}, props), { ref }));
1029
+ var import_react6 = require("react");
1030
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1031
+ var ListItem = (0, import_react6.forwardRef)((props, ref) => {
1032
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ListItem.default, __spreadProps(__spreadValues({}, props), { ref }));
1113
1033
  });
1114
1034
 
1115
1035
  // ../list/src/lib/ListItemAvatar.tsx
1116
1036
  var import_ListItemAvatar = __toESM(require("@mui/material/ListItemAvatar"));
1117
- var import_jsx_runtime21 = require("react/jsx-runtime");
1037
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1118
1038
 
1119
1039
  // ../list/src/lib/ListItemButton.tsx
1120
1040
  var import_ListItemButton = __toESM(require("@mui/material/ListItemButton"));
1121
- var import_react8 = require("react");
1122
- var import_jsx_runtime22 = require("react/jsx-runtime");
1123
- var ListItemButton = (0, import_react8.forwardRef)((props, ref) => {
1124
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ListItemButton.default, __spreadProps(__spreadValues({}, props), { ref }));
1041
+ var import_react7 = require("react");
1042
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1043
+ var ListItemButton = (0, import_react7.forwardRef)((props, ref) => {
1044
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ListItemButton.default, __spreadProps(__spreadValues({}, props), { ref }));
1125
1045
  });
1126
1046
 
1127
1047
  // ../list/src/lib/ListItemIcon.tsx
1128
1048
  var import_ListItemIcon = __toESM(require("@mui/material/ListItemIcon"));
1129
- var import_jsx_runtime23 = require("react/jsx-runtime");
1049
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1130
1050
 
1131
1051
  // ../list/src/lib/ListItemStatusCard.tsx
1132
- var import_react9 = require("react");
1052
+ var import_react8 = require("react");
1133
1053
  var import_styles3 = require("@mui/material/styles");
1134
1054
  var import_ListItem2 = __toESM(require("@mui/material/ListItem"));
1135
- var import_jsx_runtime24 = require("react/jsx-runtime");
1055
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1136
1056
  var ListItemStatusCardSlot = (0, import_styles3.styled)(import_ListItem2.default, {
1137
1057
  name: "AvListItemStatusCard",
1138
1058
  slot: "root",
@@ -1167,30 +1087,31 @@ var StatusAccent = (0, import_styles3.styled)("div", {
1167
1087
  borderBottomLeftRadius: "3px",
1168
1088
  content: "''"
1169
1089
  }));
1170
- var ListItemStatusCard = (0, import_react9.forwardRef)((props, ref) => {
1090
+ var ListItemStatusCard = (0, import_react8.forwardRef)((props, ref) => {
1171
1091
  const _a = props, { alignItems = "flex-start", children, color } = _a, rest = __objRest(_a, ["alignItems", "children", "color"]);
1172
1092
  const themeProps = (0, import_styles3.useThemeProps)({ props, name: "AvListItemStatusCard" });
1173
1093
  const ownerState = __spreadProps(__spreadValues({}, themeProps), { color });
1174
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ListItemStatusCardSlot, __spreadProps(__spreadValues({ alignItems, divider: false, ownerState }, rest), { ref, children: [
1175
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StatusAccent, { className: "AvListItemStatusCard-statusAccent" }),
1094
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ListItemStatusCardSlot, __spreadProps(__spreadValues({ alignItems, divider: false, ownerState }, rest), { ref, children: [
1095
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusAccent, { className: "AvListItemStatusCard-statusAccent" }),
1176
1096
  children
1177
1097
  ] }));
1178
1098
  });
1179
1099
 
1180
1100
  // ../list/src/lib/ListItemText.tsx
1181
1101
  var import_ListItemText = __toESM(require("@mui/material/ListItemText"));
1182
- var import_jsx_runtime25 = require("react/jsx-runtime");
1102
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1183
1103
  var ListItemText = (_a) => {
1184
1104
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
1185
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ListItemText.default, __spreadProps(__spreadValues({}, rest), { children }));
1105
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ListItemText.default, __spreadProps(__spreadValues({}, rest), { children }));
1186
1106
  };
1187
1107
 
1188
1108
  // ../list/src/lib/ListSubheader.tsx
1189
1109
  var import_ListSubheader = __toESM(require("@mui/material/ListSubheader"));
1190
- var import_jsx_runtime26 = require("react/jsx-runtime");
1110
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1191
1111
 
1192
1112
  // src/lib/SpacesLink/SpacesLink.tsx
1193
1113
  var import_react_markdown2 = __toESM(require("react-markdown"));
1114
+ var import_styles4 = require("@mui/material/styles");
1194
1115
 
1195
1116
  // src/lib/SpacesLink/useLink.tsx
1196
1117
  var import_hooks = require("@availity/hooks");
@@ -1333,7 +1254,11 @@ var useLink = (spaceOrSpaceId, options) => {
1333
1254
  };
1334
1255
 
1335
1256
  // src/lib/SpacesLink/SpacesLink.tsx
1336
- var import_jsx_runtime27 = require("react/jsx-runtime");
1257
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1258
+ var SpacesLinkContainer = (0, import_styles4.styled)(import_mui_layout2.Box, { name: "AvSpacesLink", slot: "root" })({});
1259
+ var DateInfo = (0, import_styles4.styled)(import_mui_layout2.Grid, { name: "AvSpacesLink", slot: "AvDateInfo" })({});
1260
+ var SpacesLinkFavoriteHeart = (0, import_styles4.styled)(import_mui_layout2.Grid, { name: "AvSpacesLink", slot: "AvFavoriteHeart" })({});
1261
+ var IconLink = (0, import_styles4.styled)(import_Link.default, { name: "AvSpacesLink", slot: "IconLink" })({});
1337
1262
  var getDisplayDate = (date) => (0, import_dayjs2.default)(date).format("MM/DD/YYYY");
1338
1263
  var getContainerTag = (propTag, variant) => {
1339
1264
  if (variant && variant !== "default")
@@ -1347,8 +1272,8 @@ var getBodyTag = (propTag, variant) => {
1347
1272
  };
1348
1273
  var getTitleTag = (propTag, variant) => {
1349
1274
  if (variant && variant !== "default")
1350
- return { card: CardHeader, list: import_mui_typography3.Typography }[variant];
1351
- return propTag || "div";
1275
+ return import_Link.default;
1276
+ return propTag || import_Link.default;
1352
1277
  };
1353
1278
  var getTextTag = (propTag, variant) => {
1354
1279
  if (variant && variant !== "default")
@@ -1362,7 +1287,7 @@ var SpacesLink = (_a) => {
1362
1287
  className,
1363
1288
  children,
1364
1289
  favorite,
1365
- icon,
1290
+ icon: FileIcon,
1366
1291
  showName = true,
1367
1292
  showNew,
1368
1293
  showDate,
@@ -1420,21 +1345,21 @@ var SpacesLink = (_a) => {
1420
1345
  const isLoading = loading || propsLoading;
1421
1346
  const [linkSpace, props] = useLink(propSpace || spaceId, { clientId: propsClientId, linkAttributes });
1422
1347
  const showUrl = !(linkSpace == null ? void 0 : linkSpace.isGhosted) && ((_a2 = linkSpace == null ? void 0 : linkSpace.link) == null ? void 0 : _a2.url);
1423
- const favoriteIcon = (0, import_react10.useMemo)(
1424
- () => (linkSpace == null ? void 0 : linkSpace.configurationId) && favorite && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1348
+ const favoriteIcon = (0, import_react9.useMemo)(
1349
+ () => (linkSpace == null ? void 0 : linkSpace.configurationId) && favorite && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SpacesLinkFavoriteHeart, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1425
1350
  FavoriteHeart,
1426
1351
  {
1427
1352
  id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1428
1353
  name: linkSpace == null ? void 0 : linkSpace.name,
1429
1354
  onChange: (_, e) => e.stopPropagation()
1430
1355
  }
1431
- ),
1356
+ ) }),
1432
1357
  [favorite, linkSpace == null ? void 0 : linkSpace.configurationId, linkSpace == null ? void 0 : linkSpace.name, idPrefix]
1433
1358
  );
1434
- const dateInfo = (0, import_react10.useMemo)(
1435
- () => (showNew || showDate) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_mui_layout2.Grid, { textAlign: stacked ? "center" : "inherit", children: [
1436
- showNew && (linkSpace == null ? void 0 : linkSpace.isNew) && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Chip, { id: `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}`, label: "New!" }),
1437
- showDate && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1359
+ const dateInfo = (0, import_react9.useMemo)(
1360
+ () => (showNew || showDate) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DateInfo, { textAlign: stacked ? "center" : "right", children: [
1361
+ showNew && (linkSpace == null ? void 0 : linkSpace.isNew) && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StatusChip, { id: `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}`, label: "New!", color: "secondary" }),
1362
+ showDate && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1438
1363
  import_mui_typography3.Typography,
1439
1364
  {
1440
1365
  id: `${idPrefix}app-date-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
@@ -1446,13 +1371,13 @@ var SpacesLink = (_a) => {
1446
1371
  ] }),
1447
1372
  [linkSpace == null ? void 0 : linkSpace.activeDate, linkSpace == null ? void 0 : linkSpace.isNew, showDate, showNew, stacked, linkSpace == null ? void 0 : linkSpace.configurationId, idPrefix]
1448
1373
  );
1449
- const customBadgeDisplay = (0, import_react10.useMemo)(
1450
- () => customBadgeText && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1374
+ const customBadgeDisplay = (0, import_react9.useMemo)(
1375
+ () => customBadgeText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1451
1376
  import_mui_layout2.Box,
1452
1377
  {
1453
1378
  textAlign: stacked ? "center" : "inherit",
1454
- marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 2 : void 0,
1455
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1379
+ marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 1 : void 0,
1380
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1456
1381
  StatusChip,
1457
1382
  {
1458
1383
  color: customBadgeColor || "info",
@@ -1475,7 +1400,7 @@ var SpacesLink = (_a) => {
1475
1400
  ]
1476
1401
  );
1477
1402
  if (isLoading) {
1478
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CircularProgress, __spreadValues({ id: `${idPrefix}app-${linkSpace == null ? void 0 : linkSpace.configurationId}-loading` }, rest));
1403
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CircularProgress, __spreadValues({ id: `${idPrefix}app-${linkSpace == null ? void 0 : linkSpace.configurationId}-loading` }, rest));
1479
1404
  }
1480
1405
  const Tag = getContainerTag(tag, variant);
1481
1406
  const BodyTag = getBodyTag(bodyTag, variant);
@@ -1483,7 +1408,7 @@ var SpacesLink = (_a) => {
1483
1408
  const TextTag = getTextTag(textTag, variant);
1484
1409
  const renderChildren = () => {
1485
1410
  if (children) {
1486
- return isFunction(children) ? (() => children(__spreadValues(__spreadValues(__spreadValues({}, linkSpace), analytics), props)))() : (0, import_react10.cloneElement)(children, __spreadValues(__spreadValues({
1411
+ return isFunction(children) ? (() => children(__spreadValues(__spreadValues(__spreadValues({}, linkSpace), analytics), props)))() : (0, import_react9.cloneElement)(children, __spreadValues(__spreadValues({
1487
1412
  role: "link",
1488
1413
  tabIndex: 0,
1489
1414
  style: { cursor: showUrl ? "pointer" : "not-allowed" },
@@ -1491,63 +1416,85 @@ var SpacesLink = (_a) => {
1491
1416
  }, analytics), props));
1492
1417
  }
1493
1418
  };
1494
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1495
- Tag,
1419
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1420
+ SpacesLinkContainer,
1496
1421
  __spreadProps(__spreadValues({
1422
+ component: Tag,
1497
1423
  title: linkSpace == null ? void 0 : linkSpace.name,
1498
1424
  className
1499
1425
  }, rest), {
1500
1426
  style: __spreadValues({}, style),
1501
1427
  role: variant === "list" ? "listitem" : role,
1502
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BodyTag, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_mui_layout2.Grid, { alignItems: !showDescription || stacked ? "center" : "start", direction: stacked ? "column" : "row", children: [
1503
- !stacked && favoriteIcon,
1504
- icon && (linkSpace == null ? void 0 : linkSpace.url) && ((_b2 = linkSpace == null ? void 0 : linkSpace.type) == null ? void 0 : _b2.toUpperCase()) === "FILE" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Link, { target: "_blank", href: linkSpace == null ? void 0 : linkSpace.url, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_mui_icon4.FileIcon, { "data-testid": "icon" }) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_mui_icon4.NavigateTopIcon, { "data-testid": "icon" }),
1505
- children ? renderChildren() : body && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_mui_layout2.Grid, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, children: [
1506
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1507
- import_mui_layout2.Box,
1508
- {
1509
- marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1510
- paddingTop: stacked ? 3 : void 0,
1511
- textAlign: stacked ? "center" : void 0,
1512
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1513
- TitleTag,
1514
- __spreadProps(__spreadValues(__spreadValues({
1515
- id: `${idPrefix}app-title-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1516
- className: titleClassName,
1517
- tabIndex: 0,
1428
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BodyTag, { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1429
+ import_mui_layout2.Grid,
1430
+ {
1431
+ alignItems: !showDescription || stacked ? "center" : "start",
1432
+ direction: stacked ? "column" : "row",
1433
+ container: true,
1434
+ flexWrap: "nowrap",
1435
+ children: [
1436
+ !stacked && favoriteIcon,
1437
+ FileIcon && (linkSpace == null ? void 0 : linkSpace.url) && ((_b2 = linkSpace == null ? void 0 : linkSpace.type) == null ? void 0 : _b2.toUpperCase()) === "FILE" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1438
+ IconLink,
1439
+ {
1440
+ target: "_blank",
1441
+ href: linkSpace == null ? void 0 : linkSpace.url,
1442
+ role: "link",
1443
+ "aria-labelledby": `${idPrefix}app-title-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1444
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FileIcon, { "data-testid": "icon" })
1445
+ }
1446
+ ) : null,
1447
+ children ? renderChildren() : body && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_mui_layout2.Grid, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, flexGrow: 1, children: [
1448
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1449
+ import_mui_layout2.Box,
1450
+ {
1451
+ marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1452
+ paddingTop: stacked ? 3 : void 0,
1453
+ textAlign: stacked ? "center" : void 0,
1454
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1455
+ TitleTag,
1456
+ __spreadProps(__spreadValues(__spreadValues({
1457
+ id: `${idPrefix}app-title-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1458
+ className: titleClassName,
1459
+ tabIndex: 0,
1460
+ style: {
1461
+ cursor: showUrl ? "pointer" : "not-allowed"
1462
+ }
1463
+ }, analytics), props), {
1464
+ role: showUrl ? "link" : role,
1465
+ "aria-label": linkSpace == null ? void 0 : linkSpace.name,
1466
+ "aria-describedby": showNew && (linkSpace == null ? void 0 : linkSpace.isNew) ? `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}` : void 0,
1467
+ variant: variant === "list" ? "h5" : "h6",
1468
+ title: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0,
1469
+ children: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0
1470
+ })
1471
+ )
1472
+ }
1473
+ ),
1474
+ stacked && dateInfo,
1475
+ showDescription && (linkSpace == null ? void 0 : linkSpace.description) && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1476
+ TextTag,
1477
+ {
1478
+ component: "div",
1518
1479
  style: {
1519
- cursor: showUrl ? "pointer" : "not-allowed"
1520
- }
1521
- }, analytics), props), {
1522
- role: showUrl ? "link" : role,
1523
- "aria-label": linkSpace == null ? void 0 : linkSpace.name,
1524
- "aria-describedby": showNew && (linkSpace == null ? void 0 : linkSpace.isNew) ? `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}` : void 0,
1525
- variant: variant === "list" ? "h5" : "h6",
1526
- title: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0,
1527
- children: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0
1528
- })
1529
- )
1530
- }
1531
- ),
1532
- stacked && dateInfo,
1533
- showDescription && (linkSpace == null ? void 0 : linkSpace.description) && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1534
- TextTag,
1535
- {
1536
- marginTop: 1,
1537
- textAlign: stacked ? "center" : void 0,
1538
- overflow: "hidden",
1539
- whiteSpace: maxDescriptionWidth ? "nowrap" : void 0,
1540
- width: maxDescriptionWidth,
1541
- textOverflow: "ellipsis",
1542
- id: `${idPrefix}app-description-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1543
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_markdown2.default, { className: "Card-text", children: linkSpace == null ? void 0 : linkSpace.description })
1544
- }
1545
- ),
1546
- variant === "card" && customBadgeDisplay
1547
- ] }),
1548
- variant !== "card" && customBadgeDisplay,
1549
- !stacked && dateInfo
1550
- ] }) })
1480
+ marginTop: ".5rem",
1481
+ textAlign: stacked ? "center" : void 0,
1482
+ overflow: "hidden",
1483
+ whiteSpace: maxDescriptionWidth ? "nowrap" : void 0,
1484
+ width: maxDescriptionWidth,
1485
+ textOverflow: "ellipsis"
1486
+ },
1487
+ id: `${idPrefix}app-description-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1488
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_markdown2.default, { children: linkSpace == null ? void 0 : linkSpace.description })
1489
+ }
1490
+ ),
1491
+ variant === "card" && customBadgeDisplay
1492
+ ] }),
1493
+ variant !== "card" && customBadgeDisplay,
1494
+ !stacked && dateInfo
1495
+ ]
1496
+ }
1497
+ ) })
1551
1498
  })
1552
1499
  );
1553
1500
  };
@@ -1555,14 +1502,14 @@ var SpacesLink = (_a) => {
1555
1502
  // src/lib/SpacesAgreement.tsx
1556
1503
  var import_mui_typography4 = require("@availity/mui-typography");
1557
1504
  var import_react_markdown3 = __toESM(require("react-markdown"));
1558
- var import_jsx_runtime28 = require("react/jsx-runtime");
1505
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1559
1506
  var SpacesAgreement = ({ spaceId, markdown = false, id: elementId }) => {
1560
1507
  const spaces = useSpaces(spaceId);
1561
1508
  if (spaces && spaces.length > 0) {
1562
1509
  const { description: agreement, id } = spaces[0];
1563
1510
  if (agreement) {
1564
- const children = markdown ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_markdown3.default, { children: agreement }) : agreement;
1565
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_mui_typography4.Typography, { variant: "agreement", id: elementId || `spaces-agreement-${spaceId || id}`, children });
1511
+ const children = markdown ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_markdown3.default, { children: agreement }) : agreement;
1512
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_mui_typography4.Typography, { variant: "agreement", id: elementId || `spaces-agreement-${spaceId || id}`, children });
1566
1513
  }
1567
1514
  }
1568
1515
  return null;
@@ -1571,7 +1518,7 @@ var SpacesAgreement = ({ spaceId, markdown = false, id: elementId }) => {
1571
1518
  // src/lib/SpacesDisclaimer.tsx
1572
1519
  var import_mui_disclaimer = require("@availity/mui-disclaimer");
1573
1520
  var import_react_markdown4 = __toESM(require("react-markdown"));
1574
- var import_jsx_runtime29 = require("react/jsx-runtime");
1521
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1575
1522
  var SpacesDisclaimer = (_a) => {
1576
1523
  var _b = _a, {
1577
1524
  accent = true,
@@ -1588,8 +1535,8 @@ var SpacesDisclaimer = (_a) => {
1588
1535
  if (spaces && spaces.length > 0) {
1589
1536
  const { description: disclaimer, id } = spaces[0];
1590
1537
  if (disclaimer) {
1591
- const children = markdown ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_markdown4.default, { children: disclaimer }) : disclaimer;
1592
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1538
+ const children = markdown ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_markdown4.default, { children: disclaimer }) : disclaimer;
1539
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1593
1540
  import_mui_disclaimer.Disclaimer,
1594
1541
  __spreadValues({
1595
1542
  accent,
@@ -1603,14 +1550,14 @@ var SpacesDisclaimer = (_a) => {
1603
1550
  };
1604
1551
 
1605
1552
  // src/lib/SpacesGhostText.tsx
1606
- var import_jsx_runtime30 = require("react/jsx-runtime");
1553
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1607
1554
  var SpacesGhostText = (_a) => {
1608
1555
  var _b = _a, { spaceId, id } = _b, props = __objRest(_b, ["spaceId", "id"]);
1609
1556
  var _a2;
1610
1557
  const spaces = useSpaces(spaceId);
1611
1558
  const space = spaces == null ? void 0 : spaces[0];
1612
1559
  if (space == null ? void 0 : space.isGhosted) {
1613
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("small", __spreadProps(__spreadValues({ id: id || `app-ghost-text-${spaceId}` }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("em", { children: (_a2 = space == null ? void 0 : space.meta) == null ? void 0 : _a2.ghostText }) }));
1560
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("small", __spreadProps(__spreadValues({ id: id || `app-ghost-text-${spaceId}` }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("em", { children: (_a2 = space == null ? void 0 : space.meta) == null ? void 0 : _a2.ghostText }) }));
1614
1561
  }
1615
1562
  return null;
1616
1563
  };