pne-ui 1.0.204 → 1.0.205
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,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
export type PneButtonStyle = 'contained' | 'outlined' | 'error' | 'text';
|
|
3
|
-
declare const
|
|
4
|
-
component?:
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
}, "ref"> & React.RefAttributes<any>>;
|
|
10
|
-
export default _default;
|
|
4
|
+
declare const PneButton: <C extends React.ElementType<any>>(props: ButtonProps<C, {
|
|
5
|
+
component?: C;
|
|
6
|
+
}> & {
|
|
7
|
+
pneStyle?: PneButtonStyle;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default PneButton;
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
// https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop
|
|
7
|
-
const PneButton = (props
|
|
7
|
+
const PneButton = (props) => {
|
|
8
8
|
const { sx, children, variant, color, size = 'large', pneStyle, ...rest } = props;
|
|
9
9
|
let finalVariant = 'contained';
|
|
10
10
|
let finalColor = 'primary';
|
|
@@ -40,12 +40,11 @@ const PneButton = (props, ref) => {
|
|
|
40
40
|
fontSize: '12px',
|
|
41
41
|
lineHeight: '22px',
|
|
42
42
|
fontWeight: '400',
|
|
43
|
-
textTransform: 'initial'
|
|
43
|
+
textTransform: 'initial'
|
|
44
44
|
},
|
|
45
|
-
...(Array.isArray(sx) ? sx : [sx])
|
|
45
|
+
...(Array.isArray(sx) ? sx : [sx])
|
|
46
46
|
];
|
|
47
|
-
return React.createElement(material_1.Button, { sx: _sx, variant: finalVariant, color: finalColor, size: size,
|
|
47
|
+
return React.createElement(material_1.Button, { sx: _sx, variant: finalVariant, color: finalColor, size: size, ...rest }, children);
|
|
48
48
|
};
|
|
49
|
-
|
|
50
|
-
exports.default = React.forwardRef(PneButton);
|
|
49
|
+
exports.default = PneButton;
|
|
51
50
|
//# sourceMappingURL=PneButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PneButton.js","sourceRoot":"","sources":["../../src/component/PneButton.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"PneButton.js","sourceRoot":"","sources":["../../src/component/PneButton.tsx"],"names":[],"mappings":";;;AAAA,4CAA2D;AAC3D,qDAA+B;AAI/B,uFAAuF;AACvF,MAAM,SAAS,GAAG,CACd,KAAsE,EACxE,EAAE;IACA,MAAM,EACF,EAAE,EACF,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,GAAG,OAAO,EACd,QAAQ,EACR,GAAG,IAAI,EACV,GAAG,KAAK,CAAC;IAEV,IAAI,YAAY,GAA2B,WAAW,CAAA;IACtD,IAAI,UAAU,GAAyB,SAAS,CAAA;IAEhD,IAAI,QAAQ,EAAE,CAAC;QACX,QAAQ,QAAQ,EAAE,CAAC;YACf,KAAK,WAAW;gBACZ,YAAY,GAAG,WAAW,CAAA;gBAC1B,UAAU,GAAG,SAAS,CAAA;gBACtB,MAAK;YACT,KAAK,UAAU;gBACX,YAAY,GAAG,UAAU,CAAA;gBACzB,UAAU,GAAG,SAAS,CAAA;gBACtB,MAAK;YACT,KAAK,OAAO;gBACR,YAAY,GAAG,UAAU,CAAA;gBACzB,UAAU,GAAG,OAAO,CAAA;gBACpB,MAAK;YACT,KAAK,MAAM;gBACP,YAAY,GAAG,MAAM,CAAA;gBACrB,UAAU,GAAG,SAAS,CAAA;gBACtB,MAAK;YACT;gBACI,OAAO,CAAC,IAAI,CAAC,qBAAqB,QAAQ,EAAE,CAAC,CAAA;QACrD,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,YAAY,GAAG,OAAO,IAAI,YAAY,CAAA;QACtC,UAAU,GAAG,KAAK,IAAI,UAAU,CAAA;IACpC,CAAC;IAED,MAAM,GAAG,GAAY;QACjB;YACI,MAAM,EAAE,IAAI,KAAI,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC5C,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE,MAAM;YAClB,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,SAAS;SAC3B;QACD,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KACrC,CAAA;IAED,OAAO,oBAAC,iBAAM,IAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,KAAM,IAAI,IAAG,QAAQ,CAAU,CAAA;AAC/G,CAAC,CAAA;AAED,kBAAe,SAAS,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
export type PneButtonStyle = 'contained' | 'outlined' | 'error' | 'text';
|
|
3
|
-
declare const
|
|
4
|
-
component?:
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
}, "ref"> & React.RefAttributes<any>>;
|
|
10
|
-
export default _default;
|
|
4
|
+
declare const PneButton: <C extends React.ElementType<any>>(props: ButtonProps<C, {
|
|
5
|
+
component?: C;
|
|
6
|
+
}> & {
|
|
7
|
+
pneStyle?: PneButtonStyle;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default PneButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from '@mui/material';
|
|
2
|
-
import * as React from
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
// https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop
|
|
4
|
-
const PneButton = (props
|
|
4
|
+
const PneButton = (props) => {
|
|
5
5
|
const { sx, children, variant, color, size = 'large', pneStyle, ...rest } = props;
|
|
6
6
|
let finalVariant = 'contained';
|
|
7
7
|
let finalColor = 'primary';
|
|
@@ -37,12 +37,11 @@ const PneButton = (props, ref) => {
|
|
|
37
37
|
fontSize: '12px',
|
|
38
38
|
lineHeight: '22px',
|
|
39
39
|
fontWeight: '400',
|
|
40
|
-
textTransform: 'initial'
|
|
40
|
+
textTransform: 'initial'
|
|
41
41
|
},
|
|
42
|
-
...(Array.isArray(sx) ? sx : [sx])
|
|
42
|
+
...(Array.isArray(sx) ? sx : [sx])
|
|
43
43
|
];
|
|
44
|
-
return React.createElement(Button, { sx: _sx, variant: finalVariant, color: finalColor, size: size,
|
|
44
|
+
return React.createElement(Button, { sx: _sx, variant: finalVariant, color: finalColor, size: size, ...rest }, children);
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
export default React.forwardRef(PneButton);
|
|
46
|
+
export default PneButton;
|
|
48
47
|
//# sourceMappingURL=PneButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PneButton.js","sourceRoot":"","sources":["../../src/component/PneButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAuB,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"PneButton.js","sourceRoot":"","sources":["../../src/component/PneButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAuB,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,uFAAuF;AACvF,MAAM,SAAS,GAAG,CACd,KAAsE,EACxE,EAAE;IACA,MAAM,EACF,EAAE,EACF,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,GAAG,OAAO,EACd,QAAQ,EACR,GAAG,IAAI,EACV,GAAG,KAAK,CAAC;IAEV,IAAI,YAAY,G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