@commercelayer/app-elements 0.0.79 → 0.0.80

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.
@@ -3,7 +3,7 @@ interface FormProps<T extends FieldValues> extends FormProviderProps<T> {
3
3
  /**
4
4
  * Callback invoked on submit when form has been successfully validated
5
5
  */
6
- onSubmit: (data: T) => void;
6
+ onSubmit: (data: T) => Promise<void> | void;
7
7
  }
8
8
  /**
9
9
  * Form component to be used as main provider for the `react-hook-form` context.
@@ -1,4 +1,4 @@
1
- import { _ as i } from "./main-bd408fbe.js";
1
+ import { _ as i } from "./main-dd440dc6.js";
2
2
  function p(e, t) {
3
3
  if (i(e) !== "object" || e === null)
4
4
  return e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import { type OverlayProps } from '../ui/atoms/Overlay';
3
- interface OverlayNavigationOptions {
4
- /**
5
- * The query param to be used to control the overlay visibility.
6
- **/
7
- queryParam: string;
8
- }
9
- interface OverlayNavigation {
10
- /**
11
- * The overlay component.
12
- **/
13
- Overlay: React.FC<OverlayProps>;
14
- /**
15
- * Function to be used to open the overlay.
16
- * It will add the query param to the URL.
17
- * @param replaceHistory If true, the query param will be added without creating a new history entry.
18
- **/
19
- open: (replaceHistory?: boolean) => void;
20
- /**
21
- * Function to be used to close the overlay.
22
- * It's a simple history.back() call.
23
- **/
24
- close: () => void;
25
- }
26
- export declare function useOverlayNavigation({ queryParam }: OverlayNavigationOptions): OverlayNavigation;
27
- export {};
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- export interface OverlayProps {
3
- /**
4
- * The content of the overlay.
5
- **/
6
- children: React.ReactNode;
7
- /**
8
- * The action button to be rendered at the bottom of the overlay.
9
- * If set to 'none', no button will be rendered.
10
- * If set to an object, the button will be rendered with the label and the onClick handler.
11
- * @default 'none'
12
- **/
13
- button?: 'none' | {
14
- onClick: () => void;
15
- label: string;
16
- disabled?: boolean;
17
- };
18
- }
19
- declare const Overlay: React.FC<OverlayProps>;
20
- export { Overlay };