@glasshome/widget-sdk 1.12.0 → 1.14.0
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/framework/dialogs/WidgetDialog.d.ts +15 -2
- package/dist/index.js +442 -423
- package/dist/ui.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ResponsiveDialogBody, ResponsiveDialogFooter, Tabs, TabsContent, TabsList, TabsTrigger } from "@glasshome/ui/solid";
|
|
2
|
+
import type { ModalSize, Button as UIButton, ResponsiveDialog as UIResponsiveDialog, ResponsiveDialogContent as UIResponsiveDialogContent, ResponsiveDialogDescription as UIResponsiveDialogDescription, ResponsiveDialogHeader as UIResponsiveDialogHeader, ResponsiveDialogTitle as UIResponsiveDialogTitle, SchemaForm as UISchemaForm } from "@glasshome/ui/solid";
|
|
2
3
|
import { type JSX } from "solid-js";
|
|
3
4
|
import type { ZodType } from "zod";
|
|
5
|
+
/** Widths a widget could name before ui's modal size scale existed. */
|
|
6
|
+
type LegacyMaxWidth = "2xl" | "3xl" | "4xl";
|
|
4
7
|
export interface WidgetDialogTab {
|
|
5
8
|
id: string;
|
|
6
9
|
label: string;
|
|
@@ -11,6 +14,8 @@ export interface WidgetDialogProps {
|
|
|
11
14
|
open: boolean;
|
|
12
15
|
onOpenChange: (open: boolean) => void;
|
|
13
16
|
title: string;
|
|
17
|
+
/** Rendered under the title. Omitted panels are named by the title alone. */
|
|
18
|
+
description?: JSX.Element;
|
|
14
19
|
onSave?: () => void;
|
|
15
20
|
hasUnsavedChanges?: boolean;
|
|
16
21
|
onDelete?: () => void;
|
|
@@ -20,7 +25,8 @@ export interface WidgetDialogProps {
|
|
|
20
25
|
debugData?: string | Record<string, unknown>;
|
|
21
26
|
tabs?: WidgetDialogTab[];
|
|
22
27
|
class?: string;
|
|
23
|
-
|
|
28
|
+
/** Panel width on desktop. `2xl`/`3xl`/`4xl` are deprecated aliases. */
|
|
29
|
+
maxWidth?: ModalSize | LegacyMaxWidth;
|
|
24
30
|
defaultTab?: string;
|
|
25
31
|
/** Controlled active tab (pair with `onActiveTabChange`); overrides `defaultTab`. */
|
|
26
32
|
activeTab?: string;
|
|
@@ -36,5 +42,12 @@ export interface WidgetDialogProps {
|
|
|
36
42
|
ResponsiveDialogDescription: typeof UIResponsiveDialogDescription;
|
|
37
43
|
Button: typeof UIButton;
|
|
38
44
|
SchemaForm?: typeof UISchemaForm;
|
|
45
|
+
ResponsiveDialogBody?: typeof ResponsiveDialogBody;
|
|
46
|
+
ResponsiveDialogFooter?: typeof ResponsiveDialogFooter;
|
|
47
|
+
Tabs?: typeof Tabs;
|
|
48
|
+
TabsList?: typeof TabsList;
|
|
49
|
+
TabsTrigger?: typeof TabsTrigger;
|
|
50
|
+
TabsContent?: typeof TabsContent;
|
|
39
51
|
}
|
|
40
52
|
export declare function WidgetDialog(props: WidgetDialogProps): JSX.Element;
|
|
53
|
+
export {};
|