@availity/mui-spaces 0.3.25 → 0.5.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,35 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.5.0](https://github.com/Availity/element/compare/@availity/mui-spaces@0.4.0...@availity/mui-spaces@0.5.0) (2024-11-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * **mui-spaces:** allow custom Loaders in SpacesImage ([7a585c9](https://github.com/Availity/element/commit/7a585c9aeb1255abf56b87692f8c134820a20e60))
11
+
12
+ ## [0.4.0](https://github.com/Availity/element/compare/@availity/mui-spaces@0.3.25...@availity/mui-spaces@0.4.0) (2024-10-31)
13
+
14
+ ### Dependency Updates
15
+
16
+ * `mui-button` updated to version `0.3.25`
17
+ * `mui-card` updated to version `0.3.25`
18
+ * `mui-chip` updated to version `0.3.25`
19
+ * `mui-dialog` updated to version `0.3.25`
20
+ * `mui-disclaimer` updated to version `0.3.25`
21
+ * `mui-favorites` updated to version `0.3.25`
22
+ * `mui-icon` updated to version `0.3.25`
23
+ * `mui-layout` updated to version `0.3.25`
24
+ * `mui-list` updated to version `0.3.25`
25
+ * `mui-modal` updated to version `0.3.25`
26
+ * `mui-progress` updated to version `0.3.25`
27
+ * `mui-typography` updated to version `0.3.25`
28
+ * `@availity/mock` updated to version `0.3.25`
29
+
30
+ ### Features
31
+
32
+ * add FileSelector ([7ad1f7b](https://github.com/Availity/element/commit/7ad1f7bb364bbeb2048d2ff4c9b0a2b1a1e33777))
33
+
5
34
  ## [0.3.25](https://github.com/Availity/element/compare/@availity/mui-spaces@0.3.24...@availity/mui-spaces@0.3.25) (2024-10-25)
6
35
 
7
36
  ### Dependency Updates
package/dist/index.d.mts CHANGED
@@ -240,6 +240,9 @@ type BaseSpacesImageProps = {
240
240
  imageType?: 'url' | 'images.logo' | 'images.tile' | 'images.billboard' | 'images.promotional' | 'images.promotionalHover';
241
241
  fallback?: string;
242
242
  id?: string;
243
+ Loader?: ({ id }: {
244
+ id: string;
245
+ }) => JSX.Element;
243
246
  };
244
247
  type SpacesImageSpaceId = {
245
248
  spaceId: string;
@@ -250,6 +253,6 @@ type SpacesImagePayerId = {
250
253
  payerId: string;
251
254
  } & BaseSpacesImageProps;
252
255
  type SpacesImageProps = SpacesImageSpaceId | SpacesImagePayerId;
253
- declare const SpacesImage: ({ spaceId, payerId, imageType, fallback, ...props }: SpacesImageProps) => react_jsx_runtime.JSX.Element | null;
256
+ declare const SpacesImage: ({ spaceId, payerId, imageType, fallback, Loader, ...props }: SpacesImageProps) => react_jsx_runtime.JSX.Element | null;
254
257
 
255
258
  export { INITIAL_STATE, type Space, Spaces, SpacesAgreement, type SpacesAgreementProps, SpacesContext, SpacesDisclaimer, type SpacesDisclaimerProps, SpacesGhostText, type SpacesGhostTextProps, SpacesImage, type SpacesImageProps, SpacesLink, useSpaces, useSpacesContext };
package/dist/index.d.ts CHANGED
@@ -240,6 +240,9 @@ type BaseSpacesImageProps = {
240
240
  imageType?: 'url' | 'images.logo' | 'images.tile' | 'images.billboard' | 'images.promotional' | 'images.promotionalHover';
241
241
  fallback?: string;
242
242
  id?: string;
243
+ Loader?: ({ id }: {
244
+ id: string;
245
+ }) => JSX.Element;
243
246
  };
244
247
  type SpacesImageSpaceId = {
245
248
  spaceId: string;
@@ -250,6 +253,6 @@ type SpacesImagePayerId = {
250
253
  payerId: string;
251
254
  } & BaseSpacesImageProps;
252
255
  type SpacesImageProps = SpacesImageSpaceId | SpacesImagePayerId;
253
- declare const SpacesImage: ({ spaceId, payerId, imageType, fallback, ...props }: SpacesImageProps) => react_jsx_runtime.JSX.Element | null;
256
+ declare const SpacesImage: ({ spaceId, payerId, imageType, fallback, Loader, ...props }: SpacesImageProps) => react_jsx_runtime.JSX.Element | null;
254
257
 
255
258
  export { INITIAL_STATE, type Space, Spaces, SpacesAgreement, type SpacesAgreementProps, SpacesContext, SpacesDisclaimer, type SpacesDisclaimerProps, SpacesGhostText, type SpacesGhostTextProps, SpacesImage, type SpacesImageProps, SpacesLink, useSpaces, useSpacesContext };
package/dist/index.js CHANGED
@@ -386,7 +386,19 @@ var import_mui_progress2 = require("@availity/mui-progress");
386
386
  var import_react_image = require("react-image");
387
387
  var import_jsx_runtime2 = require("react/jsx-runtime");
388
388
  var SpacesImage = (_a) => {
389
- var _b = _a, { spaceId, payerId, imageType = "url", fallback } = _b, props = __objRest(_b, ["spaceId", "payerId", "imageType", "fallback"]);
389
+ var _b = _a, {
390
+ spaceId,
391
+ payerId,
392
+ imageType = "url",
393
+ fallback,
394
+ Loader = import_mui_progress2.CircularProgress
395
+ } = _b, props = __objRest(_b, [
396
+ "spaceId",
397
+ "payerId",
398
+ "imageType",
399
+ "fallback",
400
+ "Loader"
401
+ ]);
390
402
  var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k;
391
403
  let spaces;
392
404
  if (spaceId) {
@@ -406,7 +418,7 @@ var SpacesImage = (_a) => {
406
418
  };
407
419
  let url = imageMap[imageType];
408
420
  if (!url && loading) {
409
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_progress2.CircularProgress, { id: `app-${id}-loading` });
421
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loader, { id: `app-${id}-loading` });
410
422
  }
411
423
  if (!url && !loading && fallback) {
412
424
  url = fallback;
@@ -419,7 +431,7 @@ var SpacesImage = (_a) => {
419
431
  id: props.id || `app-img-${id}`,
420
432
  src: url,
421
433
  alt: `Space ${imageType}`,
422
- loader: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_progress2.CircularProgress, { id: `app-img-${id}-loading` })
434
+ loader: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loader, { id: `app-img-${id}-loading` })
423
435
  }, props)
424
436
  );
425
437
  };
package/dist/index.mjs CHANGED
@@ -344,7 +344,19 @@ import { CircularProgress as CircularProgress2 } from "@availity/mui-progress";
344
344
  import { Img } from "react-image";
345
345
  import { jsx as jsx2 } from "react/jsx-runtime";
346
346
  var SpacesImage = (_a) => {
347
- var _b = _a, { spaceId, payerId, imageType = "url", fallback } = _b, props = __objRest(_b, ["spaceId", "payerId", "imageType", "fallback"]);
347
+ var _b = _a, {
348
+ spaceId,
349
+ payerId,
350
+ imageType = "url",
351
+ fallback,
352
+ Loader = CircularProgress2
353
+ } = _b, props = __objRest(_b, [
354
+ "spaceId",
355
+ "payerId",
356
+ "imageType",
357
+ "fallback",
358
+ "Loader"
359
+ ]);
348
360
  var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k;
349
361
  let spaces;
350
362
  if (spaceId) {
@@ -364,7 +376,7 @@ var SpacesImage = (_a) => {
364
376
  };
365
377
  let url = imageMap[imageType];
366
378
  if (!url && loading) {
367
- return /* @__PURE__ */ jsx2(CircularProgress2, { id: `app-${id}-loading` });
379
+ return /* @__PURE__ */ jsx2(Loader, { id: `app-${id}-loading` });
368
380
  }
369
381
  if (!url && !loading && fallback) {
370
382
  url = fallback;
@@ -377,7 +389,7 @@ var SpacesImage = (_a) => {
377
389
  id: props.id || `app-img-${id}`,
378
390
  src: url,
379
391
  alt: `Space ${imageType}`,
380
- loader: /* @__PURE__ */ jsx2(CircularProgress2, { id: `app-img-${id}-loading` })
392
+ loader: /* @__PURE__ */ jsx2(Loader, { id: `app-img-${id}-loading` })
381
393
  }, props)
382
394
  );
383
395
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-spaces",
3
- "version": "0.3.25",
3
+ "version": "0.5.0",
4
4
  "description": "Availity MUI Spaces Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -32,19 +32,19 @@
32
32
  "publish:canary": "yarn npm publish --access public --tag canary"
33
33
  },
34
34
  "devDependencies": {
35
- "@availity/mui-button": "^0.6.10",
36
- "@availity/mui-card": "^0.2.17",
37
- "@availity/mui-chip": "^0.2.21",
38
- "@availity/mui-dialog": "^0.1.11",
39
- "@availity/mui-disclaimer": "^0.1.4",
40
- "@availity/mui-favorites": "^0.1.8",
41
- "@availity/mui-icon": "^0.10.1",
42
- "@availity/mui-layout": "^0.1.6",
43
- "@availity/mui-list": "^0.1.18",
44
- "@availity/mui-modal": "^0.1.7",
35
+ "@availity/mui-button": "^0.6.11",
36
+ "@availity/mui-card": "^0.2.18",
37
+ "@availity/mui-chip": "^0.2.22",
38
+ "@availity/mui-dialog": "^0.1.12",
39
+ "@availity/mui-disclaimer": "^0.1.5",
40
+ "@availity/mui-favorites": "^0.2.0",
41
+ "@availity/mui-icon": "^0.11.0",
42
+ "@availity/mui-layout": "^0.2.0",
43
+ "@availity/mui-list": "^0.2.0",
44
+ "@availity/mui-modal": "^0.1.8",
45
45
  "@availity/mui-paper": "^0.1.9",
46
- "@availity/mui-progress": "^0.3.1",
47
- "@availity/mui-typography": "^0.2.0",
46
+ "@availity/mui-progress": "^0.4.0",
47
+ "@availity/mui-typography": "^0.2.1",
48
48
  "@mui/material": "^5.15.15",
49
49
  "react": "18.2.0",
50
50
  "react-dom": "18.2.0",
@@ -52,18 +52,18 @@
52
52
  "typescript": "^5.4.5"
53
53
  },
54
54
  "peerDependencies": {
55
- "@availity/mui-button": "^0.6.10",
56
- "@availity/mui-card": "^0.2.17",
57
- "@availity/mui-chip": "^0.2.21",
58
- "@availity/mui-dialog": "^0.1.11",
59
- "@availity/mui-disclaimer": "^0.1.4",
60
- "@availity/mui-favorites": "^0.1.8",
61
- "@availity/mui-icon": "^0.10.1",
62
- "@availity/mui-layout": "^0.1.6",
63
- "@availity/mui-list": "^0.1.18",
64
- "@availity/mui-modal": "^0.1.7",
65
- "@availity/mui-progress": "^0.3.1",
66
- "@availity/mui-typography": "^0.2.0",
55
+ "@availity/mui-button": "^0.6.11",
56
+ "@availity/mui-card": "^0.2.18",
57
+ "@availity/mui-chip": "^0.2.22",
58
+ "@availity/mui-dialog": "^0.1.12",
59
+ "@availity/mui-disclaimer": "^0.1.5",
60
+ "@availity/mui-favorites": "^0.2.0",
61
+ "@availity/mui-icon": "^0.11.0",
62
+ "@availity/mui-layout": "^0.2.0",
63
+ "@availity/mui-list": "^0.2.0",
64
+ "@availity/mui-modal": "^0.1.8",
65
+ "@availity/mui-progress": "^0.4.0",
66
+ "@availity/mui-typography": "^0.2.1",
67
67
  "@mui/material": "^5.11.9",
68
68
  "react": ">=16.3.0"
69
69
  },
@@ -71,7 +71,7 @@
71
71
  "access": "public"
72
72
  },
