@xylabs/react-button 3.1.0-rc.6 → 3.1.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/README.md +20 -49
- package/dist/browser/components/ButtonEx.d.cts +5 -0
- package/dist/browser/components/ButtonEx.d.cts.map +1 -0
- package/dist/browser/components/ButtonEx.d.mts.map +1 -1
- package/dist/browser/components/ButtonEx.d.ts.map +1 -1
- package/dist/browser/components/ButtonExBase.d.cts +5 -0
- package/dist/browser/components/ButtonExBase.d.cts.map +1 -0
- package/dist/browser/components/ButtonExBase.d.mts.map +1 -1
- package/dist/browser/components/ButtonExBase.d.ts.map +1 -1
- package/dist/browser/components/ButtonExProps.d.cts +10 -0
- package/dist/browser/components/ButtonExProps.d.cts.map +1 -0
- package/dist/browser/components/ButtonExProps.d.mts +1 -1
- package/dist/browser/components/ButtonExProps.d.mts.map +1 -1
- package/dist/browser/components/ButtonExProps.d.ts +1 -1
- package/dist/browser/components/ButtonExProps.d.ts.map +1 -1
- package/dist/browser/components/ButtonExTo.d.cts +5 -0
- package/dist/browser/components/ButtonExTo.d.cts.map +1 -0
- package/dist/browser/components/ButtonExTo.d.mts +3 -3
- package/dist/browser/components/ButtonExTo.d.mts.map +1 -1
- package/dist/browser/components/ButtonExTo.d.ts +3 -3
- package/dist/browser/components/ButtonExTo.d.ts.map +1 -1
- package/dist/browser/components/index.d.cts +3 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/{node/components/ButtonExBase.js → browser/index.cjs} +36 -10
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +2 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +49 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/components/ButtonEx.d.cts +5 -0
- package/dist/node/components/ButtonEx.d.cts.map +1 -0
- package/dist/node/components/ButtonEx.d.mts.map +1 -1
- package/dist/node/components/ButtonEx.d.ts.map +1 -1
- package/dist/node/components/ButtonExBase.d.cts +5 -0
- package/dist/node/components/ButtonExBase.d.cts.map +1 -0
- package/dist/node/components/ButtonExBase.d.mts.map +1 -1
- package/dist/node/components/ButtonExBase.d.ts.map +1 -1
- package/dist/node/components/ButtonExProps.d.cts +10 -0
- package/dist/node/components/ButtonExProps.d.cts.map +1 -0
- package/dist/node/components/ButtonExProps.d.mts +1 -1
- package/dist/node/components/ButtonExProps.d.mts.map +1 -1
- package/dist/node/components/ButtonExProps.d.ts +1 -1
- package/dist/node/components/ButtonExProps.d.ts.map +1 -1
- package/dist/node/components/ButtonExTo.d.cts +5 -0
- package/dist/node/components/ButtonExTo.d.cts.map +1 -0
- package/dist/node/components/ButtonExTo.d.mts +3 -3
- package/dist/node/components/ButtonExTo.d.mts.map +1 -1
- package/dist/node/components/ButtonExTo.d.ts +3 -3
- package/dist/node/components/ButtonExTo.d.ts.map +1 -1
- package/dist/node/components/index.d.cts +3 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/index.cjs +77 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +2 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +48 -21
- package/dist/node/index.js.map +1 -1
- package/package.json +24 -22
- package/src/components/ButtonEx.tsx +2 -6
- package/src/components/ButtonExBase.tsx +6 -2
- package/src/components/ButtonExProps.tsx +1 -1
- package/src/components/ButtonExTo.tsx +4 -4
- package/dist/browser/components/ButtonEx.js +0 -16
- package/dist/browser/components/ButtonEx.js.map +0 -1
- package/dist/browser/components/ButtonEx.stories.js +0 -32
- package/dist/browser/components/ButtonEx.stories.js.map +0 -1
- package/dist/browser/components/ButtonExBase.js +0 -23
- package/dist/browser/components/ButtonExBase.js.map +0 -1
- package/dist/browser/components/ButtonExProps.js +0 -1
- package/dist/browser/components/ButtonExProps.js.map +0 -1
- package/dist/browser/components/ButtonExTo.js +0 -19
- package/dist/browser/components/ButtonExTo.js.map +0 -1
- package/dist/browser/components/index.js +0 -3
- package/dist/browser/components/index.js.map +0 -1
- package/dist/node/components/ButtonEx.js +0 -40
- package/dist/node/components/ButtonEx.js.map +0 -1
- package/dist/node/components/ButtonEx.mjs +0 -16
- package/dist/node/components/ButtonEx.mjs.map +0 -1
- package/dist/node/components/ButtonEx.stories.js +0 -58
- package/dist/node/components/ButtonEx.stories.js.map +0 -1
- package/dist/node/components/ButtonEx.stories.mjs +0 -32
- package/dist/node/components/ButtonEx.stories.mjs.map +0 -1
- package/dist/node/components/ButtonExBase.js.map +0 -1
- package/dist/node/components/ButtonExBase.mjs +0 -23
- package/dist/node/components/ButtonExBase.mjs.map +0 -1
- package/dist/node/components/ButtonExProps.js +0 -17
- package/dist/node/components/ButtonExProps.js.map +0 -1
- package/dist/node/components/ButtonExProps.mjs +0 -1
- package/dist/node/components/ButtonExProps.mjs.map +0 -1
- package/dist/node/components/ButtonExTo.js +0 -43
- package/dist/node/components/ButtonExTo.js.map +0 -1
- package/dist/node/components/ButtonExTo.mjs +0 -19
- package/dist/node/components/ButtonExTo.mjs.map +0 -1
- package/dist/node/components/index.js +0 -25
- package/dist/node/components/index.js.map +0 -1
- package/dist/node/components/index.mjs +0 -3
- package/dist/node/components/index.mjs.map +0 -1
- package/dist/node/index.mjs +0 -2
- package/dist/node/index.mjs.map +0 -1
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
|
|
3
|
-
import { ButtonEx } from "./ButtonEx";
|
|
4
|
-
const StorybookEntry = {
|
|
5
|
-
argTypes: {},
|
|
6
|
-
component: ButtonEx,
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
page: null
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
title: "button/ButtonEx"
|
|
13
|
-
};
|
|
14
|
-
const DefaultTemplate = (args) => /* @__PURE__ */ jsxs(FlexRow, { justifyContent: "flex-start", children: [
|
|
15
|
-
/* @__PURE__ */ jsx(FlexCol, { marginX: 1, children: /* @__PURE__ */ jsx(ButtonEx, { ...args, children: "Default" }) }),
|
|
16
|
-
/* @__PURE__ */ jsx(FlexCol, { marginX: 1, children: /* @__PURE__ */ jsx(ButtonEx, { variant: "outlined", ...args, children: "Outlined" }) }),
|
|
17
|
-
/* @__PURE__ */ jsx(FlexCol, { marginX: 1, children: /* @__PURE__ */ jsx(ButtonEx, { variant: "contained", ...args, children: "Contained" }) })
|
|
18
|
-
] });
|
|
19
|
-
const Default = DefaultTemplate.bind({});
|
|
20
|
-
Default.args = {};
|
|
21
|
-
const BusyCircular = DefaultTemplate.bind({});
|
|
22
|
-
BusyCircular.args = { busy: true, busyVariant: "circular" };
|
|
23
|
-
const BusyLinear = DefaultTemplate.bind({});
|
|
24
|
-
BusyLinear.args = { busy: true, busyVariant: "linear" };
|
|
25
|
-
var ButtonEx_stories_default = StorybookEntry;
|
|
26
|
-
export {
|
|
27
|
-
BusyCircular,
|
|
28
|
-
BusyLinear,
|
|
29
|
-
Default,
|
|
30
|
-
ButtonEx_stories_default as default
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=ButtonEx.stories.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ButtonEx.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\n\nimport { ButtonEx } from './ButtonEx'\n\nconst StorybookEntry = {\n argTypes: {},\n component: ButtonEx,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'button/ButtonEx',\n} as Meta<typeof ButtonEx>\n\nconst DefaultTemplate: StoryFn<typeof ButtonEx> = (args) => (\n <FlexRow justifyContent=\"flex-start\">\n <FlexCol marginX={1}>\n <ButtonEx {...args}>Default</ButtonEx>\n </FlexCol>\n <FlexCol marginX={1}>\n <ButtonEx variant=\"outlined\" {...args}>\n Outlined\n </ButtonEx>\n </FlexCol>\n <FlexCol marginX={1}>\n <ButtonEx variant=\"contained\" {...args}>\n Contained\n </ButtonEx>\n </FlexCol>\n </FlexRow>\n)\n\nconst Default = DefaultTemplate.bind({})\nDefault.args = {}\n\nconst BusyCircular = DefaultTemplate.bind({})\nBusyCircular.args = { busy: true, busyVariant: 'circular' }\n\nconst BusyLinear = DefaultTemplate.bind({})\nBusyLinear.args = { busy: true, busyVariant: 'linear' }\n\nexport { BusyCircular, BusyLinear, Default }\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAiBE,SAEI,KAFJ;AAhBF,SAAS,SAAS,eAAe;AAEjC,SAAS,gBAAgB;AAEzB,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,kBAA4C,CAAC,SACjD,qBAAC,WAAQ,gBAAe,cACtB;AAAA,sBAAC,WAAQ,SAAS,GAChB,8BAAC,YAAU,GAAG,MAAM,qBAAO,GAC7B;AAAA,EACA,oBAAC,WAAQ,SAAS,GAChB,8BAAC,YAAS,SAAQ,YAAY,GAAG,MAAM,sBAEvC,GACF;AAAA,EACA,oBAAC,WAAQ,SAAS,GAChB,8BAAC,YAAS,SAAQ,aAAa,GAAG,MAAM,uBAExC,GACF;AAAA,GACF;AAGF,MAAM,UAAU,gBAAgB,KAAK,CAAC,CAAC;AACvC,QAAQ,OAAO,CAAC;AAEhB,MAAM,eAAe,gBAAgB,KAAK,CAAC,CAAC;AAC5C,aAAa,OAAO,EAAE,MAAM,MAAM,aAAa,WAAW;AAE1D,MAAM,aAAa,gBAAgB,KAAK,CAAC,CAAC;AAC1C,WAAW,OAAO,EAAE,MAAM,MAAM,aAAa,SAAS;AAItD,IAAO,2BAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ButtonExBase.tsx"],"sourcesContent":["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' ? <BusyLinearProgress rounded opacity={busyOpacity ?? 0} /> : null}\n {busy && busyVariant === 'circular' ? <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} /> : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBI;AAjBJ,sBAAiC;AACjC,0BAA6E;AAC7E,mBAAuC;AAIvC,MAAM,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,WAAW,4CAAC,0CAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IAAK;AAAA,IAC/F,QAAQ,gBAAgB,aAAa,4CAAC,4CAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IAAK;AAAA,IAC/G;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;","names":[]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, useTheme } from "@mui/material";
|
|
3
|
-
import { BusyCircularProgress, BusyLinearProgress, mergeBoxlikeStyles } from "@xylabs/react-shared";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
const ButtonExBase = forwardRef((props, ref) => {
|
|
6
|
-
const theme = useTheme();
|
|
7
|
-
const { busy, busyVariant = "linear", busyOpacity, onClick, children, ...rootProps } = mergeBoxlikeStyles(theme, props);
|
|
8
|
-
const localOnClick = (event) => {
|
|
9
|
-
if (!busy) {
|
|
10
|
-
onClick?.(event);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
return /* @__PURE__ */ jsxs(Button, { ref, onClick: localOnClick, ...rootProps, children: [
|
|
14
|
-
busy && busyVariant === "linear" ? /* @__PURE__ */ jsx(BusyLinearProgress, { rounded: true, opacity: busyOpacity ?? 0 }) : null,
|
|
15
|
-
busy && busyVariant === "circular" ? /* @__PURE__ */ jsx(BusyCircularProgress, { rounded: true, size: 24, opacity: busyOpacity ?? 0.5 }) : null,
|
|
16
|
-
children
|
|
17
|
-
] });
|
|
18
|
-
});
|
|
19
|
-
ButtonExBase.displayName = "ButtonExBaseXYLabs";
|
|
20
|
-
export {
|
|
21
|
-
ButtonExBase
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=ButtonExBase.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ButtonExBase.tsx"],"sourcesContent":["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' ? <BusyLinearProgress rounded opacity={busyOpacity ?? 0} /> : null}\n {busy && busyVariant === 'circular' ? <BusyCircularProgress rounded size={24} opacity={busyOpacity ?? 0.5} /> : null}\n {children}\n </Button>\n )\n})\n\nButtonExBase.displayName = 'ButtonExBaseXYLabs'\n\nexport { ButtonExBase }\n"],"mappings":"AAiBI,SACsC,KADtC;AAjBJ,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB,oBAAoB,0BAA0B;AAC7E,SAAS,kBAA8B;AAIvC,MAAM,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,WAAW,oBAAC,sBAAmB,SAAO,MAAC,SAAS,eAAe,GAAG,IAAK;AAAA,IAC/F,QAAQ,gBAAgB,aAAa,oBAAC,wBAAqB,SAAO,MAAC,MAAM,IAAI,SAAS,eAAe,KAAK,IAAK;AAAA,IAC/G;AAAA,KACH;AAEJ,CAAC;AAED,aAAa,cAAc;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var ButtonExProps_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(ButtonExProps_exports);
|
|
17
|
-
//# sourceMappingURL=ButtonExProps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ButtonExProps.tsx"],"sourcesContent":["import { ButtonProps } from '@mui/material'\nimport { BoxlikeComponentProps, BusyProps } from '@xylabs/react-shared'\nimport { NavigateOptions, To } from 'react-router-dom'\n\ninterface ButtonExProps extends Omit<ButtonProps, 'ref'>, BoxlikeComponentProps, BusyProps {\n target?: string\n to?: To\n toOptions?: NavigateOptions\n}\n\nexport type { ButtonExProps }\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=ButtonExProps.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var ButtonExTo_exports = {};
|
|
20
|
-
__export(ButtonExTo_exports, {
|
|
21
|
-
ButtonExTo: () => ButtonExTo
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(ButtonExTo_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var import_react_router_dom = require("react-router-dom");
|
|
27
|
-
var import_ButtonExBase = require("./ButtonExBase");
|
|
28
|
-
const ButtonExTo = (0, import_react.forwardRef)(({ to, toOptions, onClick, ...props }, ref) => {
|
|
29
|
-
const navigate = (0, import_react_router_dom.useNavigate)();
|
|
30
|
-
const localOnClick = (event) => {
|
|
31
|
-
onClick?.(event);
|
|
32
|
-
if (to) {
|
|
33
|
-
navigate(to, toOptions);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ButtonExBase.ButtonExBase, { ref, onClick: localOnClick, ...props });
|
|
37
|
-
});
|
|
38
|
-
ButtonExTo.displayName = "ButtonExToXYLabs";
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
ButtonExTo
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=ButtonExTo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ButtonExTo.tsx"],"sourcesContent":["import React, { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExTo = 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\nButtonExTo.displayName = 'ButtonExToXYLabs'\n\nexport { ButtonExTo }\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeS;AAfT,mBAA8C;AAC9C,8BAA4B;AAE5B,0BAA6B;AAG7B,MAAM,iBAAa,yBAA6C,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,4CAAC,oCAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { useNavigate } from "react-router-dom";
|
|
4
|
-
import { ButtonExBase } from "./ButtonExBase";
|
|
5
|
-
const ButtonExTo = forwardRef(({ to, toOptions, onClick, ...props }, ref) => {
|
|
6
|
-
const navigate = useNavigate();
|
|
7
|
-
const localOnClick = (event) => {
|
|
8
|
-
onClick?.(event);
|
|
9
|
-
if (to) {
|
|
10
|
-
navigate(to, toOptions);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
return /* @__PURE__ */ jsx(ButtonExBase, { ref, onClick: localOnClick, ...props });
|
|
14
|
-
});
|
|
15
|
-
ButtonExTo.displayName = "ButtonExToXYLabs";
|
|
16
|
-
export {
|
|
17
|
-
ButtonExTo
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=ButtonExTo.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ButtonExTo.tsx"],"sourcesContent":["import React, { forwardRef, MouseEvent } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ButtonExBase } from './ButtonExBase'\nimport { ButtonExProps } from './ButtonExProps'\n\nconst ButtonExTo = 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\nButtonExTo.displayName = 'ButtonExToXYLabs'\n\nexport { ButtonExTo }\n"],"mappings":"AAeS;AAfT,SAAgB,kBAA8B;AAC9C,SAAS,mBAAmB;AAE5B,SAAS,oBAAoB;AAG7B,MAAM,aAAa,WAA6C,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,oBAAC,gBAAa,KAAU,SAAS,cAAe,GAAG,OAAO;AACnE,CAAC;AAED,WAAW,cAAc;","names":[]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
var components_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(components_exports);
|
|
18
|
-
__reExport(components_exports, require("./ButtonEx"), module.exports);
|
|
19
|
-
__reExport(components_exports, require("./ButtonExProps"), module.exports);
|
|
20
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
-
0 && (module.exports = {
|
|
22
|
-
...require("./ButtonEx"),
|
|
23
|
-
...require("./ButtonExProps")
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './ButtonEx'\nexport * from './ButtonExProps'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,uBAAd;AACA,+BAAc,4BADd;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './ButtonEx'\nexport * from './ButtonExProps'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
package/dist/node/index.mjs
DELETED
package/dist/node/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\n"],"mappings":"AAAA,cAAc;","names":[]}
|