From 22200a0170b965781863577416b23a05473288bd Mon Sep 17 00:00:00 2001 From: Osama Abdul Latif <62595605+OsamaAbdellateef@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:34:11 +0300 Subject: [PATCH] [DST-581]: Revise `` page (#4202) * Revise datefield page * Adding anatomy section * Adding appearance demo * Adding usage section * Re-order page sections * Delete unwanted section of simple datefield * Deleteing unwatned file * Revising exmaples * Adding related section * Revise props table * Adding changeset * Resolving comments * Remove dup sections * Adding alt components section * rem dup words * Remove unwanted sections * Delete unwanted files * Fixing issues * Resolving comments * Resolving comments --- .changeset/fresh-zoos-vanish.md | 8 ++ .../form/datefield/date-field-basic.demo.tsx | 10 -- .../datefield/date-field-disabled.demo.tsx | 9 -- .../form/datefield/date-field-error.demo.tsx | 5 - .../datefield/date-field-required.demo.tsx | 5 - .../datefield/datefield-appearance.demo.tsx | 10 ++ .../components/form/datefield/datefield.mdx | 107 ++++++++++++----- .../building-forms/validation-zod.demo.tsx | 109 ++++++++++++++++++ docs/public/datefield/datefield-anatomy.jpg | Bin 0 -> 34660 bytes .../components/src/DateField/DateField.tsx | 4 + 10 files changed, 207 insertions(+), 60 deletions(-) create mode 100644 .changeset/fresh-zoos-vanish.md delete mode 100644 docs/content/components/form/datefield/date-field-basic.demo.tsx delete mode 100644 docs/content/components/form/datefield/date-field-disabled.demo.tsx delete mode 100644 docs/content/components/form/datefield/date-field-error.demo.tsx delete mode 100644 docs/content/components/form/datefield/date-field-required.demo.tsx create mode 100644 docs/content/components/form/datefield/datefield-appearance.demo.tsx create mode 100644 docs/content/patterns/building-forms/validation-zod.demo.tsx create mode 100644 docs/public/datefield/datefield-anatomy.jpg diff --git a/.changeset/fresh-zoos-vanish.md b/.changeset/fresh-zoos-vanish.md new file mode 100644 index 0000000000..36adf62d40 --- /dev/null +++ b/.changeset/fresh-zoos-vanish.md @@ -0,0 +1,8 @@ +--- +'@marigold/components': patch +'@marigold/docs': patch +--- + +docs([DST-581]): revise `` page according to new component page structure + +Revised the `` documentation page to our new layout of component pages. \ No newline at end of file diff --git a/docs/content/components/form/datefield/date-field-basic.demo.tsx b/docs/content/components/form/datefield/date-field-basic.demo.tsx deleted file mode 100644 index 1af43f3ad0..0000000000 --- a/docs/content/components/form/datefield/date-field-basic.demo.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { CalendarDate } from '@internationalized/date'; -import { DateField } from '@marigold/components'; - -export default () => ( - -); diff --git a/docs/content/components/form/datefield/date-field-disabled.demo.tsx b/docs/content/components/form/datefield/date-field-disabled.demo.tsx deleted file mode 100644 index 2174776581..0000000000 --- a/docs/content/components/form/datefield/date-field-disabled.demo.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { DateField } from '@marigold/components'; - -export default () => ( - -); diff --git a/docs/content/components/form/datefield/date-field-error.demo.tsx b/docs/content/components/form/datefield/date-field-error.demo.tsx deleted file mode 100644 index e21a12c5e1..0000000000 --- a/docs/content/components/form/datefield/date-field-error.demo.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { DateField } from '@marigold/components'; - -export default () => ( - -); diff --git a/docs/content/components/form/datefield/date-field-required.demo.tsx b/docs/content/components/form/datefield/date-field-required.demo.tsx deleted file mode 100644 index 38e9d74717..0000000000 --- a/docs/content/components/form/datefield/date-field-required.demo.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { DateField } from '@marigold/components'; - -export default () => ( - -); diff --git a/docs/content/components/form/datefield/datefield-appearance.demo.tsx b/docs/content/components/form/datefield/datefield-appearance.demo.tsx new file mode 100644 index 0000000000..c6f72f4a25 --- /dev/null +++ b/docs/content/components/form/datefield/datefield-appearance.demo.tsx @@ -0,0 +1,10 @@ +import { CalendarDate } from '@internationalized/date'; +import { DateField } from '@marigold/components'; + +export default () => ( + +); diff --git a/docs/content/components/form/datefield/datefield.mdx b/docs/content/components/form/datefield/datefield.mdx index a0e44af84f..bd1c8b35b3 100644 --- a/docs/content/components/form/datefield/datefield.mdx +++ b/docs/content/components/form/datefield/datefield.mdx @@ -1,48 +1,93 @@ --- title: DateField -caption: Component for input forms. +caption: Component for entering date in forms. +badge: updated --- -The `` allows users to enter and edit date values using a keyboard. Each part of a date value is displayed in an individually editable segment. +The `` allows users to enter and edit date values using a keyboard. Each part of a date value is displayed in an individually editable segment. These segments are individually focusable and editable by the user, by typing or using the arrow keys to increment and decrement the value. This approach allows values to be formatted and parsed correctly regardless of the locale or date format, and offers an easy and error-free way to edit dates using the keyboard. -The `` segments are individually focusable and editable by the user, by typing or using the arrow keys to increment and decrement the value. This approach allows values to be formatted and parsed correctly regardless of the locale or date format, and offers an easy and error-free way to edit dates using the keyboard. +## Anatomy -## Import +A `` consists of a label and a group of segments representing each unit of a date and time, such as years, months, days, hours, and minutes. -```tsx -import { DateField } from '@marigold/components'; -``` +Anatomy of datefield ## Appearance - - -## Props - - - -## Examples - -### Simple DateField + -This example shows a regular `` without any special props. - - - -### Disabled DateField - -You can disable the `` so that the user can't interact with it anymore. - - + -### Required DateField +## Usage -If you want a `` to be required, you just have to add the property `required`. With that the small required icon appears next to the label. +The `` component is a versatile input element used for selecting dates in forms. It enhances user experience by providing a structured way to input date information, reducing errors associated with manual entry. With features like labels and descriptions, it clearly communicates its purpose to users. The component can also support default values. Overall, the `` is essential for applications requiring date selection, ensuring both accessibility and usability. - +## Props -### DateField With an Error + -This example shows how to use the `error` with the `errorMessage`. + - +## Alternative components + +
    +
  • + [DatePicker](/components/form/datepicker): a user interface element that + allows users to select a date from a calendar. +
  • +
+ +## Related + + + + + + ), + }, + { + title: 'Form Fields', + href: '../../introduction/form-fields', + caption: 'Learn how to build forms.', + icon: ( + + + + + ), + }, + ]} +/> diff --git a/docs/content/patterns/building-forms/validation-zod.demo.tsx b/docs/content/patterns/building-forms/validation-zod.demo.tsx new file mode 100644 index 0000000000..e972b4fb88 --- /dev/null +++ b/docs/content/patterns/building-forms/validation-zod.demo.tsx @@ -0,0 +1,109 @@ +import { FormEventHandler, useState } from 'react'; +import { z } from 'zod'; +import { zfd } from 'zod-form-data'; +import { + Button, + Checkbox, + Columns, + FieldGroup, + Headline, + Select, + Stack, + TextField, +} from '@marigold/components'; + +export default () => { + const schemaData = z.object({ + firstname: z.string().min(1), + name: z.string().min(1), + phone: z.string().min(6), + mail: z.string().email(), + country: z.string(), + terms: zfd.checkbox(), + }); + + const [error, setError] = useState([]); + const handleSubmit: FormEventHandler = e => { + e.preventDefault(); + const errorList: Array = []; + const formData = new FormData(e.target as HTMLFormElement); + const data = Object.fromEntries(formData); + const validatedForm = schemaData.safeParse(data); + + if (!validatedForm.success) { + validatedForm.error.issues.map(e => { + return errorList.push(e.path.toString()); + }); + setError(errorList); + } else { + alert(JSON.stringify(data)); + } + }; + + return ( + + Account Registration +
+ + + + + + + + + + Agree to the terms + + + + + +
+
+ ); +}; diff --git a/docs/public/datefield/datefield-anatomy.jpg b/docs/public/datefield/datefield-anatomy.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5c026b7a99d6a58d263e1a31b873cec438a22384 GIT binary patch literal 34660 zcmeFZ30#xc+AkVwm0Cqg!zfb=H3-T)&uwL>N~9P82ZxJs6V)|Gg00=`z zM_zLJ_KV9No?l43`L`S&;{5!hu6_9ZJ0vc5t>;7O003X-@1*&EyM5$pK$O2Y!F%!d zt4ML>;>OB|!!m*Y7C!YMjQF>(^@nh5^tEVln(se^Bi$~Y6^E~i!>0m&7e@Rp?0+rt zL;5Un8tbsom=AS*pbsrR7J!CA#J``2zsi6pz$Jha;M))V7ylPicnJVtz6t;w{OPav z5O@H9b_)Pd82IbGuO0yaQa=I!b)A2`_g9`=^NaNROK~5IuOA_i0Kifi03hiB004gj z06z8lOPu)fciQ%aI7(UEu5j@u5D*Fo0DJ*B2S5Y-0lMOlAwVBs05IJj1e^sN{OALH zxE>VK$A>@uK%X2weCY6zPd@$h$R|gRe0ogk*r!L2A3btJQd;u3)MuYbfA;CI&w-zR z1{8-s`%uV%4>=Eh{E0Z@XGf1572o|QY5!M%^d|>BC6o^yPzQV@ec+(@g=o@#Rp8WYMW0SMz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0Z*nw$wXJ_l;#boD1lSWgc>n+a literal 0 HcmV?d00001 diff --git a/packages/components/src/DateField/DateField.tsx b/packages/components/src/DateField/DateField.tsx index 9c60fd6506..df17f5bf0a 100644 --- a/packages/components/src/DateField/DateField.tsx +++ b/packages/components/src/DateField/DateField.tsx @@ -20,6 +20,10 @@ export interface DateFieldProps Pick, 'label' | 'description' | 'errorMessage'> { variant?: string; size?: string; + + /** + * Optional element (e.g., button or icon) rendered inside the DateField. + */ action?: ReactElement; /**