@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/CHANGELOG.md +4 -0
- package/dist/index.d.mts +9 -13
- package/dist/index.d.ts +9 -13
- package/dist/index.js +153 -553
- package/dist/index.mjs +144 -548
- package/package.json +12 -1
- package/src/lib/SpacesLink/SpacesLink.test.tsx +6 -49
- package/src/lib/SpacesLink/SpacesLink.tsx +70 -38
- package/src/lib/SpacesLink/spaces-link-types.tsx +7 -5
- package/src/lib/SpacesLink/useLink.test.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.3.5](https://github.com/Availity/element/compare/@availity/mui-spaces@0.3.4...@availity/mui-spaces@0.3.5) (2024-07-25)
|
|
6
|
+
|
|
7
|
+
## [0.3.4](https://github.com/Availity/element/compare/@availity/mui-spaces@0.3.3...@availity/mui-spaces@0.3.4) (2024-07-25)
|
|
8
|
+
|
|
5
9
|
## [0.3.3](https://github.com/Availity/element/compare/@availity/mui-spaces@0.3.2...@availity/mui-spaces@0.3.3) (2024-07-22)
|
|
6
10
|
|
|
7
11
|
### Dependency Updates
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { StatusChipProps } from '@availity/mui-chip';
|
|
4
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
6
|
|
|
5
|
-
type StatusChipProps = {
|
|
6
|
-
/** The color of the component.
|
|
7
|
-
* @default default */
|
|
8
|
-
color?: 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
9
|
-
} & Omit<ChipProps, 'avatar' | 'children' | 'color' | 'variant' | 'skipFocusWhenDisabled' | 'disabled' | 'size' | 'icon' | 'clickable' | 'deleteIcon' | 'onDelete'>;
|
|
10
|
-
|
|
11
7
|
type SpacesLinkVariants = 'card' | 'list' | 'default' | undefined;
|
|
12
8
|
type SpacesLinkWithSpace = {
|
|
13
9
|
/** If no spaceId is provided, the first space in the spaces array is used.
|
|
@@ -35,24 +31,24 @@ type SpacesLinkProps = {
|
|
|
35
31
|
/** Children can be a react child or render prop. */
|
|
36
32
|
children?: JSX.Element | ((props: any | undefined) => JSX.Element);
|
|
37
33
|
/** Tag to overwrite the root component rendered. */
|
|
38
|
-
tag?:
|
|
34
|
+
tag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
39
35
|
/** Tag to overwrite the body component that renders the title, description and data values.
|
|
40
36
|
* It defaults to CardBody or div depending on the value of the variant prop.
|
|
41
37
|
*/
|
|
42
|
-
bodyTag?:
|
|
38
|
+
bodyTag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
43
39
|
/** Tag to overwrite the title component. If variant prop is set to "card", defaults to CardTitle.
|
|
44
40
|
* If variant is set to "list", defaults to ListItemHeading. Overwise, defaults to div.
|
|
45
41
|
*/
|
|
46
|
-
titleTag?:
|
|
42
|
+
titleTag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
47
43
|
/** Tag to overwrite the text component. If variant prop is set to "card", defaults to Card Text.
|
|
48
44
|
* If variant is set to "list", defaults to ListItemText. Otherwise, defaults to div.
|
|
49
45
|
*/
|
|
50
|
-
textTag?:
|
|
46
|
+
textTag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
51
47
|
titleClassName?: string;
|
|
52
48
|
/** When true, utilizes the Card component for styling. */
|
|
53
49
|
card?: boolean;
|
|
54
50
|
/** When true, renders an @availity/mui-icon next to the title if present on the Space. */
|
|
55
|
-
icon?:
|
|
51
|
+
icon?: (props: SvgIconProps) => JSX.Element;
|
|
56
52
|
/** When true, renders the Spaces description beneath the title. */
|
|
57
53
|
description?: boolean;
|
|
58
54
|
/** When passed in, provides predefined styles for the component.
|
|
@@ -217,7 +213,7 @@ declare const useSpacesContext: () => SpacesContextType;
|
|
|
217
213
|
declare const Spaces: ({ query, variables, clientId, children, payerIds, spaceIds, spaces: spacesFromProps, }: SpacesProps) => JSX.Element;
|
|
218
214
|
declare const useSpaces: UseSpaces;
|
|
219
215
|
|
|
220
|
-
declare const SpacesLink: ({ spaceId, space: propSpace, className, children, favorite, icon, showName, showNew, showDate, stacked, body, description: showDescription, tag, bodyTag, titleTag, textTag, titleClassName, variant, loading: propsLoading, clientId: propsClientId, maxDescriptionWidth, style, linkAttributes, role, analytics, customBadgeText, customBadgeColor, idPrefix, ...rest }: SpacesLinkWithSpace | SpacesLinkWithSpaceId) => react_jsx_runtime.JSX.Element;
|
|
216
|
+
declare const SpacesLink: ({ spaceId, space: propSpace, className, children, favorite, icon: FileIcon, showName, showNew, showDate, stacked, body, description: showDescription, tag, bodyTag, titleTag, textTag, titleClassName, variant, loading: propsLoading, clientId: propsClientId, maxDescriptionWidth, style, linkAttributes, role, analytics, customBadgeText, customBadgeColor, idPrefix, ...rest }: SpacesLinkWithSpace | SpacesLinkWithSpaceId) => react_jsx_runtime.JSX.Element;
|
|
221
217
|
|
|
222
218
|
type SpacesAgreementProps = {
|
|
223
219
|
spaceId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { StatusChipProps } from '@availity/mui-chip';
|
|
4
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
6
|
|
|
5
|
-
type StatusChipProps = {
|
|
6
|
-
/** The color of the component.
|
|
7
|
-
* @default default */
|
|
8
|
-
color?: 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
9
|
-
} & Omit<ChipProps, 'avatar' | 'children' | 'color' | 'variant' | 'skipFocusWhenDisabled' | 'disabled' | 'size' | 'icon' | 'clickable' | 'deleteIcon' | 'onDelete'>;
|
|
10
|
-
|
|
11
7
|
type SpacesLinkVariants = 'card' | 'list' | 'default' | undefined;
|
|
12
8
|
type SpacesLinkWithSpace = {
|
|
13
9
|
/** If no spaceId is provided, the first space in the spaces array is used.
|
|
@@ -35,24 +31,24 @@ type SpacesLinkProps = {
|
|
|
35
31
|
/** Children can be a react child or render prop. */
|
|
36
32
|
children?: JSX.Element | ((props: any | undefined) => JSX.Element);
|
|
37
33
|
/** Tag to overwrite the root component rendered. */
|
|
38
|
-
tag?:
|
|
34
|
+
tag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
39
35
|
/** Tag to overwrite the body component that renders the title, description and data values.
|
|
40
36
|
* It defaults to CardBody or div depending on the value of the variant prop.
|
|
41
37
|
*/
|
|
42
|
-
bodyTag?:
|
|
38
|
+
bodyTag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
43
39
|
/** Tag to overwrite the title component. If variant prop is set to "card", defaults to CardTitle.
|
|
44
40
|
* If variant is set to "list", defaults to ListItemHeading. Overwise, defaults to div.
|
|
45
41
|
*/
|
|
46
|
-
titleTag?:
|
|
42
|
+
titleTag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
47
43
|
/** Tag to overwrite the text component. If variant prop is set to "card", defaults to Card Text.
|
|
48
44
|
* If variant is set to "list", defaults to ListItemText. Otherwise, defaults to div.
|
|
49
45
|
*/
|
|
50
|
-
textTag?:
|
|
46
|
+
textTag?: ElementType<any, keyof JSX.IntrinsicElements>;
|
|
51
47
|
titleClassName?: string;
|
|
52
48
|
/** When true, utilizes the Card component for styling. */
|
|
53
49
|
card?: boolean;
|
|
54
50
|
/** When true, renders an @availity/mui-icon next to the title if present on the Space. */
|
|
55
|
-
icon?:
|
|
51
|
+
icon?: (props: SvgIconProps) => JSX.Element;
|
|
56
52
|
/** When true, renders the Spaces description beneath the title. */
|
|
57
53
|
description?: boolean;
|
|
58
54
|
/** When passed in, provides predefined styles for the component.
|
|
@@ -217,7 +213,7 @@ declare const useSpacesContext: () => SpacesContextType;
|
|
|
217
213
|
declare const Spaces: ({ query, variables, clientId, children, payerIds, spaceIds, spaces: spacesFromProps, }: SpacesProps) => JSX.Element;
|
|
218
214
|
declare const useSpaces: UseSpaces;
|
|
219
215
|
|
|
220
|
-
declare const SpacesLink: ({ spaceId, space: propSpace, className, children, favorite, icon, showName, showNew, showDate, stacked, body, description: showDescription, tag, bodyTag, titleTag, textTag, titleClassName, variant, loading: propsLoading, clientId: propsClientId, maxDescriptionWidth, style, linkAttributes, role, analytics, customBadgeText, customBadgeColor, idPrefix, ...rest }: SpacesLinkWithSpace | SpacesLinkWithSpaceId) => react_jsx_runtime.JSX.Element;
|
|
216
|
+
declare const SpacesLink: ({ spaceId, space: propSpace, className, children, favorite, icon: FileIcon, showName, showNew, showDate, stacked, body, description: showDescription, tag, bodyTag, titleTag, textTag, titleClassName, variant, loading: propsLoading, clientId: propsClientId, maxDescriptionWidth, style, linkAttributes, role, analytics, customBadgeText, customBadgeColor, idPrefix, ...rest }: SpacesLinkWithSpace | SpacesLinkWithSpaceId) => react_jsx_runtime.JSX.Element;
|
|
221
217
|
|
|
222
218
|
type SpacesAgreementProps = {
|
|
223
219
|
spaceId: string;
|