Skip to content

feat(form-layout): update form component to form-layout #4314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"/packages/paste-core/components/file-picker",
"/packages/paste-core/components/file-uploader",
"/packages/paste-core/layout/flex",
"/packages/paste-core/components/form",
"/packages/paste-core/components/form-layout",
"/packages/paste-core/components/form-pill-group",
"/packages/paste-core/layout/grid",
"/packages/paste-core/components/heading",
Expand Down
6 changes: 3 additions & 3 deletions cypress/integration/sitemap-vrt/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export const SITEMAP = [
"/components/file-uploader/",
"/components/file-uploader/api",
"/components/file-uploader/changelog",
"/components/form/",
"/components/form/api",
"/components/form/changelog",
"/components/form-layout/",
"/components/form-layout/api",
"/components/form-layout/changelog",
"/components/combobox/",
"/components/date-picker/",
"/components/date-picker/api",
Expand Down
14 changes: 7 additions & 7 deletions packages/paste-codemods/tools/.cache/mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@
"FileUploaderItemTitle": "@twilio-paste/core/file-uploader",
"FileUploaderItemsList": "@twilio-paste/core/file-uploader",
"FileUploaderLabel": "@twilio-paste/core/file-uploader",
"Form": "@twilio-paste/core/form",
"FormActions": "@twilio-paste/core/form",
"FormControl": "@twilio-paste/core/form",
"FormControlTwoColumn": "@twilio-paste/core/form",
"FormSection": "@twilio-paste/core/form",
"FormSectionDescription": "@twilio-paste/core/form",
"FormSectionHeading": "@twilio-paste/core/form",
"Form": "@twilio-paste/core/form-layout",
"FormActions": "@twilio-paste/core/form-layout",
"FormControl": "@twilio-paste/core/form-layout",
"FormControlTwoColumn": "@twilio-paste/core/form-layout",
"FormSection": "@twilio-paste/core/form-layout",
"FormSectionDescription": "@twilio-paste/core/form-layout",
"FormSectionHeading": "@twilio-paste/core/form-layout",
"FormPill": "@twilio-paste/core/form-pill-group",
"FormPillGroup": "@twilio-paste/core/form-pill-group",
"useFormPillState": "@twilio-paste/core/form-pill-group",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { act, fireEvent, render, screen } from "@testing-library/react";
import type { RenderOptions } from "@testing-library/react";
import { Button } from "@twilio-paste/button";
import { Form } from "@twilio-paste/form";
import { Form } from "@twilio-paste/form-layout";
import { Theme } from "@twilio-paste/theme";
import filter from "lodash/filter";
import uniq from "lodash/uniq";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryContext, StoryFn } from "@storybook/react";
import { Anchor } from "@twilio-paste/anchor";
import { Box } from "@twilio-paste/box";
import { Button } from "@twilio-paste/button";
import { Form } from "@twilio-paste/form";
import { Form } from "@twilio-paste/form-layout";
import { AttachIcon } from "@twilio-paste/icons/esm/AttachIcon";
import { InformationIcon } from "@twilio-paste/icons/esm/InformationIcon";
import { MediaBody, MediaFigure, MediaObject } from "@twilio-paste/media-object";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@twilio-paste/form",
"name": "@twilio-paste/form-layout",
"version": "12.0.1",
"category": "layout",
"status": "production",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { StoryFn } from "@storybook/react";
import { Anchor } from "@twilio-paste/anchor";
import { Box } from "@twilio-paste/box";
import { CustomizationProvider } from "@twilio-paste/customization";
import { Form, FormControl } from "@twilio-paste/form";
import { Form, FormControl } from "@twilio-paste/form-layout";
import { HelpText } from "@twilio-paste/help-text";
import { InformationIcon } from "@twilio-paste/icons/esm/InformationIcon";
import { Label } from "@twilio-paste/label";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box } from "@twilio-paste/box";
import { Button } from "@twilio-paste/button";
import { CustomizationProvider } from "@twilio-paste/customization";
import { Form, FormControl } from "@twilio-paste/form";
import { Form, FormControl } from "@twilio-paste/form-layout";
import { HelpText } from "@twilio-paste/help-text";
import { useUID } from "@twilio-paste/uid-library";
import * as React from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from "@twilio-paste/box";
import { CustomizationProvider } from "@twilio-paste/customization";
import { Form, FormControl } from "@twilio-paste/form";
import { Form, FormControl } from "@twilio-paste/form-layout";
import { HelpText } from "@twilio-paste/help-text";
import { Label } from "@twilio-paste/label";
import { Paragraph } from "@twilio-paste/paragraph";
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-core/core-bundle/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/file-picker
/file-uploader
/flex
/form
/form-layout
/form-pill-group
/grid
/heading
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-core/core-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"@twilio-paste/file-picker": "^5.0.1",
"@twilio-paste/file-uploader": "^5.0.1",
"@twilio-paste/flex": "^9.0.1",
"@twilio-paste/form": "^12.0.1",
"@twilio-paste/form-layout": "^12.0.1",
"@twilio-paste/form-pill-group": "^9.0.1",
"@twilio-paste/grid": "^9.0.1",
"@twilio-paste/heading": "^12.0.1",
Expand Down
1 change: 1 addition & 0 deletions packages/paste-core/core-bundle/src/form-layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "@twilio-paste/form-layout";
2 changes: 1 addition & 1 deletion packages/paste-core/core-bundle/src/form.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "@twilio-paste/form";
export * from "@twilio-paste/form-layout";
2 changes: 1 addition & 1 deletion packages/paste-core/core-bundle/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export * from "@twilio-paste/example-text";
export * from "@twilio-paste/file-picker";
export * from "@twilio-paste/file-uploader";
export * from "@twilio-paste/flex";
export * from "@twilio-paste/form";
export * from "@twilio-paste/form-layout";
export * from "@twilio-paste/form-pill-group";
export * from "@twilio-paste/grid";
export * from "@twilio-paste/heading";
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@twilio-paste/file-picker": "^5.0.1",
"@twilio-paste/file-uploader": "^5.0.1",
"@twilio-paste/flex": "^9.0.1",
"@twilio-paste/form": "^12.0.1",
"@twilio-paste/form-layout": "^12.0.1",
"@twilio-paste/form-pill-group": "^9.0.1",
"@twilio-paste/grid": "^9.0.1",
"@twilio-paste/heading": "^12.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Box } from "@twilio-paste/box";
import { Button } from "@twilio-paste/button";
import { Form, FormControl, FormSection } from "@twilio-paste/form";
import { ClearIcon } from "@twilio-paste/icons/esm/ClearIcon";
import { SearchIcon } from "@twilio-paste/icons/esm/SearchIcon";
import { Input } from "@twilio-paste/input";
import { useUID } from "@twilio-paste/uid-library";
import * as React from "react";

