@xylabs/react-button 3.2.1 → 3.4.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/dist/browser/components/ButtonEx.d.cts +1 -1
- package/dist/browser/components/ButtonEx.d.cts.map +1 -1
- package/dist/browser/components/ButtonEx.d.mts +1 -1
- package/dist/browser/components/ButtonEx.d.mts.map +1 -1
- package/dist/browser/components/ButtonEx.d.ts +1 -1
- package/dist/browser/components/ButtonEx.d.ts.map +1 -1
- package/dist/browser/components/ButtonExBase.d.cts +1 -1
- package/dist/browser/components/ButtonExBase.d.cts.map +1 -1
- package/dist/browser/components/ButtonExBase.d.mts +1 -1
- package/dist/browser/components/ButtonExBase.d.mts.map +1 -1
- package/dist/browser/components/ButtonExBase.d.ts +1 -1
- package/dist/browser/components/ButtonExBase.d.ts.map +1 -1
- package/dist/browser/components/ButtonExTo.d.cts +1 -1
- package/dist/browser/components/ButtonExTo.d.cts.map +1 -1
- package/dist/browser/components/ButtonExTo.d.mts +1 -1
- package/dist/browser/components/ButtonExTo.d.mts.map +1 -1
- package/dist/browser/components/ButtonExTo.d.ts +1 -1
- package/dist/browser/components/ButtonExTo.d.ts.map +1 -1
- package/dist/browser/components/index.d.cts +2 -2
- package/dist/browser/components/index.d.cts.map +1 -1
- package/dist/browser/components/index.d.mts +2 -2
- package/dist/browser/components/index.d.mts.map +1 -1
- package/dist/browser/components/index.d.ts +2 -2
- package/dist/browser/components/index.d.ts.map +1 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +1 -1
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts +1 -1
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/neutral/components/ButtonEx.d.cts +1 -1
- package/dist/neutral/components/ButtonEx.d.cts.map +1 -1
- package/dist/neutral/components/ButtonEx.d.mts +1 -1
- package/dist/neutral/components/ButtonEx.d.mts.map +1 -1
- package/dist/neutral/components/ButtonEx.d.ts +1 -1
- package/dist/neutral/components/ButtonEx.d.ts.map +1 -1
- package/dist/neutral/components/ButtonExBase.d.cts +1 -1
- package/dist/neutral/components/ButtonExBase.d.cts.map +1 -1
- package/dist/neutral/components/ButtonExBase.d.mts +1 -1
- package/dist/neutral/components/ButtonExBase.d.mts.map +1 -1
- package/dist/neutral/components/ButtonExBase.d.ts +1 -1
- package/dist/neutral/components/ButtonExBase.d.ts.map +1 -1
- package/dist/neutral/components/ButtonExTo.d.cts +1 -1
- package/dist/neutral/components/ButtonExTo.d.cts.map +1 -1
- package/dist/neutral/components/ButtonExTo.d.mts +1 -1
- package/dist/neutral/components/ButtonExTo.d.mts.map +1 -1
- package/dist/neutral/components/ButtonExTo.d.ts +1 -1
- package/dist/neutral/components/ButtonExTo.d.ts.map +1 -1
- package/dist/neutral/components/index.d.cts +2 -2
- package/dist/neutral/components/index.d.cts.map +1 -1
- package/dist/neutral/components/index.d.mts +2 -2
- package/dist/neutral/components/index.d.mts.map +1 -1
- package/dist/neutral/components/index.d.ts +2 -2
- package/dist/neutral/components/index.d.ts.map +1 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +1 -1
- package/dist/neutral/index.d.cts.map +1 -1
- package/dist/neutral/index.d.mts +1 -1
- package/dist/neutral/index.d.mts.map +1 -1
- package/dist/neutral/index.d.ts +1 -1
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.js.map +1 -1
- package/dist/node/components/ButtonEx.d.cts +1 -1
- package/dist/node/components/ButtonEx.d.cts.map +1 -1
- package/dist/node/components/ButtonEx.d.mts +1 -1
- package/dist/node/components/ButtonEx.d.mts.map +1 -1
- package/dist/node/components/ButtonEx.d.ts +1 -1
- package/dist/node/components/ButtonEx.d.ts.map +1 -1
- package/dist/node/components/ButtonExBase.d.cts +1 -1
- package/dist/node/components/ButtonExBase.d.cts.map +1 -1
- package/dist/node/components/ButtonExBase.d.mts +1 -1
- package/dist/node/components/ButtonExBase.d.mts.map +1 -1
- package/dist/node/components/ButtonExBase.d.ts +1 -1
- package/dist/node/components/ButtonExBase.d.ts.map +1 -1
- package/dist/node/components/ButtonExTo.d.cts +1 -1
- package/dist/node/components/ButtonExTo.d.cts.map +1 -1
- package/dist/node/components/ButtonExTo.d.mts +1 -1
- package/dist/node/components/ButtonExTo.d.mts.map +1 -1
- package/dist/node/components/ButtonExTo.d.ts +1 -1
- package/dist/node/components/ButtonExTo.d.ts.map +1 -1
- package/dist/node/components/index.d.cts +2 -2
- package/dist/node/components/index.d.cts.map +1 -1
- package/dist/node/components/index.d.mts +2 -2
- package/dist/node/components/index.d.mts.map +1 -1
- package/dist/node/components/index.d.ts +2 -2
- package/dist/node/components/index.d.ts.map +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/ButtonEx.stories.tsx +1 -2
- package/src/components/ButtonEx.tsx +3 -3
- package/src/components/ButtonExBase.tsx +1 -1
- package/src/components/ButtonExTo.tsx +2 -2
- package/src/components/index.ts +2 -2
- package/src/index.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["export * from './components'\n","import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\nimport { ButtonToEx } from './ButtonExTo'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;ACA3B,sBAAiC;AACjC,0BAA6E;AAC7E,mBAAuC;AAenC;AAXJ,IAAM,mBAAe,yBAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,YAAQ,0BAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,QAAI,wCAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,6CAAC,0BAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,4CAAC,0CAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,4CAAC,4CAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,IAAAC,gBAAuC;AACvC,8BAA4B;AAcnB,IAAAC,sBAAA;AATT,IAAM,iBAAa,0BAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,eAAW,qCAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,6CAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,IAAAC,sBAAA;AADd,IAAM,eAAW,0BAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,6CAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,6CAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["export * from './components/index.js'\n","import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\nimport { ButtonToEx } from './ButtonExTo.jsx'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;ACA3B,sBAAiC;AACjC,0BAA6E;AAC7E,mBAAuC;AAenC;AAXJ,IAAM,mBAAe,yBAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,YAAQ,0BAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,QAAI,wCAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,6CAAC,0BAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,4CAAC,0CAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,4CAAC,4CAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,IAAAC,gBAAuC;AACvC,8BAA4B;AAcnB,IAAAC,sBAAA;AATT,IAAM,iBAAa,0BAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,eAAW,qCAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,6CAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,IAAAC,sBAAA;AADd,IAAM,eAAW,0BAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,6CAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,6CAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\nimport { ButtonToEx } from './ButtonExTo'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB,oBAAoB,0BAA0B;AAC7E,SAAS,kBAA8B;AAenC,SAEI,KAFJ;AAXJ,IAAM,eAAe,WAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,QAAQ,SAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,IAAI,mBAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,qBAAC,UAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,oBAAC,sBAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,oBAAC,wBAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,SAAS,cAAAC,mBAA8B;AACvC,SAAS,mBAAmB;AAcnB,gBAAAC,YAAA;AATT,IAAM,aAAaC,YAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,gBAAAD,KAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,gBAAAE,YAAA;AADd,IAAM,WAAWC,YAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,gBAAAD,KAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,gBAAAA,KAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["forwardRef","forwardRef","jsx","forwardRef","jsx","forwardRef"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\nimport { ButtonToEx } from './ButtonExTo.jsx'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB,oBAAoB,0BAA0B;AAC7E,SAAS,kBAA8B;AAenC,SAEI,KAFJ;AAXJ,IAAM,eAAe,WAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,QAAQ,SAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,IAAI,mBAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,qBAAC,UAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,oBAAC,sBAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,oBAAC,wBAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,SAAS,cAAAC,mBAA8B;AACvC,SAAS,mBAAmB;AAcnB,gBAAAC,YAAA;AATT,IAAM,aAAaC,YAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,gBAAAD,KAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,gBAAAE,YAAA;AADd,IAAM,WAAWC,YAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,gBAAAD,KAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,gBAAAA,KAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["forwardRef","forwardRef","jsx","forwardRef","jsx","forwardRef"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["export * from './components'\n","import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\nimport { ButtonToEx } from './ButtonExTo'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;ACA3B,sBAAiC;AACjC,0BAA6E;AAC7E,mBAAuC;AAenC;AAXJ,IAAM,mBAAe,yBAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,YAAQ,0BAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,QAAI,wCAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,6CAAC,0BAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,4CAAC,0CAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,4CAAC,4CAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,IAAAC,gBAAuC;AACvC,8BAA4B;AAcnB,IAAAC,sBAAA;AATT,IAAM,iBAAa,0BAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,eAAW,qCAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,6CAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,IAAAC,sBAAA;AADd,IAAM,eAAW,0BAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,6CAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,6CAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["export * from './components/index.js'\n","import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\nimport { ButtonToEx } from './ButtonExTo.jsx'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;ACA3B,sBAAiC;AACjC,0BAA6E;AAC7E,mBAAuC;AAenC;AAXJ,IAAM,mBAAe,yBAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,YAAQ,0BAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,QAAI,wCAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,6CAAC,0BAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,4CAAC,0CAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,4CAAC,4CAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,IAAAC,gBAAuC;AACvC,8BAA4B;AAcnB,IAAAC,sBAAA;AATT,IAAM,iBAAa,0BAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,eAAW,qCAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,6CAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,IAAAC,sBAAA;AADd,IAAM,eAAW,0BAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,6CAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,6CAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}
|
package/dist/neutral/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/neutral/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\nimport { ButtonToEx } from './ButtonExTo'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB,oBAAoB,0BAA0B;AAC7E,SAAS,kBAA8B;AAenC,SAEI,KAFJ;AAXJ,IAAM,eAAe,WAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,QAAQ,SAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,IAAI,mBAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,qBAAC,UAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,oBAAC,sBAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,oBAAC,wBAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,SAAS,cAAAC,mBAA8B;AACvC,SAAS,mBAAmB;AAcnB,gBAAAC,YAAA;AATT,IAAM,aAAaC,YAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,gBAAAD,KAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,gBAAAE,YAAA;AADd,IAAM,WAAWC,YAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,gBAAAD,KAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,gBAAAA,KAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["forwardRef","forwardRef","jsx","forwardRef","jsx","forwardRef"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\nimport { ButtonToEx } from './ButtonExTo.jsx'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB,oBAAoB,0BAA0B;AAC7E,SAAS,kBAA8B;AAenC,SAEI,KAFJ;AAXJ,IAAM,eAAe,WAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,QAAQ,SAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,IAAI,mBAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF;AAEA,SACE,qBAAC,UAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,oBAAC,sBAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,oBAAC,wBAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,SAAS,cAAAC,mBAA8B;AACvC,SAAS,mBAAmB;AAcnB,gBAAAC,YAAA;AATT,IAAM,aAAaC,YAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,cAAU,KAAK;AACf,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,gBAAAD,KAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,gBAAAE,YAAA;AADd,IAAM,WAAWC,YAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,gBAAAD,KAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,gBAAAA,KAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["forwardRef","forwardRef","jsx","forwardRef","jsx","forwardRef"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonEx };
|
|
4
4
|
//# sourceMappingURL=ButtonEx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonEx.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonEx.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGnD,QAAA,MAAM,QAAQ,6GAEZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonExBase: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonExBase };
|
|
4
4
|
//# sourceMappingURL=ButtonExBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExBase.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExBase.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,YAAY,6GAqBhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonExProps } from './ButtonExProps';
|
|
1
|
+
import { ButtonExProps } from './ButtonExProps.jsx';
|
|
2
2
|
declare const ButtonToEx: import("react").ForwardRefExoticComponent<ButtonExProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export { ButtonToEx };
|
|
4
4
|
//# sourceMappingURL=ButtonExTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonExTo.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonExTo.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAA,MAAM,UAAU,6GAUd,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ButtonEx';
|
|
2
|
-
export * from './ButtonExProps';
|
|
1
|
+
export * from './ButtonEx.jsx';
|
|
2
|
+
export * from './ButtonExProps.jsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
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/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["export * from './components'\n","import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\nimport { ButtonToEx } from './ButtonExTo'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;ACA3B,sBAAiC;AACjC,0BAA6E;AAC7E,mBAAuC;AAenC;AAXJ,IAAM,mBAAe,yBAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,YAAQ,0BAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,QAAI,wCAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,yCAAU;AAAA,IACZ;AAAA,EACF;AAEA,SACE,6CAAC,0BAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,4CAAC,0CAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,4CAAC,4CAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,IAAAC,gBAAuC;AACvC,8BAA4B;AAcnB,IAAAC,sBAAA;AATT,IAAM,iBAAa,0BAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,eAAW,qCAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,uCAAU;AACV,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,6CAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,IAAAC,sBAAA;AADd,IAAM,eAAW,0BAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,6CAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,6CAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["export * from './components/index.js'\n","import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\nimport { ButtonToEx } from './ButtonExTo.jsx'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;ACA3B,sBAAiC;AACjC,0BAA6E;AAC7E,mBAAuC;AAenC;AAXJ,IAAM,mBAAe,yBAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,YAAQ,0BAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,QAAI,wCAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,yCAAU;AAAA,IACZ;AAAA,EACF;AAEA,SACE,6CAAC,0BAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,4CAAC,0CAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,4CAAC,4CAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,IAAAC,gBAAuC;AACvC,8BAA4B;AAcnB,IAAAC,sBAAA;AATT,IAAM,iBAAa,0BAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,eAAW,qCAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,uCAAU;AACV,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,6CAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,IAAAC,sBAAA;AADd,IAAM,eAAW,0BAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,6CAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,6CAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\nimport { ButtonToEx } from './ButtonExTo'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB,oBAAoB,0BAA0B;AAC7E,SAAS,kBAA8B;AAenC,SAEI,KAFJ;AAXJ,IAAM,eAAe,WAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,QAAQ,SAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,IAAI,mBAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,yCAAU;AAAA,IACZ;AAAA,EACF;AAEA,SACE,qBAAC,UAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,oBAAC,sBAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,oBAAC,wBAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,SAAS,cAAAC,mBAA8B;AACvC,SAAS,mBAAmB;AAcnB,gBAAAC,YAAA;AATT,IAAM,aAAaC,YAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,uCAAU;AACV,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,gBAAAD,KAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,gBAAAE,YAAA;AADd,IAAM,WAAWC,YAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,gBAAAD,KAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,gBAAAA,KAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["forwardRef","forwardRef","jsx","forwardRef","jsx","forwardRef"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/ButtonEx.tsx","../../src/components/ButtonExBase.tsx","../../src/components/ButtonExTo.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\nimport { ButtonToEx } from './ButtonExTo.jsx'\n\nconst ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {\n return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />\n})\n\nButtonEx.displayName = 'ButtonExXYLabs'\n\nexport { ButtonEx }\n","import { Button, useTheme } from '@mui/material'\nimport { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'\nimport { forwardRef, MouseEvent } from 'react'\n\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {\n const theme = useTheme()\n const { busy, busyVariant = 'linear', busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles<ButtonExProps>(theme, props)\n\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (!busy) {\n onClick?.(event)\n }\n }\n\n return (\n <Button ref={ref} onClick={localOnClick} {...rootProps}>\n {busy && busyVariant === 'linear' ?\n <BusyLinearProgress rounded opacity={busyOpacity ?? 0} />\n : null}\n {busy && busyVariant === 'circular' ?\n <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} />\n : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n","import { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase.jsx'\nimport { ButtonExProps } from './ButtonExProps.jsx'\n\nconst ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ButtonExBase ref={ref} onClick={localOnClick} {...props} />\n})\n\nButtonToEx.displayName = 'ButtonToExXYLabs'\n\nexport { ButtonToEx }\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB,oBAAoB,0BAA0B;AAC7E,SAAS,kBAA8B;AAenC,SAEI,KAFJ;AAXJ,IAAM,eAAe,WAA6C,CAAC,OAAO,QAAQ;AAChF,QAAM,QAAQ,SAAS;AACvB,QAAM,EAAE,MAAM,cAAc,UAAU,aAAa,SAAS,UAAU,GAAG,UAAU,IAAI,mBAAkC,OAAO,KAAK;AAErI,QAAM,eAAe,CAAC,UAAyC;AAC7D,QAAI,CAAC,MAAM;AACT,yCAAU;AAAA,IACZ;AAAA,EACF;AAEA,SACE,qBAAC,UAAO,KAAU,SAAS,cAAe,GAAG,WAC1C;AAAA,YAAQ,gBAAgB,WACvB,oBAAC,sBAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IACvD;AAAA,IACD,QAAQ,gBAAgB,aACvB,oBAAC,wBAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IACrE;AAAA,IACD;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;;;AC7B3B,SAAS,cAAAC,mBAA8B;AACvC,SAAS,mBAAmB;AAcnB,gBAAAC,YAAA;AATT,IAAM,aAAaC,YAA6C,CAAC,EAAE,IAAI,WAAW,SAAS,GAAG,MAAM,GAAG,QAAQ;AAC7G,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,CAAC,UAAyC;AAC7D,uCAAU;AACV,QAAI,IAAI;AACN,eAAS,IAAI,SAAS;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,gBAAAD,KAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;;;AFXX,gBAAAE,YAAA;AADd,IAAM,WAAWC,YAA6C,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ;AACvF,SAAO,KAAK,gBAAAD,KAAC,cAAW,IAAQ,KAAW,GAAG,OAAO,IAAK,gBAAAA,KAAC,gBAAc,GAAG,OAAO;AACrF,CAAC;AAED,SAAS,cAAc;","names":["forwardRef","forwardRef","jsx","forwardRef","jsx","forwardRef"]}
|
package/package.json
CHANGED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"packages/*"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xylabs/react-shared": "^3.
|
|
16
|
+
"@xylabs/react-shared": "^3.4.0",
|
|
17
17
|
"react-router-dom": "^6.24.1"
|
|
18
18
|
},
|
|
19
19
|
"description": "Common React library for all XY Labs projects that use React",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@storybook/react": "^
|
|
21
|
+
"@storybook/react": "^8.2.1",
|
|
22
22
|
"@types/react": "^18.3.3",
|
|
23
|
-
"@xylabs/react-flexbox": "^3.
|
|
23
|
+
"@xylabs/react-flexbox": "^3.4.0",
|
|
24
24
|
"@xylabs/ts-scripts-yarn3": "^3.11.12",
|
|
25
25
|
"@xylabs/tsconfig-react": "^3.11.12",
|
|
26
26
|
"react": "^18.3.1",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"url": "https://github.com/xylabs/sdk-react.git"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
|
-
"version": "3.
|
|
78
|
+
"version": "3.4.0",
|
|
79
79
|
"type": "module"
|
|
80
80
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
|
+
import { ButtonEx } from '@xylabs/react-button'
|
|
2
3
|
import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
3
4
|
|
|
4
|
-
import { ButtonEx } from './ButtonEx'
|
|
5
|
-
|
|
6
5
|
const StorybookEntry = {
|
|
7
6
|
argTypes: {},
|
|
8
7
|
component: ButtonEx,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { forwardRef } from 'react'
|
|
2
2
|
|
|
3
|
-
import { ButtonExBase } from './ButtonExBase'
|
|
4
|
-
import { ButtonExProps } from './ButtonExProps'
|
|
5
|
-
import { ButtonToEx } from './ButtonExTo'
|
|
3
|
+
import { ButtonExBase } from './ButtonExBase.jsx'
|
|
4
|
+
import { ButtonExProps } from './ButtonExProps.jsx'
|
|
5
|
+
import { ButtonToEx } from './ButtonExTo.jsx'
|
|
6
6
|
|
|
7
7
|
const ButtonEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, ...props }, ref) => {
|
|
8
8
|
return to ? <ButtonToEx to={to} ref={ref} {...props} /> : <ButtonExBase {...props} />
|
|
@@ -2,7 +2,7 @@ import { Button, useTheme } from '@mui/material'
|
|
|
2
2
|
import { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from '@xylabs/react-shared'
|
|
3
3
|
import { forwardRef, MouseEvent } from 'react'
|
|
4
4
|
|
|
5
|
-
import { ButtonExProps } from './ButtonExProps'
|
|
5
|
+
import { ButtonExProps } from './ButtonExProps.jsx'
|
|
6
6
|
|
|
7
7
|
const ButtonExBase = forwardRef<HTMLButtonElement, ButtonExProps>((props, ref) => {
|
|
8
8
|
const theme = useTheme()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { forwardRef, MouseEvent } from 'react'
|
|
2
2
|
import { useNavigate } from 'react-router-dom'
|
|
3
3
|
|
|
4
|
-
import { ButtonExBase } from './ButtonExBase'
|
|
5
|
-
import { ButtonExProps } from './ButtonExProps'
|
|
4
|
+
import { ButtonExBase } from './ButtonExBase.jsx'
|
|
5
|
+
import { ButtonExProps } from './ButtonExProps.jsx'
|
|
6
6
|
|
|
7
7
|
const ButtonToEx = forwardRef<HTMLButtonElement, ButtonExProps>(({ to, toOptions, onClick, ...props }, ref) => {
|
|
8
8
|
const navigate = useNavigate()
|
package/src/components/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './ButtonEx'
|
|
2
|
-
export * from './ButtonExProps'
|
|
1
|
+
export * from './ButtonEx.jsx'
|
|
2
|
+
export * from './ButtonExProps.jsx'
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components'
|
|
1
|
+
export * from './components/index.js'
|