pne-ui 1.0.203 → 1.0.204
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,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import * as React from 'react';
|
|
3
2
|
export type PneButtonStyle = 'contained' | 'outlined' | 'error' | 'text';
|
|
4
|
-
declare const
|
|
5
|
-
component?:
|
|
6
|
-
}> & {
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
component?: React.ElementType<any> | undefined;
|
|
5
|
+
} & import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<any, "disabled" | "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "size" | "disableElevation" | "fullWidth" | "startIcon" | "endIcon" | "href" | "variant" | "component"> & {
|
|
6
|
+
component?: React.ElementType<any> | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
pneStyle?: PneButtonStyle | undefined;
|
|
9
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
10
|
+
export default _default;
|
|
@@ -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, ref) => {
|
|
8
8
|
const { sx, children, variant, color, size = 'large', pneStyle, ...rest } = props;
|
|
9
9
|
let finalVariant = 'contained';
|
|
10
10
|
let finalColor = 'primary';
|
|
@@ -40,11 +40,12 @@ const PneButton = (props) => {
|
|
|
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, ...rest }, children);
|
|
47
|
+
return React.createElement(material_1.Button, { sx: _sx, variant: finalVariant, color: finalColor, size: size, ref: ref, ...rest }, children);
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
PneButton.displayName = 'PneButton';
|
|
50
|
+
exports.default = React.forwardRef(PneButton);
|
|
50
51
|
//# 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,4CAA0D;AAC1D,qDAA8B;AAI9B,uFAAuF;AACvF,MAAM,SAAS,GAAG,CACd,KAAwE,EACxE,GAAmB,EACrB,EAAE;IACA,MAAM,EACF,EAAE,EACF,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,GAAG,OAAO,EACd,QAAQ,EACR,GAAG,IAAI,EACV,GAAG,KAAK,CAAA;IAET,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,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC7C,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,IACV,EAAE,EAAE,GAAG,EACP,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,KACJ,IAAI,IACV,QAAQ,CACD,CAAA;AACb,CAAC,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AACnC,kBAAe,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import * as React from 'react';
|
|
3
2
|
export type PneButtonStyle = 'contained' | 'outlined' | 'error' | 'text';
|
|
4
|
-
declare const
|
|
5
|
-
component?:
|
|
6
|
-
}> & {
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
component?: React.ElementType<any> | undefined;
|
|
5
|
+
} & import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<any, "disabled" | "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "size" | "disableElevation" | "fullWidth" | "startIcon" | "endIcon" | "href" | "variant" | "component"> & {
|
|
6
|
+
component?: React.ElementType<any> | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
pneStyle?: PneButtonStyle | undefined;
|
|
9
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
10
|
+
export default _default;
|
|
@@ -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, ref) => {
|
|
5
5
|
const { sx, children, variant, color, size = 'large', pneStyle, ...rest } = props;
|
|
6
6
|
let finalVariant = 'contained';
|
|
7
7
|
let finalColor = 'primary';
|
|
@@ -37,11 +37,12 @@ const PneButton = (props) => {
|
|
|
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, ...rest }, children);
|
|
44
|
+
return React.createElement(Button, { sx: _sx, variant: finalVariant, color: finalColor, size: size, ref: ref, ...rest }, children);
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
PneButton.displayName = 'PneButton';
|
|
47
|
+
export default React.forwardRef(PneButton);
|
|
47
48
|
//# 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,CAAA;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,uFAAuF;AACvF,MAAM,SAAS,GAAG,CACd,KAAwE,EACxE,GAAmB,EACrB,EAAE;IACA,MAAM,EACF,EAAE,EACF,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,GAAG,OAAO,EACd,QAAQ,EACR,GAAG,IAAI,EACV,GAAG,KAAK,CAAA;IAET,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,MAA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