Check failure on line 7 in packages/paste-website/src/components/site-search/SearchForm.tsx

View workflow job for this annotation

GitHub Actions / Lint repository

There should be at least one empty line between import groups
import { Form, FormControl, FormSection } from "../../../../paste-core/components/form-layout/dist";

export interface SearchFormProps {
onSubmit: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const meta = {
};

import Changelog from '@twilio-paste/form/CHANGELOG.md'; // I don't know why this is needed but if you remove it the page fails to render
import packageJson from '@twilio-paste/form/package.json';
import packageJson from '../../../../../paste-core/components/form-layout/package.json';

import {SidebarCategoryRoutes} from '../../../constants';
import ComponentPageLayout from '../../../layouts/ComponentPageLayout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const meta = {
};

import Changelog from '@twilio-paste/form/CHANGELOG.md';
import packageJson from '@twilio-paste/form/package.json';
import packageJson from '../../../../../paste-core/components/form-layout/package.json';

import {SidebarCategoryRoutes} from '../../../constants';
import ComponentPageLayout from '../../../layouts/ComponentPageLayout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const meta = {
title: 'Form',
package: '@twilio-paste/form',
description: 'A Form groups related form elements that allow users to input information or configure options.',
slug: '/components/form/',
slug: '/components/form-layout/',
};

import {Box} from '@twilio-paste/box';
Expand All @@ -18,7 +18,7 @@ import {
FormSection,
FormSectionDescription,
FormSectionHeading,
} from '@twilio-paste/form';
} from '../../../../../paste-core/components/form-layout/dist';
import {Heading} from '@twilio-paste/heading';
import {HelpText} from '@twilio-paste/help-text';
import {InlineCode} from '@twilio-paste/inline-code';
Expand All @@ -43,7 +43,7 @@ import {
errorExample,
maxWidthForm,
} from '../../../component-examples/FormExamples';
import packageJson from '@twilio-paste/form/package.json';
import packageJson from '../../../../../paste-core/components/form-layout/package.json';
import ComponentPageLayout from '../../../layouts/ComponentPageLayout';
import {getFeature, getNavigationData} from '../../../utils/api';

