norma-library 0.5.74 → 0.5.76

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.
@@ -1,13 +1,14 @@
1
1
  import { __assign, __makeTemplateObject, __rest } from "tslib";
2
2
  import React from 'react';
3
- import { Modal as MuiModal, Paper, Box } from '@mui/material';
3
+ import { Modal as MuiModal, Paper, Box, Typography } from '@mui/material';
4
4
  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 bgcolor: background.paper;\n box-shadow: 24px;\n padding: 16px;\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 bgcolor: background.paper;\n box-shadow: 24px;\n padding: 16px;\n"])));
9
- var ModalHeaderStyled = styled(Box)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: left;\n border-bottom: 1px solid #00000033;\n margin: 0;\n top: -5px;\n position: relative;\n padding: 0 5px;\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 margin: 0;\n top: -5px;\n position: relative;\n padding: 0 5px;\n display: flex;\n\n & h2 {\n font: normal normal 600 18px/30px Source Sans Pro;\n color: #292929;\n }\n"])));
10
- var ModalFooterStyled = styled(Box)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n text-align: left;\n border-top: 1px solid #00000033;\n margin-top: 16px;\n bottom: -5px;\n position: relative;\n padding: 10px 5px 5px;\n display: flex;\n justify-content: end;\n"], ["\n text-align: left;\n border-top: 1px solid #00000033;\n margin-top: 16px;\n bottom: -5px;\n position: relative;\n padding: 10px 5px 5px;\n display: flex;\n justify-content: end;\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 bgcolor: background.paper;\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 bgcolor: background.paper;\n box-shadow: 24px;\n"])));
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
+ 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
+ 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"])));
11
12
  export function Close() {
12
13
  return (React.createElement("svg", { fill: "#808080", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", height: "24", width: "24" },
13
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" })));
@@ -17,12 +18,11 @@ export var Modal = function (_a) {
17
18
  return (React.createElement(ModalStyled, __assign({ open: true }, props),
18
19
  React.createElement(ModalContentStyled, null,
19
20
  props.title && (React.createElement(ModalHeaderStyled, null,
20
- React.createElement(React.Fragment, null,
21
- React.createElement("h2", null, props.title),
22
- React.createElement(IconButton, { onClick: props.onClose, size: "small", color: "inherit", variant: "text", cursor: "pointer", sx: { position: 'absolute', right: 0, top: 5 } },
23
- React.createElement(Close, null))))),
24
- children,
25
- props.action && (React.createElement(ModalFooterStyled, null, props.action.map(function (item, key) { return (React.createElement(Button, { color: item.color, variant: item.variant, key: key, onClick: item.action, style: { marginLeft: 10 } }, item.label)); }))))));
21
+ React.createElement(Typography, { variant: 'h2' }, props.title),
22
+ React.createElement(IconButton, { onClick: props.onClose, size: "small", color: "inherit", variant: "text", cursor: "pointer", sx: { padding: "0" } },
23
+ React.createElement(Close, null)))),
24
+ React.createElement(ModalContainerChildrenStyled, null, children),
25
+ props.action && (React.createElement(ModalFooterStyled, null, props.action.map(function (item, key) { return (React.createElement(Button, { color: item.color, variant: item.variant, key: key, onClick: item.action, size: item.size }, item.label)); }))))));
26
26
  };
27
- var templateObject_1, templateObject_2, templateObject_3;
27
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
28
28
  //# sourceMappingURL=Modal.js.map
@@ -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,IAA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AI,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,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { TabsBaseProps } from '../interfaces';
3
- export declare const Tabs: ({ data, color, ...props }: TabsBaseProps) => React.JSX.Element;
3
+ export declare const Tabs: ({ data, color, onChange, ...props }: TabsBaseProps) => React.JSX.Element;
@@ -58,11 +58,12 @@ function a11yProps(index) {
58
58
  };
59
59
  }
