@homefile/components-v2 2.8.7 → 2.8.8

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,3 +1,3 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { ItemFormPanelI } from '../../../../interfaces';
3
- export declare const ItemFormPanel: ({ children, itemName, onClose, onSaveItemName, onSubmitForm, panelIcon, panelTitle, showFooter, }: PropsWithChildren<ItemFormPanelI>) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const ItemFormPanel: ({ children, itemName, onClose, onSaveItemName, onSubmitForm, panelIcon, panelTitle, showFooter, showOverlay, }: PropsWithChildren<ItemFormPanelI>) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { DrawerBody, DrawerHeader, DrawerContent, DrawerFooter, Box, } from '@chakra-ui/react';
3
3
  import { PanelHeader, FooterDrawer, ItemNameHeader, ItemFormFooter, Overlay, } from '../../..';
4
- export const ItemFormPanel = ({ children, itemName, onClose, onSaveItemName, onSubmitForm, panelIcon, panelTitle, showFooter = false, }) => {
5
- return (_jsxs(DrawerContent, { bg: "lightBlue.1", zIndex: 4, children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, icon: panelIcon, title: panelTitle }) }), _jsxs(DrawerBody, { padding: "0", bg: "lightBlue.1", children: [_jsx(ItemNameHeader, { id: "item-name", onSave: onSaveItemName, value: itemName }), _jsxs(Box, { position: "relative", overflowY: "scroll", h: "inherit", pb: "12", children: [_jsx(Overlay, { showOverlay: !itemName, position: "absolute", w: "inherit", h: "inherit", zIndex: "9" }), children] })] }), _jsx(FooterDrawer, { isOpen: showFooter, children: _jsx(DrawerFooter, { w: "100%", children: _jsx(ItemFormFooter, { onSave: onSubmitForm, onCancel: onClose }) }) })] }));
4
+ export const ItemFormPanel = ({ children, itemName, onClose, onSaveItemName, onSubmitForm, panelIcon, panelTitle, showFooter = false, showOverlay = false, }) => {
5
+ return (_jsxs(DrawerContent, { bg: "lightBlue.1", zIndex: 4, children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, icon: panelIcon, title: panelTitle }) }), _jsxs(DrawerBody, { p: "0", pb: "12", overflowX: "hidden", overflowY: "scroll", bg: "lightBlue.1", children: [_jsx(ItemNameHeader, { id: "item-name", onSave: onSaveItemName, value: itemName }), _jsxs(Box, { position: "relative", children: [_jsx(Overlay, { showOverlay: showOverlay, position: "absolute", w: "inherit", h: "inherit", zIndex: "9" }), children] })] }), _jsx(FooterDrawer, { isOpen: showFooter, children: _jsx(DrawerFooter, { w: "100%", children: _jsx(ItemFormFooter, { onSave: onSubmitForm, onCancel: onClose }) }) })] }));
6
6
  };
@@ -6,4 +6,5 @@ export interface ItemFormPanelI {
6
6
  panelIcon: string;
7
7
  panelTitle: string;
8
8
  showFooter?: boolean;
9
+ showOverlay?: boolean;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.8.7",
3
+ "version": "2.8.8",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -24,6 +24,7 @@ export const ItemFormPanel = ({
24
24
  panelIcon,
25
25
  panelTitle,
26
26
  showFooter = false,
27
+ showOverlay = false,
27
28
  }: PropsWithChildren<ItemFormPanelI>) => {
28
29
  return (
29
30
  <DrawerContent bg="lightBlue.1" zIndex={4}>
@@ -35,15 +36,21 @@ export const ItemFormPanel = ({
35
36
  />
36
37
  </DrawerHeader>
37
38
 
38
- <DrawerBody padding="0" bg="lightBlue.1">
39
+ <DrawerBody
40
+ p="0"
41
+ pb="12"
42
+ overflowX="hidden"
43
+ overflowY="scroll"
44
+ bg="lightBlue.1"
45
+ >
39
46
  <ItemNameHeader
40
47
  id="item-name"
41
48
  onSave={onSaveItemName}
42
49
  value={itemName}
43
50
  />
44
- <Box position="relative" overflowY="scroll" h="inherit" pb="12">
51
+ <Box position="relative">
45
52
  <Overlay
46
- showOverlay={!itemName}
53
+ showOverlay={showOverlay}
47
54
  position="absolute"
48
55
  w="inherit"
49
56
  h="inherit"
@@ -6,4 +6,5 @@ export interface ItemFormPanelI {
6
6
  panelIcon: string
7
7
  panelTitle: string
8
8
  showFooter?: boolean
9
+ showOverlay?: boolean
9
10
  }