@xyo-network/react-share 2.82.0 → 2.83.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/index.d.ts +10 -2
- package/package.json +6 -22
- package/xy.config.ts +12 -0
- package/dist/browser/ShareButton.d.cts +0 -8
- package/dist/browser/ShareButton.d.cts.map +0 -1
- package/dist/browser/ShareButton.d.mts +0 -8
- package/dist/browser/ShareButton.d.mts.map +0 -1
- package/dist/browser/ShareButton.d.ts +0 -8
- package/dist/browser/ShareButton.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -96
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -2
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -2
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/neutral/ShareButton.d.cts +0 -8
- package/dist/neutral/ShareButton.d.cts.map +0 -1
- package/dist/neutral/ShareButton.d.mts +0 -8
- package/dist/neutral/ShareButton.d.mts.map +0 -1
- package/dist/neutral/ShareButton.d.ts +0 -8
- package/dist/neutral/ShareButton.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -96
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -2
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -2
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts +0 -2
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/index.mjs +0 -65
- package/dist/neutral/index.mjs.map +0 -1
- package/dist/node/ShareButton.d.cts +0 -8
- package/dist/node/ShareButton.d.cts.map +0 -1
- package/dist/node/ShareButton.d.mts +0 -8
- package/dist/node/ShareButton.d.mts.map +0 -1
- package/dist/node/ShareButton.d.ts +0 -8
- package/dist/node/ShareButton.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -100
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -2
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -2
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.mjs +0 -65
- package/dist/node/index.mjs.map +0 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface ShareButtonProps extends ButtonExProps {
|
|
5
|
+
prepared?: boolean;
|
|
6
|
+
shareLink?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const ShareButton: React.FC<ShareButtonProps>;
|
|
9
|
+
|
|
10
|
+
export { ShareButton, type ShareButtonProps };
|
package/package.json
CHANGED
|
@@ -24,38 +24,22 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@storybook/react": "^8.2.7",
|
|
27
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
27
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.7",
|
|
28
28
|
"typescript": "^5.5.4"
|
|
29
29
|
},
|
|
30
30
|
"description": "Common React library for all XYO projects that use React",
|
|
31
31
|
"docs": "dist/docs.json",
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
"default": "./dist/node/index.mjs"
|
|
38
|
-
},
|
|
39
|
-
"require": {
|
|
40
|
-
"types": "./dist/node/index.d.cts",
|
|
41
|
-
"default": "./dist/node/index.cjs"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"browser": {
|
|
45
|
-
"import": {
|
|
46
|
-
"types": "./dist/browser/index.d.mts",
|
|
47
|
-
"default": "./dist/browser/index.mjs"
|
|
48
|
-
},
|
|
49
|
-
"require": {
|
|
50
|
-
"types": "./dist/browser/index.d.cts",
|
|
51
|
-
"default": "./dist/browser/index.cjs"
|
|
52
|
-
}
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./dist/browser/index.d.ts",
|
|
36
|
+
"default": "./dist/browser/index.mjs"
|
|
53
37
|
},
|
|
38
|
+
"types": "./dist/browser/index.d.ts",
|
|
54
39
|
"default": "./dist/browser/index.mjs"
|
|
55
40
|
},
|
|
56
41
|
"./package.json": "./package.json"
|
|
57
42
|
},
|
|
58
|
-
"main": "dist/browser/index.cjs",
|
|
59
43
|
"module": "dist/browser/index.mjs",
|
|
60
44
|
"homepage": "https://xyo.network",
|
|
61
45
|
"keywords": [
|
|
@@ -78,6 +62,6 @@
|
|
|
78
62
|
},
|
|
79
63
|
"sideEffects": false,
|
|
80
64
|
"types": "dist/browser/index.d.ts",
|
|
81
|
-
"version": "2.
|
|
65
|
+
"version": "2.83.0",
|
|
82
66
|
"type": "module"
|
|
83
67
|
}
|
package/xy.config.ts
ADDED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
package/dist/browser/index.cjs
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/index.ts
|
|
32
|
-
var src_exports = {};
|
|
33
|
-
__export(src_exports, {
|
|
34
|
-
ShareButton: () => ShareButton
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(src_exports);
|
|
37
|
-
|
|
38
|
-
// src/ShareButton.tsx
|
|
39
|
-
var import_icons_material = require("@mui/icons-material");
|
|
40
|
-
var import_material = require("@mui/material");
|
|
41
|
-
var import_react_button = require("@xylabs/react-button");
|
|
42
|
-
var import_react_flexbox = require("@xylabs/react-flexbox");
|
|
43
|
-
var import_react_link = require("@xylabs/react-link");
|
|
44
|
-
var import_react = __toESM(require("react"), 1);
|
|
45
|
-
var ShareButton = /* @__PURE__ */ __name(({ prepared = true, shareLink, ...props }) => {
|
|
46
|
-
const [expanded, setExpanded] = (0, import_react.useState)(false);
|
|
47
|
-
const anchorRef = (0, import_react.useRef)(null);
|
|
48
|
-
const link = shareLink ?? window.location.href;
|
|
49
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_flexbox.FlexRow, {
|
|
50
|
-
gap: 1,
|
|
51
|
-
ref: anchorRef
|
|
52
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_button.ButtonEx, {
|
|
53
|
-
variant: "text",
|
|
54
|
-
minWidth: 32,
|
|
55
|
-
size: "small",
|
|
56
|
-
disabled: !prepared,
|
|
57
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
58
|
-
setExpanded(true);
|
|
59
|
-
}, "onClick"),
|
|
60
|
-
...props
|
|
61
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Share, {
|
|
62
|
-
htmlColor: "gray",
|
|
63
|
-
fontSize: "small"
|
|
64
|
-
})), /* @__PURE__ */ import_react.default.createElement(import_material.Popover, {
|
|
65
|
-
open: prepared ? expanded : false,
|
|
66
|
-
anchorEl: anchorRef.current,
|
|
67
|
-
onClose: /* @__PURE__ */ __name(() => setExpanded(false), "onClose"),
|
|
68
|
-
transitionDuration: 500
|
|
69
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_flexbox.FlexRow, {
|
|
70
|
-
gap: 0.5,
|
|
71
|
-
padding: 0.5
|
|
72
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_link.LinkEx, {
|
|
73
|
-
lineHeight: 0,
|
|
74
|
-
style: {
|
|
75
|
-
color: "#1da1f2"
|
|
76
|
-
},
|
|
77
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
78
|
-
window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`);
|
|
79
|
-
setExpanded(false);
|
|
80
|
-
}, "onClick")
|
|
81
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Twitter, {
|
|
82
|
-
fontSize: "small"
|
|
83
|
-
})), /* @__PURE__ */ import_react.default.createElement(import_react_link.LinkEx, {
|
|
84
|
-
lineHeight: 0,
|
|
85
|
-
style: {
|
|
86
|
-
color: "#4267b2"
|
|
87
|
-
},
|
|
88
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
89
|
-
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`);
|
|
90
|
-
setExpanded(false);
|
|
91
|
-
}, "onClick")
|
|
92
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Facebook, {
|
|
93
|
-
fontSize: "small"
|
|
94
|
-
})))));
|
|
95
|
-
}, "ShareButton");
|
|
96
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/ShareButton.tsx"],"sourcesContent":["export * from './ShareButton.tsx'\n","import { Facebook as FacebookIcon, Share as ShareIcon, Twitter as TwitterIcon } from '@mui/icons-material'\nimport { Popover } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React, { useRef, useState } from 'react'\n\nexport interface ShareButtonProps extends ButtonExProps {\n prepared?: boolean\n shareLink?: string\n}\n\nexport const ShareButton: React.FC<ShareButtonProps> = ({ prepared = true, shareLink, ...props }) => {\n const [expanded, setExpanded] = useState(false)\n const anchorRef = useRef(null)\n const link = shareLink ?? window.location.href\n\n return (\n <FlexRow gap={1} ref={anchorRef}>\n <ButtonEx\n variant=\"text\"\n minWidth={32}\n size=\"small\"\n disabled={!prepared}\n onClick={() => {\n setExpanded(true)\n }}\n {...props}\n >\n <ShareIcon htmlColor=\"gray\" fontSize=\"small\" />\n </ButtonEx>\n <Popover open={prepared ? expanded : false} anchorEl={anchorRef.current} onClose={() => setExpanded(false)} transitionDuration={500}>\n <FlexRow gap={0.5} padding={0.5}>\n <LinkEx\n lineHeight={0}\n style={{ color: '#1da1f2' }}\n onClick={() => {\n window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <TwitterIcon fontSize=\"small\" />\n </LinkEx>\n <LinkEx\n lineHeight={0}\n style={{ color: '#4267b2' }}\n onClick={() => {\n window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <FacebookIcon fontSize=\"small\" />\n </LinkEx>\n </FlexRow>\n </Popover>\n </FlexRow>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,4BAAqF;AACrF,sBAAwB;AACxB,0BAAwC;AACxC,2BAAwB;AACxB,wBAAuB;AACvB,mBAAwC;AAOjC,IAAMA,cAA0C,wBAAC,EAAEC,WAAW,MAAMC,WAAW,GAAGC,MAAAA,MAAO;AAC9F,QAAM,CAACC,UAAUC,WAAAA,QAAeC,uBAAS,KAAA;AACzC,QAAMC,gBAAYC,qBAAO,IAAA;AACzB,QAAMC,OAAOP,aAAaQ,OAAOC,SAASC;AAE1C,SACE,6BAAAC,QAAA,cAACC,8BAAAA;IAAQC,KAAK;IAAGC,KAAKT;KACpB,6BAAAM,QAAA,cAACI,8BAAAA;IACCC,SAAQ;IACRC,UAAU;IACVC,MAAK;IACLC,UAAU,CAACpB;IACXqB,SAAS,6BAAA;AACPjB,kBAAY,IAAA;IACd,GAFS;IAGR,GAAGF;KAEJ,6BAAAU,QAAA,cAACU,sBAAAA,OAAAA;IAAUC,WAAU;IAAOC,UAAS;OAEvC,6BAAAZ,QAAA,cAACa,yBAAAA;IAAQC,MAAM1B,WAAWG,WAAW;IAAOwB,UAAUrB,UAAUsB;IAASC,SAAS,6BAAMzB,YAAY,KAAA,GAAlB;IAA0B0B,oBAAoB;KAC9H,6BAAAlB,QAAA,cAACC,8BAAAA;IAAQC,KAAK;IAAKiB,SAAS;KAC1B,6BAAAnB,QAAA,cAACoB,0BAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPZ,aAAOiB,KAAK,wCAAwCU,mBAAmB5B,IAAAA,CAAAA,EAAO;AAC9EJ,kBAAY,KAAA;IACd,GAHS;KAKT,6BAAAQ,QAAA,cAACyB,sBAAAA,SAAAA;IAAYb,UAAS;OAExB,6BAAAZ,QAAA,cAACoB,0BAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPZ,aAAOiB,KAAK,gDAAgDU,mBAAmB5B,IAAAA,CAAAA,EAAO;AACtFJ,kBAAY,KAAA;IACd,GAHS;KAKT,6BAAAQ,QAAA,cAAC0B,sBAAAA,UAAAA;IAAad,UAAS;;AAMnC,GA7CuD;","names":["ShareButton","prepared","shareLink","props","expanded","setExpanded","useState","anchorRef","useRef","link","window","location","href","React","FlexRow","gap","ref","ButtonEx","variant","minWidth","size","disabled","onClick","ShareIcon","htmlColor","fontSize","Popover","open","anchorEl","current","onClose","transitionDuration","padding","LinkEx","lineHeight","style","color","encodeURIComponent","TwitterIcon","FacebookIcon"]}
|
package/dist/browser/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
package/dist/browser/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
package/dist/neutral/index.cjs
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/index.ts
|
|
32
|
-
var src_exports = {};
|
|
33
|
-
__export(src_exports, {
|
|
34
|
-
ShareButton: () => ShareButton
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(src_exports);
|
|
37
|
-
|
|
38
|
-
// src/ShareButton.tsx
|
|
39
|
-
var import_icons_material = require("@mui/icons-material");
|
|
40
|
-
var import_material = require("@mui/material");
|
|
41
|
-
var import_react_button = require("@xylabs/react-button");
|
|
42
|
-
var import_react_flexbox = require("@xylabs/react-flexbox");
|
|
43
|
-
var import_react_link = require("@xylabs/react-link");
|
|
44
|
-
var import_react = __toESM(require("react"), 1);
|
|
45
|
-
var ShareButton = /* @__PURE__ */ __name(({ prepared = true, shareLink, ...props }) => {
|
|
46
|
-
const [expanded, setExpanded] = (0, import_react.useState)(false);
|
|
47
|
-
const anchorRef = (0, import_react.useRef)(null);
|
|
48
|
-
const link = shareLink ?? window.location.href;
|
|
49
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_flexbox.FlexRow, {
|
|
50
|
-
gap: 1,
|
|
51
|
-
ref: anchorRef
|
|
52
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_button.ButtonEx, {
|
|
53
|
-
variant: "text",
|
|
54
|
-
minWidth: 32,
|
|
55
|
-
size: "small",
|
|
56
|
-
disabled: !prepared,
|
|
57
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
58
|
-
setExpanded(true);
|
|
59
|
-
}, "onClick"),
|
|
60
|
-
...props
|
|
61
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Share, {
|
|
62
|
-
htmlColor: "gray",
|
|
63
|
-
fontSize: "small"
|
|
64
|
-
})), /* @__PURE__ */ import_react.default.createElement(import_material.Popover, {
|
|
65
|
-
open: prepared ? expanded : false,
|
|
66
|
-
anchorEl: anchorRef.current,
|
|
67
|
-
onClose: /* @__PURE__ */ __name(() => setExpanded(false), "onClose"),
|
|
68
|
-
transitionDuration: 500
|
|
69
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_flexbox.FlexRow, {
|
|
70
|
-
gap: 0.5,
|
|
71
|
-
padding: 0.5
|
|
72
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_link.LinkEx, {
|
|
73
|
-
lineHeight: 0,
|
|
74
|
-
style: {
|
|
75
|
-
color: "#1da1f2"
|
|
76
|
-
},
|
|
77
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
78
|
-
window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`);
|
|
79
|
-
setExpanded(false);
|
|
80
|
-
}, "onClick")
|
|
81
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Twitter, {
|
|
82
|
-
fontSize: "small"
|
|
83
|
-
})), /* @__PURE__ */ import_react.default.createElement(import_react_link.LinkEx, {
|
|
84
|
-
lineHeight: 0,
|
|
85
|
-
style: {
|
|
86
|
-
color: "#4267b2"
|
|
87
|
-
},
|
|
88
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
89
|
-
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`);
|
|
90
|
-
setExpanded(false);
|
|
91
|
-
}, "onClick")
|
|
92
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Facebook, {
|
|
93
|
-
fontSize: "small"
|
|
94
|
-
})))));
|
|
95
|
-
}, "ShareButton");
|
|
96
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/ShareButton.tsx"],"sourcesContent":["export * from './ShareButton.tsx'\n","import { Facebook as FacebookIcon, Share as ShareIcon, Twitter as TwitterIcon } from '@mui/icons-material'\nimport { Popover } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React, { useRef, useState } from 'react'\n\nexport interface ShareButtonProps extends ButtonExProps {\n prepared?: boolean\n shareLink?: string\n}\n\nexport const ShareButton: React.FC<ShareButtonProps> = ({ prepared = true, shareLink, ...props }) => {\n const [expanded, setExpanded] = useState(false)\n const anchorRef = useRef(null)\n const link = shareLink ?? window.location.href\n\n return (\n <FlexRow gap={1} ref={anchorRef}>\n <ButtonEx\n variant=\"text\"\n minWidth={32}\n size=\"small\"\n disabled={!prepared}\n onClick={() => {\n setExpanded(true)\n }}\n {...props}\n >\n <ShareIcon htmlColor=\"gray\" fontSize=\"small\" />\n </ButtonEx>\n <Popover open={prepared ? expanded : false} anchorEl={anchorRef.current} onClose={() => setExpanded(false)} transitionDuration={500}>\n <FlexRow gap={0.5} padding={0.5}>\n <LinkEx\n lineHeight={0}\n style={{ color: '#1da1f2' }}\n onClick={() => {\n window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <TwitterIcon fontSize=\"small\" />\n </LinkEx>\n <LinkEx\n lineHeight={0}\n style={{ color: '#4267b2' }}\n onClick={() => {\n window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <FacebookIcon fontSize=\"small\" />\n </LinkEx>\n </FlexRow>\n </Popover>\n </FlexRow>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,4BAAqF;AACrF,sBAAwB;AACxB,0BAAwC;AACxC,2BAAwB;AACxB,wBAAuB;AACvB,mBAAwC;AAOjC,IAAMA,cAA0C,wBAAC,EAAEC,WAAW,MAAMC,WAAW,GAAGC,MAAAA,MAAO;AAC9F,QAAM,CAACC,UAAUC,WAAAA,QAAeC,uBAAS,KAAA;AACzC,QAAMC,gBAAYC,qBAAO,IAAA;AACzB,QAAMC,OAAOP,aAAaQ,OAAOC,SAASC;AAE1C,SACE,6BAAAC,QAAA,cAACC,8BAAAA;IAAQC,KAAK;IAAGC,KAAKT;KACpB,6BAAAM,QAAA,cAACI,8BAAAA;IACCC,SAAQ;IACRC,UAAU;IACVC,MAAK;IACLC,UAAU,CAACpB;IACXqB,SAAS,6BAAA;AACPjB,kBAAY,IAAA;IACd,GAFS;IAGR,GAAGF;KAEJ,6BAAAU,QAAA,cAACU,sBAAAA,OAAAA;IAAUC,WAAU;IAAOC,UAAS;OAEvC,6BAAAZ,QAAA,cAACa,yBAAAA;IAAQC,MAAM1B,WAAWG,WAAW;IAAOwB,UAAUrB,UAAUsB;IAASC,SAAS,6BAAMzB,YAAY,KAAA,GAAlB;IAA0B0B,oBAAoB;KAC9H,6BAAAlB,QAAA,cAACC,8BAAAA;IAAQC,KAAK;IAAKiB,SAAS;KAC1B,6BAAAnB,QAAA,cAACoB,0BAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPZ,aAAOiB,KAAK,wCAAwCU,mBAAmB5B,IAAAA,CAAAA,EAAO;AAC9EJ,kBAAY,KAAA;IACd,GAHS;KAKT,6BAAAQ,QAAA,cAACyB,sBAAAA,SAAAA;IAAYb,UAAS;OAExB,6BAAAZ,QAAA,cAACoB,0BAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPZ,aAAOiB,KAAK,gDAAgDU,mBAAmB5B,IAAAA,CAAAA,EAAO;AACtFJ,kBAAY,KAAA;IACd,GAHS;KAKT,6BAAAQ,QAAA,cAAC0B,sBAAAA,UAAAA;IAAad,UAAS;;AAMnC,GA7CuD;","names":["ShareButton","prepared","shareLink","props","expanded","setExpanded","useState","anchorRef","useRef","link","window","location","href","React","FlexRow","gap","ref","ButtonEx","variant","minWidth","size","disabled","onClick","ShareIcon","htmlColor","fontSize","Popover","open","anchorEl","current","onClose","transitionDuration","padding","LinkEx","lineHeight","style","color","encodeURIComponent","TwitterIcon","FacebookIcon"]}
|
package/dist/neutral/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
package/dist/neutral/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
package/dist/neutral/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
package/dist/neutral/index.mjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/ShareButton.tsx
|
|
5
|
-
import { Facebook as FacebookIcon, Share as ShareIcon, Twitter as TwitterIcon } from "@mui/icons-material";
|
|
6
|
-
import { Popover } from "@mui/material";
|
|
7
|
-
import { ButtonEx } from "@xylabs/react-button";
|
|
8
|
-
import { FlexRow } from "@xylabs/react-flexbox";
|
|
9
|
-
import { LinkEx } from "@xylabs/react-link";
|
|
10
|
-
import React, { useRef, useState } from "react";
|
|
11
|
-
var ShareButton = /* @__PURE__ */ __name(({ prepared = true, shareLink, ...props }) => {
|
|
12
|
-
const [expanded, setExpanded] = useState(false);
|
|
13
|
-
const anchorRef = useRef(null);
|
|
14
|
-
const link = shareLink ?? window.location.href;
|
|
15
|
-
return /* @__PURE__ */ React.createElement(FlexRow, {
|
|
16
|
-
gap: 1,
|
|
17
|
-
ref: anchorRef
|
|
18
|
-
}, /* @__PURE__ */ React.createElement(ButtonEx, {
|
|
19
|
-
variant: "text",
|
|
20
|
-
minWidth: 32,
|
|
21
|
-
size: "small",
|
|
22
|
-
disabled: !prepared,
|
|
23
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
24
|
-
setExpanded(true);
|
|
25
|
-
}, "onClick"),
|
|
26
|
-
...props
|
|
27
|
-
}, /* @__PURE__ */ React.createElement(ShareIcon, {
|
|
28
|
-
htmlColor: "gray",
|
|
29
|
-
fontSize: "small"
|
|
30
|
-
})), /* @__PURE__ */ React.createElement(Popover, {
|
|
31
|
-
open: prepared ? expanded : false,
|
|
32
|
-
anchorEl: anchorRef.current,
|
|
33
|
-
onClose: /* @__PURE__ */ __name(() => setExpanded(false), "onClose"),
|
|
34
|
-
transitionDuration: 500
|
|
35
|
-
}, /* @__PURE__ */ React.createElement(FlexRow, {
|
|
36
|
-
gap: 0.5,
|
|
37
|
-
padding: 0.5
|
|
38
|
-
}, /* @__PURE__ */ React.createElement(LinkEx, {
|
|
39
|
-
lineHeight: 0,
|
|
40
|
-
style: {
|
|
41
|
-
color: "#1da1f2"
|
|
42
|
-
},
|
|
43
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
44
|
-
window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`);
|
|
45
|
-
setExpanded(false);
|
|
46
|
-
}, "onClick")
|
|
47
|
-
}, /* @__PURE__ */ React.createElement(TwitterIcon, {
|
|
48
|
-
fontSize: "small"
|
|
49
|
-
})), /* @__PURE__ */ React.createElement(LinkEx, {
|
|
50
|
-
lineHeight: 0,
|
|
51
|
-
style: {
|
|
52
|
-
color: "#4267b2"
|
|
53
|
-
},
|
|
54
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
55
|
-
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`);
|
|
56
|
-
setExpanded(false);
|
|
57
|
-
}, "onClick")
|
|
58
|
-
}, /* @__PURE__ */ React.createElement(FacebookIcon, {
|
|
59
|
-
fontSize: "small"
|
|
60
|
-
})))));
|
|
61
|
-
}, "ShareButton");
|
|
62
|
-
export {
|
|
63
|
-
ShareButton
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ShareButton.tsx"],"sourcesContent":["import { Facebook as FacebookIcon, Share as ShareIcon, Twitter as TwitterIcon } from '@mui/icons-material'\nimport { Popover } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React, { useRef, useState } from 'react'\n\nexport interface ShareButtonProps extends ButtonExProps {\n prepared?: boolean\n shareLink?: string\n}\n\nexport const ShareButton: React.FC<ShareButtonProps> = ({ prepared = true, shareLink, ...props }) => {\n const [expanded, setExpanded] = useState(false)\n const anchorRef = useRef(null)\n const link = shareLink ?? window.location.href\n\n return (\n <FlexRow gap={1} ref={anchorRef}>\n <ButtonEx\n variant=\"text\"\n minWidth={32}\n size=\"small\"\n disabled={!prepared}\n onClick={() => {\n setExpanded(true)\n }}\n {...props}\n >\n <ShareIcon htmlColor=\"gray\" fontSize=\"small\" />\n </ButtonEx>\n <Popover open={prepared ? expanded : false} anchorEl={anchorRef.current} onClose={() => setExpanded(false)} transitionDuration={500}>\n <FlexRow gap={0.5} padding={0.5}>\n <LinkEx\n lineHeight={0}\n style={{ color: '#1da1f2' }}\n onClick={() => {\n window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <TwitterIcon fontSize=\"small\" />\n </LinkEx>\n <LinkEx\n lineHeight={0}\n style={{ color: '#4267b2' }}\n onClick={() => {\n window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <FacebookIcon fontSize=\"small\" />\n </LinkEx>\n </FlexRow>\n </Popover>\n </FlexRow>\n )\n}\n"],"mappings":";;;;AAAA,SAASA,YAAYC,cAAcC,SAASC,WAAWC,WAAWC,mBAAmB;AACrF,SAASC,eAAe;AACxB,SAASC,gBAA+B;AACxC,SAASC,eAAe;AACxB,SAASC,cAAc;AACvB,OAAOC,SAASC,QAAQC,gBAAgB;AAOjC,IAAMC,cAA0C,wBAAC,EAAEC,WAAW,MAAMC,WAAW,GAAGC,MAAAA,MAAO;AAC9F,QAAM,CAACC,UAAUC,WAAAA,IAAeC,SAAS,KAAA;AACzC,QAAMC,YAAYC,OAAO,IAAA;AACzB,QAAMC,OAAOP,aAAaQ,OAAOC,SAASC;AAE1C,SACE,sBAAA,cAACC,SAAAA;IAAQC,KAAK;IAAGC,KAAKR;KACpB,sBAAA,cAACS,UAAAA;IACCC,SAAQ;IACRC,UAAU;IACVC,MAAK;IACLC,UAAU,CAACnB;IACXoB,SAAS,6BAAA;AACPhB,kBAAY,IAAA;IACd,GAFS;IAGR,GAAGF;KAEJ,sBAAA,cAACmB,WAAAA;IAAUC,WAAU;IAAOC,UAAS;OAEvC,sBAAA,cAACC,SAAAA;IAAQC,MAAMzB,WAAWG,WAAW;IAAOuB,UAAUpB,UAAUqB;IAASC,SAAS,6BAAMxB,YAAY,KAAA,GAAlB;IAA0ByB,oBAAoB;KAC9H,sBAAA,cAACjB,SAAAA;IAAQC,KAAK;IAAKiB,SAAS;KAC1B,sBAAA,cAACC,QAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPX,aAAOgB,KAAK,wCAAwCU,mBAAmB3B,IAAAA,CAAAA,EAAO;AAC9EJ,kBAAY,KAAA;IACd,GAHS;KAKT,sBAAA,cAACgC,aAAAA;IAAYb,UAAS;OAExB,sBAAA,cAACQ,QAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPX,aAAOgB,KAAK,gDAAgDU,mBAAmB3B,IAAAA,CAAAA,EAAO;AACtFJ,kBAAY,KAAA;IACd,GAHS;KAKT,sBAAA,cAACiC,cAAAA;IAAad,UAAS;;AAMnC,GA7CuD;","names":["Facebook","FacebookIcon","Share","ShareIcon","Twitter","TwitterIcon","Popover","ButtonEx","FlexRow","LinkEx","React","useRef","useState","ShareButton","prepared","shareLink","props","expanded","setExpanded","useState","anchorRef","useRef","link","window","location","href","FlexRow","gap","ref","ButtonEx","variant","minWidth","size","disabled","onClick","ShareIcon","htmlColor","fontSize","Popover","open","anchorEl","current","onClose","transitionDuration","padding","LinkEx","lineHeight","style","color","encodeURIComponent","TwitterIcon","FacebookIcon"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonExProps } from '@xylabs/react-button';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ShareButtonProps extends ButtonExProps {
|
|
4
|
-
prepared?: boolean;
|
|
5
|
-
shareLink?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShareButton: React.FC<ShareButtonProps>;
|
|
8
|
-
//# sourceMappingURL=ShareButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/ShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6ClD,CAAA"}
|
package/dist/node/index.cjs
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/index.ts
|
|
32
|
-
var src_exports = {};
|
|
33
|
-
__export(src_exports, {
|
|
34
|
-
ShareButton: () => ShareButton
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(src_exports);
|
|
37
|
-
|
|
38
|
-
// src/ShareButton.tsx
|
|
39
|
-
var import_icons_material = require("@mui/icons-material");
|
|
40
|
-
var import_material = require("@mui/material");
|
|
41
|
-
var import_react_button = require("@xylabs/react-button");
|
|
42
|
-
var import_react_flexbox = require("@xylabs/react-flexbox");
|
|
43
|
-
var import_react_link = require("@xylabs/react-link");
|
|
44
|
-
var import_react = __toESM(require("react"), 1);
|
|
45
|
-
var ShareButton = /* @__PURE__ */ __name(({ prepared = true, shareLink, ...props }) => {
|
|
46
|
-
const [expanded, setExpanded] = (0, import_react.useState)(false);
|
|
47
|
-
const anchorRef = (0, import_react.useRef)(null);
|
|
48
|
-
const link = shareLink ?? window.location.href;
|
|
49
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_flexbox.FlexRow, {
|
|
50
|
-
gap: 1,
|
|
51
|
-
ref: anchorRef
|
|
52
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_button.ButtonEx, {
|
|
53
|
-
variant: "text",
|
|
54
|
-
minWidth: 32,
|
|
55
|
-
size: "small",
|
|
56
|
-
disabled: !prepared,
|
|
57
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
58
|
-
setExpanded(true);
|
|
59
|
-
}, "onClick"),
|
|
60
|
-
...props
|
|
61
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Share, {
|
|
62
|
-
htmlColor: "gray",
|
|
63
|
-
fontSize: "small"
|
|
64
|
-
})), /* @__PURE__ */ import_react.default.createElement(import_material.Popover, {
|
|
65
|
-
open: prepared ? expanded : false,
|
|
66
|
-
anchorEl: anchorRef.current,
|
|
67
|
-
onClose: /* @__PURE__ */ __name(() => setExpanded(false), "onClose"),
|
|
68
|
-
transitionDuration: 500
|
|
69
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_flexbox.FlexRow, {
|
|
70
|
-
gap: 0.5,
|
|
71
|
-
padding: 0.5
|
|
72
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_link.LinkEx, {
|
|
73
|
-
lineHeight: 0,
|
|
74
|
-
style: {
|
|
75
|
-
color: "#1da1f2"
|
|
76
|
-
},
|
|
77
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
78
|
-
window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`);
|
|
79
|
-
setExpanded(false);
|
|
80
|
-
}, "onClick")
|
|
81
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Twitter, {
|
|
82
|
-
fontSize: "small"
|
|
83
|
-
})), /* @__PURE__ */ import_react.default.createElement(import_react_link.LinkEx, {
|
|
84
|
-
lineHeight: 0,
|
|
85
|
-
style: {
|
|
86
|
-
color: "#4267b2"
|
|
87
|
-
},
|
|
88
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
89
|
-
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`);
|
|
90
|
-
setExpanded(false);
|
|
91
|
-
}, "onClick")
|
|
92
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Facebook, {
|
|
93
|
-
fontSize: "small"
|
|
94
|
-
})))));
|
|
95
|
-
}, "ShareButton");
|
|
96
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
-
0 && (module.exports = {
|
|
98
|
-
ShareButton
|
|
99
|
-
});
|
|
100
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/node/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/ShareButton.tsx"],"sourcesContent":["export * from './ShareButton.tsx'\n","import { Facebook as FacebookIcon, Share as ShareIcon, Twitter as TwitterIcon } from '@mui/icons-material'\nimport { Popover } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React, { useRef, useState } from 'react'\n\nexport interface ShareButtonProps extends ButtonExProps {\n prepared?: boolean\n shareLink?: string\n}\n\nexport const ShareButton: React.FC<ShareButtonProps> = ({ prepared = true, shareLink, ...props }) => {\n const [expanded, setExpanded] = useState(false)\n const anchorRef = useRef(null)\n const link = shareLink ?? window.location.href\n\n return (\n <FlexRow gap={1} ref={anchorRef}>\n <ButtonEx\n variant=\"text\"\n minWidth={32}\n size=\"small\"\n disabled={!prepared}\n onClick={() => {\n setExpanded(true)\n }}\n {...props}\n >\n <ShareIcon htmlColor=\"gray\" fontSize=\"small\" />\n </ButtonEx>\n <Popover open={prepared ? expanded : false} anchorEl={anchorRef.current} onClose={() => setExpanded(false)} transitionDuration={500}>\n <FlexRow gap={0.5} padding={0.5}>\n <LinkEx\n lineHeight={0}\n style={{ color: '#1da1f2' }}\n onClick={() => {\n window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <TwitterIcon fontSize=\"small\" />\n </LinkEx>\n <LinkEx\n lineHeight={0}\n style={{ color: '#4267b2' }}\n onClick={() => {\n window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <FacebookIcon fontSize=\"small\" />\n </LinkEx>\n </FlexRow>\n </Popover>\n </FlexRow>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,4BAAqF;AACrF,sBAAwB;AACxB,0BAAwC;AACxC,2BAAwB;AACxB,wBAAuB;AACvB,mBAAwC;AAOjC,IAAMA,cAA0C,wBAAC,EAAEC,WAAW,MAAMC,WAAW,GAAGC,MAAAA,MAAO;AAC9F,QAAM,CAACC,UAAUC,WAAAA,QAAeC,uBAAS,KAAA;AACzC,QAAMC,gBAAYC,qBAAO,IAAA;AACzB,QAAMC,OAAOP,aAAaQ,OAAOC,SAASC;AAE1C,SACE,6BAAAC,QAAA,cAACC,8BAAAA;IAAQC,KAAK;IAAGC,KAAKT;KACpB,6BAAAM,QAAA,cAACI,8BAAAA;IACCC,SAAQ;IACRC,UAAU;IACVC,MAAK;IACLC,UAAU,CAACpB;IACXqB,SAAS,6BAAA;AACPjB,kBAAY,IAAA;IACd,GAFS;IAGR,GAAGF;KAEJ,6BAAAU,QAAA,cAACU,sBAAAA,OAAAA;IAAUC,WAAU;IAAOC,UAAS;OAEvC,6BAAAZ,QAAA,cAACa,yBAAAA;IAAQC,MAAM1B,WAAWG,WAAW;IAAOwB,UAAUrB,UAAUsB;IAASC,SAAS,6BAAMzB,YAAY,KAAA,GAAlB;IAA0B0B,oBAAoB;KAC9H,6BAAAlB,QAAA,cAACC,8BAAAA;IAAQC,KAAK;IAAKiB,SAAS;KAC1B,6BAAAnB,QAAA,cAACoB,0BAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPZ,aAAOiB,KAAK,wCAAwCU,mBAAmB5B,IAAAA,CAAAA,EAAO;AAC9EJ,kBAAY,KAAA;IACd,GAHS;KAKT,6BAAAQ,QAAA,cAACyB,sBAAAA,SAAAA;IAAYb,UAAS;OAExB,6BAAAZ,QAAA,cAACoB,0BAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPZ,aAAOiB,KAAK,gDAAgDU,mBAAmB5B,IAAAA,CAAAA,EAAO;AACtFJ,kBAAY,KAAA;IACd,GAHS;KAKT,6BAAAQ,QAAA,cAAC0B,sBAAAA,UAAAA;IAAad,UAAS;;AAMnC,GA7CuD;","names":["ShareButton","prepared","shareLink","props","expanded","setExpanded","useState","anchorRef","useRef","link","window","location","href","React","FlexRow","gap","ref","ButtonEx","variant","minWidth","size","disabled","onClick","ShareIcon","htmlColor","fontSize","Popover","open","anchorEl","current","onClose","transitionDuration","padding","LinkEx","lineHeight","style","color","encodeURIComponent","TwitterIcon","FacebookIcon"]}
|
package/dist/node/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
package/dist/node/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
package/dist/node/index.d.ts
DELETED
package/dist/node/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
package/dist/node/index.mjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/ShareButton.tsx
|
|
5
|
-
import { Facebook as FacebookIcon, Share as ShareIcon, Twitter as TwitterIcon } from "@mui/icons-material";
|
|
6
|
-
import { Popover } from "@mui/material";
|
|
7
|
-
import { ButtonEx } from "@xylabs/react-button";
|
|
8
|
-
import { FlexRow } from "@xylabs/react-flexbox";
|
|
9
|
-
import { LinkEx } from "@xylabs/react-link";
|
|
10
|
-
import React, { useRef, useState } from "react";
|
|
11
|
-
var ShareButton = /* @__PURE__ */ __name(({ prepared = true, shareLink, ...props }) => {
|
|
12
|
-
const [expanded, setExpanded] = useState(false);
|
|
13
|
-
const anchorRef = useRef(null);
|
|
14
|
-
const link = shareLink ?? window.location.href;
|
|
15
|
-
return /* @__PURE__ */ React.createElement(FlexRow, {
|
|
16
|
-
gap: 1,
|
|
17
|
-
ref: anchorRef
|
|
18
|
-
}, /* @__PURE__ */ React.createElement(ButtonEx, {
|
|
19
|
-
variant: "text",
|
|
20
|
-
minWidth: 32,
|
|
21
|
-
size: "small",
|
|
22
|
-
disabled: !prepared,
|
|
23
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
24
|
-
setExpanded(true);
|
|
25
|
-
}, "onClick"),
|
|
26
|
-
...props
|
|
27
|
-
}, /* @__PURE__ */ React.createElement(ShareIcon, {
|
|
28
|
-
htmlColor: "gray",
|
|
29
|
-
fontSize: "small"
|
|
30
|
-
})), /* @__PURE__ */ React.createElement(Popover, {
|
|
31
|
-
open: prepared ? expanded : false,
|
|
32
|
-
anchorEl: anchorRef.current,
|
|
33
|
-
onClose: /* @__PURE__ */ __name(() => setExpanded(false), "onClose"),
|
|
34
|
-
transitionDuration: 500
|
|
35
|
-
}, /* @__PURE__ */ React.createElement(FlexRow, {
|
|
36
|
-
gap: 0.5,
|
|
37
|
-
padding: 0.5
|
|
38
|
-
}, /* @__PURE__ */ React.createElement(LinkEx, {
|
|
39
|
-
lineHeight: 0,
|
|
40
|
-
style: {
|
|
41
|
-
color: "#1da1f2"
|
|
42
|
-
},
|
|
43
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
44
|
-
window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`);
|
|
45
|
-
setExpanded(false);
|
|
46
|
-
}, "onClick")
|
|
47
|
-
}, /* @__PURE__ */ React.createElement(TwitterIcon, {
|
|
48
|
-
fontSize: "small"
|
|
49
|
-
})), /* @__PURE__ */ React.createElement(LinkEx, {
|
|
50
|
-
lineHeight: 0,
|
|
51
|
-
style: {
|
|
52
|
-
color: "#4267b2"
|
|
53
|
-
},
|
|
54
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
55
|
-
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`);
|
|
56
|
-
setExpanded(false);
|
|
57
|
-
}, "onClick")
|
|
58
|
-
}, /* @__PURE__ */ React.createElement(FacebookIcon, {
|
|
59
|
-
fontSize: "small"
|
|
60
|
-
})))));
|
|
61
|
-
}, "ShareButton");
|
|
62
|
-
export {
|
|
63
|
-
ShareButton
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ShareButton.tsx"],"sourcesContent":["import { Facebook as FacebookIcon, Share as ShareIcon, Twitter as TwitterIcon } from '@mui/icons-material'\nimport { Popover } from '@mui/material'\nimport { ButtonEx, ButtonExProps } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React, { useRef, useState } from 'react'\n\nexport interface ShareButtonProps extends ButtonExProps {\n prepared?: boolean\n shareLink?: string\n}\n\nexport const ShareButton: React.FC<ShareButtonProps> = ({ prepared = true, shareLink, ...props }) => {\n const [expanded, setExpanded] = useState(false)\n const anchorRef = useRef(null)\n const link = shareLink ?? window.location.href\n\n return (\n <FlexRow gap={1} ref={anchorRef}>\n <ButtonEx\n variant=\"text\"\n minWidth={32}\n size=\"small\"\n disabled={!prepared}\n onClick={() => {\n setExpanded(true)\n }}\n {...props}\n >\n <ShareIcon htmlColor=\"gray\" fontSize=\"small\" />\n </ButtonEx>\n <Popover open={prepared ? expanded : false} anchorEl={anchorRef.current} onClose={() => setExpanded(false)} transitionDuration={500}>\n <FlexRow gap={0.5} padding={0.5}>\n <LinkEx\n lineHeight={0}\n style={{ color: '#1da1f2' }}\n onClick={() => {\n window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <TwitterIcon fontSize=\"small\" />\n </LinkEx>\n <LinkEx\n lineHeight={0}\n style={{ color: '#4267b2' }}\n onClick={() => {\n window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <FacebookIcon fontSize=\"small\" />\n </LinkEx>\n </FlexRow>\n </Popover>\n </FlexRow>\n )\n}\n"],"mappings":";;;;AAAA,SAASA,YAAYC,cAAcC,SAASC,WAAWC,WAAWC,mBAAmB;AACrF,SAASC,eAAe;AACxB,SAASC,gBAA+B;AACxC,SAASC,eAAe;AACxB,SAASC,cAAc;AACvB,OAAOC,SAASC,QAAQC,gBAAgB;AAOjC,IAAMC,cAA0C,wBAAC,EAAEC,WAAW,MAAMC,WAAW,GAAGC,MAAAA,MAAO;AAC9F,QAAM,CAACC,UAAUC,WAAAA,IAAeC,SAAS,KAAA;AACzC,QAAMC,YAAYC,OAAO,IAAA;AACzB,QAAMC,OAAOP,aAAaQ,OAAOC,SAASC;AAE1C,SACE,sBAAA,cAACC,SAAAA;IAAQC,KAAK;IAAGC,KAAKR;KACpB,sBAAA,cAACS,UAAAA;IACCC,SAAQ;IACRC,UAAU;IACVC,MAAK;IACLC,UAAU,CAACnB;IACXoB,SAAS,6BAAA;AACPhB,kBAAY,IAAA;IACd,GAFS;IAGR,GAAGF;KAEJ,sBAAA,cAACmB,WAAAA;IAAUC,WAAU;IAAOC,UAAS;OAEvC,sBAAA,cAACC,SAAAA;IAAQC,MAAMzB,WAAWG,WAAW;IAAOuB,UAAUpB,UAAUqB;IAASC,SAAS,6BAAMxB,YAAY,KAAA,GAAlB;IAA0ByB,oBAAoB;KAC9H,sBAAA,cAACjB,SAAAA;IAAQC,KAAK;IAAKiB,SAAS;KAC1B,sBAAA,cAACC,QAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPX,aAAOgB,KAAK,wCAAwCU,mBAAmB3B,IAAAA,CAAAA,EAAO;AAC9EJ,kBAAY,KAAA;IACd,GAHS;KAKT,sBAAA,cAACgC,aAAAA;IAAYb,UAAS;OAExB,sBAAA,cAACQ,QAAAA;IACCC,YAAY;IACZC,OAAO;MAAEC,OAAO;IAAU;IAC1Bd,SAAS,6BAAA;AACPX,aAAOgB,KAAK,gDAAgDU,mBAAmB3B,IAAAA,CAAAA,EAAO;AACtFJ,kBAAY,KAAA;IACd,GAHS;KAKT,sBAAA,cAACiC,cAAAA;IAAad,UAAS;;AAMnC,GA7CuD;","names":["Facebook","FacebookIcon","Share","ShareIcon","Twitter","TwitterIcon","Popover","ButtonEx","FlexRow","LinkEx","React","useRef","useState","ShareButton","prepared","shareLink","props","expanded","setExpanded","useState","anchorRef","useRef","link","window","location","href","FlexRow","gap","ref","ButtonEx","variant","minWidth","size","disabled","onClick","ShareIcon","htmlColor","fontSize","Popover","open","anchorEl","current","onClose","transitionDuration","padding","LinkEx","lineHeight","style","color","encodeURIComponent","TwitterIcon","FacebookIcon"]}
|