60
60
  export var Tabs = function (_a) {
61
- var _b = _a.data, data = _b === void 0 ? [] : _b, _c = _a.color, color = _c === void 0 ? 'primary' : _c, props = __rest(_a, ["data", "color"]);
61
+ var _b = _a.data, data = _b === void 0 ? [] : _b, _c = _a.color, color = _c === void 0 ? 'primary' : _c, onChange = _a.onChange, props = __rest(_a, ["data", "color", "onChange"]);
62
62
  var _d = React.useState(0), value = _d[0], setValue = _d[1];
63
63
  var handleChange = function (event, newValue) {
64
64
  setValue(newValue);
65
- console.log(event);
65
+ if (!!onChange)
66
+ onChange(event, newValue);
66
67
  };
67
68
  return (React.createElement(Box, { sx: { width: '100%' } },
68
69
  React.createElement(Box, null,
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,IAAI,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,IAAM,QAAQ,GAAiC;IAC7C,OAAO,EAAE,OAAO,CAAC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I,EAAlE,CAAkE,CAAC,CACzF,CACT;QACL,IAAI;YACH,IAAI,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,GAAG,IAAK,OAAA,CACtB,oBAAC,cAAc,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IACrC,IAAI,CAAC,QAAQ,CACC,CAClB,EAJuB,CAIvB,CAAC,CACA,CACP,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "norma-library",
3
- "version": "0.5.74",
3
+ "version": "0.5.76",
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": {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Modal as MuiModal, Paper, Box } from '@mui/material';
2
+ import { Modal as MuiModal, Paper, Box, Typography } from '@mui/material';
3
3
  import { ModalBaseProps } from '../interfaces';
4
4
  import { styled } from '@mui/material/styles';
5
5
  import { IconButton } from './IconButton';
@@ -17,16 +17,16 @@ const ModalContentStyled = styled(Paper)`
17
17
  transform: translate(-50%, -50%);
18
18
  bgcolor: background.paper;
19
19
  box-shadow: 24px;
20
- padding: 16px;
21
20
  `;
22
21
 
23
22
  const ModalHeaderStyled = styled(Box)`
24
23
  text-align: left;
25
24
  border-bottom: 1px solid #00000033;
25
+ box-sizing: border-box;
26
26
  margin: 0;
27
- top: -5px;
28
27
  position: relative;
29
- padding: 0 5px;
28
+ padding: 22px 26px 15px 26px;
29
+ justify-content: space-between;
30
30
  display: flex;
31
31
 
32
32
  & h2 {
@@ -36,14 +36,18 @@ const ModalHeaderStyled = styled(Box)`
36
36
  `;
37
37
 
38
38
  const ModalFooterStyled = styled(Box)`
39
- text-align: left;
40
39
  border-top: 1px solid #00000033;
41
- margin-top: 16px;
42
- bottom: -5px;
40
+ box-sizing: border-box;
43
41
  position: relative;
44
- padding: 10px 5px 5px;
42
+ padding: 24px;
45
43
  display: flex;
46
44
  justify-content: end;
45
+ gap: 24px;
46
+ `;
47
+
48
+ const ModalContainerChildrenStyled = styled(Box)`
49
+ box-sizing: border-box;
50
+ padding: 24px;
47
51
  `;
48
52
 
49
53
  export function Close() {
@@ -72,22 +76,22 @@ export const Modal = ({ open, children, ...props }: ModalBaseProps) => {
72
76
  <ModalContentStyled>
73
77
  {props.title && (
74
78
  <ModalHeaderStyled>
75
- <>
76
- <h2>{props.title}</h2>
77
- <IconButton
78
- onClick={props.onClose}
79
- size="small"
80
- color="inherit"
81
- variant="text"
82
- cursor="pointer"
83
- sx={{ position: 'absolute', right: 0, top: 5 }}
84
- >
85
- <Close />
86
- </IconButton>
87
- </>
79
+ <Typography variant='h2'>{props.title}</Typography>
80
+ <IconButton
81
+ onClick={props.onClose}
82
+ size="small"
83
+ color="inherit"
84
+ variant="text"
85
+ cursor="pointer"
86
+ sx={{padding: "0"}}
87
+ >
88
+ <Close />
89
+ </IconButton>
88
90
  </ModalHeaderStyled>
89
91
  )}
90
- {children}
92
+ <ModalContainerChildrenStyled>
93
+ {children}
94
+ </ModalContainerChildrenStyled>
91
95
  {props.action && (
92
96
  <ModalFooterStyled>
93
97
  {props.action.map((item, key) => (
@@ -96,7 +100,7 @@ export const Modal = ({ open, children, ...props }: ModalBaseProps) => {
96
100
  variant={item.variant}
97
101
  key={key}
98
102
  onClick={item.action}
99
- style={{ marginLeft: 10 }}
103
+ size={item.size}
100
104
  >
101
105
  {item.label}
102
106
  </Button>
@@ -80,12 +80,12 @@ function a11yProps(index: number) {
80
80
  };
81
81
  }
82
82
 
83
- export const Tabs = ({ data = [], color = 'primary', ...props }: TabsBaseProps) => {
83
+ export const Tabs = ({ data = [], color = 'primary', onChange, ...props }: TabsBaseProps) => {
84
84
  const [value, setValue] = React.useState(0);
85
85
 
86
86
  const handleChange = (event: React.SyntheticEvent, newValue: number) => {
87
87
  setValue(newValue);
88
- console.log(event);
88
+ if(!!onChange) onChange(event, newValue)
89
89
  };
90
90
 
91
91
  return (
@@ -54,7 +54,7 @@ export const Playground: Story = {
54
54
  export const TabsBasic = () => {
55
55
  return (
56
56
  <div style={{ width: '480px', marginBottom: 30 }}>
57
- <Tabs data={data} />
57
+ <Tabs data={data} onChange={(e, value) => console.log(e, value)} />
58
58
  </div>
59
59
  );
60
60
  };