@veritone-ce/design-system 2.8.3 → 2.8.4

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.
@@ -39,7 +39,7 @@ function createBoundDialogComponent(dialogAtom, config) {
39
39
  config.dialogProps?.onDismiss?.();
40
40
  },
41
41
  className: config.dialogProps?.className,
42
- children: cachedOpen !== false && /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(index.default, { children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
42
+ children: cachedOpen !== false && /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(index.default, { fallback: config.errorFallback, children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: config.loadingFallback, children: /* @__PURE__ */ jsxRuntime.jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
43
43
  }
44
44
  );
45
45
  };
@@ -49,7 +49,7 @@ function createBoundDrawerComponent(drawerAtom, config) {
49
49
  config.drawerProps?.onDismiss?.();
50
50
  },
51
51
  className: cx.cx(index_module.default.drawer, config.drawerProps?.className),
52
- children: cachedOpen !== false && /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(index.default, { children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
52
+ children: cachedOpen !== false && /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(index.default, { fallback: config.errorFallback, children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: config.loadingFallback, children: /* @__PURE__ */ jsxRuntime.jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
53
53
  }
54
54
  );
55
55
  };
@@ -37,7 +37,7 @@ function createBoundDialogComponent(dialogAtom, config) {
37
37
  config.dialogProps?.onDismiss?.();
38
38
  },
39
39
  className: config.dialogProps?.className,
40
- children: cachedOpen !== false && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
40
+ children: cachedOpen !== false && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: config.errorFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: config.loadingFallback, children: /* @__PURE__ */ jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
41
41
  }
42
42
  );
43
43
  };
@@ -47,7 +47,7 @@ function createBoundDrawerComponent(drawerAtom, config) {
47
47
  config.drawerProps?.onDismiss?.();
48
48
  },
49
49
  className: cx(styles.drawer, config.drawerProps?.className),
50
- children: cachedOpen !== false && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
50
+ children: cachedOpen !== false && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: config.errorFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: config.loadingFallback, children: /* @__PURE__ */ jsx(config.Content, { open: cachedOpen }) }) }) }, JSON.stringify(cachedOpen))
51
51
  }
52
52
  );
53
53
  };
@@ -8,6 +8,8 @@ export type OpenDialogContentProps<O> = {
8
8
  export type OpenDialogContentComponent<O> = (props: OpenDialogContentProps<O>) => ReactNode;
9
9
  export type DialogConfig<O> = {
10
10
  Content: OpenDialogContentComponent<O>;
11
+ loadingFallback?: ReactNode;
12
+ errorFallback?: ReactNode;
11
13
  dialogProps?: Partial<Omit<DialogProps, 'open' | 'children'>>;
12
14
  };
13
15
  export declare function createDialog<O = true>(config: DialogConfig<O>, store?: ReturnType<typeof createStore>): {
@@ -8,6 +8,8 @@ export type OpenDrawerContentProps<O> = {
8
8
  export type OpenDrawerContentComponent<O> = (props: OpenDrawerContentProps<O>) => ReactNode;
9
9
  export type DrawerConfig<O> = {
10
10
  Content: OpenDrawerContentComponent<O>;
11
+ loadingFallback?: ReactNode;
12
+ errorFallback?: ReactNode;
11
13
  drawerProps?: Partial<Omit<DrawerProps, 'open' | 'children'>>;
12
14
  };
13
15
  export declare function createDrawer<O = true>(config: DrawerConfig<O>, store?: ReturnType<typeof createStore>): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritone-ce/design-system",
3
- "version": "2.8.3",
3
+ "version": "2.8.4",
4
4
  "private": false,
5
5
  "description": "Design System for Veritone CE",
6
6
  "keywords": [