@homefile/components-v2 2.8.6 → 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.
- package/dist/components/forms/dynamicForm/ItemFormPanel/ItemFormPanel.d.ts +1 -1
- package/dist/components/forms/dynamicForm/ItemFormPanel/ItemFormPanel.js +2 -2
- package/dist/interfaces/forms/ItemFormPanel/ItemFormPanel.interface.d.ts +1 -0
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +3 -4
- package/package.json +1 -1
- package/src/components/forms/dynamicForm/ItemFormPanel/ItemFormPanel.tsx +10 -3
- package/src/interfaces/forms/ItemFormPanel/ItemFormPanel.interface.ts +1 -0
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +3 -3
|
@@ -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, {
|
|
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
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FolderFileI, MenuItemI, PartnerFooterI, TileCtaI } from '../..';
|
|
2
|
-
type KindTypes = 'checkbox' | 'checkbox-agreement' | 'checkbox-group' | 'currency' | 'date' | 'email' | 'file' | 'grid' | 'group' | 'hidden' | 'notes' | 'number' | 'radio' | 'rating' | 'select' | 'string' | 'switch' | 'telephone' | 'text' | 'textarea' | 'default' | UIKindTypes | HomeItemTypes;
|
|
3
|
-
type UIKindTypes = 'tile-body' | 'tile-body-logo' | 'tile-body-header' | 'tile-body-section' | 'tile-body-section-grid' | 'tile-form' | 'tile-body-action' | 'vertical-icon' | 'primary-cta' | 'secondary-cta';
|
|
4
|
-
type HomeItemTypes = 'appliances' | 'images' | 'guidelines' | 'item-related' | 'item-icon-btn';
|
|
2
|
+
export type KindTypes = 'checkbox' | 'checkbox-agreement' | 'checkbox-group' | 'currency' | 'date' | 'email' | 'file' | 'grid' | 'group' | 'hidden' | 'notes' | 'number' | 'radio' | 'rating' | 'select' | 'string' | 'switch' | 'telephone' | 'text' | 'textarea' | 'default' | UIKindTypes | HomeItemTypes;
|
|
3
|
+
export type UIKindTypes = 'tile-body' | 'tile-body-logo' | 'tile-body-header' | 'tile-body-section' | 'tile-body-section-grid' | 'tile-form' | 'tile-body-action' | 'vertical-icon' | 'primary-cta' | 'secondary-cta';
|
|
4
|
+
export type HomeItemTypes = 'appliances' | 'images' | 'guidelines' | 'item-related' | 'item-icon-btn';
|
|
5
5
|
export type IconTypes = 'barcode' | 'battery' | 'billing' | 'book' | 'book-opened' | 'calc' | 'calendar' | 'check' | 'co2' | 'contact' | 'date' | 'default' | 'detector' | 'electricity' | 'goldbars' | 'heart' | 'image' | 'notes' | 'palette' | 'people' | 'price' | 'rating' | 'receipt' | 'registry' | 'sprinkler' | 'tools' | 'wind' | '68' | 'calendar2' | 'water' | 'calendar-drop' | 'umbrella' | 'heater' | 'roof' | 'foundation' | 'solar-panel' | 'pool' | 'drop' | 'mobile-drop' | 'light' | 'plate' | 'pressure-washer' | 'house' | 'target' | 'title' | 'company' | UIIconTypes;
|
|
6
6
|
export type UIIconTypes = 'sh-pressure' | 'sh-window' | 'sh-roof' | 'sh-lights' | 'sh-gutter' | 'sh-home' | 'sh-house';
|
|
7
7
|
export type ValueTypes = string | string[] | number | boolean;
|
|
@@ -39,4 +39,3 @@ export interface ReadOnlyDynamicFormI extends Pick<DynamicFormI, 'form'> {
|
|
|
39
39
|
onEdit?: (id: string) => void;
|
|
40
40
|
onClick?: (id: string) => void;
|
|
41
41
|
}
|
|
42
|
-
export {};
|
package/package.json
CHANGED
|
@@ -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
|
|
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"
|
|
51
|
+
<Box position="relative">
|
|
45
52
|
<Overlay
|
|
46
|
-
showOverlay={
|
|
53
|
+
showOverlay={showOverlay}
|
|
47
54
|
position="absolute"
|
|
48
55
|
w="inherit"
|
|
49
56
|
h="inherit"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FolderFileI, MenuItemI, PartnerFooterI, TileCtaI } from '@/interfaces'
|
|
2
2
|
|
|
3
|
-
type KindTypes =
|
|
3
|
+
export type KindTypes =
|
|
4
4
|
| 'checkbox'
|
|
5
5
|
| 'checkbox-agreement'
|
|
6
6
|
| 'checkbox-group'
|
|
@@ -25,7 +25,7 @@ type KindTypes =
|
|
|
25
25
|
| UIKindTypes
|
|
26
26
|
| HomeItemTypes
|
|
27
27
|
|
|
28
|
-
type UIKindTypes =
|
|
28
|
+
export type UIKindTypes =
|
|
29
29
|
| 'tile-body'
|
|
30
30
|
| 'tile-body-logo'
|
|
31
31
|
| 'tile-body-header'
|
|
@@ -37,7 +37,7 @@ type UIKindTypes =
|
|
|
37
37
|
| 'primary-cta'
|
|
38
38
|
| 'secondary-cta'
|
|
39
39
|
|
|
40
|
-
type HomeItemTypes =
|
|
40
|
+
export type HomeItemTypes =
|
|
41
41
|
| 'appliances'
|
|
42
42
|
| 'images'
|
|
43
43
|
| 'guidelines'
|