@xyo-network/react-card 2.37.23 → 2.37.25
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/cjs/components/CardContentEx.d.ts +3 -1
- package/dist/cjs/components/CardContentEx.d.ts.map +1 -1
- package/dist/cjs/components/CardContentEx.js +15 -5
- package/dist/cjs/components/CardContentEx.js.map +1 -1
- package/dist/cjs/components/CardEx.d.ts +2 -1
- package/dist/cjs/components/CardEx.d.ts.map +1 -1
- package/dist/cjs/components/CardEx.js +7 -5
- package/dist/cjs/components/CardEx.js.map +1 -1
- package/dist/cjs/components/PageCard.d.ts +1 -1
- package/dist/cjs/components/PageCard.d.ts.map +1 -1
- package/dist/cjs/components/PageCard.js +6 -4
- package/dist/cjs/components/PageCard.js.map +1 -1
- package/dist/docs.json +2491 -141
- package/dist/esm/components/CardContentEx.d.ts +3 -1
- package/dist/esm/components/CardContentEx.d.ts.map +1 -1
- package/dist/esm/components/CardContentEx.js +11 -3
- package/dist/esm/components/CardContentEx.js.map +1 -1
- package/dist/esm/components/CardEx.d.ts +2 -1
- package/dist/esm/components/CardEx.d.ts.map +1 -1
- package/dist/esm/components/CardEx.js +6 -3
- package/dist/esm/components/CardEx.js.map +1 -1
- package/dist/esm/components/PageCard.d.ts +1 -1
- package/dist/esm/components/PageCard.d.ts.map +1 -1
- package/dist/esm/components/PageCard.js +6 -3
- package/dist/esm/components/PageCard.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CardContentEx.stories.tsx +26 -7
- package/src/components/CardContentEx.tsx +14 -3
- package/src/components/CardEx.tsx +8 -2
- package/src/components/PageCard.stories.tsx +5 -1
- package/src/components/PageCard.tsx +8 -4
@@ -2,6 +2,8 @@
|
|
2
2
|
import { CardContentProps } from '@mui/material';
|
3
3
|
export declare type CardContentExProps = CardContentProps & {
|
4
4
|
variant?: 'scrollable' | 'normal';
|
5
|
+
scrollToTop?: boolean;
|
5
6
|
};
|
6
|
-
export declare const
|
7
|
+
export declare const CardContentExWithRef: import("react").ForwardRefExoticComponent<Pick<CardContentExProps, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "variant" | "scrollToTop"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
8
|
+
export declare const CardContentEx: import("react").ForwardRefExoticComponent<Pick<CardContentExProps, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "variant" | "scrollToTop"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
7
9
|
//# sourceMappingURL=CardContentEx.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardContentEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardContentEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAe,gBAAgB,EAAU,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"CardContentEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardContentEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAe,gBAAgB,EAAU,MAAM,eAAe,CAAA;AAiBrE,oBAAY,kBAAkB,GAAG,gBAAgB,GAAG;IAClD,OAAO,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,oBAAoB,8rJAO/B,CAAA;AAIF,eAAO,MAAM,aAAa,8rJAAuB,CAAA"}
|
@@ -1,8 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CardContentEx = void 0;
|
3
|
+
exports.CardContentEx = exports.CardContentExWithRef = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
5
6
|
const material_1 = require("@mui/material");
|
7
|
+
const react_1 = require("react");
|
6
8
|
const CardContentExRoot = (0, material_1.styled)(material_1.CardContent, {
|
7
9
|
name: 'CardContentEx',
|
8
10
|
shouldForwardProp: (prop) => prop !== 'variant',
|
@@ -14,8 +16,16 @@ const CardContentExRoot = (0, material_1.styled)(material_1.CardContent, {
|
|
14
16
|
overflow: 'auto',
|
15
17
|
paddingTop: 0,
|
16
18
|
}))));
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
exports.CardContentExWithRef = (0, react_1.forwardRef)((_a, ref) => {
|
20
|
+
var { scrollToTop } = _a, props = tslib_1.__rest(_a, ["scrollToTop"]);
|
21
|
+
(0, react_1.useEffect)(() => {
|
22
|
+
var _a;
|
23
|
+
if (ref !== null && typeof ref === 'object') {
|
24
|
+
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scroll({ behavior: 'smooth', top: 0 });
|
25
|
+
}
|
26
|
+
}, [ref, scrollToTop]);
|
27
|
+
return (0, jsx_runtime_1.jsx)(CardContentExRoot, Object.assign({ ref: ref }, props));
|
28
|
+
});
|
29
|
+
exports.CardContentExWithRef.displayName = 'CardContentEx';
|
30
|
+
exports.CardContentEx = exports.CardContentExWithRef;
|
21
31
|
//# sourceMappingURL=CardContentEx.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardContentEx.js","sourceRoot":"","sources":["../../../src/components/CardContentEx.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"CardContentEx.js","sourceRoot":"","sources":["../../../src/components/CardContentEx.tsx"],"names":[],"mappings":";;;;;AAAA,4CAAqE;AACrE,iCAA6C;AAE7C,MAAM,iBAAiB,GAAG,IAAA,iBAAM,EAAC,sBAAW,EAAE;IAC5C,IAAI,EAAE,eAAe;IACrB,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS;IAC/C,IAAI,EAAE,MAAM;CACb,CAAC,CAAqB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,mBACnC,CAAC,OAAO,KAAK,YAAY,IAAI;IAC9B,CAAC,aAAa,CAAC,EAAE;QACf,aAAa,EAAE,CAAC;KACjB;IACD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,CAAC;CACd,CAAC,EACF,CAAC,CAAA;AAOU,QAAA,oBAAoB,GAAG,IAAA,kBAAU,EAA4C,CAAC,EAAyB,EAAE,GAAG,EAAE,EAAE;QAAlC,EAAE,WAAW,OAAY,EAAP,KAAK,sBAAvB,eAAyB,CAAF;IAChH,IAAA,iBAAS,EAAC,GAAG,EAAE;;QACb,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3C,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,0CAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;SACrD;IACH,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAA;IACtB,OAAO,uBAAC,iBAAiB,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CAAA;AACnD,CAAC,CAAC,CAAA;AAEF,4BAAoB,CAAC,WAAW,GAAG,eAAe,CAAA;AAErC,QAAA,aAAa,GAAG,4BAAoB,CAAA"}
|
@@ -3,5 +3,6 @@ import { CardProps } from '@mui/material';
|
|
3
3
|
export declare type CardExProps = CardProps & {
|
4
4
|
gradient?: 'border' | 'background';
|
5
5
|
};
|
6
|
-
export declare const
|
6
|
+
export declare const CardExWithRef: React.FC<CardExProps>;
|
7
|
+
export declare const CardEx: import("react").FC<CardExProps>;
|
7
8
|
//# sourceMappingURL=CardEx.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"CardEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,eAAe,CAAA;AAI/C,oBAAY,WAAW,GAAG,SAAS,GAAG;IACpC,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAa9C,CAAA;AAIF,eAAO,MAAM,MAAM,iCAAgB,CAAA"}
|
@@ -1,15 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CardEx = void 0;
|
3
|
+
exports.CardEx = exports.CardExWithRef = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
6
|
const material_1 = require("@mui/material");
|
7
7
|
const react_shared_1 = require("@xyo-network/react-shared");
|
8
|
-
const
|
8
|
+
const react_1 = require("react");
|
9
|
+
exports.CardExWithRef = (0, react_1.forwardRef)((_a, ref) => {
|
9
10
|
var { style, gradient } = _a, props = tslib_1.__rest(_a, ["style", "gradient"]);
|
10
11
|
const { styles } = (0, react_shared_1.useGradientStyles)();
|
11
12
|
const gradientStyle = gradient === 'border' ? styles.border : gradient === 'background' ? styles.background : {};
|
12
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Card, Object.assign({ style: Object.assign(Object.assign({}, gradientStyle), style) }, props)));
|
13
|
-
};
|
14
|
-
exports.
|
13
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Card, Object.assign({ style: Object.assign(Object.assign({}, gradientStyle), style), ref: ref }, props)));
|
14
|
+
});
|
15
|
+
exports.CardExWithRef.displayName = 'CardEx';
|
16
|
+
exports.CardEx = exports.CardExWithRef;
|
15
17
|
//# sourceMappingURL=CardEx.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardEx.js","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA+C;AAC/C,4DAA6D;
|
1
|
+
{"version":3,"file":"CardEx.js","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA+C;AAC/C,4DAA6D;AAC7D,iCAAkC;AAMrB,QAAA,aAAa,GAA0B,IAAA,kBAAU,EAAC,CAAC,EAA6B,EAAE,GAAG,EAAE,EAAE;QAAtC,EAAE,KAAK,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAA3B,qBAA6B,CAAF;IACzF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,gCAAiB,GAAE,CAAA;IACtC,MAAM,aAAa,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAA;IAChH,OAAO,CACL,uBAAC,eAAI,kBACH,KAAK,kCACA,aAAa,GACb,KAAK,GAEV,GAAG,EAAE,GAAG,IACJ,KAAK,EACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,qBAAa,CAAC,WAAW,GAAG,QAAQ,CAAA;AAEvB,QAAA,MAAM,GAAG,qBAAa,CAAA"}
|
@@ -6,5 +6,5 @@ export interface PageCardProps extends CardExProps {
|
|
6
6
|
subheader?: CardHeaderProps['subheader'];
|
7
7
|
action?: ReactNode;
|
8
8
|
}
|
9
|
-
export declare const PageCard:
|
9
|
+
export declare const PageCard: import("react").FC<PageCardProps>;
|
10
10
|
//# sourceMappingURL=PageCard.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PageCard.d.ts","sourceRoot":"","sources":["../../../src/components/PageCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,eAAe,EAAc,MAAM,eAAe,CAAA;AAEvE,OAAO,
|
1
|
+
{"version":3,"file":"PageCard.d.ts","sourceRoot":"","sources":["../../../src/components/PageCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,eAAe,EAAc,MAAM,eAAe,CAAA;AAEvE,OAAO,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACxC,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAiCD,eAAO,MAAM,QAAQ,mCAAkB,CAAA"}
|
@@ -6,10 +6,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const Refresh_1 = tslib_1.__importDefault(require("@mui/icons-material/Refresh"));
|
7
7
|
const material_1 = require("@mui/material");
|
8
8
|
const react_shared_1 = require("@xyo-network/react-shared");
|
9
|
+
const react_1 = require("react");
|
9
10
|
const CardEx_1 = require("./CardEx");
|
10
|
-
const
|
11
|
+
const PageCardWithRef = (0, react_1.forwardRef)((_a, ref) => {
|
11
12
|
var { subheader, title, onRefresh, children, action, style } = _a, props = tslib_1.__rest(_a, ["subheader", "title", "onRefresh", "children", "action", "style"]);
|
12
|
-
return ((0, jsx_runtime_1.jsxs)(CardEx_1.CardEx, Object.assign({ style: Object.assign({ backgroundColor: 'transparent', position: 'relative' }, style), elevation: 0 }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.CardHeader, { title: (0, jsx_runtime_1.jsx)(react_shared_1.TypographyEx, Object.assign({ variant: "h5", gutterBottom: true }, { children: title })), subheader: (0, jsx_runtime_1.jsx)(react_shared_1.TypographyEx, Object.assign({ variant: "subtitle1" }, { children: subheader })), action: action ? (action) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: onRefresh ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh() }, { children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) }))) : null })) }), children] })));
|
13
|
-
};
|
14
|
-
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(CardEx_1.CardEx, Object.assign({ style: Object.assign({ backgroundColor: 'transparent', position: 'relative' }, style), elevation: 0, ref: ref }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.CardHeader, { title: (0, jsx_runtime_1.jsx)(react_shared_1.TypographyEx, Object.assign({ variant: "h5", gutterBottom: true }, { children: title })), subheader: (0, jsx_runtime_1.jsx)(react_shared_1.TypographyEx, Object.assign({ variant: "subtitle1" }, { children: subheader })), action: action ? (action) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: onRefresh ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh() }, { children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) }))) : null })) }), children] })));
|
14
|
+
});
|
15
|
+
PageCardWithRef.displayName = 'PageCard';
|
16
|
+
exports.PageCard = PageCardWithRef;
|
15
17
|
//# sourceMappingURL=PageCard.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PageCard.js","sourceRoot":"","sources":["../../../src/components/PageCard.tsx"],"names":[],"mappings":";;;;;AAAA,kFAAqD;AACrD,4CAAuE;AACvE,4DAAwD;
|
1
|
+
{"version":3,"file":"PageCard.js","sourceRoot":"","sources":["../../../src/components/PageCard.tsx"],"names":[],"mappings":";;;;;AAAA,kFAAqD;AACrD,4CAAuE;AACvE,4DAAwD;AACxD,iCAA6C;AAE7C,qCAA8C;AAQ9C,MAAM,eAAe,GAA4B,IAAA,kBAAU,EAAC,CAAC,EAAkE,EAAE,GAAG,EAAE,EAAE;QAA3E,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAY,EAAP,KAAK,sBAAhE,kEAAkE,CAAF;IAC3H,OAAO,CACL,wBAAC,eAAM,kBAAC,KAAK,kBAAI,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,IAAK,KAAK,GAAI,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,IAAM,KAAK,eAClH,uBAAC,qBAAU,IACT,KAAK,EACH,uBAAC,2BAAY,kBAAC,OAAO,EAAC,IAAI,EAAC,YAAY,sBACpC,KAAK,IACO,EAEjB,SAAS,EAAE,uBAAC,2BAAY,kBAAC,OAAO,EAAC,WAAW,gBAAE,SAAS,IAAgB,EACvE,MAAM,EACJ,MAAM,CAAC,CAAC,CAAC,CACP,MAAM,CACP,CAAC,CAAC,CAAC,CACF,2DACG,SAAS,CAAC,CAAC,CAAC,CACX,uBAAC,qBAAU,kBAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,EAAI,gBACtC,uBAAC,iBAAW,KAAG,IACJ,CACd,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,GAEH,EACD,QAAQ,KACF,CACV,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,CAAC,WAAW,GAAG,UAAU,CAAA;AAE3B,QAAA,QAAQ,GAAG,eAAe,CAAA"}
|