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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Drop radio button field and checkbox field (#1745)
Bogdan Chadkin6fa95e2964f2
diff --git a/packages/prisma-client/prisma/migrations/20230611181439_control_labels/migration.ts b/packages/prisma-client/prisma/migrations/20230611181439_control_labels/migration.tsnew file mode 100644index 0000000000..aa64c84d3d--- /dev/null+++ b/packages/prisma-client/prisma/migrations/20230611181439_control_labels/migration.ts@@ -0,0 +1,87 @@+import { PrismaClient } from "./client";++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[];++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);+ let changed = false;++ for (const instance of instancesList) {+ if (instance.component === "RadioButtonField") {+ instance.component = "Label";+ instance.label = "Radio Field";+ changed = true;+ }+ if (instance.component === "CheckboxField") {+ instance.component = "Label";+ instance.label = "Checkbox Field";+ changed = true;+ }+ }++ if (changed) {+ build.instances = JSON.stringify(instancesList);+ changedBuilds.push(build);+ }+ } catch {+ console.info(`build ${buildId} cannot be converted`);+ }+ }+ await Promise.all(+ changedBuilds.map(({ id, instances }) =>+ prisma.build.update({ where: { id }, data: { instances } })+ )+ );+ }+ },+ { timeout: 1000 * 60 * 8 }+ );+};diff --git a/packages/prisma-client/prisma/migrations/20230611181439_control_labels/schema.prisma b/packages/prisma-client/prisma/migrations/20230611181439_control_labels/schema.prismanew file mode 100644index 0000000000..9ead9c752b--- /dev/null+++ b/packages/prisma-client/prisma/migrations/20230611181439_control_labels/schema.prisma@@ -0,0 +1,232 @@+// 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("[]")+ 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/sdk-components-react/src/__generated__/checkbox-field.props.ts b/packages/sdk-components-react/src/__generated__/checkbox-field.props.tsdeleted file mode 100644index 83238636e1..0000000000--- a/packages/sdk-components-react/src/__generated__/checkbox-field.props.ts+++ /dev/null@@ -1,444 +0,0 @@-import type { PropMeta } from "@webstudio-is/generate-arg-types";--export const props: Record<string, PropMeta> = {- form: { required: false, control: "text", type: "string" },- slot: { required: false, control: "text", type: "string" },- style: { required: false, control: "text", type: "string" },- title: { required: false, control: "text", type: "string" },- defaultChecked: { required: false, control: "boolean", type: "boolean" },- defaultValue: { required: false, control: "text", type: "string" },- suppressContentEditableWarning: {- required: false,- control: "boolean",- type: "boolean",- },- suppressHydrationWarning: {- required: false,- control: "boolean",- type: "boolean",- },- accessKey: { required: false, control: "text", type: "string" },- autoFocus: { required: false, control: "boolean", type: "boolean" },- className: { required: false, control: "text", type: "string" },- contentEditable: { required: false, control: "text", type: "string" },- contextMenu: { required: false, control: "text", type: "string" },- 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" },- lang: { required: false, control: "text", type: "string" },- nonce: { required: false, control: "text", type: "string" },- placeholder: { required: false, control: "text", type: "string" },- spellCheck: { required: false, control: "boolean", type: "boolean" },- tabIndex: { required: false, control: "number", type: "number" },- translate: {- required: false,- control: "radio",- type: "string",- options: ["yes", "no"],- },- radioGroup: { required: false, control: "text", type: "string" },- role: { required: false, control: "text", type: "string" },- about: { required: false, control: "text", type: "string" },- content: { required: false, control: "text", type: "string" },- datatype: { required: false, control: "text", type: "string" },- inlist: { required: false, control: "text", type: "string" },- prefix: { required: false, control: "text", type: "string" },- property: { required: false, control: "text", type: "string" },- rel: { required: false, control: "text", type: "string" },- resource: { required: false, control: "text", type: "string" },- rev: { required: false, control: "text", type: "string" },- typeof: { required: false, control: "text", type: "string" },- vocab: { required: false, control: "text", type: "string" },- autoCapitalize: { required: false, control: "text", type: "string" },- autoCorrect: { required: false, control: "text", type: "string" },- autoSave: { required: false, control: "text", type: "string" },- color: { required: false, control: "color", type: "string" },- itemProp: { required: false, control: "text", type: "string" },- itemScope: { required: false, control: "boolean", type: "boolean" },- itemType: { required: false, control: "text", type: "string" },- itemID: { required: false, control: "text", type: "string" },- itemRef: { required: false, control: "text", type: "string" },- results: { required: false, control: "number", type: "number" },- security: { required: false, control: "text", type: "string" },- unselectable: {- required: false,- control: "radio",- type: "string",- options: ["on", "off"],- },- 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",- },- "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",- },-};diff --git a/packages/sdk-components-react/src/__generated__/radio-button-field.props.ts b/packages/sdk-components-react/src/__generated__/radio-button-field.props.tsdeleted file mode 100644index 83238636e1..0000000000--- a/packages/sdk-components-react/src/__generated__/radio-button-field.props.ts+++ /dev/null@@ -1,444 +0,0 @@-import type { PropMeta } from "@webstudio-is/generate-arg-types";--export const props: Record<string, PropMeta> = {- form: { required: false, control: "text", type: "string" },- slot: { required: false, control: "text", type: "string" },- style: { required: false, control: "text", type: "string" },- title: { required: false, control: "text", type: "string" },- defaultChecked: { required: false, control: "boolean", type: "boolean" },- defaultValue: { required: false, control: "text", type: "string" },- suppressContentEditableWarning: {- required: false,- control: "boolean",- type: "boolean",- },- suppressHydrationWarning: {- required: false,- control: "boolean",- type: "boolean",- },- accessKey: { required: false, control: "text", type: "string" },- autoFocus: { required: false, control: "boolean", type: "boolean" },- className: { required: false, control: "text", type: "string" },- contentEditable: { required: false, control: "text", type: "string" },- contextMenu: { required: false, control: "text", type: "string" },- 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" },- lang: { required: false, control: "text", type: "string" },- nonce: { required: false, control: "text", type: "string" },- placeholder: { required: false, control: "text", type: "string" },- spellCheck: { required: false, control: "boolean", type: "boolean" },- tabIndex: { required: false, control: "number", type: "number" },- translate: {- required: false,- control: "radio",- type: "string",- options: ["yes", "no"],- },- radioGroup: { required: false, control: "text", type: "string" },- role: { required: false, control: "text", type: "string" },- about: { required: false, control: "text", type: "string" },- content: { required: false, control: "text", type: "string" },- datatype: { required: false, control: "text", type: "string" },- inlist: { required: false, control: "text", type: "string" },- prefix: { required: false, control: "text", type: "string" },- property: { required: false, control: "text", type: "string" },- rel: { required: false, control: "text", type: "string" },- resource: { required: false, control: "text", type: "string" },- rev: { required: false, control: "text", type: "string" },- typeof: { required: false, control: "text", type: "string" },- vocab: { required: false, control: "text", type: "string" },- autoCapitalize: { required: false, control: "text", type: "string" },- autoCorrect: { required: false, control: "text", type: "string" },- autoSave: { required: false, control: "text", type: "string" },- color: { required: false, control: "color", type: "string" },- itemProp: { required: false, control: "text", type: "string" },- itemScope: { required: false, control: "boolean", type: "boolean" },- itemType: { required: false, control: "text", type: "string" },- itemID: { required: false, control: "text", type: "string" },- itemRef: { required: false, control: "text", type: "string" },- results: { required: false, control: "number", type: "number" },- security: { required: false, control: "text", type: "string" },- unselectable: {- required: false,- control: "radio",- type: "string",- options: ["on", "off"],- },- 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",- },- "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",- },-};diff --git a/packages/sdk-components-react/src/checkbox-field.tsx b/packages/sdk-components-react/src/checkbox-field.tsxdeleted file mode 100644index e5d3a8c774..0000000000--- a/packages/sdk-components-react/src/checkbox-field.tsx+++ /dev/null@@ -1,10 +0,0 @@-import { forwardRef, type ElementRef, type ComponentProps } from "react";--export const defaultTag = "label";--export const CheckboxField = forwardRef<- ElementRef<typeof defaultTag>,- Omit<ComponentProps<typeof defaultTag>, "htmlFor">->((props, ref) => <label {...props} ref={ref} />);--CheckboxField.displayName = "CheckboxField";diff --git a/packages/sdk-components-react/src/checkbox-field.ws.tsx b/packages/sdk-components-react/src/checkbox-field.ws.tsxdeleted file mode 100644index 96b8b6bba1..0000000000--- a/packages/sdk-components-react/src/checkbox-field.ws.tsx+++ /dev/null@@ -1,47 +0,0 @@-import { CheckboxCheckedIcon } from "@webstudio-is/icons/svg";-import {- type WsComponentMeta,- type WsComponentPropsMeta,- type PresetStyle,- defaultStates,-} from "@webstudio-is/react-sdk";-import { label } from "@webstudio-is/react-sdk/css-normalize";-import { props } from "./__generated__/checkbox-field.props";-import type { defaultTag } from "./checkbox-field";--const presetStyle = {- label: [- ...label,- { property: "display", value: { type: "keyword", value: "flex" } },- ],-} satisfies PresetStyle<typeof defaultTag>;--export const meta: WsComponentMeta = {- category: "forms",- type: "container",- label: "Checkbox",- icon: CheckboxCheckedIcon,- states: defaultStates,- presetStyle,- template: [- {- type: "instance",- component: "CheckboxField",- children: [- { type: "instance", component: "Checkbox", children: [] },- {- type: "instance",- component: "Text",- label: "Checkbox Label",- props: [],- children: [{ type: "text", value: "Checkbox" }],- },- ],- },- ],-};--export const propsMeta: WsComponentPropsMeta = {- props,- initialProps: [],-};diff --git a/packages/sdk-components-react/src/checkbox.ws.tsx b/packages/sdk-components-react/src/checkbox.ws.tsxindex 1836337b2c..4d106a0c05 100644--- a/packages/sdk-components-react/src/checkbox.ws.tsx+++ b/packages/sdk-components-react/src/checkbox.ws.tsx@@ -20,8 +20,9 @@ const presetStyle = {} satisfies PresetStyle<typeof defaultTag>;export const meta: WsComponentMeta = {+ category: "forms",type: "control",- label: "Checkbox Input",+ label: "Checkbox",icon: CheckboxCheckedIcon,presetStyle,order: 6,@@ -35,6 +36,23 @@ export const meta: WsComponentMeta = {{ selector: ":read-only", label: "Read Only" },{ selector: ":read-write", label: "Read Write" },],+ template: [+ {+ type: "instance",+ component: "Label",+ label: "Checkbox Field",+ children: [+ { type: "instance", component: "Checkbox", children: [] },+ {+ type: "instance",+ component: "Text",+ label: "Checkbox Label",+ props: [{ type: "string", name: "tag", value: "span" }],+ children: [{ type: "text", value: "Checkbox" }],+ },+ ],+ },+ ],};export const propsMeta: WsComponentPropsMeta = {diff --git a/packages/sdk-components-react/src/components.ts b/packages/sdk-components-react/src/components.tsindex 801c8b6dd3..75484da584 100644--- a/packages/sdk-components-react/src/components.ts+++ b/packages/sdk-components-react/src/components.ts@@ -26,9 +26,7 @@ export { Label } from "./label";export { SuccessMessage } from "./success-message";export { ErrorMessage } from "./error-message";export { Textarea } from "./textarea";-export { RadioButtonField } from "./radio-button-field";export { RadioButton } from "./radio-button";-export { CheckboxField } from "./checkbox-field";export { Checkbox } from "./checkbox";export { Vimeo } from "./vimeo";export { VimeoPreviewImage } from "./vimeo-preview-image";diff --git a/packages/sdk-components-react/src/metas.ts b/packages/sdk-components-react/src/metas.tsindex 193bb1781b..c6cb4de69a 100644--- a/packages/sdk-components-react/src/metas.ts+++ b/packages/sdk-components-react/src/metas.ts@@ -26,9 +26,7 @@ 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 RadioButtonField } from "./radio-button-field.ws";export { meta as RadioButton } from "./radio-button.ws";-export { meta as CheckboxField } from "./checkbox-field.ws";export { meta as Checkbox } from "./checkbox.ws";export { meta as Vimeo } from "./vimeo.ws";export { meta as VimeoPreviewImage } from "./vimeo-preview-image.ws";diff --git a/packages/sdk-components-react/src/props.ts b/packages/sdk-components-react/src/props.tsindex a523b02598..f04f22b31b 100644--- a/packages/sdk-components-react/src/props.ts+++ b/packages/sdk-components-react/src/props.ts@@ -26,9 +26,7 @@ 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 RadioButtonField } from "./radio-button-field.ws";export { propsMeta as RadioButton } from "./radio-button.ws";-export { propsMeta as CheckboxField } from "./checkbox-field.ws";export { propsMeta as Checkbox } from "./checkbox.ws";export { propsMeta as Vimeo } from "./vimeo.ws";export { propsMeta as VimeoPreviewImage } from "./vimeo-preview-image.ws";diff --git a/packages/sdk-components-react/src/radio-button-field.tsx b/packages/sdk-components-react/src/radio-button-field.tsxdeleted file mode 100644index 4fc6a2d128..0000000000--- a/packages/sdk-components-react/src/radio-button-field.tsx+++ /dev/null@@ -1,10 +0,0 @@-import { forwardRef, type ElementRef, type ComponentProps } from "react";--export const defaultTag = "label";--export const RadioButtonField = forwardRef<- ElementRef<typeof defaultTag>,- Omit<ComponentProps<typeof defaultTag>, "htmlFor">->((props, ref) => <label {...props} ref={ref} />);--RadioButtonField.displayName = "RadioButtonField";diff --git a/packages/sdk-components-react/src/radio-button-field.ws.tsx b/packages/sdk-components-react/src/radio-button-field.ws.tsxdeleted file mode 100644index 0bac79f697..0000000000--- a/packages/sdk-components-react/src/radio-button-field.ws.tsx+++ /dev/null@@ -1,47 +0,0 @@-import { RadioCheckedIcon } from "@webstudio-is/icons/svg";-import {- type WsComponentMeta,- type WsComponentPropsMeta,- type PresetStyle,- defaultStates,-} from "@webstudio-is/react-sdk";-import { props } from "./__generated__/radio-button-field.props";-import type { defaultTag } from "./radio-button-field";-import { label } from "@webstudio-is/react-sdk/css-normalize";--const presetStyle = {- label: [- ...label,- { property: "display", value: { type: "keyword", value: "flex" } },- ],-} satisfies PresetStyle<typeof defaultTag>;--export const meta: WsComponentMeta = {- category: "forms",- type: "container",- label: "Radio",- icon: RadioCheckedIcon,- states: defaultStates,- presetStyle,- template: [- {- type: "instance",- component: "RadioButtonField",- children: [- { type: "instance", component: "RadioButton", props: [], children: [] },- {- type: "instance",- component: "Text",- label: "Radio Label",- props: [],- children: [{ type: "text", value: "Radio" }],- },- ],- },- ],-};--export const propsMeta: WsComponentPropsMeta = {- props,- initialProps: [],-};diff --git a/packages/sdk-components-react/src/radio-button.ws.tsx b/packages/sdk-components-react/src/radio-button.ws.tsxindex 1e452eab06..03e992bf42 100644--- a/packages/sdk-components-react/src/radio-button.ws.tsx+++ b/packages/sdk-components-react/src/radio-button.ws.tsx@@ -20,8 +20,9 @@ const presetStyle = {} satisfies PresetStyle<typeof defaultTag>;export const meta: WsComponentMeta = {+ category: "forms",type: "control",- label: "Radio Input",+ label: "Radio",icon: RadioCheckedIcon,presetStyle,order: 5,@@ -35,6 +36,23 @@ export const meta: WsComponentMeta = {{ selector: ":read-only", label: "Read Only" },{ selector: ":read-write", label: "Read Write" },],+ template: [+ {+ type: "instance",+ component: "Label",+ label: "Radio Field",+ children: [+ { type: "instance", component: "RadioButton", props: [], children: [] },+ {+ type: "instance",+ component: "Text",+ label: "Radio Label",+ props: [{ type: "string", name: "tag", value: "span" }],+ children: [{ type: "text", value: "Radio" }],+ },+ ],+ },+ ],};export const propsMeta: WsComponentPropsMeta = {