Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Migrate form to data sources (#1855)

Bogdan Chadkin47ac7080da8f
diff --git a/packages/prisma-client/prisma/migrations/20230702002752_form_data_sources/migration.ts b/packages/prisma-client/prisma/migrations/20230702002752_form_data_sources/migration.ts
new file mode 100644
index 0000000000..e214eb5afb
--- /dev/null
+++ b/packages/prisma-client/prisma/migrations/20230702002752_form_data_sources/migration.ts
@@ -0,0 +1,237 @@
+import { nanoid } from "nanoid";
+import { PrismaClient } from "./client";
+
+const showAttribute = "data-ws-show";
+
+const dataSourceVariablePrefix = "$ws$dataSource$";
+
+const encodeDataSourceVariable = (id: string) => {
+ const encoded = id.replaceAll("-", "__DASH__");
+ return `${dataSourceVariablePrefix}${encoded}`;
+};
+
+type Text = {
+ type: "text";
+ value: string;
+};
+
+type Id = {
+ type: "id";
+ value: string;
+};
+
+export type Instance = {
+ type: "instance";
+ id: string;
+ component: string;
+ label?: string;
+ children: Array<Id | Text>;
+};
+
+type InstancesList = Instance[];
+
+type BaseProp = {
+ id: string;
+ instanceId: string;
+ name: string;
+ required?: boolean;
+};
+
+type Prop = BaseProp &
+ (
+ | { type: "number"; value: number }
+ | { type: "string"; value: string }
+ | { type: "boolean"; value: boolean }
+ | { type: "asset"; value: string }
+ | { type: "page"; value: string | { pageId: string; instanceId: string } }
+ | { type: "string[]"; value: string[] }
+ | { type: "dataSource"; value: string }
+ );
+
+type PropsList = Prop[];
+
+type DataSourceVariableValue =
+ | { type: "number"; value: number }
+ | { type: "string"; value: string }
+ | { type: "boolean"; value: boolean }
+ | { type: "string[]"; value: string[] };
+
+type DataSource =
+ | {
+ type: "variable";
+ id: string;
+ scopeInstanceId?: string;
+ name: string;
+ value: DataSourceVariableValue;
+ }
+ | {
+ type: "expression";
+ id: string;
+ scopeInstanceId?: string;
+ name: string;
+ code: string;
+ };
+
+type DataSourcesList = DataSource[];
+
+export default async () => {
+ const client = new PrismaClient({
+ // Uncomment to see the queries in console as the migration runs
+ // log: ["query", "info", "warn", "error"],
+ });
+
+ await client.$transaction(
+ async (prisma) => {
+ const chunkSize = 1000;
+ let cursor: undefined | string = undefined;
+ let hasNext = true;
+ while (hasNext) {
+ const builds = await prisma.build.findMany({
+ take: chunkSize,
+ orderBy: {
+ id: "asc",
+ },
+ ...(cursor
+ ? {
+ skip: 1, // Skip the cursor
+ cursor: { id: cursor },
+ }
+ : null),
+ });
+ cursor = builds.at(-1)?.id;
+ hasNext = builds.length === chunkSize;
+ const changedBuilds: typeof builds = [];
+
+ for (const build of builds) {
+ const buildId = build.id;
+ try {
+ const instancesList: InstancesList = JSON.parse(build.instances);
+ const propsList: PropsList = JSON.parse(build.props);
+ const dataSourcesList: DataSourcesList = JSON.parse(
+ build.dataSources
+ );
+
+ const instances = new Map(
+ instancesList.map((instance) => [instance.id, instance])
+ );
+ let changed = false;
+
+ const formInstanceIds = new Set<string>();
+
+ for (const instance of instancesList) {
+ if (instance.component === "Form") {
+ formInstanceIds.add(instance.id);
+ const formDataSourceId = nanoid();
+ const formState = encodeDataSourceVariable(formDataSourceId);
+ dataSourcesList.push({
+ type: "variable",
+ id: formDataSourceId,
+ scopeInstanceId: instance.id,
+ name: "formState",
+ value: {
+ type: "string",
+ value: "initial",
+ },
+ });
+ propsList.push({
+ id: nanoid(),
+ instanceId: instance.id,
+ type: "dataSource",
+ name: "state",
+ value: formDataSourceId,
+ });
+
+ // add show bindings to all direct children
+ for (const child of instance.children) {
+ if (child.type !== "id") {
+ continue;
+ }
+ const chillInstance = instances.get(child.value);
+ if (chillInstance === undefined) {
+ continue;
+ }
+ const childDataSourceId = nanoid();
+ propsList.push({
+ id: nanoid(),
+ instanceId: chillInstance.id,
+ type: "dataSource",
+ name: showAttribute,
+ value: childDataSourceId,
+ });
+ if (chillInstance.component === "ErrorMessage") {
+ dataSourcesList.push({
+ type: "expression",
+ id: childDataSourceId,
+ scopeInstanceId: chillInstance.id,
+ name: "formError",
+ code: `${formState} === 'error'`,
+ });
+ } else if (chillInstance.component === "SuccessMessage") {
+ dataSourcesList.push({
+ type: "expression",
+ id: childDataSourceId,
+ scopeInstanceId: chillInstance.id,
+ name: "formSuccess",
+ code: `${formState} === 'success'`,
+ });
+ } else {
+ dataSourcesList.push({
+ type: "expression",
+ id: childDataSourceId,
+ scopeInstanceId: chillInstance.id,
+ name: "formInitial",
+ code: `${formState} === 'initial' || ${formState} === 'error'`,
+ });
+ }
+ }
+
+ changed = true;
+ }
+ if (instance.component === "ErrorMessage") {
+ instance.component = "Box";
+ instance.label = "Error Message";
+ changed = true;
+ }
+ if (instance.component === "SuccessMessage") {
+ instance.component = "Box";
+ instance.label = "Success Message";
+ changed = true;
+ }
+ }
+
+ const newPropsList: PropsList = [];
+
+ for (const prop of propsList) {
+ if (
+ prop.name === "initialState" &&
+ formInstanceIds.has(prop.instanceId)
+ ) {
+ changed = true;
+ continue;
+ }
+ newPropsList.push(prop);
+ }
+
+ if (changed) {
+ build.instances = JSON.stringify(instancesList);
+ build.props = JSON.stringify(newPropsList);
+ build.dataSources = JSON.stringify(dataSourcesList);
+ changedBuilds.push(build);
+ }
+ } catch {
+ console.info(`build ${buildId} cannot be converted`);
+ }
+ }
+ await Promise.all(
+ changedBuilds.map(({ id, instances, props, dataSources }) =>
+ prisma.build.update({
+ where: { id },
+ data: { instances, props, dataSources },
+ })
+ )
+ );
+ }
+ },
+ { timeout: 1000 * 60 * 8 }
+ );
+};
diff --git a/packages/prisma-client/prisma/migrations/20230702002752_form_data_sources/schema.prisma b/packages/prisma-client/prisma/migrations/20230702002752_form_data_sources/schema.prisma
new file mode 100644
index 0000000000..52111b5983
--- /dev/null
+++ b/packages/prisma-client/prisma/migrations/20230702002752_form_data_sources/schema.prisma
@@ -0,0 +1,233 @@
+// DO NOT EDIT THIS FILE!
+// This is a copy of your schema.prisma that corresponds to the state of the database
+// when all migrations up until this one are applied.
+// It's used to generate a Prisma Client for the migration.
+
+// This is your Prisma schema file,
+// learn more about it in the docs: https://pris.ly/d/prisma-schema
+
+generator client {
+ provider = "prisma-client-js"
+ previewFeatures = ["views", "clientExtensions", "jsonProtocol"]
+ // see commands.ts
+ output = "client"
+}
+
+datasource db {
+ provider = "postgres"
+ url = env("DATABASE_URL")
+}
+
+model Team {
+ id String @id @default(uuid())
+ users User[]
+}
+
+enum UploadStatus {
+ UPLOADING
+ UPLOADED
+}
+
+model File {
+ name String @id
+ format String
+ size Int
+ description String?
+ createdAt DateTime @default(now())
+ updatedAt DateTime @default(now()) @updatedAt
+ meta String @default("{}")
+ status UploadStatus @default(UPLOADING)
+ isDeleted Boolean @default(false)
+ uploaderProject Project? @relation(fields: [uploaderProjectId], references: [id])
+ uploaderProjectId String?
+ assets Asset[]
+}
+
+model Asset {
+ id String @default(uuid()) // not unique!
+ projectId String
+ file File @relation(fields: [name], references: [name])
+ name String
+
+ @@id([id, projectId])
+}
+
+model User {
+ id String @id @default(uuid())
+ email String? @unique
+ provider String?
+ image String?
+ username String?
+ createdAt DateTime @default(now())
+ team Team? @relation(fields: [teamId], references: [id])
+ teamId String?
+ projects Project[]
+}
+
+model Project {
+ id String @id @default(uuid())
+ createdAt DateTime @default(now())
+ title String
+ domain String @unique
+ user User? @relation(fields: [userId], references: [id])
+ userId String?
+ build Build[]
+ isDeleted Boolean @default(false)
+ files File[]
+ projectDomain ProjectDomain[]
+ latestBuild LatestBuildPerProject?
+
+ @@unique([id, isDeleted])
+ @@unique([domain, isDeleted])
+ @@unique([id, domain])
+}
+
+enum PublishStatus {
+ PENDING
+ PUBLISHED
+ FAILED
+}
+
+model Build {
+ id String @unique @default(uuid())
+ version Int @default(0)
+ createdAt DateTime @default(now())
+ updatedAt DateTime @default(now()) @updatedAt
+ pages String
+
+ project Project @relation(fields: [projectId], references: [id])
+ projectId String
+
+ breakpoints String @default("[]")
+ styles String @default("[]")
+ styleSources String @default("[]")
+ styleSourceSelections String @default("[]")
+ props String @default("[]")
+ dataSources String @default("[]")
+ instances String @default("[]")
+
+ deployment String?
+ publishStatus PublishStatus @default(PENDING)
+
+ @@id([id, projectId])
+}
+
+enum AuthorizationRelation {
+ viewers
+ editors
+ builders
+}
+
+model AuthorizationToken {
+ token String @default(uuid())
+ // No relation to Project, as the Authorization system is not tied to a project
+ projectId String
+ name String @default("")
+ relation AuthorizationRelation @default(viewers)
+ createdAt DateTime @default(now())
+
+ @@id([token, projectId])
+}
+
+enum DomainStatus {
+ INITIALIZING
+ ACTIVE
+ ERROR
+ PENDING
+}
+
+// Domains + last known status and last known txtRecord
+// In the future we can update this table using queue, n8n or temporal workflows.
+// As of now updates are done during UI interactions
+model Domain {
+ id String @id @default(uuid())
+ domain String @unique
+ createdAt DateTime @default(now())
+ updatedAt DateTime @default(now()) @updatedAt
+
+ ProjectDomain ProjectDomain[]
+ // Last known txtRecord of the domain (to check domain ownership)
+ txtRecord String?
+ // create, init, pending, active, error
+ status DomainStatus @default(INITIALIZING)
+ // In case of status="error", this will contain the error message
+ error String?
+
+ projectWithDomain ProjectWithDomain[]
+}
+
+model ProjectDomain {
+ projectId String
+ project Project @relation(fields: [projectId], references: [id])
+ domainId String
+ domain Domain @relation(fields: [domainId], references: [id])
+ createdAt DateTime @default(now())
+ // Generated txt record to check domain ownership
+ txtRecord String @unique @default(uuid())
+
+ // CNAME record to point to the domain
+ cname String
+
+ @@id([projectId, domainId])
+ @@index([domainId])
+}
+
+view ProjectWithDomain {
+ projectId String
+
+ domainId String
+ domain Domain @relation(fields: [domainId], references: [id])
+ txtRecord String
+
+ createdAt DateTime
+
+ // CNAME record to point to the domain
+ cname String
+
+ verified Boolean
+ // To count statistics per user
+ userId String?
+
+ // We can deploy on per domain basis, here for each project domain we have latest build
+ latestBuid LatestBuildPerProjectDomain?
+
+ @@id([projectId, domainId])
+}
+
+view LatestBuildPerProjectDomain {
+ domainId String
+ buildId String
+ projectId String
+ projectWithDomain ProjectWithDomain @relation(fields: [projectId, domainId], references: [projectId, domainId])
+
+ isLatestBuild Boolean
+ publishStatus PublishStatus
+ updatedAt DateTime
+
+ @@id([projectId, domainId])
+}
+
+view LatestBuildPerProject {
+ buildId String
+
+ projectId String
+ domain String
+ project Project @relation(fields: [projectId, domain], references: [id, domain])
+
+ isLatestBuild Boolean
+ publishStatus PublishStatus
+ updatedAt DateTime
+
+ @@id([projectId, domain])
+}
+
+// Dashboard
+view DashboardProject {
+ id String @id @default(uuid())
+ createdAt DateTime @default(now())
+ title String
+ domain String
+ userId String?
+ isDeleted Boolean @default(false)
+ isPublished Boolean
+}
diff --git a/packages/prisma-client/tsconfig.json b/packages/prisma-client/tsconfig.json
index da0d32a1b9..194545b71f 100644
--- a/packages/prisma-client/tsconfig.json
+++ b/packages/prisma-client/tsconfig.json
@@ -2,8 +2,6 @@
"extends": "@webstudio-is/tsconfig/base.json",
"include": ["src"],
"compilerOptions": {
- "module": "ES2020",
- "target": "ES2019",
"rootDir": "./src",
"outDir": "./lib"
}
diff --git a/packages/sdk-components-react-remix/src/__generated__/form.props.ts b/packages/sdk-components-react-remix/src/__generated__/form.props.ts
index 3bc12391c8..596f4cd18d 100644
--- a/packages/sdk-components-react-remix/src/__generated__/form.props.ts
+++ b/packages/sdk-components-react-remix/src/__generated__/form.props.ts
@@ -371,13 +371,6 @@ export const props: Record<string, PropMeta> = {
encType: { required: false, control: "text", type: "string" },
hidden: { required: false, control: "boolean", type: "boolean" },
id: { required: false, control: "text", type: "string" },
- initialState: {
- required: false,
- control: "radio",
- type: "string",
- defaultValue: "initial",
- options: ["initial", "success", "error"],
- },
inputMode: {
description:
"Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
@@ -424,6 +417,13 @@ export const props: Record<string, PropMeta> = {
security: { required: false, control: "text", type: "string" },
slot: { required: false, control: "text", type: "string" },
spellCheck: { required: false, control: "boolean", type: "boolean" },
+ state: {
+ required: false,
+ control: "radio",
+ type: "string",
+ defaultValue: "initial",
+ options: ["initial", "success", "error"],
+ },
suppressContentEditableWarning: {
required: false,
control: "boolean",
diff --git a/packages/sdk-components-react-remix/src/form.tsx b/packages/sdk-components-react-remix/src/form.tsx
index b27effb7a5..fb71b71e02 100644
--- a/packages/sdk-components-react-remix/src/form.tsx
+++ b/packages/sdk-components-react-remix/src/form.tsx
@@ -1,109 +1,61 @@
import {
- type ReactNode,
type ElementRef,
type ComponentProps,
- Children,
- cloneElement,
forwardRef,
+ useRef,
+ useEffect,
+ useContext,
} from "react";
-import { useFetcher } from "@remix-run/react";
+import { useFetcher, type Fetcher } from "@remix-run/react";
import { formIdFieldName } from "@webstudio-is/form-handlers";
-import { getInstanceIdFromComponentProps } from "@webstudio-is/react-sdk";
+import {
+ ReactSdkContext,
+ getInstanceIdFromComponentProps,
+} from "@webstudio-is/react-sdk";
export const defaultTag = "form";
-const isComponentNode = (
- component: string,
- node: Exclude<ReactNode, null | number | string | boolean | undefined>
-) => "props" in node && node.props.instance?.component === component;
-
-const onlyErrorMessage = (children: ReactNode) =>
- Children.map(children, (child): ReactNode => {
- if (typeof child !== "object" || child === null) {
- return null;
- }
-
- if (isComponentNode("ErrorMessage", child)) {
- return child;
- }
-
- if ("props" in child) {
- const newChildren = onlyErrorMessage(child.props.children);
- return Children.toArray(newChildren).some((child) => child !== null)
- ? cloneElement(child, { children: newChildren })
- : null;
- }
-
- return onlyErrorMessage(child);
- });
-
-const onlySuccessMessage = (children: ReactNode) =>
- Children.map(children, (child): ReactNode => {
- if (typeof child !== "object" || child === null) {
- return null;
- }
-
- if (isComponentNode("SuccessMessage", child)) {
- return child;
- }
-
- if ("props" in child) {
- const newChildren = onlySuccessMessage(child.props.children);
- return Children.toArray(newChildren).some((child) => child !== null)
- ? cloneElement(child, { children: newChildren })
- : null;
- }
-
- return onlySuccessMessage(child);
- });
-
-const withoutMessages = (children: ReactNode) =>
- Children.map(children, (child): ReactNode => {
- if (typeof child !== "object" || child === null) {
- return child;
- }
+const useOnFetchEnd = <Data,>(
+ fetcher: Fetcher<Data>,
+ handler: (data: Data) => void
+) => {
+ const latestHandler = useRef(handler);
+ latestHandler.current = handler;
+ const prevFetcher = useRef(fetcher);
+ useEffect(() => {
if (
- isComponentNode("ErrorMessage", child) ||
- isComponentNode("SuccessMessage", child)
+ prevFetcher.current.state !== fetcher.state &&
+ fetcher.state === "idle" &&
+ fetcher.data !== undefined
) {
- return null;
- }
-
- if ("props" in child) {
- return cloneElement(child, {
- children: withoutMessages(child.props.children),
- });
+ latestHandler.current(fetcher.data);
}
+ prevFetcher.current = fetcher;
+ }, [fetcher]);
+};
- return withoutMessages(child);
- });
+type State = "initial" | "success" | "error";
export const Form = forwardRef<
ElementRef<typeof defaultTag>,
- ComponentProps<typeof defaultTag> & {
- initialState?: "initial" | "success" | "error";
- }
->(({ children, initialState = "initial", action, method, ...props }, ref) => {
+ ComponentProps<typeof defaultTag> & { state?: State }
+>(({ children, action, method, state = "initial", ...rest }, ref) => {
+ const { setDataSourceValue } = useContext(ReactSdkContext);
+
const fetcher = useFetcher();
- const state =
- fetcher.type === "done"
- ? fetcher.data?.success === true
- ? "success"
- : "error"
- : initialState;
+ const instanceId = getInstanceIdFromComponentProps(rest);
- const instanceId = getInstanceIdFromComponentProps(props);
+ useOnFetchEnd(fetcher, (data) => {
+ const state: State = data?.success === true ? "success" : "error";
+ setDataSourceValue(instanceId, "state", state);
+ });
return (
- <fetcher.Form {...props} method="post" data-state={state} ref={ref}>
+ <fetcher.Form {...rest} method="post" data-state={state} ref={ref}>
<input type="hidden" name={formIdFieldName} value={instanceId} />
- {state === "success"
- ? onlySuccessMessage(children)
- : state === "error"
- ? onlyErrorMessage(children)
- : withoutMessages(children)}
+ {children}
</fetcher.Form>
);
});
diff --git a/packages/sdk-components-react-remix/src/form.ws.tsx b/packages/sdk-components-react-remix/src/form.ws.tsx
index e0edfe42ad..2b538a5f94 100644
--- a/packages/sdk-components-react-remix/src/form.ws.tsx
+++ b/packages/sdk-components-react-remix/src/form.ws.tsx
@@ -1,9 +1,10 @@
import { FormIcon } from "@webstudio-is/icons/svg";
import { form } from "@webstudio-is/react-sdk/css-normalize";
-import type {
- PresetStyle,
- WsComponentMeta,
- WsComponentPropsMeta,
+import {
+ type PresetStyle,
+ type WsComponentMeta,
+ type WsComponentPropsMeta,
+ showAttribute,
} from "@webstudio-is/react-sdk";
import type { defaultTag } from "./form";
import { props } from "./__generated__/form.props";
@@ -18,6 +19,7 @@ const presetStyle = {
export const meta: WsComponentMeta = {
category: "forms",
type: "container",
+ invalidAncestors: ["Form"],
label: "Form",
icon: FormIcon,
presetStyle,
@@ -30,59 +32,103 @@ export const meta: WsComponentMeta = {
{
type: "instance",
component: "Form",
- children: [
- {
- type: "instance",
- component: "Label",
- children: [{ type: "text", value: "Name" }],
- },
+ props: [
{
- type: "instance",
- component: "Input",
- props: [{ type: "string", name: "name", value: "name" }],
- children: [],
- },
- {
- type: "instance",
- component: "Label",
- children: [{ type: "text", value: "Email" }],
- },
- {
- type: "instance",
- component: "Input",
- props: [{ type: "string", name: "name", value: "email" }],
- children: [],
- },
- {
- type: "instance",
- component: "Button",
- children: [{ type: "text", value: "Submit" }],
+ name: "state",
+ type: "string",
+ value: "initial",
+ dataSourceRef: {
+ type: "variable",
+ name: "formState",
+ },
},
+ ],
+ children: [
{
type: "instance",
- component: "SuccessMessage",
+ label: "Form Content",
+ component: "Box",
+ props: [
+ {
+ name: showAttribute,
+ type: "boolean",
+ value: false,
+ dataSourceRef: {
+ type: "expression",
+ name: "formInitial",
+ code: `formState === 'initial' || formState === 'error'`,
+ },
+ },
+ ],
children: [
{
type: "instance",
- component: "Text",
- children: [
- { type: "text", value: "Thank you for getting in touch!" },
- ],
+ component: "Label",
+ children: [{ type: "text", value: "Name" }],
+ },
+ {
+ type: "instance",
+ component: "Input",
+ props: [{ type: "string", name: "name", value: "name" }],
+ children: [],
+ },
+ {
+ type: "instance",
+ component: "Label",
+ children: [{ type: "text", value: "Email" }],
+ },
+ {
+ type: "instance",
+ component: "Input",
+ props: [{ type: "string", name: "name", value: "email" }],
+ children: [],
+ },
+ {
+ type: "instance",
+ component: "Button",
+ children: [{ type: "text", value: "Submit" }],
},
],
},
+
{
type: "instance",
- component: "ErrorMessage",
+ label: "Success Message",
+ component: "Box",
+ props: [
+ {
+ name: showAttribute,
+ type: "boolean",
+ value: false,
+ dataSourceRef: {
+ type: "expression",
+ name: "formSuccess",
+ code: `formState === 'success'`,
+ },
+ },
+ ],
children: [
+ { type: "text", value: "Thank you for getting in touch!" },
+ ],
+ },
+
+ {
+ type: "instance",
+ label: "Error Message",
+ component: "Box",
+ props: [
{
- type: "instance",
- component: "Text",
- children: [
- { type: "text", value: "Sorry, something went wrong." },
- ],
+ name: showAttribute,
+ type: "boolean",
+ value: false,
+ dataSourceRef: {
+ type: "expression",
+ name: "formError",
+ code: `formState === 'error'`,
+ },
},
],
+ children: [{ type: "text", value: "Sorry, something went wrong." }],
},
],
},
@@ -91,5 +137,5 @@ export const meta: WsComponentMeta = {
export const propsMeta: WsComponentPropsMeta = {
props,
- initialProps: ["initialState"],
+ initialProps: ["state"],
};
diff --git a/packages/sdk-components-react/src/__generated__/error-message.props.ts b/packages/sdk-components-react/src/__generated__/error-message.props.ts
deleted file mode 100644
index 951676773a..0000000000
--- a/packages/sdk-components-react/src/__generated__/error-message.props.ts
+++ /dev/null
@@ -1,439 +0,0 @@
-import type { PropMeta } from "@webstudio-is/generate-arg-types";
-
-export const props: Record<string, PropMeta> = {
- about: { required: false, control: "text", type: "string" },
- accessKey: { required: false, control: "text", type: "string" },
- "aria-activedescendant": {
- description:
- "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-atomic": {
- description:
- "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-autocomplete": {
- description:
- "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
- required: false,
- control: "select",
- type: "string",
- options: ["list", "none", "inline", "both"],
- },
- "aria-busy": {
- description:
- "Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-checked": {
- description:
- 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
- required: false,
- control: "text",
- type: "string",
- },
- "aria-colcount": {
- description:
- "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-colindex": {
- description:
- "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-colspan": {
- description:
- "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-controls": {
- description:
- "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-current": {
- description:
- "Indicates the element that represents the current item within a container or set of related elements.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-describedby": {
- description:
- "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-details": {
- description:
- "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-disabled": {
- description:
- "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-dropeffect": {
- description:
- "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
- required: false,
- control: "select",
- type: "string",
- options: ["link", "none", "copy", "execute", "move", "popup"],
- },
- "aria-errormessage": {
- description:
- "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-expanded": {
- description:
- "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-flowto": {
- description:
- "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-grabbed": {
- description:
- 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-haspopup": {
- description:
- "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-hidden": {
- description:
- "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-invalid": {
- description:
- "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-keyshortcuts": {
- description:
- "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-label": {
- description:
- "Defines a string value that labels the current element.\n@see aria-labelledby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-labelledby": {
- description:
- "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-level": {
- description:
- "Defines the hierarchical level of an element within a structure.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-live": {
- description:
- "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
- required: false,
- control: "radio",
- type: "string",
- options: ["off", "assertive", "polite"],
- },
- "aria-modal": {
- description: "Indicates whether an element is modal when displayed.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-multiline": {
- description:
- "Indicates whether a text box accepts multiple lines of input or only a single line.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-multiselectable": {
- description:
- "Indicates that the user may select more than one item from the current selectable descendants.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-orientation": {
- description:
- "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
- required: false,
- control: "radio",
- type: "string",
- options: ["horizontal", "vertical"],
- },
- "aria-owns": {
- description:
- "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-placeholder": {
- description:
- "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-posinset": {
- description:
- "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-pressed": {
- description:
- 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
- required: false,
- control: "text",
- type: "string",
- },
- "aria-readonly": {
- description:
- "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-relevant": {
- description:
- "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
- required: false,
- control: "select",
- type: "string",
- options: [
- "text",
- "additions",
- "additions removals",
- "additions text",
- "all",
- "removals",
- "removals additions",
- "removals text",
- "text additions",
- "text removals",
- ],
- },
- "aria-required": {
- description:
- "Indicates that user input is required on the element before a form may be submitted.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-roledescription": {
- description:
- "Defines a human-readable, author-localized description for the role of an element.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-rowcount": {
- description:
- "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-rowindex": {
- description:
- "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-rowspan": {
- description:
- "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-selected": {
- description:
- 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-setsize": {
- description:
- "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-sort": {
- description:
- "Indicates if items in a table or grid are sorted in ascending or descending order.",
- required: false,
- control: "select",
- type: "string",
- options: ["none", "ascending", "descending", "other"],
- },
- "aria-valuemax": {
- description: "Defines the maximum allowed value for a range widget.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-valuemin": {
- description: "Defines the minimum allowed value for a range widget.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-valuenow": {
- description:
- "Defines the current value for a range widget.\n@see aria-valuetext.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-valuetext": {
- description:
- "Defines the human readable text alternative of aria-valuenow for a range widget.",
- required: false,
- control: "text",
- type: "string",
- },
- autoCapitalize: { required: false, control: "text", type: "string" },
- autoCorrect: { required: false, control: "text", type: "string" },
- autoFocus: { required: false, control: "boolean", type: "boolean" },
- autoSave: { required: false, control: "text", type: "string" },
- className: { required: false, control: "text", type: "string" },
- color: { required: false, control: "color", type: "string" },
- content: { required: false, control: "text", type: "string" },
- contextMenu: { required: false, control: "text", type: "string" },
- datatype: { required: false, control: "text", type: "string" },
- defaultChecked: { required: false, control: "boolean", type: "boolean" },
- dir: { required: false, control: "text", type: "string" },
- draggable: { required: false, control: "boolean", type: "boolean" },
- hidden: { required: false, control: "boolean", type: "boolean" },
- id: { required: false, control: "text", type: "string" },
- inputMode: {
- description:
- "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
- required: false,
- control: "select",
- type: "string",
- options: [
- "text",
- "none",
- "search",
- "tel",
- "url",
- "email",
- "numeric",
- "decimal",
- ],
- },
- is: {
- description:
- "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
- required: false,
- control: "text",
- type: "string",
- },
- itemID: { required: false, control: "text", type: "string" },
- itemProp: { required: false, control: "text", type: "string" },
- itemRef: { required: false, control: "text", type: "string" },
- itemScope: { required: false, control: "boolean", type: "boolean" },
- itemType: { required: false, control: "text", type: "string" },
- lang: { required: false, control: "text", type: "string" },
- nonce: { required: false, control: "text", type: "string" },
- placeholder: { required: false, control: "text", type: "string" },
- prefix: { required: false, control: "text", type: "string" },
- property: { required: false, control: "text", type: "string" },
- radioGroup: { required: false, control: "text", type: "string" },
- rel: { required: false, control: "text", type: "string" },
- resource: { required: false, control: "text", type: "string" },
- results: { required: false, control: "number", type: "number" },
- rev: { required: false, control: "text", type: "string" },
- role: { required: false, control: "text", type: "string" },
- security: { required: false, control: "text", type: "string" },
- slot: { required: false, control: "text", type: "string" },
- spellCheck: { required: false, control: "boolean", type: "boolean" },
- suppressContentEditableWarning: {
- required: false,
- control: "boolean",
- type: "boolean",
- },
- suppressHydrationWarning: {
- required: false,
- control: "boolean",
- type: "boolean",
- },
- tabIndex: { required: false, control: "number", type: "number" },
- title: { required: false, control: "text", type: "string" },
- translate: {
- required: false,
- control: "radio",
- type: "string",
- options: ["yes", "no"],
- },
- typeof: { required: false, control: "text", type: "string" },
- unselectable: {
- required: false,
- control: "radio",
- type: "string",
- options: ["on", "off"],
- },
- vocab: { required: false, control: "text", type: "string" },
-};
diff --git a/packages/sdk-components-react/src/__generated__/success-message.props.ts b/packages/sdk-components-react/src/__generated__/success-message.props.ts
deleted file mode 100644
index 951676773a..0000000000
--- a/packages/sdk-components-react/src/__generated__/success-message.props.ts
+++ /dev/null
@@ -1,439 +0,0 @@
-import type { PropMeta } from "@webstudio-is/generate-arg-types";
-
-export const props: Record<string, PropMeta> = {
- about: { required: false, control: "text", type: "string" },
- accessKey: { required: false, control: "text", type: "string" },
- "aria-activedescendant": {
- description:
- "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-atomic": {
- description:
- "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-autocomplete": {
- description:
- "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
- required: false,
- control: "select",
- type: "string",
- options: ["list", "none", "inline", "both"],
- },
- "aria-busy": {
- description:
- "Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-checked": {
- description:
- 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
- required: false,
- control: "text",
- type: "string",
- },
- "aria-colcount": {
- description:
- "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-colindex": {
- description:
- "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-colspan": {
- description:
- "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-controls": {
- description:
- "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-current": {
- description:
- "Indicates the element that represents the current item within a container or set of related elements.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-describedby": {
- description:
- "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-details": {
- description:
- "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-disabled": {
- description:
- "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-dropeffect": {
- description:
- "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
- required: false,
- control: "select",
- type: "string",
- options: ["link", "none", "copy", "execute", "move", "popup"],
- },
- "aria-errormessage": {
- description:
- "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-expanded": {
- description:
- "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-flowto": {
- description:
- "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-grabbed": {
- description:
- 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-haspopup": {
- description:
- "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-hidden": {
- description:
- "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-invalid": {
- description:
- "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-keyshortcuts": {
- description:
- "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-label": {
- description:
- "Defines a string value that labels the current element.\n@see aria-labelledby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-labelledby": {
- description:
- "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-level": {
- description:
- "Defines the hierarchical level of an element within a structure.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-live": {
- description:
- "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
- required: false,
- control: "radio",
- type: "string",
- options: ["off", "assertive", "polite"],
- },
- "aria-modal": {
- description: "Indicates whether an element is modal when displayed.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-multiline": {
- description:
- "Indicates whether a text box accepts multiple lines of input or only a single line.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-multiselectable": {
- description:
- "Indicates that the user may select more than one item from the current selectable descendants.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-orientation": {
- description:
- "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
- required: false,
- control: "radio",
- type: "string",
- options: ["horizontal", "vertical"],
- },
- "aria-owns": {
- description:
- "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-placeholder": {
- description:
- "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-posinset": {
- description:
- "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-pressed": {
- description:
- 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
- required: false,
- control: "text",
- type: "string",
- },
- "aria-readonly": {
- description:
- "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-relevant": {
- description:
- "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
- required: false,
- control: "select",
- type: "string",
- options: [
- "text",
- "additions",
- "additions removals",
- "additions text",
- "all",
- "removals",
- "removals additions",
- "removals text",
- "text additions",
- "text removals",
- ],
- },
- "aria-required": {
- description:
- "Indicates that user input is required on the element before a form may be submitted.",
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-roledescription": {
- description:
- "Defines a human-readable, author-localized description for the role of an element.",
- required: false,
- control: "text",
- type: "string",
- },
- "aria-rowcount": {
- description:
- "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-rowindex": {
- description:
- "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-rowspan": {
- description:
- "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-selected": {
- description:
- 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
- required: false,
- control: "boolean",
- type: "boolean",
- },
- "aria-setsize": {
- description:
- "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-sort": {
- description:
- "Indicates if items in a table or grid are sorted in ascending or descending order.",
- required: false,
- control: "select",
- type: "string",
- options: ["none", "ascending", "descending", "other"],
- },
- "aria-valuemax": {
- description: "Defines the maximum allowed value for a range widget.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-valuemin": {
- description: "Defines the minimum allowed value for a range widget.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-valuenow": {
- description:
- "Defines the current value for a range widget.\n@see aria-valuetext.",
- required: false,
- control: "number",
- type: "number",
- },
- "aria-valuetext": {
- description:
- "Defines the human readable text alternative of aria-valuenow for a range widget.",
- required: false,
- control: "text",
- type: "string",
- },
- autoCapitalize: { required: false, control: "text", type: "string" },
- autoCorrect: { required: false, control: "text", type: "string" },
- autoFocus: { required: false, control: "boolean", type: "boolean" },
- autoSave: { required: false, control: "text", type: "string" },
- className: { required: false, control: "text", type: "string" },
- color: { required: false, control: "color", type: "string" },
- content: { required: false, control: "text", type: "string" },
- contextMenu: { required: false, control: "text", type: "string" },
- datatype: { required: false, control: "text", type: "string" },
- defaultChecked: { required: false, control: "boolean", type: "boolean" },
- dir: { required: false, control: "text", type: "string" },
- draggable: { required: false, control: "boolean", type: "boolean" },
- hidden: { required: false, control: "boolean", type: "boolean" },
- id: { required: false, control: "text", type: "string" },
- inputMode: {
- description:
- "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
- required: false,
- control: "select",
- type: "string",
- options: [
- "text",
- "none",
- "search",
- "tel",
- "url",
- "email",
- "numeric",
- "decimal",
- ],
- },
- is: {
- description:
- "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
- required: false,
- control: "text",
- type: "string",
- },
- itemID: { required: false, control: "text", type: "string" },
- itemProp: { required: false, control: "text", type: "string" },
- itemRef: { required: false, control: "text", type: "string" },
- itemScope: { required: false, control: "boolean", type: "boolean" },
- itemType: { required: false, control: "text", type: "string" },
- lang: { required: false, control: "text", type: "string" },
- nonce: { required: false, control: "text", type: "string" },
- placeholder: { required: false, control: "text", type: "string" },
- prefix: { required: false, control: "text", type: "string" },
- property: { required: false, control: "text", type: "string" },
- radioGroup: { required: false, control: "text", type: "string" },
- rel: { required: false, control: "text", type: "string" },
- resource: { required: false, control: "text", type: "string" },
- results: { required: false, control: "number", type: "number" },
- rev: { required: false, control: "text", type: "string" },
- role: { required: false, control: "text", type: "string" },
- security: { required: false, control: "text", type: "string" },
- slot: { required: false, control: "text", type: "string" },
- spellCheck: { required: false, control: "boolean", type: "boolean" },
- suppressContentEditableWarning: {
- required: false,
- control: "boolean",
- type: "boolean",
- },
- suppressHydrationWarning: {
- required: false,
- control: "boolean",
- type: "boolean",
- },
- tabIndex: { required: false, control: "number", type: "number" },
- title: { required: false, control: "text", type: "string" },
- translate: {
- required: false,
- control: "radio",
- type: "string",
- options: ["yes", "no"],
- },
- typeof: { required: false, control: "text", type: "string" },
- unselectable: {
- required: false,
- control: "radio",
- type: "string",
- options: ["on", "off"],
- },
- vocab: { required: false, control: "text", type: "string" },
-};
diff --git a/packages/sdk-components-react/src/components.ts b/packages/sdk-components-react/src/components.ts
index 75484da584..be3b4cd4ba 100644
--- a/packages/sdk-components-react/src/components.ts
+++ b/packages/sdk-components-react/src/components.ts
@@ -23,8 +23,6 @@ export { ListItem } from "./list-item";
export { Separator } from "./separator";
export { CodeText } from "./code-text";
export { Label } from "./label";
-export { SuccessMessage } from "./success-message";
-export { ErrorMessage } from "./error-message";
export { Textarea } from "./textarea";
export { RadioButton } from "./radio-button";
export { Checkbox } from "./checkbox";
diff --git a/packages/sdk-components-react/src/error-message.tsx b/packages/sdk-components-react/src/error-message.tsx
deleted file mode 100644
index 65ca0bd55d..0000000000
--- a/packages/sdk-components-react/src/error-message.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { forwardRef, type ElementRef, type ComponentProps } from "react";
-
-export const defaultTag = "div";
-
-export const ErrorMessage = forwardRef<
- ElementRef<typeof defaultTag>,
- ComponentProps<typeof defaultTag>
->((props, ref) => <div {...props} ref={ref} />);
-
-ErrorMessage.displayName = "ErrorMessage";
diff --git a/packages/sdk-components-react/src/error-message.ws.tsx b/packages/sdk-components-react/src/error-message.ws.tsx
deleted file mode 100644
index 3424fc0f30..0000000000
--- a/packages/sdk-components-react/src/error-message.ws.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { BoxIcon } from "@webstudio-is/icons/svg";
-import type {
- WsComponentMeta,
- WsComponentPropsMeta,
- PresetStyle,
-} from "@webstudio-is/react-sdk";
-import { div } from "@webstudio-is/react-sdk/css-normalize";
-import { props } from "./__generated__/error-message.props";
-
-const presetStyle = {
- div,
-} satisfies PresetStyle<"div">;
-
-export const meta: WsComponentMeta = {
- type: "container",
- label: "Error Message",
- icon: BoxIcon,
- presetStyle,
-};
-
-export const propsMeta: WsComponentPropsMeta = {
- props,
- initialProps: [],
-};
diff --git a/packages/sdk-components-react/src/form.ws.tsx b/packages/sdk-components-react/src/form.ws.tsx
index 196da78b9a..a56f45c73c 100644
--- a/packages/sdk-components-react/src/form.ws.tsx
+++ b/packages/sdk-components-react/src/form.ws.tsx
@@ -19,6 +19,7 @@ const presetStyle = {
export const meta: WsComponentMeta = {
category: "forms",
type: "container",
+ invalidAncestors: ["Form"],
label: "Form",
icon: FormIcon,
states: defaultStates,
diff --git a/packages/sdk-components-react/src/metas.ts b/packages/sdk-components-react/src/metas.ts
index c6cb4de69a..1fbb40020a 100644
--- a/packages/sdk-components-react/src/metas.ts
+++ b/packages/sdk-components-react/src/metas.ts
@@ -23,8 +23,6 @@ export { meta as ListItem } from "./list-item.ws";
export { meta as Separator } from "./separator.ws";
export { meta as CodeText } from "./code-text.ws";
export { meta as Label } from "./label.ws";
-export { meta as SuccessMessage } from "./success-message.ws";
-export { meta as ErrorMessage } from "./error-message.ws";
export { meta as Textarea } from "./textarea.ws";
export { meta as RadioButton } from "./radio-button.ws";
export { meta as Checkbox } from "./checkbox.ws";
diff --git a/packages/sdk-components-react/src/props.ts b/packages/sdk-components-react/src/props.ts
index f04f22b31b..f6c1fef4e3 100644
--- a/packages/sdk-components-react/src/props.ts
+++ b/packages/sdk-components-react/src/props.ts
@@ -23,8 +23,6 @@ export { propsMeta as ListItem } from "./list-item.ws";
export { propsMeta as Separator } from "./separator.ws";
export { propsMeta as CodeText } from "./code-text.ws";
export { propsMeta as Label } from "./label.ws";
-export { propsMeta as SuccessMessage } from "./success-message.ws";
-export { propsMeta as ErrorMessage } from "./error-message.ws";
export { propsMeta as Textarea } from "./textarea.ws";
export { propsMeta as RadioButton } from "./radio-button.ws";
export { propsMeta as Checkbox } from "./checkbox.ws";
diff --git a/packages/sdk-components-react/src/success-message.tsx b/packages/sdk-components-react/src/success-message.tsx
deleted file mode 100644
index 6f6cabc407..0000000000
--- a/packages/sdk-components-react/src/success-message.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { forwardRef, type ElementRef, type ComponentProps } from "react";
-
-export const defaultTag = "div";
-
-export const SuccessMessage = forwardRef<
- ElementRef<typeof defaultTag>,
- ComponentProps<typeof defaultTag>
->((props, ref) => <div {...props} ref={ref} />);
-
-SuccessMessage.displayName = "SuccessMessage";
diff --git a/packages/sdk-components-react/src/success-message.ws.tsx b/packages/sdk-components-react/src/success-message.ws.tsx
deleted file mode 100644
index 70703e7f9a..0000000000
--- a/packages/sdk-components-react/src/success-message.ws.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { BoxIcon } from "@webstudio-is/icons/svg";
-import type {
- WsComponentMeta,
- WsComponentPropsMeta,
- PresetStyle,
-} from "@webstudio-is/react-sdk";
-import { props } from "./__generated__/success-message.props";
-import { div } from "@webstudio-is/react-sdk/css-normalize";
-
-const presetStyle = {
- div,
-} satisfies PresetStyle<"div">;
-
-export const meta: WsComponentMeta = {
- type: "container",
- label: "Success Message",
- icon: BoxIcon,
- presetStyle,
-};
-
-export const propsMeta: WsComponentPropsMeta = {
- props,
- initialProps: [],
-};