@availity/mui-spaces 0.3.3 → 0.3.5

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.mjs CHANGED
@@ -51,7 +51,7 @@ var __async = (__this, __arguments, generator) => {
51
51
  };
52
52
 
53
53
  // src/lib/Spaces.tsx
54
- import { createContext as createContext2, useContext as useContext2, useReducer as useReducer2, useEffect as useEffect3 } from "react";
54
+ import { createContext as createContext2, useContext as useContext2, useReducer as useReducer2, useEffect as useEffect2 } from "react";
55
55
  import { useQueries } from "@tanstack/react-query";
56
56
 
57
57
  // src/lib/spaces-data.tsx
@@ -303,74 +303,12 @@ var updateTopApps = (space, akaname) => __async(void 0, null, function* () {
303
303
  });
304
304
 
305
305
  // src/lib/modals/DisclaimerModal.tsx
306
- import { useState as useState2, useEffect as useEffect2 } from "react";
306
+ import { useState, useEffect } from "react";
307
307
  import { avWebQLApi as avWebQLApi2 } from "@availity/api-axios";
308
308
  import ReactMarkdown from "react-markdown";
309
-
310
- // ../progress/src/lib/CircularProgress.tsx
311
- import { useEffect, useState } from "react";
312
- import {
313
- default as MuiCircularProgress
314
- } from "@mui/material/CircularProgress";
315
- import Stack from "@mui/material/Stack";
316
- import { SuccessCircleIcon, WarningCircleIcon } from "@availity/mui-icon";
317
- import { Typography } from "@availity/mui-typography";
318
- import { jsx, jsxs } from "react/jsx-runtime";
319
- var StatusIcon = ({ status, size }) => {
320
- const fontSize = size === "small" ? "medium" : "large";
321
- switch (status) {
322
- case "error":
323
- return /* @__PURE__ */ jsx(WarningCircleIcon, { color: "error", fontSize, titleAccess: "loading error" });
324
- case "success":
325
- return /* @__PURE__ */ jsx(SuccessCircleIcon, { color: "success", fontSize, titleAccess: "loading successful" });
326
- default:
327
- return null;
328
- }
329
- };
330
- var getCaptionText = (status) => ({
331
- loading: "Loading",
332
- error: "Loading error",
333
- success: "Loading successful"
334
- })[status] || "";
335
- var CircularProgress = (_a) => {
336
- var _b = _a, {
337
- loadingCaption = true,
338
- error = false,
339
- success = false,
340
- size = "default"
341
- } = _b, props = __objRest(_b, [
342
- "loadingCaption",
343
- "error",
344
- "success",
345
- "size"
346
- ]);
347
- const [status, setStatus] = useState("loading");
348
- useEffect(() => {
349
- if (error) {
350
- setStatus("error");
351
- } else if (success) {
352
- setStatus("success");
353
- } else {
354
- setStatus("loading");
355
- }
356
- }, [error, success]);
357
- return /* @__PURE__ */ jsxs(Stack, { width: "fit-content", alignItems: "center", children: [
358
- status === "loading" ? /* @__PURE__ */ jsx(
359
- MuiCircularProgress,
360
- __spreadProps(__spreadValues({
361
- "aria-label": "Loading"
362
- }, props), {
363
- size: size === "small" ? 24 : 40,
364
- variant: "indeterminate"
365
- })
366
- ) : /* @__PURE__ */ jsx(StatusIcon, { status, size }),
367
- /* @__PURE__ */ jsx(Typography, { marginTop: "8px", variant: "caption", children: loadingCaption || error || success ? getCaptionText(status) : null })
368
- ] });
369
- };
370
-
371
- // src/lib/modals/DisclaimerModal.tsx
309
+ import { CircularProgress } from "@availity/mui-progress";
372
310
  import { DialogContent } from "@availity/mui-dialog";
373
- import { jsx as jsx2 } from "react/jsx-runtime";
311
+ import { jsx } from "react/jsx-runtime";
374
312
  var disclaimerQuery = `query disclaimerFindOne($id: ID!) {
375
313
  configurationFindOne(id: $id) {
376
314
  ... on Text {
@@ -379,8 +317,8 @@ var disclaimerQuery = `query disclaimerFindOne($id: ID!) {
379
317
  }