Expand All @@ -62,7 +62,7 @@ export const getStaticProps = async () => {
mdxHeadings,
pageHeaderData: {
categoryRoute: SidebarCategoryRoutes.COMPONENTS,
githubUrl: 'https://github.com/twilio-labs/paste/tree/main/packages/paste-core/components/form',
githubUrl: 'https://github.com/twilio-labs/paste/tree/main/packages/paste-core/components/form-layout',
storybookUrl: '/?path=/story/components-form--default',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Box } from "@twilio-paste/box";
import { Button } from "@twilio-paste/button";
import { ButtonGroup } from "@twilio-paste/button-group";
import { CheckboxGroup, Checkbox } from "@twilio-paste/checkbox";
import { Form, FormActions, FormControl } from "@twilio-paste/form";
import { Form, FormActions, FormControl } from "@twilio-paste/form-layout";
import { FormPillGroup, useFormPillState } from "@twilio-paste/form-pill-group";
import { Heading } from "@twilio-paste/heading";
import { Input } from "@twilio-paste/input";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {Slider} from '@twilio-paste/slider';
import packageJson from '@twilio-paste/slider/package.json';
import {Label} from '@twilio-paste/label';
import {HelpText} from '@twilio-paste/help-text';
import {Form, FormControl} from '@twilio-paste/form';
import {Form, FormControl} from '../../../../../paste-core/components/form-layout/dist';
import {useUID} from '@twilio-paste/uid-library';
import {Meter, MeterLabel} from '@twilio-paste/meter';

Expand Down
2 changes: 1 addition & 1 deletion packages/paste-website/src/pages/patterns/form/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
FormSection,
FormSectionDescription,
FormSectionHeading,
} from '@twilio-paste/form';
} from '../../../../../paste-core/components/form-layout/dist';
import {SearchIcon} from '@twilio-paste/icons/esm/SearchIcon';
import {ArrowBackIcon} from '@twilio-paste/icons/esm/ArrowBackIcon';
import {ArrowForwardIcon} from '@twilio-paste/icons/esm/ArrowForwardIcon';
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-website/stories/Form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
DataGridRow,
} from "@twilio-paste/data-grid";
import { DatePicker } from "@twilio-paste/date-picker";
import { Form, FormControl, FormSection, FormSectionDescription, FormSectionHeading } from "@twilio-paste/form";
import { Form, FormControl, FormSection, FormSectionDescription, FormSectionHeading } from "@twilio-paste/form-layout";
import { Heading } from "@twilio-paste/heading";
import { HelpText } from "@twilio-paste/help-text";
import { ArrowBackIcon } from "@twilio-paste/icons/esm/ArrowBackIcon";
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-website/stories/PageTemplates.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
FormSection,
FormSectionDescription,
FormSectionHeading,
} from "@twilio-paste/form";
} from "@twilio-paste/form-layout";
import { FormPill, FormPillGroup, useFormPillState } from "@twilio-paste/form-pill-group";
import { Column, Grid } from "@twilio-paste/grid";
import { Heading } from "@twilio-paste/heading";
Expand Down
42 changes: 21 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11979,7 +11979,7 @@ __metadata:
"@twilio-paste/file-picker": ^5.0.1
"@twilio-paste/file-uploader": ^5.0.1
"@twilio-paste/flex": ^9.0.1
"@twilio-paste/form": ^12.0.1
"@twilio-paste/form-layout": ^12.0.1
"@twilio-paste/form-pill-group": ^9.0.1
"@twilio-paste/grid": ^9.0.1
"@twilio-paste/heading": ^12.0.1
Expand Down Expand Up @@ -12777,27 +12777,24 @@ __metadata:
languageName: unknown
linkType: soft

