@synchat/webchat 0.0.9 → 0.0.11
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/index.d.mts +11 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { FC } from 'react';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
|
-
type
|
|
5
|
+
type ChatButtonProps = {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
className?: string;
|
|
8
|
-
/** Desabilita o botão */
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
|
|
12
|
+
type IDefaultProps = {
|
|
13
|
+
testId?: string;
|
|
14
|
+
};
|
|
15
|
+
interface IComponent<T = {}> extends FC<IDefaultProps & T> {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const ChatButton: IComponent<ChatButtonProps>;
|
|
16
19
|
|
|
17
20
|
declare const WebChat: () => react_jsx_runtime.JSX.Element;
|
|
18
21
|
|
|
19
|
-
export {
|
|
22
|
+
export { ChatButton, type ChatButtonProps, WebChat };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { FC } from 'react';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
|
-
type
|
|
5
|
+
type ChatButtonProps = {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
className?: string;
|
|
8
|
-
/** Desabilita o botão */
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
|
|
12
|
+
type IDefaultProps = {
|
|
13
|
+
testId?: string;
|
|
14
|
+
};
|
|
15
|
+
interface IComponent<T = {}> extends FC<IDefaultProps & T> {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const ChatButton: IComponent<ChatButtonProps>;
|
|
16
19
|
|
|
17
20
|
declare const WebChat: () => react_jsx_runtime.JSX.Element;
|
|
18
21
|
|
|
19
|
-
export {
|
|
22
|
+
export { ChatButton, type ChatButtonProps, WebChat };
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var material = require('@mui/material');
|
|
3
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
|
|
5
|
-
// src/lib/components/button/
|
|
6
|
-
var
|
|
6
|
+
// src/lib/components/button/styles.tsx
|
|
7
|
+
var AtomButton = material.styled(material.Button, {
|
|
8
|
+
shouldForwardProp: (prop) => prop !== "buttonType"
|
|
9
|
+
})(({ buttonType = "default" }) => {
|
|
10
|
+
return {};
|
|
11
|
+
});
|
|
12
|
+
var ChatButton = ({ children = "Chat", onClick, className, disabled }) => {
|
|
7
13
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8
|
-
|
|
14
|
+
AtomButton,
|
|
9
15
|
{
|
|
10
16
|
onClick,
|
|
11
17
|
disabled,
|
|
12
18
|
className,
|
|
13
19
|
style: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
fontWeight: 600
|
|
20
|
+
position: "fixed",
|
|
21
|
+
bottom: "20px",
|
|
22
|
+
right: "20px",
|
|
23
|
+
backgroundColor: "#007bff",
|
|
24
|
+
display: "flex"
|
|
20
25
|
},
|
|
21
26
|
children
|
|
22
27
|
}
|
|
@@ -32,7 +37,7 @@ var WebChat = () => {
|
|
|
32
37
|
}, children: "CHAT" });
|
|
33
38
|
};
|
|
34
39
|
|
|
35
|
-
exports.
|
|
40
|
+
exports.ChatButton = ChatButton;
|
|
36
41
|
exports.WebChat = WebChat;
|
|
37
42
|
//# sourceMappingURL=index.js.map
|
|
38
43
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/components/button/index.tsx","../src/lib/components/webchat/index.tsx"],"names":["jsx"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/lib/components/button/styles.tsx","../src/lib/components/button/index.tsx","../src/lib/components/webchat/index.tsx"],"names":["styled","Button","jsx"],"mappings":";;;;;;AA8EO,IAAM,UAAA,GAAaA,gBAAOC,eAAA,EAAQ;AAAA,EACrC,iBAAA,EAAmB,CAAC,IAAA,KAAS,IAAA,KAAS;AAC1C,CAAC,CAAA,CAAmB,CAAC,EAAE,UAAA,GAAa,WAAU,KAAM;AAEhD,EAAA,OAAO,EACP;AAEJ,CAAC,CAAA;AChFM,IAAM,UAAA,GAA0C,CAAC,EAAE,QAAA,GAAW,QAAQ,OAAA,EAAS,SAAA,EAAW,UAAS,KAAM;AAC9G,EAAA,uBACEC,cAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACH,QAAA,EAAU,OAAA;AAAA,QACV,MAAA,EAAQ,MAAA;AAAA,QACR,KAAA,EAAO,MAAA;AAAA,QACP,eAAA,EAAiB,SAAA;AAAA,QACjB,OAAA,EAAS;AAAA,OACb;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;ACtBO,IAAM,UAAU,MAAM;AACzB,EAAA,uBACIA,cAAAA,CAAC,QAAA,EAAA,EAAO,KAAA,EAAO;AAAA,IACX,QAAA,EAAU,OAAA;AAAA,IACV,MAAA,EAAQ,MAAA;AAAA,IACR,KAAA,EAAO,MAAA;AAAA,IACP,eAAA,EAAiB,SAAA;AAAA,IACjB,OAAA,EAAS;AAAA,KACV,QAAA,EAAA,MAAA,EAEH,CAAA;AAER","file":"index.js","sourcesContent":["import { Button, ButtonProps, styled } from \"@mui/material\";\nimport { ButtonHTMLAttributes } from \"react\";\n\nconst disabledStyles = {\n backgroundColor: \"#E0E0E0\",\n color: \"#9E9E9E\",\n borderColor: \"#BDBDBD\",\n};\n\nconst buttonVariants = {\n primary: {\n background: \"#00BB7E\",\n color: \"#FFF\",\n border: \"none\",\n },\n secondary: {\n background: \"transparent\",\n color: \"#00BB7E\",\n border: \"#00BB7E\",\n },\n error: {\n background: \"transparent\",\n color: \"#D32F2F\",\n border: \"#D32F2F\",\n },\n danger: {\n background: \"#E61E2E\",\n color: \"#fff\",\n border: \"none\",\n },\n outlinedBlue: {\n background: \"transparent\",\n color: \"#2196F3\",\n border: \"#2196F3\",\n },\n outlinedGreen: {\n background: \"transparent\",\n color: \"#00BB7E\",\n border: \"#00BB7E\",\n },\n outlinedBlack: {\n background: \"transparent\",\n color: \"#000000DE\",\n border: \"#000000DE\",\n },\n outlinedGrey: {\n background: \"transparent\",\n color: \"#59676D\",\n border: \"#0B0D0E52\",\n },\n textPrimary: {\n background: \"transparent\",\n color: \"#00BB7E\",\n border: \"transparent\",\n },\n textSecondary: {\n background: \"transparent\",\n color: \"#000000DE\",\n border: \"transparent\",\n },\n textBlue: {\n background: \"transparent\",\n color: \"#2196F3\",\n border: \"transparent\",\n },\n default: {\n background: \"#00BB7E\",\n color: \"#FFF\",\n border: \"#00BB7E\",\n },\n};\n\ninterface AtomButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"color\">,\n ButtonProps {\n buttonType?: keyof typeof buttonVariants;\n}\n\nexport const AtomButton = styled(Button, {\n shouldForwardProp: (prop) => prop !== \"buttonType\",\n})<AtomButtonProps>(({ buttonType = \"default\" }) => {\n\n return {\n }\n\n});","import * as React from 'react'\nimport { ChatButtonProps } from \"./types\";\nimport IComponent from \"../../../types/component\";\nimport { AtomButton } from \"./styles\";\n\nexport const ChatButton: IComponent<ChatButtonProps> = ({ children = 'Chat', onClick, className, disabled }) => {\n return (\n <AtomButton\n onClick={onClick}\n disabled={disabled}\n className={className}\n style={{\n position: \"fixed\",\n bottom: \"20px\",\n right: \"20px\",\n backgroundColor: \"#007bff\",\n display: \"flex\",\n }}\n >\n {children}\n </AtomButton>\n )\n}\n","export const WebChat = () => {\n return (\n <button style={{\n position: \"fixed\",\n bottom: \"20px\",\n right: \"20px\",\n backgroundColor: \"#007bff\",\n display: \"flex\",\n }}>\n CHAT\n </button>\n )\n}"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
+
import { styled, Button } from '@mui/material';
|
|
1
2
|
import { jsx } from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
|
-
// src/lib/components/button/
|
|
4
|
-
var
|
|
4
|
+
// src/lib/components/button/styles.tsx
|
|
5
|
+
var AtomButton = styled(Button, {
|
|
6
|
+
shouldForwardProp: (prop) => prop !== "buttonType"
|
|
7
|
+
})(({ buttonType = "default" }) => {
|
|
8
|
+
return {};
|
|
9
|
+
});
|
|
10
|
+
var ChatButton = ({ children = "Chat", onClick, className, disabled }) => {
|
|
5
11
|
return /* @__PURE__ */ jsx(
|
|
6
|
-
|
|
12
|
+
AtomButton,
|
|
7
13
|
{
|
|
8
14
|
onClick,
|
|
9
15
|
disabled,
|
|
10
16
|
className,
|
|
11
17
|
style: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fontWeight: 600
|
|
18
|
+
position: "fixed",
|
|
19
|
+
bottom: "20px",
|
|
20
|
+
right: "20px",
|
|
21
|
+
backgroundColor: "#007bff",
|
|
22
|
+
display: "flex"
|
|
18
23
|
},
|
|
19
24
|
children
|
|
20
25
|
}
|
|
@@ -30,6 +35,6 @@ var WebChat = () => {
|
|
|
30
35
|
}, children: "CHAT" });
|
|
31
36
|
};
|
|
32
37
|
|
|
33
|
-
export {
|
|
38
|
+
export { ChatButton, WebChat };
|
|
34
39
|
//# sourceMappingURL=index.mjs.map
|
|
35
40
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/components/button/index.tsx","../src/lib/components/webchat/index.tsx"],"names":["jsx"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/lib/components/button/styles.tsx","../src/lib/components/button/index.tsx","../src/lib/components/webchat/index.tsx"],"names":["jsx"],"mappings":";;;;AA8EO,IAAM,UAAA,GAAa,OAAO,MAAA,EAAQ;AAAA,EACrC,iBAAA,EAAmB,CAAC,IAAA,KAAS,IAAA,KAAS;AAC1C,CAAC,CAAA,CAAmB,CAAC,EAAE,UAAA,GAAa,WAAU,KAAM;AAEhD,EAAA,OAAO,EACP;AAEJ,CAAC,CAAA;AChFM,IAAM,UAAA,GAA0C,CAAC,EAAE,QAAA,GAAW,QAAQ,OAAA,EAAS,SAAA,EAAW,UAAS,KAAM;AAC9G,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACH,QAAA,EAAU,OAAA;AAAA,QACV,MAAA,EAAQ,MAAA;AAAA,QACR,KAAA,EAAO,MAAA;AAAA,QACP,eAAA,EAAiB,SAAA;AAAA,QACjB,OAAA,EAAS;AAAA,OACb;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;ACtBO,IAAM,UAAU,MAAM;AACzB,EAAA,uBACIA,GAAAA,CAAC,QAAA,EAAA,EAAO,KAAA,EAAO;AAAA,IACX,QAAA,EAAU,OAAA;AAAA,IACV,MAAA,EAAQ,MAAA;AAAA,IACR,KAAA,EAAO,MAAA;AAAA,IACP,eAAA,EAAiB,SAAA;AAAA,IACjB,OAAA,EAAS;AAAA,KACV,QAAA,EAAA,MAAA,EAEH,CAAA;AAER","file":"index.mjs","sourcesContent":["import { Button, ButtonProps, styled } from \"@mui/material\";\nimport { ButtonHTMLAttributes } from \"react\";\n\nconst disabledStyles = {\n backgroundColor: \"#E0E0E0\",\n color: \"#9E9E9E\",\n borderColor: \"#BDBDBD\",\n};\n\nconst buttonVariants = {\n primary: {\n background: \"#00BB7E\",\n color: \"#FFF\",\n border: \"none\",\n },\n secondary: {\n background: \"transparent\",\n color: \"#00BB7E\",\n border: \"#00BB7E\",\n },\n error: {\n background: \"transparent\",\n color: \"#D32F2F\",\n border: \"#D32F2F\",\n },\n danger: {\n background: \"#E61E2E\",\n color: \"#fff\",\n border: \"none\",\n },\n outlinedBlue: {\n background: \"transparent\",\n color: \"#2196F3\",\n border: \"#2196F3\",\n },\n outlinedGreen: {\n background: \"transparent\",\n color: \"#00BB7E\",\n border: \"#00BB7E\",\n },\n outlinedBlack: {\n background: \"transparent\",\n color: \"#000000DE\",\n border: \"#000000DE\",\n },\n outlinedGrey: {\n background: \"transparent\",\n color: \"#59676D\",\n border: \"#0B0D0E52\",\n },\n textPrimary: {\n background: \"transparent\",\n color: \"#00BB7E\",\n border: \"transparent\",\n },\n textSecondary: {\n background: \"transparent\",\n color: \"#000000DE\",\n border: \"transparent\",\n },\n textBlue: {\n background: \"transparent\",\n color: \"#2196F3\",\n border: \"transparent\",\n },\n default: {\n background: \"#00BB7E\",\n color: \"#FFF\",\n border: \"#00BB7E\",\n },\n};\n\ninterface AtomButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"color\">,\n ButtonProps {\n buttonType?: keyof typeof buttonVariants;\n}\n\nexport const AtomButton = styled(Button, {\n shouldForwardProp: (prop) => prop !== \"buttonType\",\n})<AtomButtonProps>(({ buttonType = \"default\" }) => {\n\n return {\n }\n\n});","import * as React from 'react'\nimport { ChatButtonProps } from \"./types\";\nimport IComponent from \"../../../types/component\";\nimport { AtomButton } from \"./styles\";\n\nexport const ChatButton: IComponent<ChatButtonProps> = ({ children = 'Chat', onClick, className, disabled }) => {\n return (\n <AtomButton\n onClick={onClick}\n disabled={disabled}\n className={className}\n style={{\n position: \"fixed\",\n bottom: \"20px\",\n right: \"20px\",\n backgroundColor: \"#007bff\",\n display: \"flex\",\n }}\n >\n {children}\n </AtomButton>\n )\n}\n","export const WebChat = () => {\n return (\n <button style={{\n position: \"fixed\",\n bottom: \"20px\",\n right: \"20px\",\n backgroundColor: \"#007bff\",\n display: \"flex\",\n }}>\n CHAT\n </button>\n )\n}"]}
|