73
73
  "dependencies": {
74
- "@availity/api-axios": "^9.0.0",
74
+ "@availity/api-axios": "^9.0.4",
75
75
  "@availity/hooks": "^5.0.2",
76
76
  "@availity/message-core": "^7.0.1",
77
77
  "@availity/native-form": "^5.0.6",
@@ -12,6 +12,7 @@ type BaseSpacesImageProps = {
12
12
  | 'images.promotionalHover';
13
13
  fallback?: string;
14
14
  id?: string;
15
+ Loader?: ({ id }: { id: string }) => JSX.Element;
15
16
  };
16
17
 
17
18
  type SpacesImageSpaceId = {
@@ -26,7 +27,14 @@ type SpacesImagePayerId = {
26
27
 
27
28
  export type SpacesImageProps = SpacesImageSpaceId | SpacesImagePayerId;
28
29
 
29
- export const SpacesImage = ({ spaceId, payerId, imageType = 'url', fallback, ...props }: SpacesImageProps) => {
30
+ export const SpacesImage = ({
31
+ spaceId,
32
+ payerId,
33
+ imageType = 'url',
34
+ fallback,
35
+ Loader = CircularProgress,
36
+ ...props
37
+ }: SpacesImageProps) => {
30
38
  let spaces;
31
39
 
32
40
  if (spaceId) {
@@ -51,7 +59,7 @@ export const SpacesImage = ({ spaceId, payerId, imageType = 'url', fallback, ...
51
59
  let url = imageMap[imageType];
52
60
 
53
61
  if (!url && loading) {
54
- return <CircularProgress id={`app-${id}-loading`} />;
62
+ return <Loader id={`app-${id}-loading`} />;
55
63
  }
56
64
 
57
65
  if (!url && !loading && fallback) {
@@ -65,7 +73,7 @@ export const SpacesImage = ({ spaceId, payerId, imageType = 'url', fallback, ...
65
73
  id={props.id || `app-img-${id}`}
66
74
  src={url}
67
75
  alt={`Space ${imageType}`}
68
- loader={<CircularProgress id={`app-img-${id}-loading`} />}
76
+ loader={<Loader id={`app-img-${id}-loading`} />}
69
77
  {...props}
70
78
  />
71
79
  );