"@twilio-paste/form-pill-group@^9.0.1, @twilio-paste/form-pill-group@workspace:packages/paste-core/components/form-pill-group":
"@twilio-paste/form-layout@^12.0.1, @twilio-paste/form-layout@workspace:packages/paste-core/components/form-layout":
version: 0.0.0-use.local
resolution: "@twilio-paste/form-pill-group@workspace:packages/paste-core/components/form-pill-group"
resolution: "@twilio-paste/form-layout@workspace:packages/paste-core/components/form-layout"
dependencies:
"@twilio-paste/animation-library": ^3.0.1
"@twilio-paste/box": ^11.0.1
"@twilio-paste/color-contrast-utils": ^5.0.0
"@twilio-paste/customization": ^9.0.1
"@twilio-paste/design-tokens": ^10.8.0
"@twilio-paste/icons": ^13.0.1
"@twilio-paste/reakit-library": ^3.0.1
"@twilio-paste/screen-reader-only": ^14.0.1
"@twilio-paste/design-tokens": ^10.3.0
"@twilio-paste/heading": ^12.0.1
"@twilio-paste/style-props": ^10.0.1
"@twilio-paste/styling-library": ^4.0.1
"@twilio-paste/text": ^11.0.1
"@twilio-paste/theme": ^12.0.1
"@twilio-paste/truncate": ^15.0.1
"@twilio-paste/types": ^7.0.1
"@twilio-paste/uid-library": ^3.0.1
"@types/react": ^19.0.8
"@types/react-dom": ^19.0.3
deepmerge: 4.2.2
react: ^19.0.0
react-dom: ^19.0.0
tsx: ^4.0.0
Expand All @@ -12808,13 +12805,11 @@ __metadata:
"@twilio-paste/color-contrast-utils": ^5.0.0
"@twilio-paste/customization": ^9.0.0
"@twilio-paste/design-tokens": ^10.0.0
"@twilio-paste/icons": ^13.0.0
"@twilio-paste/reakit-library": ^3.0.0
"@twilio-paste/screen-reader-only": ^14.0.0
"@twilio-paste/heading": ^12.0.0
"@twilio-paste/style-props": ^10.0.0
"@twilio-paste/styling-library": ^4.0.0
"@twilio-paste/text": ^11.0.0
"@twilio-paste/theme": ^12.0.0
"@twilio-paste/truncate": ^15.0.0
"@twilio-paste/types": ^7.0.0
"@twilio-paste/uid-library": ^3.0.0
"@types/react": ^17.0.2 || ^18.0.27 || ^19.0.0
Expand All @@ -12824,24 +12819,27 @@ __metadata:
languageName: unknown
linkType: soft

"@twilio-paste/form@^12.0.1, @twilio-paste/form@workspace:packages/paste-core/components/form":
"@twilio-paste/form-pill-group@^9.0.1, @twilio-paste/form-pill-group@workspace:packages/paste-core/components/form-pill-group":
version: 0.0.0-use.local
resolution: "@twilio-paste/form@workspace:packages/paste-core/components/form"
resolution: "@twilio-paste/form-pill-group@workspace:packages/paste-core/components/form-pill-group"
dependencies:
"@twilio-paste/animation-library": ^3.0.1
"@twilio-paste/box": ^11.0.1
"@twilio-paste/color-contrast-utils": ^5.0.0
"@twilio-paste/customization": ^9.0.1
"@twilio-paste/design-tokens": ^10.3.0
"@twilio-paste/heading": ^12.0.1
"@twilio-paste/design-tokens": ^10.8.0
"@twilio-paste/icons": ^13.0.1
"@twilio-paste/reakit-library": ^3.0.1
"@twilio-paste/screen-reader-only": ^14.0.1
"@twilio-paste/style-props": ^10.0.1
"@twilio-paste/styling-library": ^4.0.1
"@twilio-paste/text": ^11.0.1
"@twilio-paste/theme": ^12.0.1
"@twilio-paste/truncate": ^15.0.1
"@twilio-paste/types": ^7.0.1
"@twilio-paste/uid-library": ^3.0.1
"@types/react": ^19.0.8
"@types/react-dom": ^19.0.3
deepmerge: 4.2.2
react: ^19.0.0
react-dom: ^19.0.0
tsx: ^4.0.0
Expand All @@ -12852,11 +12850,13 @@ __metadata:
"@twilio-paste/color-contrast-utils": ^5.0.0
"@twilio-paste/customization": ^9.0.0
"@twilio-paste/design-tokens": ^10.0.0
"@twilio-paste/heading": ^12.0.0
"@twilio-paste/icons": ^13.0.0
"@twilio-paste/reakit-library": ^3.0.0
"@twilio-paste/screen-reader-only": ^14.0.0
"@twilio-paste/style-props": ^10.0.0
"@twilio-paste/styling-library": ^4.0.0
"@twilio-paste/text": ^11.0.0
"@twilio-paste/theme": ^12.0.0
"@twilio-paste/truncate": ^15.0.0
"@twilio-paste/types": ^7.0.0
"@twilio-paste/uid-library": ^3.0.0
"@types/react": ^17.0.2 || ^18.0.27 || ^19.0.0
Expand Down Expand Up @@ -15795,7 +15795,7 @@ __metadata:
"@twilio-paste/file-picker": ^5.0.1
"@twilio-paste/file-uploader": ^5.0.1
"@twilio-paste/flex": ^9.0.1
"@twilio-paste/form": ^12.0.1
"@twilio-paste/form-layout": ^12.0.1
"@twilio-paste/form-pill-group": ^9.0.1
"@twilio-paste/grid": ^9.0.1
"@twilio-paste/heading": ^12.0.1
Expand Down
Loading