@xylabs/react-button 6.3.6 → 6.3.8
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/browser/index.d.ts +43 -0
- package/package.json +15 -14
- package/dist/types/components/ButtonEx.d.ts +0 -7
- package/dist/types/components/ButtonEx.d.ts.map +0 -1
- package/dist/types/components/ButtonExBase.d.ts +0 -7
- package/dist/types/components/ButtonExBase.d.ts.map +0 -1
- package/dist/types/components/ButtonExProps.d.ts +0 -34
- package/dist/types/components/ButtonExProps.d.ts.map +0 -1
- package/dist/types/components/ButtonExTo.d.ts +0 -7
- package/dist/types/components/ButtonExTo.d.ts.map +0 -1
- package/dist/types/components/index.d.ts +0 -3
- package/dist/types/components/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ButtonProps } from '@mui/material';
|
|
3
|
+
import { BoxlikeComponentProps, BusyProps } from '@xylabs/react-shared';
|
|
4
|
+
import { To, NavigateOptions } from 'react-router-dom';
|
|
5
|
+
|
|
6
|
+
interface ButtonOnlyHrefProps {
|
|
7
|
+
href?: string;
|
|
8
|
+
to?: never;
|
|
9
|
+
toOptions?: never;
|
|
10
|
+
}
|
|
11
|
+
interface ButtonOnlyToProps {
|
|
12
|
+
href?: never;
|
|
13
|
+
to?: To;
|
|
14
|
+
toOptions?: NavigateOptions;
|
|
15
|
+
}
|
|
16
|
+
interface ButtonNoToOrHrefProps {
|
|
17
|
+
href?: never;
|
|
18
|
+
to?: never;
|
|
19
|
+
toOptions?: never;
|
|
20
|
+
}
|
|
21
|
+
type ButtonHrefOrToOrNoProps = ButtonOnlyHrefProps | ButtonOnlyToProps | ButtonNoToOrHrefProps;
|
|
22
|
+
interface ButtonHrefAndToProps {
|
|
23
|
+
href?: string;
|
|
24
|
+
to?: To;
|
|
25
|
+
toOptions?: NavigateOptions;
|
|
26
|
+
}
|
|
27
|
+
declare const asButtonHrefOrToProps: (props: ButtonHrefAndToProps) => ButtonHrefOrToOrNoProps;
|
|
28
|
+
interface ButtonBaseExProps extends Omit<ButtonProps, 'href'>, BoxlikeComponentProps, BusyProps {
|
|
29
|
+
disableUserEvents?: boolean;
|
|
30
|
+
funnel?: string;
|
|
31
|
+
intent?: string;
|
|
32
|
+
placement?: string;
|
|
33
|
+
target?: string;
|
|
34
|
+
}
|
|
35
|
+
type ButtonExProps = ButtonBaseExProps & ButtonHrefOrToOrNoProps;
|
|
36
|
+
|
|
37
|
+
declare const ButtonEx: {
|
|
38
|
+
({ ref, ...props }: ButtonExProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { ButtonEx, asButtonHrefOrToProps };
|
|
43
|
+
export type { ButtonBaseExProps, ButtonExProps, ButtonHrefAndToProps, ButtonHrefOrToOrNoProps, ButtonNoToOrHrefProps, ButtonOnlyHrefProps, ButtonOnlyToProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/react-button",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.8",
|
|
4
4
|
"description": "Common React library for all XY Labs projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"utility",
|
|
@@ -26,33 +26,34 @@
|
|
|
26
26
|
"type": "module",
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"types": "./dist/
|
|
29
|
+
"types": "./dist/browser/index.d.ts",
|
|
30
30
|
"default": "./dist/browser/index.mjs"
|
|
31
31
|
},
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"module": "./dist/browser/index.mjs",
|
|
35
|
-
"types": "dist/
|
|
35
|
+
"types": "dist/browser/index.d.ts",
|
|
36
36
|
"workspaces": [
|
|
37
37
|
"packages/*"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@xylabs/promise": "^4.
|
|
41
|
-
"@xylabs/react-pixel": "^6.3.
|
|
42
|
-
"@xylabs/react-shared": "^6.3.
|
|
43
|
-
"react-router-dom": "^7.6.
|
|
40
|
+
"@xylabs/promise": "^4.13.4",
|
|
41
|
+
"@xylabs/react-pixel": "^6.3.8",
|
|
42
|
+
"@xylabs/react-shared": "^6.3.8",
|
|
43
|
+
"react-router-dom": "^7.6.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@mui/material": "^7.
|
|
46
|
+
"@mui/material": "^7.2.0",
|
|
47
|
+
"@storybook/react-vite": "^9.0.16",
|
|
47
48
|
"@types/react": "^19.1.8",
|
|
48
|
-
"@xylabs/react-flexbox": "^6.3.
|
|
49
|
-
"@xylabs/react-pixel": "^6.3.
|
|
50
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
51
|
-
"@xylabs/tsconfig-react": "^
|
|
52
|
-
"knip": "^5.61.
|
|
49
|
+
"@xylabs/react-flexbox": "^6.3.8",
|
|
50
|
+
"@xylabs/react-pixel": "^6.3.8",
|
|
51
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.8",
|
|
52
|
+
"@xylabs/tsconfig-react": "^7.0.0-rc.8",
|
|
53
|
+
"knip": "^5.61.3",
|
|
53
54
|
"react": "^19.1.0",
|
|
54
55
|
"react-dom": "^19.1.0",
|
|
55
|
-
"storybook": "^9.0.
|
|
56
|
+
"storybook": "^9.0.16",
|
|
56
57
|
"typescript": "^5.8.3"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGxD,QAAA,MAAM,QAAQ;wBAAuB,aAAa;;CAOjD,CAAA;AAID,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ButtonExProps } from './ButtonExProps.tsx';
|
|
2
|
-
declare const ButtonExBase: {
|
|
3
|
-
({ ref, funnel, intent, target, placement, disableUserEvents, href, ...props }: ButtonExProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
displayName: string;
|
|
5
|
-
};
|
|
6
|
-
export { ButtonExBase };
|
|
7
|
-
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,QAAA,MAAM,YAAY;oFAEf,aAAa;;CAoDf,CAAA;AAID,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps } from '@mui/material';
|
|
2
|
-
import type { BoxlikeComponentProps, BusyProps } from '@xylabs/react-shared';
|
|
3
|
-
import type { NavigateOptions, To } from 'react-router-dom';
|
|
4
|
-
export interface ButtonOnlyHrefProps {
|
|
5
|
-
href?: string;
|
|
6
|
-
to?: never;
|
|
7
|
-
toOptions?: never;
|
|
8
|
-
}
|
|
9
|
-
export interface ButtonOnlyToProps {
|
|
10
|
-
href?: never;
|
|
11
|
-
to?: To;
|
|
12
|
-
toOptions?: NavigateOptions;
|
|
13
|
-
}
|
|
14
|
-
export interface ButtonNoToOrHrefProps {
|
|
15
|
-
href?: never;
|
|
16
|
-
to?: never;
|
|
17
|
-
toOptions?: never;
|
|
18
|
-
}
|
|
19
|
-
export type ButtonHrefOrToOrNoProps = ButtonOnlyHrefProps | ButtonOnlyToProps | ButtonNoToOrHrefProps;
|
|
20
|
-
export interface ButtonHrefAndToProps {
|
|
21
|
-
href?: string;
|
|
22
|
-
to?: To;
|
|
23
|
-
toOptions?: NavigateOptions;
|
|
24
|
-
}
|
|
25
|
-
export declare const asButtonHrefOrToProps: (props: ButtonHrefAndToProps) => ButtonHrefOrToOrNoProps;
|
|
26
|
-
export interface ButtonBaseExProps extends Omit<ButtonProps, 'href'>, BoxlikeComponentProps, BusyProps {
|
|
27
|
-
disableUserEvents?: boolean;
|
|
28
|
-
funnel?: string;
|
|
29
|
-
intent?: string;
|
|
30
|
-
placement?: string;
|
|
31
|
-
target?: string;
|
|
32
|
-
}
|
|
33
|
-
export type ButtonExProps = ButtonBaseExProps & ButtonHrefOrToOrNoProps;
|
|
34
|
-
//# sourceMappingURL=ButtonExProps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExProps.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExProps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAE3D,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,KAAK,CAAA;IACV,SAAS,CAAC,EAAE,KAAK,CAAA;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,SAAS,CAAC,EAAE,eAAe,CAAA;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,EAAE,CAAC,EAAE,KAAK,CAAA;IACV,SAAS,CAAC,EAAE,KAAK,CAAA;CAClB;AAED,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,qBAAqB,CAAA;AAErG,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,SAAS,CAAC,EAAE,eAAe,CAAA;CAC5B;AAED,eAAO,MAAM,qBAAqB,GAAI,OAAO,oBAAoB,KAAG,uBAKnE,CAAA;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,qBAAqB,EAAE,SAAS;IACpG,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,uBAAuB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ButtonExProps } from './ButtonExProps.tsx';
|
|
2
|
-
declare const ButtonToEx: {
|
|
3
|
-
({ ref, to, toOptions, onClick, ...props }: ButtonExProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
displayName: string;
|
|
5
|
-
};
|
|
6
|
-
export { ButtonToEx };
|
|
7
|
-
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,QAAA,MAAM,UAAU;gDAEb,aAAa;;CAUf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|