@xyo-network/react-shared 2.57.6 → 2.57.7
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/cjs/components/Ellipsize.js.map +1 -1
- package/dist/docs.json +9436 -32438
- package/dist/esm/components/Ellipsize.js.map +1 -1
- package/dist/types/components/Ellipsize.d.ts +4 -5
- package/dist/types/components/Ellipsize.d.ts.map +1 -1
- package/dist/types/components/ErrorBoundary.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/Ellipsize.tsx +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ellipsize.js","sourceRoot":"","sources":["../../../src/components/Ellipsize.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAY,MAAM,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"Ellipsize.js","sourceRoot":"","sources":["../../../src/components/Ellipsize.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAY,MAAM,EAAE,UAAU,EAAsC,MAAM,eAAe,CAAA;AAErG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEzD;;GAEG;AAEH,MAAM,aAAa,GAAG,WAAW,CAAA;AAMjC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,EAAE;IAChC,IAAI,EAAE,aAAa;IACnB,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,kBAAkB;IACxD,IAAI,EAAE,MAAM;CACb,CAAC,CAAqB,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAAC;IAChD,GAAG,EAAE;QACH,oGAAoG;QACpG,uGAAuG;QACvG,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,OAAO;YAChB,uGAAuG;YACvG,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,QAAQ;YACpB,0DAA0D;YAC1D,GAAG,CAAC,gB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AAC,CAAA;IAEN,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AAC9C,CAAC,CAAA;AAaD,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CACpC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3E,wEAAwE;IACxE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,eAAe,EAAE,CAAA;IAE/D,OAAO,CACL,KAAC,aAAa,IAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,KAAM,KAAK,EAAE,GAAG,EAAE,GAAG,YACvF,KAAC,kBAAkB,cACjB,KAAC,oBAAoB,IAAC,GAAG,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAC,OAAO,KAAK,eAAe,YAClI,QAAQ,GACY,GACJ,GACP,CACjB,CAAA;AACH,CAAC,CACF,CAAA;AACD,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps, TypographyProps, TypographyTypeMap } from '@mui/material';
|
|
2
3
|
import { WithChildren } from '@xylabs/react-shared';
|
|
3
|
-
import { ElementType } from 'react';
|
|
4
4
|
export interface EllipsizeRootProps extends BoxProps {
|
|
5
5
|
beforeLineHeight?: string | number;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
component?: Comp;
|
|
7
|
+
export type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {
|
|
9
8
|
ellipsisPosition?: 'start' | 'end';
|
|
10
|
-
}
|
|
9
|
+
};
|
|
11
10
|
export interface EllipsizeBoxProps extends BoxProps {
|
|
12
11
|
ellipsisPosition?: 'start' | 'end';
|
|
13
12
|
typographyProps?: TypographyWithComponentProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ellipsize.d.ts","sourceRoot":"","sources":["../../../src/components/Ellipsize.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAsB,eAAe,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Ellipsize.d.ts","sourceRoot":"","sources":["../../../src/components/Ellipsize.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAO,QAAQ,EAAsB,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AASnD,MAAM,WAAW,kBAAmB,SAAQ,QAAQ;IAClD,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACnC;AAiED,MAAM,MAAM,4BAA4B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAC9I,gBAAgB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CACnC,CAAA;AAED,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IACjD,gBAAgB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAClC,eAAe,CAAC,EAAE,4BAA4B,CAAA;CAC/C;AAED,eAAO,MAAM,YAAY,yIAexB,CAAA"}
|
|
@@ -13,6 +13,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
13
13
|
error: Error;
|
|
14
14
|
};
|
|
15
15
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
16
|
-
render(): string | number | boolean |
|
|
16
|
+
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
package/package.json
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@xylabs/react-link": "~2.17.6",
|
|
18
18
|
"@xylabs/react-promise": "~2.17.6",
|
|
19
19
|
"@xylabs/react-shared": "~2.17.6",
|
|
20
|
-
"@xyo-network/core": "~2.66.
|
|
21
|
-
"@xyo-network/payload-model": "~2.66.
|
|
22
|
-
"@xyo-network/react-event": "~2.57.
|
|
20
|
+
"@xyo-network/core": "~2.66.9",
|
|
21
|
+
"@xyo-network/payload-model": "~2.66.9",
|
|
22
|
+
"@xyo-network/react-event": "~2.57.7"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@storybook/react": "^7.1.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
},
|
|
81
81
|
"sideEffects": false,
|
|
82
82
|
"types": "dist/types/index.d.ts",
|
|
83
|
-
"version": "2.57.
|
|
83
|
+
"version": "2.57.7"
|
|
84
84
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Box, BoxProps, styled, Typography, TypographyProps } from '@mui/material'
|
|
1
|
+
import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'
|
|
2
2
|
import { WithChildren } from '@xylabs/react-shared'
|
|
3
|
-
import {
|
|
3
|
+
import { forwardRef, useCallback, useState } from 'react'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Heavily inspired by - https://stackoverflow.com/a/30362531/2803259
|
|
@@ -74,8 +74,8 @@ const useClientHeight = () => {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
// See - https://mui.com/material-ui/guides/composition/#with-typescript
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
78
|
+
export type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {
|
|
79
79
|
ellipsisPosition?: 'start' | 'end'
|
|
80
80
|
}
|
|
81
81
|
|