380
318
  }`;
381
319
  var DisclaimerModal = ({ disclaimerId }) => {
382
- const [disclaimer, setDisclaimer] = useState2("");
383
- useEffect2(() => {
320
+ const [disclaimer, setDisclaimer] = useState("");
321
+ useEffect(() => {
384
322
  const fetchDisclaimer = () => __async(void 0, null, function* () {
385
323
  if (disclaimerId) {
386
324
  const result = yield avWebQLApi2.create({ query: disclaimerQuery, variables: { id: disclaimerId } });
@@ -389,17 +327,18 @@ var DisclaimerModal = ({ disclaimerId }) => {
389
327
  });
390
328
  fetchDisclaimer();
391
329
  }, [disclaimerId]);
392
- return /* @__PURE__ */ jsx2(DialogContent, { children: disclaimer ? /* @__PURE__ */ jsx2(ReactMarkdown, { children: disclaimer }) : /* @__PURE__ */ jsx2(CircularProgress, {}) });
330
+ return /* @__PURE__ */ jsx(DialogContent, { children: disclaimer ? /* @__PURE__ */ jsx(ReactMarkdown, { children: disclaimer }) : /* @__PURE__ */ jsx(CircularProgress, {}) });
393
331
  };
394
332
 
395
333
  // src/lib/modals/MultiPayerModal.tsx
396
334
  import { DialogContent as DialogContent2 } from "@availity/mui-dialog";
397
335
  import { Grid, Box } from "@availity/mui-layout";
398
- import { Typography as Typography2 } from "@availity/mui-typography";
336
+ import { Typography } from "@availity/mui-typography";
399
337
 
400
338
  // src/lib/SpacesImage.tsx
339
+ import { CircularProgress as CircularProgress2 } from "@availity/mui-progress";
401
340
  import { Img } from "react-image";
402
- import { jsx as jsx3 } from "react/jsx-runtime";
341
+ import { jsx as jsx2 } from "react/jsx-runtime";
403
342
  var SpacesImage = (_a) => {
404
343
  var _b = _a, { spaceId, payerId, imageType = "url", fallback } = _b, props = __objRest(_b, ["spaceId", "payerId", "imageType", "fallback"]);
405
344
  var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k;
@@ -421,29 +360,29 @@ var SpacesImage = (_a) => {
421
360
  };
422
361
  let url = imageMap[imageType];
423
362
  if (!url && loading) {
424
- return /* @__PURE__ */ jsx3(CircularProgress, { id: `app-${id}-loading` });
363
+ return /* @__PURE__ */ jsx2(CircularProgress2, { id: `app-${id}-loading` });
425
364
  }
426
365
  if (!url && !loading && fallback) {
427
366
  url = fallback;
428
367
  }
429
368
  if (!url || !id)
430
369
  return null;
431
- return /* @__PURE__ */ jsx3(
370
+ return /* @__PURE__ */ jsx2(
432
371
  Img,
433
372
  __spreadValues({
434
373
  id: props.id || `app-img-${id}`,
435
374
  src: url,
436
375
  alt: `Space ${imageType}`,
437
- loader: /* @__PURE__ */ jsx3(CircularProgress, { id: `app-img-${id}-loading` })
376
+ loader: /* @__PURE__ */ jsx2(CircularProgress2, { id: `app-img-${id}-loading` })
438
377
  }, props)
439
378
  );
440
379
  };
441
380
 
442
381
  // src/lib/modals/MultiPayerModal.tsx
443
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
444
- var MultiPayerModal = ({ parentPayerSpaces, name, state: { selectedOption }, setState }) => /* @__PURE__ */ jsxs2(DialogContent2, { children: [
445
- /* @__PURE__ */ jsx4(Typography2, { children: `Open ${name} as: ${selectedOption ? selectedOption.name || selectedOption.id : ""}` }),
446
- /* @__PURE__ */ jsx4(Grid, { direction: "row", children: parentPayerSpaces && parentPayerSpaces.map((payerSpace) => /* @__PURE__ */ jsx4(Box, { onClick: () => setState({ selectedOption: payerSpace }), children: /* @__PURE__ */ jsx4(SpacesImage, { spaceId: payerSpace.configurationId, imageType: "images.tile" }) })) })
382
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
383
+ var MultiPayerModal = ({ parentPayerSpaces, name, state: { selectedOption }, setState }) => /* @__PURE__ */ jsxs(DialogContent2, { children: [
384
+ /* @__PURE__ */ jsx3(Typography, { children: `Open ${name} as: ${selectedOption ? selectedOption.name || selectedOption.id : ""}` }),
385
+ /* @__PURE__ */ jsx3(Grid, { direction: "row", children: parentPayerSpaces && parentPayerSpaces.map((payerSpace) => /* @__PURE__ */ jsx3(Box, { onClick: () => setState({ selectedOption: payerSpace }), children: /* @__PURE__ */ jsx3(SpacesImage, { spaceId: payerSpace.configurationId, imageType: "images.tile" }) })) })
447
386
  ] });
448
387
 
449
388
  // src/lib/modals/modal-types.tsx
@@ -451,7 +390,7 @@ var isModalOptions = (action) => action.spaceType !== void 0;
451
390
  var isModalState = (action) => action.selectedOption !== void 0;
452
391
 
453
392
  // src/lib/modals/ModalProvider.tsx
454
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
393
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
455
394
  var MODAL_INITIAL_STATE = {
456
395
  isOpen: false,
457
396
  modalOptions: void 0,
@@ -535,23 +474,23 @@ var ModalProvider = ({ children }) => {
535
474
  const toggle = () => dispatch({ type: "RESET" });
536
475
  const buttonProps = (selectedModal == null ? void 0 : selectedModal.buttonProps) && (selectedModal == null ? void 0 : selectedModal.buttonProps(__spreadProps(__spreadValues({}, modalState), { modalOptions })));
537
476
  const Body = selectedModal == null ? void 0 : selectedModal.body;
538
- return /* @__PURE__ */ jsxs3(
477
+ return /* @__PURE__ */ jsxs2(
539
478
  ModalContext.Provider,
540
479
  {
541
480
  value: (modalType, modalOptions2) => dispatch(__spreadValues({ type: `OPEN_${modalType}` }, modalOptions2)),
542
481
  children: [
543
- /* @__PURE__ */ jsxs3(Dialog, { open: isOpen, children: [
544
- /* @__PURE__ */ jsx5(DialogTitle, { id: "disclaimer-header", children: modalOptions == null ? void 0 : modalOptions.title }),
545
- Body && /* @__PURE__ */ jsx5(
482
+ /* @__PURE__ */ jsxs2(Dialog, { open: isOpen, children: [
483
+ /* @__PURE__ */ jsx4(DialogTitle, { id: "disclaimer-header", children: modalOptions == null ? void 0 : modalOptions.title }),
484
+ Body && /* @__PURE__ */ jsx4(
546
485
  Body,
547
486
  __spreadProps(__spreadValues({}, modalOptions), {
548
487
  setState: (newState) => dispatch(__spreadValues({ type: "UPDATE_MODAL_STATE" }, newState)),
549
488
  state: modalState
550
489
  })
551
490
  ),
552
- /* @__PURE__ */ jsxs3(DialogActions, { children: [
553
- /* @__PURE__ */ jsx5(Button, { onClick: toggle, children: "Cancel" }),
554
- /* @__PURE__ */ jsx5(
491
+ /* @__PURE__ */ jsxs2(DialogActions, { children: [
492
+ /* @__PURE__ */ jsx4(Button, { onClick: toggle, children: "Cancel" }),
493
+ /* @__PURE__ */ jsx4(
555
494
  Button,
556
495
  __spreadProps(__spreadValues({
557
496
  color: "primary"
@@ -584,7 +523,7 @@ var ModalProvider = ({ children }) => {
584
523
  };
585
524
 
586
525
  // src/lib/Spaces.tsx
587
- import { jsx as jsx6 } from "react/jsx-runtime";
526
+ import { jsx as jsx5 } from "react/jsx-runtime";
588
527
  var INITIAL_STATE = {
589
528
  loading: true
590
529
  };
@@ -658,7 +597,7 @@ var Spaces = ({
658
597
  }
659
598
  ]
660
599
  });
661
- useEffect3(() => {
600
+ useEffect2(() => {
662
601
  if (isErrorByPayerIds || isErrorBySpaceIds) {
663
602
  dispatch({
664
603
  type: "ERROR",
@@ -667,7 +606,7 @@ var Spaces = ({
667
606
  });
668
607
  }
669
608
  }, [isErrorByPayerIds, isErrorBySpaceIds]);
670
- useEffect3(() => {
609
+ useEffect2(() => {
671
610
  dispatch({
672
611
  type: "LOADING",
673
612
  loading: true
@@ -734,7 +673,7 @@ var Spaces = ({
734
673
  return isReactNodeFunction(children) ? (() => children({ spaces: [spacesMap.values()], loading, error }))() : children;
735
674
  }
736
675
  };
737
- return /* @__PURE__ */ jsx6(
676
+ return /* @__PURE__ */ jsx5(
738
677
  SpacesContext.Provider,
739
678
  {
740
679
  value: {
@@ -744,7 +683,7 @@ var Spaces = ({
744
683
  loading: loading || isLoadingByPayerIds || isLoadingBySpaceIds,
745
684
  error
746
685
  },
747
- children: /* @__PURE__ */ jsx6(ModalProvider, { children: spacesChildren() })
686
+ children: /* @__PURE__ */ jsx5(ModalProvider, { children: spacesChildren() })
748
687
  }
749
688
  );
750
689
  };
@@ -773,393 +712,24 @@ var useSpaces = (...ids) => {
773
712
 
774
713
  // src/lib/SpacesLink/SpacesLink.tsx
775
714
  import dayjs2 from "dayjs";
776
-
777
- // ../card/src/lib/Card.tsx
778
- import { default as MuiCard } from "@mui/material/Card";
779
- import { jsx as jsx7 } from "react/jsx-runtime";
780
- var Card = (_a) => {
781
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
782
- return /* @__PURE__ */ jsx7(MuiCard, __spreadProps(__spreadValues({}, rest), { children }));
783
- };
784
-
785
- // ../card/src/lib/CardActionArea.tsx
786
- import {
787
- default as MuiCardActionArea
788
- } from "@mui/material/CardActionArea";
789
- import { jsx as jsx8 } from "react/jsx-runtime";
790
-
791
- // ../card/src/lib/CardActions.tsx
792
- import { default as MuiCardActions } from "@mui/material/CardActions";
793
- import { jsx as jsx9 } from "react/jsx-runtime";
794
-
795
- // ../card/src/lib/CardContent.tsx
796
- import { default as MuiCardContent } from "@mui/material/CardContent";
797
- import { jsx as jsx10 } from "react/jsx-runtime";
798
- var CardContent = (_a) => {
799
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
800
- return /* @__PURE__ */ jsx10(MuiCardContent, __spreadProps(__spreadValues({}, rest), { children }));
801
- };
802
-
803
- // ../card/src/lib/CardHeader.tsx
804
- import { useTheme } from "@mui/material/styles";
805
- import { default as MuiCardHeader } from "@mui/material/CardHeader";
806
- import { jsx as jsx11 } from "react/jsx-runtime";
807
- var CardHeader = (_a) => {
808
- var _b = _a, {
809
- titleTypographyProps,
810
- subheaderTypographyProps
811
- } = _b, rest = __objRest(_b, [
812
- "titleTypographyProps",
813
- "subheaderTypographyProps"
814
- ]);
815
- var _a2, _b2, _c, _d;
816
- const theme = useTheme();
817
- 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;
818
- return /* @__PURE__ */ jsx11(
819
- MuiCardHeader,
820
- __spreadProps(__spreadValues({}, rest), {
821
- titleTypographyProps: __spreadValues({
822
- variant: titleVariant
823
- }, titleTypographyProps),
824
- subheaderTypographyProps: __spreadValues({ variant: "subtitle2" }, subheaderTypographyProps)
825
- })
826
- );
827
- };
828
-
829
- // ../card/src/lib/CardMedia.tsx
830
- import { default as MuiCardMedia } from "@mui/material/CardMedia";
831
- import { jsx as jsx12 } from "react/jsx-runtime";
832
-
833
- // src/lib/SpacesLink/SpacesLink.tsx
834
- import { Typography as Typography3 } from "@availity/mui-typography";
835
- import { NavigateTopIcon, FileIcon } from "@availity/mui-icon";
836
- import { useMemo as useMemo2, cloneElement } from "react";
837
-
838
- // ../chip/src/lib/Chip.tsx
839
- import { default as MuiChip } from "@mui/material/Chip";
840
- import { jsx as jsx13 } from "react/jsx-runtime";
841
- var Chip = (props) => {
842
- return /* @__PURE__ */ jsx13(MuiChip, __spreadProps(__spreadValues({}, props), { color: "default", size: "medium" }));
843
- };
844
-
845
- // ../chip/src/lib/StatusChip.tsx
846
- import { default as MuiChip2 } from "@mui/material/Chip";
847
- import { jsx as jsx14 } from "react/jsx-runtime";
848
- var StatusChip = (_a) => {
849
- var _b = _a, { color = "default" } = _b, rest = __objRest(_b, ["color"]);
850
- return /* @__PURE__ */ jsx14(MuiChip2, __spreadProps(__spreadValues({ color }, rest), { size: "small" }));
851
- };
852
-
853
- // ../link/src/lib/Link.tsx
854
- import { forwardRef } from "react";
855
- import { default as MuiLink } from "@mui/material/Link";
856
- import { OpenInNewIcon } from "@availity/mui-icon";
857
- import { jsx as jsx15, jsxs as jsxs4 } from "react/jsx-runtime";
858
- var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
859
- var WINDOWS_PATH_REGEX = /^[a-zA-Z]:\\/;
860
- function isAbsoluteUrl2(url) {
861
- if (WINDOWS_PATH_REGEX.test(url)) {
862
- return false;
863
- }
864
- return ABSOLUTE_URL_REGEX.test(url);
865
- }
866
- var getUrl2 = (url = "") => {
867
- return `/public/apps/home/#!/loadApp?appUrl=${encodeURIComponent(url)}`;
868
- };
869
- var getLocation = (href) => {
870
- const location = document.createElement("a");
871
- location.href = href;
872
- return location;
873
- };
874
- var setRel = (url, target, absolute) => {
875
- if (target === "_blank" && absolute) {
876
- const dest = getLocation(url);
877
- if (dest.hostname !== window.location.hostname) {
878
- return "noopener noreferrer";
879
- }
880
- }
881
- return void 0;
882
- };
883
- var Link = forwardRef((props, ref) => {
884
- const _a = props, { href, target = "_self", children, onClick, loadApp = true, rel, iconPosition = "start" } = _a, rest = __objRest(_a, ["href", "target", "children", "onClick", "loadApp", "rel", "iconPosition"]);
885
- const absolute = isAbsoluteUrl2(href);
886
- const encode = !(absolute || !loadApp);
887
- const url = encode ? getUrl2(href) : href;
888
- const NewWindowIcon = target === "_blank" ? /* @__PURE__ */ jsx15(OpenInNewIcon, {}) : null;
889
- const startIcon = iconPosition === "start";
890
- const endIcon = iconPosition === "end";
891
- return /* @__PURE__ */ jsx15(
892
- MuiLink,
893
- __spreadProps(__spreadValues({
894
- href: url,
895
- target,
896
- onClick: (event) => onClick && onClick(event, url),
897
- rel: rel || setRel(url, target, absolute)
898
- }, rest), {
899
- ref,
900
- children: /* @__PURE__ */ jsxs4("span", { children: [
901
- startIcon && NewWindowIcon,
902
- " ",
903
- children,
904
- " ",
905
- endIcon && NewWindowIcon
906
- ] })
907
- })
908
- );
909
- });
910
-
911
- // ../favorites/src/lib/Favorites.tsx
912
- import { createContext as createContext3, useContext as useContext3, useEffect as useEffect4, useState as useState3, useMemo } from "react";
913
- import { useQueryClient as useQueryClient2 } from "@tanstack/react-query";
914
- import avMessages2 from "@availity/message-core";
915
-
916
- // ../favorites/src/lib/utils.ts
917
- import avMessages from "@availity/message-core";
918
- import { avSettingsApi } from "@availity/api-axios";
919
- import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
920
-
921
- // ../favorites/src/lib/Favorites.tsx
922
- import { jsx as jsx16 } from "react/jsx-runtime";
923
- var FavoritesContext = createContext3(null);
924
- var noOp = () => {
925
- };
926
- var useFavorites = (id) => {
927
- const context = useContext3(FavoritesContext);
928
- if (context === null) {
929
- throw new Error("useFavorites must be used within a FavoritesProvider");
930
- }
931
- const { favorites, queryStatus, mutationStatus, lastClickedFavoriteId, deleteFavorite, addFavorite } = context;
932
- const isLastClickedFavorite = lastClickedFavoriteId === id;
933
- const isFavorited = useMemo(() => {
934
- const fav = favorites == null ? void 0 : favorites.find((f) => f.id === id);
935
- return !!fav;
936
- }, [favorites, id]);
937
- const toggleFavorite = () => isFavorited ? deleteFavorite(id) : addFavorite(id);
938
- const isDisabled = queryStatus === "loading" || queryStatus === "idle" || mutationStatus === "loading";
939
- let status = "initLoading";
940
- if (queryStatus === "loading")
941
- status = "initLoading";
942
- if (mutationStatus === "loading")
943
- status = "reloading";
944
- if (queryStatus === "error" || mutationStatus === "error")
945
- status = "error";
946
- if (queryStatus === "success" && (mutationStatus === "success" || mutationStatus === "idle"))
947
- status = "success";
948
- return {
949
- isFavorited,
950
- status,
951
- isLastClickedFavorite,
952
- toggleFavorite: isDisabled ? noOp : toggleFavorite
953
- };
954
- };
955
-
956
- // ../tooltip/src/lib/Tooltip.tsx
957
- import { default as MuiTooltip } from "@mui/material/Tooltip";
958
- import { jsx as jsx17 } from "react/jsx-runtime";
959
- var Tooltip = (props) => {
960
- const _a = props, { children, dangerouslySetTransitionTimer } = _a, rest = __objRest(_a, ["children", "dangerouslySetTransitionTimer"]);
961
- return /* @__PURE__ */ jsx17(
962
- MuiTooltip,
963
- __spreadProps(__spreadValues({}, rest), {
964
- TransitionProps: { timeout: dangerouslySetTransitionTimer !== void 0 ? dangerouslySetTransitionTimer : 100 },
965
- arrow: true,
966
- children
967
- })
968
- );
969
- };
970
-
971
- // ../favorites/src/lib/FavoriteHeart.tsx
972
- import { HeartIcon, HeartEmptyIcon } from "@availity/mui-icon";
973
- import { styled } from "@mui/material/styles";
974
- import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
975
- var icons = {
976
- spinner: /* @__PURE__ */ jsx18(CircularProgress, { "aria-hidden": true, size: "small", loadingCaption: false }),
977
- unknownDisabledHeart: /* @__PURE__ */ jsx18(HeartIcon, { "aria-hidden": true, color: "disabled" }),
978
- favoritedDisabledHeart: /* @__PURE__ */ jsx18(HeartIcon, { "aria-hidden": true, color: "error", opacity: "0.6" }),
979
- unfavoritedDisabledHeart: /* @__PURE__ */ jsx18(HeartEmptyIcon, { "aria-hidden": true, color: "disabled", opacity: "0.6" }),
980
- favoritedHeart: /* @__PURE__ */ jsx18(HeartIcon, { "aria-hidden": true, color: "error" }),
981
- unfavoritedHeart: /* @__PURE__ */ jsx18(HeartEmptyIcon, { "aria-hidden": true, color: "secondary" })
982
- };
983
- var FavoriteHeartContainer = styled("div", { name: "AvFavoriteHeart", slot: "root" })({});
984
- var FavoriteInput = styled("input", {
985
- name: "AvFavoriteHeart",
986
- slot: "input"
987
- })({});
988
- var FavoriteIcon = styled("div", {
989
- name: "AvFavoriteHeart",
990
- slot: "icon"
991
- })({});
992
- var FavoriteHeart = ({
993
- id,
994
- name,
995
- onChange,
996
- onMouseDown,
997
- disabled = false
998
- }) => {
999
- const { isFavorited, isLastClickedFavorite, status, toggleFavorite } = useFavorites(id);
1000
- const handleChange = (event) => {
1001
- onChange == null ? void 0 : onChange(isFavorited, event);
1002
- toggleFavorite();
1003
- };
1004
- const handleKeyPress = (event) => {
1005
- if (event.code === "Enter" || event.key === "Enter") {
1006
- onChange == null ? void 0 : onChange(isFavorited, event);
1007
- toggleFavorite();
1008
- }
1009
- };
1010
- const iconKey = (() => {
1011
- if (status === "initLoading")
1012
- return "unknownDisabledHeart";
1013
- if (status === "reloading") {
1014
- if (isLastClickedFavorite)
1015
- return "spinner";
1016
- return isFavorited ? "favoritedDisabledHeart" : "unfavoritedDisabledHeart";
1017
- }
1018
- if (disabled) {
1019
- return isFavorited ? "favoritedDisabledHeart" : "unfavoritedDisabledHeart";
1020
- }
1021
- if (isFavorited)
1022
- return "favoritedHeart";
1023
- return "unfavoritedHeart";
1024
- })();
1025
- const cursor = disabled || !isLastClickedFavorite && (status === "initLoading" || status === "reloading") ? "not-allowed" : void 0;
1026
- const tooltipContent = `${isFavorited ? "Remove from" : "Add to"} My Favorites`;
1027
- const favoriteInputProps = {
1028
- onKeyDown: handleKeyPress,
1029
- type: "checkbox",
1030
- "aria-label": `Favorite ${name}`,
1031
- id: `av-favorite-heart-${id}`,
1032
- disabled,
1033
- checked: isFavorited,
1034
- onChange: handleChange,
1035
- onMouseDown,
1036
- style: { cursor }
1037
- };
1038
- return /* @__PURE__ */ jsxs5(FavoriteHeartContainer, { children: [
1039
- /* @__PURE__ */ jsx18(FavoriteIcon, { children: icons[iconKey] }),
1040
- /* @__PURE__ */ jsx18(
1041
- "span",
1042
- {
1043
- style: {
1044
- position: "absolute",
1045
- width: "1px",
1046
- height: "1px",
1047
- padding: 0,
1048
- margin: "-1px",
1049
- overflow: "hidden",
1050
- clip: "rect(0,0,0,0)",
1051
- whiteSpace: "nowrap",
1052
- border: 0
1053
- },
1054
- "aria-live": isLastClickedFavorite && (status === "reloading" || status === "error") ? "polite" : "off",
1055
- children: isLastClickedFavorite && status === "reloading" ? "Loading..." : isLastClickedFavorite && status === "error" ? "An error has occurred. Please try again." : ""
1056
- }
1057
- ),
1058
- disabled ? /* @__PURE__ */ jsx18(FavoriteInput, __spreadValues({}, favoriteInputProps)) : /* @__PURE__ */ jsx18(Tooltip, { title: tooltipContent, placement: "top", children: /* @__PURE__ */ jsx18(FavoriteInput, __spreadValues({}, favoriteInputProps)) })
1059
- ] });
1060
- };
1061
-
1062
- // src/lib/SpacesLink/SpacesLink.tsx
715
+ import { Card, CardContent } from "@availity/mui-card";
716
+ import { Typography as Typography2 } from "@availity/mui-typography";
717
+ import { useMemo, cloneElement } from "react";
718
+ import { StatusChip } from "@availity/mui-chip";
719
+ import { CircularProgress as CircularProgress3 } from "@availity/mui-progress";
720
+ import Link from "@mui/material/Link";
721
+ import { FavoriteHeart } from "@availity/mui-favorites";
1063
722
  import { Grid as Grid2, Box as Box2 } from "@availity/mui-layout";
