norma-library 0.6.81 → 0.6.83

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.
@@ -6,7 +6,7 @@ import { IconButton } from './IconButton';
6
6
  import { Button } from './Button';
7
7
  var ModalStyled = styled(MuiModal)({});
8
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: ", ";\n transform: translate(-50%, -50%);\n background-color: #fff;\n outline: none;\n"], ["\n border: 1px solid #00000033;\n border-radius: 4px;\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n transform: translate(-50%, -50%);\n background-color: #fff;\n outline: none;\n"])), function (props) { return props.$w || '421px'; });
9
- var ModalHeaderStyled = styled(Box)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: left;\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 pointer-events: none;\n & h2 {\n font-style: normal;\n font-weight: 600;\n font-size: 18px;\n color: #1d1d1d;\n }\n"], ["\n text-align: left;\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 pointer-events: none;\n & h2 {\n font-style: normal;\n font-weight: 600;\n font-size: 18px;\n color: #1d1d1d;\n }\n"])));
9
+ var ModalHeaderStyled = styled(Box)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: left;\n box-sizing: border-box;\n margin: 0;\n position: relative;\n padding: 22px 26px 15px 26px;\n pointer-events: none;\n & h2 {\n font-style: normal;\n font-weight: 600;\n font-size: 18px;\n color: #1d1d1d;\n }\n & p{\n margin-top: 16px;\n }\n"], ["\n text-align: left;\n box-sizing: border-box;\n margin: 0;\n position: relative;\n padding: 22px 26px 15px 26px;\n pointer-events: none;\n & h2 {\n font-style: normal;\n font-weight: 600;\n font-size: 18px;\n color: #1d1d1d;\n }\n & p{\n margin-top: 16px;\n }\n"])));
10
10
  var ModalFooterStyled = styled(Box)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n padding: 24px;\n display: flex;\n justify-content: ", ";\n gap: 24px;\n"], ["\n box-sizing: border-box;\n position: relative;\n padding: 24px;\n display: flex;\n justify-content: ", ";\n gap: 24px;\n"])), function (props) { return (props.$spaceBetween ? 'space-between' : 'flex-end'); });
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"])));
12
12
  export function Close() {
@@ -25,7 +25,8 @@ export var Modal = function (_a) {
25
25
  React.createElement(IconButton, { onClick: props.onClose, size: "small", color: "inherit", variant: "text", cursor: "pointer", sx: { padding: '0', position: 'absolute', right: '22px', top: '22px', zIndex: 2 }, className: 'Modal__Close' },
26
26
  React.createElement(Close, null)),
27
27
  props.title && (React.createElement(ModalHeaderStyled, null,
28
- React.createElement(Typography, { variant: "h2" }, props.title))),
28
+ React.createElement(Typography, { variant: "h2" }, props.title),
29
+ props.description && React.createElement(Typography, { variant: "body1" }, props.description))),
29
30
  React.createElement(ModalContainerChildrenStyled, null, children),
30
31
  !!((_b = props.action) === null || _b === void 0 ? void 0 : _b.length) && (React.createElement(ModalFooterStyled, { "$spaceBetween": props.actionSpaceBetween }, props.action.map(function (_a, key) {
31
32
  var color = _a.color, variant = _a.variant, action = _a.action, size = _a.size, label = _a.label, rest = __rest(_a, ["color", "variant", "action", "size", "label"]);
@@ -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,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,OAAO,IAAE,KAAK,CAAC,WAAW,CAAc,CAChE,CACrB;YAED,oBAAC,4BAA4B,QAAE,QAAQ,CAAgC;YACtE,CAAC,CAAC,CAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,MAAM,CAAA,IAAI,CACzB,oBAAC,iBAAiB,qBAAgB,KAAK,CAAC,kBAAkB,IACvD,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAC,EAAgD,EAAE,GAAG;gBAAnD,IAAA,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAK,IAAI,cAA9C,+CAAgD,CAAF;gBAAY,OAAA,CAC3E,oBAAC,MAAM,aAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,IAAM,IAAI,GACpF,KAAK,CACC,CACV,CAAA;aAAA,CAAC,CACgB,CACrB,CACkB,CACT,CACf,CAAC;AACJ,CAAC,CAAC"}
@@ -10,6 +10,7 @@ export interface ModalBaseProps extends MuiModalBaseProps {
10
10
  actionSpaceBetween?: boolean;
11
11
  className?: string;
12
12
  title?: string;
13
+ description?: string;
13
14
  id?: string;
14
15
  paperProps?: MuiPaperBaseProps;
15
16
  width?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "norma-library",
3
- "version": "0.6.81",
3
+ "version": "0.6.83",
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": {
@@ -25,8 +25,6 @@ const ModalHeaderStyled = styled(Box)`
25
25
  margin: 0;
26
26
  position: relative;
27
27
  padding: 22px 26px 15px 26px;
28
- justify-content: space-between;
29
- display: flex;
30
28
  pointer-events: none;
31
29
  & h2 {
32
30
  font-style: normal;
@@ -34,6 +32,9 @@ const ModalHeaderStyled = styled(Box)`
34
32
  font-size: 18px;
35
33
  color: #1d1d1d;
36
34
  }
35
+ & p{
36
+ margin-top: 16px;
37
+ }
37
38
  `;
38
39
 
39
40
  const ModalFooterStyled = styled(Box) <{ $spaceBetween?: boolean }>`
@@ -93,6 +94,7 @@ export const Modal = ({ open, children, paperProps, ...props }: ModalBaseProps)
93
94
  {props.title && (
94
95
  <ModalHeaderStyled>
95
96
  <Typography variant="h2">{props.title}</Typography>
97
+ {props.description && <Typography variant="body1">{props.description}</Typography>}
96
98
  </ModalHeaderStyled>
97
99
  )}
98
100
 
@@ -11,6 +11,7 @@ export interface ModalBaseProps extends MuiModalBaseProps {
11
11
  actionSpaceBetween?: boolean;
12
12
  className?: string;
13
13
  title?: string;
14
+ description?: string;
14
15
  id?: string;
15
16
  paperProps?: MuiPaperBaseProps;
16
17
  width?: string;
@@ -67,6 +67,7 @@ export const ModalTitle = () => {
67
67
  aria-labelledby="modal-modal-title"
68
68
  aria-describedby="modal-modal-description"
69
69
  title="Title Modal"
70
+ description='Description Modal'
70
71
  >
71
72
  <>
72
73
  <Typography id="modal-modal-title" variant="h6" component="h2">