norma-library 0.5.80 → 0.5.802
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/esm/components/ChatMessageBalloon/ChatMessageBalloon.style.js +1 -1
- package/dist/esm/components/Modal.d.ts +1 -1
- package/dist/esm/components/Modal.js +4 -3
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/interfaces/Modal.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/ChatMessageBalloon/ChatMessageBalloon.style.ts +1 -1
- package/src/components/Modal.tsx +4 -4
- package/src/interfaces/Modal.ts +2 -1
- package/src/stories/Modal.stories.tsx +5 -0
|
@@ -6,7 +6,7 @@ export var ChatMessageBalloonContainerStyle = styled(Box)({
|
|
|
6
6
|
flexDirection: "column",
|
|
7
7
|
});
|
|
8
8
|
export var ChatMessageBalloonRowStyle = styled('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n margin-bottom: 8px;\n flex-direction: ", ";\n\n &:last-child {\n margin-bottom: 0px;\n }\n"], ["\n display: flex;\n margin-bottom: 8px;\n flex-direction: ", ";\n\n &:last-child {\n margin-bottom: 0px;\n }\n"])), function (props) { return (props.direction === "I") ? "row-reverse" : "row"; });
|
|
9
|
-
export var ChatMessageBalloonStyle = styled('div')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border:
|
|
9
|
+
export var ChatMessageBalloonStyle = styled('div')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border: 2px solid transparent;\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n flex-direction: column;\n padding: 12px 24px;\n width: 60%;\n transition: border 0.6s cubic-bezier(0.16, 1, 0.3, 1);\n\n &.is-highlight {\n border: 2px solid #8a8888;\n }\n\n &.is-interactive {\n cursor: pointer;\n\n &:hover {\n border: 2px solid #8a8888;\n }\n }\n"], ["\n background-color: ", ";\n border: 2px solid transparent;\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n flex-direction: column;\n padding: 12px 24px;\n width: 60%;\n transition: border 0.6s cubic-bezier(0.16, 1, 0.3, 1);\n\n &.is-highlight {\n border: 2px solid #8a8888;\n }\n\n &.is-interactive {\n cursor: pointer;\n\n &:hover {\n border: 2px solid #8a8888;\n }\n }\n"])), function (props) { return (props.direction === "I") ? "#FFF" : "#E18B50"; }, function (props) { return (props.direction === "I") ? "20px 20px 0px 20px" : "20px 20px 20px 0px"; }, function (props) { return (props.direction === "I") ? "#4D4F5B" : "#FFF"; });
|
|
10
10
|
export var ChatMessageDateStyle = styled(Typography)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: #43425D;\n opacity: .5;\n"], ["\n color: #43425D;\n opacity: .5;\n"])));
|
|
11
11
|
export var ChatMessageChildrenStyle = styled('div')(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n justify-content: ", ";\n padding: 8px;\n"], ["\n align-items: center;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n justify-content: ", ";\n padding: 8px;\n"])), function (props) { return (props.direction === "I") ? "end" : "start"; });
|
|
12
12
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ModalBaseProps } from '../interfaces';
|
|
3
3
|
export declare function Close(): React.JSX.Element;
|
|
4
|
-
export declare const Modal: ({ open, children, ...props }: ModalBaseProps) => React.JSX.Element;
|
|
4
|
+
export declare const Modal: ({ open, children, paperProps, ...props }: ModalBaseProps) => React.JSX.Element;
|
|
@@ -5,7 +5,7 @@ import { styled } from '@mui/material/styles';
|
|
|
5
5
|
import { IconButton } from './IconButton';
|
|
6
6
|
import { Button } from './Button';
|
|
7
7
|
var ModalStyled = styled(MuiModal)({});
|
|
8
|
-
var ModalContentStyled = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid #00000033;\n border-radius: 4px;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 421px;\n transform: translate(-50%, -50%);\n
|
|
8
|
+
var ModalContentStyled = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid #00000033;\n border-radius: 4px;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 421px;\n transform: translate(-50%, -50%);\n background-color: #FFF;\n box-shadow: 24px;\n"], ["\n border: 1px solid #00000033;\n border-radius: 4px;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 421px;\n transform: translate(-50%, -50%);\n background-color: #FFF;\n box-shadow: 24px;\n"])));
|
|
9
9
|
var ModalHeaderStyled = styled(Box)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: left;\n border-bottom: 1px solid #00000033;\n box-sizing: border-box;\n margin: 0;\n position: relative;\n padding: 22px 26px 15px 26px;\n justify-content: space-between;\n display: flex;\n\n & h2 {\n font: normal normal 600 18px/30px Source Sans Pro;\n color: #292929;\n }\n"], ["\n text-align: left;\n border-bottom: 1px solid #00000033;\n box-sizing: border-box;\n margin: 0;\n position: relative;\n padding: 22px 26px 15px 26px;\n justify-content: space-between;\n display: flex;\n\n & h2 {\n font: normal normal 600 18px/30px Source Sans Pro;\n color: #292929;\n }\n"])));
|
|
10
10
|
var ModalFooterStyled = styled(Box)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-top: 1px solid #00000033;\n box-sizing: border-box;\n position: relative;\n padding: 24px;\n display: flex;\n justify-content: end;\n gap: 24px;\n"], ["\n border-top: 1px solid #00000033;\n box-sizing: border-box;\n position: relative;\n padding: 24px;\n display: flex;\n justify-content: end;\n gap: 24px;\n"])));
|
|
11
11
|
var ModalContainerChildrenStyled = styled(Box)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n box-sizing: border-box;\n padding: 24px;\n"], ["\n box-sizing: border-box;\n padding: 24px;\n"])));
|
|
@@ -14,9 +14,10 @@ export function Close() {
|
|
|
14
14
|
React.createElement("path", { clipRule: "evenodd", fillRule: "evenodd", d: "M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z" })));
|
|
15
15
|
}
|
|
16
16
|
export var Modal = function (_a) {
|
|
17
|
-
var open = _a.open, children = _a.children, props = __rest(_a, ["open", "children"]);
|
|
17
|
+
var open = _a.open, children = _a.children, paperProps = _a.paperProps, props = __rest(_a, ["open", "children", "paperProps"]);
|
|
18
|
+
console.log('RICK :: paperProps', paperProps, props);
|
|
18
19
|
return (React.createElement(ModalStyled, __assign({ open: true }, props),
|
|
19
|
-
React.createElement(ModalContentStyled,
|
|
20
|
+
React.createElement(ModalContentStyled, __assign({}, paperProps),
|
|
20
21
|
props.title && (React.createElement(ModalHeaderStyled, null,
|
|
21
22
|
React.createElement(Typography, { variant: 'h2' }, props.title),
|
|
22
23
|
React.createElement(IconButton, { onClick: props.onClose, size: "small", color: "inherit", variant: "text", cursor: "pointer", sx: { padding: "0" } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,IAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;AAEzC,IAAM,kBAAkB,GAAG,MAAM,CAAC,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,oBAAoB,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;IACpD,OAAO,CACL,oBAAC,WAAW,aAAC,IAAI,UAAK,KAAK;QACzB,oBAAC,kBAAkB,eAAK,UAAU;YAC/B,KAAK,CAAC,KAAK,IAAI,CACd,oBAAC,iBAAiB;gBAChB,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,IAAE,KAAK,CAAC,KAAK,CAAc;gBACnD,oBAAC,UAAU,IACT,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,MAAM,EACd,MAAM,EAAC,SAAS,EAChB,EAAE,EAAE,EAAC,OAAO,EAAE,GAAG,EAAC;oBAElB,oBAAC,KAAK,OAAG,CACE,CACK,CACrB;YACD,oBAAC,4BAA4B,QAC1B,QAAQ,CACoB;YAC9B,KAAK,CAAC,MAAM,IAAI,CACf,oBAAC,iBAAiB,QACf,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,GAAG,IAAK,OAAA,CAC/B,oBAAC,MAAM,IACL,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,IAAI,CAAC,MAAM,EACpB,IAAI,EAAE,IAAI,CAAC,IAAI,IAEd,IAAI,CAAC,KAAK,CACJ,CACV,EAVgC,CAUhC,CAAC,CACgB,CACrB,CACkB,CACT,CACf,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SxProps } from '@mui/material';
|
|
3
3
|
import { Theme } from '@emotion/react';
|
|
4
|
-
import { MuiModalBaseProps, OnAction } from '@/types';
|
|
4
|
+
import { MuiModalBaseProps, MuiPaperBaseProps, OnAction } from '@/types';
|
|
5
5
|
export interface ModalBaseProps extends MuiModalBaseProps {
|
|
6
6
|
sx?: SxProps<Theme>;
|
|
7
7
|
children: React.ReactElement;
|
|
@@ -12,4 +12,5 @@ export interface ModalBaseProps extends MuiModalBaseProps {
|
|
|
12
12
|
full?: boolean;
|
|
13
13
|
title?: string;
|
|
14
14
|
id?: string;
|
|
15
|
+
paperProps?: MuiPaperBaseProps;
|
|
15
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "norma-library",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.802",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,7 @@ export const ChatMessageBalloonRowStyle = styled('div')<{ direction: string }>`
|
|
|
18
18
|
|
|
19
19
|
export const ChatMessageBalloonStyle = styled('div')<{ direction: string }>`
|
|
20
20
|
background-color: ${(props) => (props.direction === "I") ? "#FFF" : "#E18B50"};
|
|
21
|
-
border:
|
|
21
|
+
border: 2px solid transparent;
|
|
22
22
|
border-radius: ${(props) => (props.direction === "I") ? "20px 20px 0px 20px" : "20px 20px 20px 0px"};
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
color: ${(props) => (props.direction === "I") ? "#4D4F5B" : "#FFF"};
|
package/src/components/Modal.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const ModalContentStyled = styled(Paper)`
|
|
|
15
15
|
left: 50%;
|
|
16
16
|
width: 421px;
|
|
17
17
|
transform: translate(-50%, -50%);
|
|
18
|
-
|
|
18
|
+
background-color: #FFF;
|
|
19
19
|
box-shadow: 24px;
|
|
20
20
|
`;
|
|
21
21
|
|
|
@@ -69,11 +69,11 @@ export function Close() {
|
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export const Modal = ({ open, children, ...props }: ModalBaseProps) => {
|
|
73
|
-
|
|
72
|
+
export const Modal = ({ open, children, paperProps, ...props }: ModalBaseProps) => {
|
|
73
|
+
console.log('RICK :: paperProps', paperProps, props)
|
|
74
74
|
return (
|
|
75
75
|
<ModalStyled open {...props}>
|
|
76
|
-
<ModalContentStyled>
|
|
76
|
+
<ModalContentStyled {...paperProps}>
|
|
77
77
|
{props.title && (
|
|
78
78
|
<ModalHeaderStyled>
|
|
79
79
|
<Typography variant='h2'>{props.title}</Typography>
|
package/src/interfaces/Modal.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
2
|
import { Theme } from '@emotion/react';
|
|
3
|
-
import { MuiModalBaseProps, OnAction } from '@/types';
|
|
3
|
+
import { MuiModalBaseProps, MuiPaperBaseProps, OnAction } from '@/types';
|
|
4
4
|
|
|
5
5
|
export interface ModalBaseProps extends MuiModalBaseProps {
|
|
6
6
|
sx?: SxProps<Theme>;
|
|
@@ -12,4 +12,5 @@ export interface ModalBaseProps extends MuiModalBaseProps {
|
|
|
12
12
|
full?: boolean;
|
|
13
13
|
title?: string;
|
|
14
14
|
id?: string;
|
|
15
|
+
paperProps?: MuiPaperBaseProps;
|
|
15
16
|
}
|
|
@@ -120,6 +120,11 @@ export const ModalAction = () => {
|
|
|
120
120
|
aria-labelledby="modal-modal-title"
|
|
121
121
|
aria-describedby="modal-modal-description"
|
|
122
122
|
action={defaultAction}
|
|
123
|
+
paperProps={{
|
|
124
|
+
sx: {
|
|
125
|
+
width: "90vw"
|
|
126
|
+
}
|
|
127
|
+
}}
|
|
123
128
|
>
|
|
124
129
|
<>
|
|
125
130
|
<Typography id="modal-modal-title" variant="h6" component="h2">
|