1064
-
1065
- // ../list/src/lib/List.tsx
1066
- import MuiList from "@mui/material/List";
1067
- import { jsx as jsx19 } from "react/jsx-runtime";
1068
-
1069
- // ../list/src/lib/ListItem.tsx
1070
- import MuiListItem from "@mui/material/ListItem";
1071
- import { forwardRef as forwardRef2 } from "react";
1072
- import { jsx as jsx20 } from "react/jsx-runtime";
1073
- var ListItem = forwardRef2((props, ref) => {
1074
- return /* @__PURE__ */ jsx20(MuiListItem, __spreadProps(__spreadValues({}, props), { ref }));
1075
- });
1076
-
1077
- // ../list/src/lib/ListItemAvatar.tsx
1078
- import MuiListItemAvatar from "@mui/material/ListItemAvatar";
1079
- import { jsx as jsx21 } from "react/jsx-runtime";
1080
-
1081
- // ../list/src/lib/ListItemButton.tsx
1082
- import MuiListItemButton from "@mui/material/ListItemButton";
1083
- import { forwardRef as forwardRef3 } from "react";
1084
- import { jsx as jsx22 } from "react/jsx-runtime";
1085
- var ListItemButton = forwardRef3((props, ref) => {
1086
- return /* @__PURE__ */ jsx22(MuiListItemButton, __spreadProps(__spreadValues({}, props), { ref }));
1087
- });
1088
-
1089
- // ../list/src/lib/ListItemIcon.tsx
1090
- import MuiListItemIcon from "@mui/material/ListItemIcon";
1091
- import { jsx as jsx23 } from "react/jsx-runtime";
1092
-
1093
- // ../list/src/lib/ListItemStatusCard.tsx
1094
- import { forwardRef as forwardRef4 } from "react";
1095
- import { styled as styled2, useThemeProps } from "@mui/material/styles";
1096
- import MuiListItem2 from "@mui/material/ListItem";
1097
- import { jsx as jsx24, jsxs as jsxs6 } from "react/jsx-runtime";
1098
- var ListItemStatusCardSlot = styled2(MuiListItem2, {
1099
- name: "AvListItemStatusCard",
1100
- slot: "root",
1101
- overridesResolver: (props, styles) => [styles.root, props.color && styles.color]
1102
- })(({ theme, ownerState }) => __spreadValues({
1103
- backgroundColor: theme.palette.background.paper,
1104
- border: `1px solid ${theme.palette.divider}`,
1105
- borderRadius: "4px",
1106
- marginBottom: "4px",
1107
- paddingLeft: "8px",
1108
- "&.MuiListItem-padding.MuiListItem-gutters": {
1109
- paddingLeft: "calc(16px + 8px)"
1110
- }
1111
- }, ownerState.color && ownerState.color !== "default" && {
1112
- ".AvListItemStatusCard-statusAccent": {
1113
- backgroundColor: `${theme.palette[ownerState.color].main}`
1114
- }
1115
- }));
1116
- var StatusAccent = styled2("div", {
1117
- name: "AvListItemStatusCard",
1118
- slot: "statusAccent",
1119
- overridesResolver: (props, styles) => [styles.statusAccent, props.color && styles.color]
1120
- })(({ theme }) => ({
1121
- position: "absolute",
1122
- left: 0,
1123
- top: 0,
1124
- height: "100%",
1125
- width: "8px",
1126
- backgroundColor: theme.palette.divider,
1127
- backgroundClip: "border-box",
1128
- borderTopLeftRadius: "3px",
1129
- borderBottomLeftRadius: "3px",
1130
- content: "''"
1131
- }));
1132
- var ListItemStatusCard = forwardRef4((props, ref) => {
1133
- const _a = props, { alignItems = "flex-start", children, color } = _a, rest = __objRest(_a, ["alignItems", "children", "color"]);
1134
- const themeProps = useThemeProps({ props, name: "AvListItemStatusCard" });
1135
- const ownerState = __spreadProps(__spreadValues({}, themeProps), { color });
1136
- return /* @__PURE__ */ jsxs6(ListItemStatusCardSlot, __spreadProps(__spreadValues({ alignItems, divider: false, ownerState }, rest), { ref, children: [
1137
- /* @__PURE__ */ jsx24(StatusAccent, { className: "AvListItemStatusCard-statusAccent" }),
1138
- children
1139
- ] }));
1140
- });
1141
-
1142
- // ../list/src/lib/ListItemText.tsx
1143
- import MuiListItemText from "@mui/material/ListItemText";
1144
- import { jsx as jsx25 } from "react/jsx-runtime";
1145
- var ListItemText = (_a) => {
1146
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
1147
- return /* @__PURE__ */ jsx25(MuiListItemText, __spreadProps(__spreadValues({}, rest), { children }));
1148
- };
1149
-
1150
- // ../list/src/lib/ListSubheader.tsx
1151
- import MuiListSubheader from "@mui/material/ListSubheader";
1152
- import { jsx as jsx26 } from "react/jsx-runtime";
1153
-
1154
- // src/lib/SpacesLink/SpacesLink.tsx
723
+ import { ListItem, ListItemText } from "@availity/mui-list";
1155
724
  import ReactMarkdown2 from "react-markdown";
725
+ import { styled } from "@mui/material/styles";
1156
726
 
1157
727
  // src/lib/SpacesLink/useLink.tsx
1158
728
  import { useCurrentUser } from "@availity/hooks";
1159
729
 
1160
730
  // src/lib/SpacesLink/linkHandlers.tsx
1161
731
  import nativeForm from "@availity/native-form";
1162
- import { isAbsoluteUrl as isAbsoluteUrl3 } from "@availity/resolve-url";
732
+ import { isAbsoluteUrl as isAbsoluteUrl2 } from "@availity/resolve-url";
1163
733
  var openLink = (space, params) => __async(void 0, null, function* () {
1164
734
  var _a, _b, _c;
1165
735
  if (!((_a = space == null ? void 0 : space.link) == null ? void 0 : _a.url)) {
@@ -1167,7 +737,7 @@ var openLink = (space, params) => __async(void 0, null, function* () {
1167
737
  }
1168
738
  if (params == null ? void 0 : params.akaname)
1169
739
  yield updateTopApps(space, params.akaname);
1170
- const url = !isAbsoluteUrl3(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;
740
+ 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;
1171
741
  const target = getTarget(space.link.target);
1172
742
  window.open(url, target);
1173
743
  });
@@ -1295,7 +865,11 @@ var useLink = (spaceOrSpaceId, options) => {
1295
865
  };
1296
866
 
1297
867
  // src/lib/SpacesLink/SpacesLink.tsx
1298
- import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
868
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
869
+ var SpacesLinkContainer = styled(Box2, { name: "AvSpacesLink", slot: "root" })({});
870
+ var DateInfo = styled(Grid2, { name: "AvSpacesLink", slot: "AvDateInfo" })({});
871
+ var SpacesLinkFavoriteHeart = styled(Grid2, { name: "AvSpacesLink", slot: "AvFavoriteHeart" })({});
872
+ var IconLink = styled(Link, { name: "AvSpacesLink", slot: "IconLink" })({});
1299
873
  var getDisplayDate = (date) => dayjs2(date).format("MM/DD/YYYY");
1300
874
  var getContainerTag = (propTag, variant) => {
1301
875
  if (variant && variant !== "default")
@@ -1309,12 +883,12 @@ var getBodyTag = (propTag, variant) => {
1309
883
  };
1310
884
  var getTitleTag = (propTag, variant) => {
1311
885
  if (variant && variant !== "default")
1312
- return { card: CardHeader, list: Typography3 }[variant];
1313
- return propTag || "div";
886
+ return Link;
887
+ return propTag || Link;
1314
888
  };
1315
889
  var getTextTag = (propTag, variant) => {
1316
890
  if (variant && variant !== "default")
1317
- return { card: Typography3, list: ListItemText }[variant];
891
+ return { card: Typography2, list: ListItemText }[variant];
1318
892
  return propTag || "div";
1319
893
  };
1320
894
  var SpacesLink = (_a) => {
@@ -1324,7 +898,7 @@ var SpacesLink = (_a) => {
1324
898
  className,
1325
899
  children,
1326
900
  favorite,
1327
- icon,
901
+ icon: FileIcon,
1328
902
  showName = true,
1329
903
  showNew,
1330
904
  showDate,
@@ -1382,22 +956,22 @@ var SpacesLink = (_a) => {
1382
956
  const isLoading = loading || propsLoading;
1383
957
  const [linkSpace, props] = useLink(propSpace || spaceId, { clientId: propsClientId, linkAttributes });
1384
958
  const showUrl = !(linkSpace == null ? void 0 : linkSpace.isGhosted) && ((_a2 = linkSpace == null ? void 0 : linkSpace.link) == null ? void 0 : _a2.url);
1385
- const favoriteIcon = useMemo2(
1386
- () => (linkSpace == null ? void 0 : linkSpace.configurationId) && favorite && /* @__PURE__ */ jsx27(
959
+ const favoriteIcon = useMemo(
960
+ () => (linkSpace == null ? void 0 : linkSpace.configurationId) && favorite && /* @__PURE__ */ jsx6(SpacesLinkFavoriteHeart, { children: /* @__PURE__ */ jsx6(
1387
961
  FavoriteHeart,
1388
962
  {
1389
963
  id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1390
964
  name: linkSpace == null ? void 0 : linkSpace.name,
1391
965
  onChange: (_, e) => e.stopPropagation()
1392
966
  }
1393
- ),
967
+ ) }),
1394
968
  [favorite, linkSpace == null ? void 0 : linkSpace.configurationId, linkSpace == null ? void 0 : linkSpace.name, idPrefix]
1395
969
  );
1396
- const dateInfo = useMemo2(
1397
- () => (showNew || showDate) && /* @__PURE__ */ jsxs7(Grid2, { textAlign: stacked ? "center" : "inherit", children: [
1398
- showNew && (linkSpace == null ? void 0 : linkSpace.isNew) && /* @__PURE__ */ jsx27(Chip, { id: `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}`, label: "New!" }),
1399
- showDate && /* @__PURE__ */ jsx27(
1400
- Typography3,
970
+ const dateInfo = useMemo(
971
+ () => (showNew || showDate) && /* @__PURE__ */ jsxs3(DateInfo, { textAlign: stacked ? "center" : "right", children: [
972
+ showNew && (linkSpace == null ? void 0 : linkSpace.isNew) && /* @__PURE__ */ jsx6(StatusChip, { id: `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}`, label: "New!", color: "secondary" }),
973
+ showDate && /* @__PURE__ */ jsx6(
974
+ Typography2,
1401
975
  {
1402
976
  id: `${idPrefix}app-date-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1403
977
  variant: "caption",
@@ -1408,13 +982,13 @@ var SpacesLink = (_a) => {
1408
982
  ] }),
1409
983
  [linkSpace == null ? void 0 : linkSpace.activeDate, linkSpace == null ? void 0 : linkSpace.isNew, showDate, showNew, stacked, linkSpace == null ? void 0 : linkSpace.configurationId, idPrefix]
1410
984
  );
1411
- const customBadgeDisplay = useMemo2(
1412
- () => customBadgeText && /* @__PURE__ */ jsx27(
985
+ const customBadgeDisplay = useMemo(
986
+ () => customBadgeText && /* @__PURE__ */ jsx6(
1413
987
  Box2,
1414
988
  {
1415
989
  textAlign: stacked ? "center" : "inherit",
1416
- marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 2 : void 0,
1417
- children: /* @__PURE__ */ jsx27(
990
+ marginRight: variant !== "card" && (showDate || showNew && (linkSpace == null ? void 0 : linkSpace.isNew)) ? 1 : void 0,
991
+ children: /* @__PURE__ */ jsx6(
1418
992
  StatusChip,
1419
993
  {
1420
994
  color: customBadgeColor || "info",
@@ -1437,7 +1011,7 @@ var SpacesLink = (_a) => {
1437
1011
  ]
1438
1012
  );
1439
1013
  if (isLoading) {
1440
- return /* @__PURE__ */ jsx27(CircularProgress, __spreadValues({ id: `${idPrefix}app-${linkSpace == null ? void 0 : linkSpace.configurationId}-loading` }, rest));
1014
+ return /* @__PURE__ */ jsx6(CircularProgress3, __spreadValues({ id: `${idPrefix}app-${linkSpace == null ? void 0 : linkSpace.configurationId}-loading` }, rest));
1441
1015
  }
1442
1016
  const Tag = getContainerTag(tag, variant);
1443
1017
  const BodyTag = getBodyTag(bodyTag, variant);
@@ -1453,78 +1027,100 @@ var SpacesLink = (_a) => {
1453
1027
  }, analytics), props));
1454
1028
  }
1455
1029
  };
1456
- return /* @__PURE__ */ jsx27(
1457
- Tag,
1030
+ return /* @__PURE__ */ jsx6(
1031
+ SpacesLinkContainer,
1458
1032
  __spreadProps(__spreadValues({
1033
+ component: Tag,
1459
1034
  title: linkSpace == null ? void 0 : linkSpace.name,
1460
1035
  className
1461
1036
  }, rest), {
1462
1037
  style: __spreadValues({}, style),
1463
1038
  role: variant === "list" ? "listitem" : role,
1464
- children: /* @__PURE__ */ jsx27(BodyTag, { children: /* @__PURE__ */ jsxs7(Grid2, { alignItems: !showDescription || stacked ? "center" : "start", direction: stacked ? "column" : "row", children: [
1465
- !stacked && favoriteIcon,
1466
- icon && (linkSpace == null ? void 0 : linkSpace.url) && ((_b2 = linkSpace == null ? void 0 : linkSpace.type) == null ? void 0 : _b2.toUpperCase()) === "FILE" ? /* @__PURE__ */ jsx27(Link, { target: "_blank", href: linkSpace == null ? void 0 : linkSpace.url, children: /* @__PURE__ */ jsx27(FileIcon, { "data-testid": "icon" }) }) : /* @__PURE__ */ jsx27(NavigateTopIcon, { "data-testid": "icon" }),
1467
- children ? renderChildren() : body && /* @__PURE__ */ jsxs7(Grid2, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, children: [
1468
- /* @__PURE__ */ jsx27(
1469
- Box2,
1470
- {
1471
- marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1472
- paddingTop: stacked ? 3 : void 0,
1473
- textAlign: stacked ? "center" : void 0,
1474
- children: /* @__PURE__ */ jsx27(
1475
- TitleTag,
1476
- __spreadProps(__spreadValues(__spreadValues({
1477
- id: `${idPrefix}app-title-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1478
- className: titleClassName,
1479
- tabIndex: 0,
1039
+ children: /* @__PURE__ */ jsx6(BodyTag, { style: { width: "100%" }, children: /* @__PURE__ */ jsxs3(
1040
+ Grid2,
1041
+ {
1042
+ alignItems: !showDescription || stacked ? "center" : "start",
1043
+ direction: stacked ? "column" : "row",
1044
+ container: true,
1045
+ flexWrap: "nowrap",
1046
+ children: [
1047
+ !stacked && favoriteIcon,
1048
+ FileIcon && (linkSpace == null ? void 0 : linkSpace.url) && ((_b2 = linkSpace == null ? void 0 : linkSpace.type) == null ? void 0 : _b2.toUpperCase()) === "FILE" ? /* @__PURE__ */ jsx6(
1049
+ IconLink,
1050
+ {
1051
+ target: "_blank",
1052
+ href: linkSpace == null ? void 0 : linkSpace.url,
1053
+ role: "link",
1054
+ "aria-labelledby": `${idPrefix}app-title-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1055
+ children: /* @__PURE__ */ jsx6(FileIcon, { "data-testid": "icon" })
1056
+ }
1057
+ ) : null,
1058
+ children ? renderChildren() : body && /* @__PURE__ */ jsxs3(Grid2, { id: `${idPrefix}${linkSpace == null ? void 0 : linkSpace.type}-${linkSpace == null ? void 0 : linkSpace.configurationId}`, flexGrow: 1, children: [
1059
+ /* @__PURE__ */ jsx6(
1060
+ Box2,
1061
+ {
1062
+ marginBottom: !customBadgeDisplay && (!showDescription || !(linkSpace == null ? void 0 : linkSpace.description)) ? 0 : void 0,
1063
+ paddingTop: stacked ? 3 : void 0,
1064
+ textAlign: stacked ? "center" : void 0,
1065
+ children: /* @__PURE__ */ jsx6(
1066
+ TitleTag,
1067
+ __spreadProps(__spreadValues(__spreadValues({
1068
+ id: `${idPrefix}app-title-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1069
+ className: titleClassName,
1070
+ tabIndex: 0,
1071
+ style: {
1072
+ cursor: showUrl ? "pointer" : "not-allowed"
1073
+ }
1074
+ }, analytics), props), {
1075
+ role: showUrl ? "link" : role,
1076
+ "aria-label": linkSpace == null ? void 0 : linkSpace.name,
1077
+ "aria-describedby": showNew && (linkSpace == null ? void 0 : linkSpace.isNew) ? `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}` : void 0,
1078
+ variant: variant === "list" ? "h5" : "h6",
1079
+ title: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0,
1080
+ children: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0
1081
+ })
1082
+ )
1083
+ }
1084
+ ),
1085
+ stacked && dateInfo,
1086
+ showDescription && (linkSpace == null ? void 0 : linkSpace.description) && /* @__PURE__ */ jsx6(
1087
+ TextTag,
1088
+ {
1089
+ component: "div",
1480
1090
  style: {
1481
- cursor: showUrl ? "pointer" : "not-allowed"
1482
- }
1483
- }, analytics), props), {
1484
- role: showUrl ? "link" : role,
1485
- "aria-label": linkSpace == null ? void 0 : linkSpace.name,
1486
- "aria-describedby": showNew && (linkSpace == null ? void 0 : linkSpace.isNew) ? `${idPrefix}app-new-badge-${linkSpace == null ? void 0 : linkSpace.configurationId}` : void 0,
1487
- variant: variant === "list" ? "h5" : "h6",
1488
- title: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0,
1489
- children: showName ? linkSpace == null ? void 0 : linkSpace.name : void 0
1490
- })
1491
- )
1492
- }
1493
- ),
1494
- stacked && dateInfo,
1495
- showDescription && (linkSpace == null ? void 0 : linkSpace.description) && /* @__PURE__ */ jsx27(
1496
- TextTag,
1497
- {
1498
- marginTop: 1,
1499
- textAlign: stacked ? "center" : void 0,
1500
- overflow: "hidden",
1501
- whiteSpace: maxDescriptionWidth ? "nowrap" : void 0,
1502
- width: maxDescriptionWidth,
1503
- textOverflow: "ellipsis",
1504
- id: `${idPrefix}app-description-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1505
- children: /* @__PURE__ */ jsx27(ReactMarkdown2, { className: "Card-text", children: linkSpace == null ? void 0 : linkSpace.description })
1506
- }
1507
- ),
1508
- variant === "card" && customBadgeDisplay
1509
- ] }),
1510
- variant !== "card" && customBadgeDisplay,
1511
- !stacked && dateInfo
1512
- ] }) })
1091
+ marginTop: ".5rem",
1092
+ textAlign: stacked ? "center" : void 0,
1093
+ overflow: "hidden",
1094
+ whiteSpace: maxDescriptionWidth ? "nowrap" : void 0,
1095
+ width: maxDescriptionWidth,
1096
+ textOverflow: "ellipsis"
1097
+ },
1098
+ id: `${idPrefix}app-description-${linkSpace == null ? void 0 : linkSpace.configurationId}`,
1099
+ children: /* @__PURE__ */ jsx6(ReactMarkdown2, { children: linkSpace == null ? void 0 : linkSpace.description })
1100
+ }
1101
+ ),
1102
+ variant === "card" && customBadgeDisplay
1103
+ ] }),
1104
+ variant !== "card" && customBadgeDisplay,
1105
+ !stacked && dateInfo
1106
+ ]
1107
+ }
1108
+ ) })
1513
1109
  })
1514
1110
  );
1515
1111
  };
1516
1112
 
1517
1113
  // src/lib/SpacesAgreement.tsx
1518
- import { Typography as Typography4 } from "@availity/mui-typography";
1114
+ import { Typography as Typography3 } from "@availity/mui-typography";
1519
1115
  import ReactMarkdown3 from "react-markdown";
1520
- import { jsx as jsx28 } from "react/jsx-runtime";
1116
+ import { jsx as jsx7 } from "react/jsx-runtime";
1521
1117
  var SpacesAgreement = ({ spaceId, markdown = false, id: elementId }) => {
1522
1118
  const spaces = useSpaces(spaceId);
1523
1119
  if (spaces && spaces.length > 0) {
1524
1120
  const { description: agreement, id } = spaces[0];
1525
1121
  if (agreement) {
1526
- const children = markdown ? /* @__PURE__ */ jsx28(ReactMarkdown3, { children: agreement }) : agreement;
1527
- return /* @__PURE__ */ jsx28(Typography4, { variant: "agreement", id: elementId || `spaces-agreement-${spaceId || id}`, children });
1122
+ const children = markdown ? /* @__PURE__ */ jsx7(ReactMarkdown3, { children: agreement }) : agreement;
1123
+ return /* @__PURE__ */ jsx7(Typography3, { variant: "agreement", id: elementId || `spaces-agreement-${spaceId || id}`, children });
1528
1124
  }
1529
1125
  }
1530
1126
  return null;
@@ -1533,7 +1129,7 @@ var SpacesAgreement = ({ spaceId, markdown = false, id: elementId }) => {
1533
1129
  // src/lib/SpacesDisclaimer.tsx
1534
1130
  import { Disclaimer } from "@availity/mui-disclaimer";
1535
1131
  import ReactMarkdown4 from "react-markdown";
1536
- import { jsx as jsx29 } from "react/jsx-runtime";
1132
+ import { jsx as jsx8 } from "react/jsx-runtime";
1537
1133
  var SpacesDisclaimer = (_a) => {
1538
1134
  var _b = _a, {
1539
1135
  accent = true,
@@ -1550,8 +1146,8 @@ var SpacesDisclaimer = (_a) => {
1550
1146
  if (spaces && spaces.length > 0) {
1551
1147
  const { description: disclaimer, id } = spaces[0];
1552
1148
  if (disclaimer) {
1553
- const children = markdown ? /* @__PURE__ */ jsx29(ReactMarkdown4, { children: disclaimer }) : disclaimer;
1554
- return /* @__PURE__ */ jsx29(
1149
+ const children = markdown ? /* @__PURE__ */ jsx8(ReactMarkdown4, { children: disclaimer }) : disclaimer;
1150
+ return /* @__PURE__ */ jsx8(
1555
1151
  Disclaimer,
1556
1152
  __spreadValues({
1557
1153
  accent,
@@ -1565,14 +1161,14 @@ var SpacesDisclaimer = (_a) => {
1565
1161
  };
1566
1162
 
1567
1163
  // src/lib/SpacesGhostText.tsx
1568
- import { jsx as jsx30 } from "react/jsx-runtime";
1164
+ import { jsx as jsx9 } from "react/jsx-runtime";
1569
1165
  var SpacesGhostText = (_a) => {
1570
1166
  var _b = _a, { spaceId, id } = _b, props = __objRest(_b, ["spaceId", "id"]);
1571
1167
  var _a2;
1572
1168
  const spaces = useSpaces(spaceId);
1573
1169
  const space = spaces == null ? void 0 : spaces[0];
1574
1170
  if (space == null ? void 0 : space.isGhosted) {
1575
- return /* @__PURE__ */ jsx30("small", __spreadProps(__spreadValues({ id: id || `app-ghost-text-${spaceId}` }, props), { children: /* @__PURE__ */ jsx30("em", { children: (_a2 = space == null ? void 0 : space.meta) == null ? void 0 : _a2.ghostText }) }));
1171
+ return /* @__PURE__ */ jsx9("small", __spreadProps(__spreadValues({ id: id || `app-ghost-text-${spaceId}` }, props), { children: /* @__PURE__ */ jsx9("em", { children: (_a2 = space == null ? void 0 : space.meta) == null ? void 0 : _a2.ghostText }) }));
1576
1172
  }
1577
1173
  return null;
1578
1174
  };