From 6fb8d4a055968695a87b332b95b89a8a24847ba8 Mon Sep 17 00:00:00 2001 From: Henrik Haugberg Date: Fri, 8 Dec 2023 14:05:41 +0100 Subject: [PATCH] chore(forms): Extended features docs (#2978) Doing the following (inside the Forms-extension): - Rewrite Extended feature page with sections instead of automatic component lists - Moving DataContext and Value from "Create your own component" to "Extended features" - Moving Field from "Create your own component" to a separate menu item above the field components in the left menu - Remove duplicated list of components between the Field page and the two Base/Feature field pages --------- Co-authored-by: Anders --- .../src/docs/uilib/extensions/forms.mdx | 4 +- .../uilib/extensions/forms/base-fields.mdx | 2 +- .../forms/base-fields/Boolean/info.mdx | 2 +- .../forms/base-fields/Number/info.mdx | 2 +- .../forms/base-fields/Option/info.mdx | 2 - .../forms/base-fields/String/info.mdx | 2 +- .../extensions/forms/create-component.mdx | 2 +- .../create-component/DataContext/Context.mdx | 21 ---------- .../forms/create-component/Field/Examples.tsx | 38 ------------------ .../create-component/FieldBlock/info.mdx | 2 +- .../FieldBlock/properties.mdx | 16 ++++---- .../create-component/ValueBlock/info.mdx | 2 +- .../extensions/forms/extended-features.mdx | 20 +++++++--- .../DataContext.mdx | 14 +++---- .../DataContext/At.mdx | 12 +++--- .../DataContext/At/Examples.tsx | 0 .../DataContext/At/demos.mdx | 0 .../DataContext/At/info.mdx | 0 .../DataContext/At/properties.mdx | 0 .../extended-features/DataContext/Context.mdx | 21 ++++++++++ .../DataContext/ListDataContextComponents.tsx | 2 +- .../DataContext/Provider.mdx | 12 +++--- .../DataContext/Provider/Examples.tsx | 0 .../DataContext/Provider/demos.mdx | 0 .../DataContext/Provider/events.mdx | 0 .../DataContext/Provider/info.mdx | 2 +- .../DataContext/Provider/properties.mdx | 0 .../extended-features/Form/Handler/events.mdx | 6 +-- .../Form/Handler/properties.mdx | 14 +++---- .../Form/SubmitButton/info.mdx | 2 +- .../Form/schema-validation/info.mdx | 2 +- .../extended-features/ListAdvancedAPIs.tsx | 39 ------------------- .../Value.mdx | 8 ++-- .../Value/BankAccountNumber.mdx | 12 +++--- .../Value/BankAccountNumber/Examples.tsx | 0 .../Value/BankAccountNumber/demos.mdx | 0 .../Value/BankAccountNumber/info.mdx | 0 .../Value/BankAccountNumber/properties.mdx | 0 .../Value/Boolean.mdx | 12 +++--- .../Value/Boolean/Examples.tsx | 0 .../Value/Boolean/demos.mdx | 0 .../Value/Boolean/info.mdx | 0 .../Value/Boolean/properties.mdx | 0 .../Value/Currency.mdx | 12 +++--- .../Value/Currency/Examples.tsx | 0 .../Value/Currency/demos.mdx | 0 .../Value/Currency/info.mdx | 0 .../Value/Currency/properties.mdx | 0 .../Value/Date.mdx | 12 +++--- .../Value/Date/Examples.tsx | 0 .../Value/Date/demos.mdx | 0 .../Value/Date/info.mdx | 0 .../Value/Date/properties.mdx | 0 .../Value/Email.mdx | 12 +++--- .../Value/Email/Examples.tsx | 0 .../Value/Email/demos.mdx | 0 .../Value/Email/info.mdx | 0 .../Value/Email/properties.mdx | 0 .../Value/ListBaseValueComponents.tsx | 2 +- .../Value/ListFeatureValueComponents.tsx | 2 +- .../Value/NationalIdentityNumber.mdx | 12 +++--- .../Value/NationalIdentityNumber/Examples.tsx | 0 .../Value/NationalIdentityNumber/demos.mdx | 0 .../Value/NationalIdentityNumber/info.mdx | 0 .../NationalIdentityNumber/properties.mdx | 0 .../Value/Number.mdx | 12 +++--- .../Value/Number/Examples.tsx | 0 .../Value/Number/demos.mdx | 0 .../Value/Number/info.mdx | 0 .../Value/Number/properties.mdx | 0 .../Value/PhoneNumber.mdx | 12 +++--- .../Value/PhoneNumber/Examples.tsx | 0 .../Value/PhoneNumber/demos.mdx | 0 .../Value/PhoneNumber/info.mdx | 0 .../Value/PhoneNumber/properties.mdx | 0 .../Value/String.mdx | 12 +++--- .../Value/String/Examples.tsx | 0 .../Value/String/demos.mdx | 0 .../Value/String/info.mdx | 0 .../Value/String/properties.mdx | 0 .../Value/value-properties.mdx | 0 .../uilib/extensions/forms/feature-fields.mdx | 2 +- .../feature-fields/BankAccountNumber/info.mdx | 2 +- .../forms/feature-fields/Currency/info.mdx | 2 +- .../forms/feature-fields/Date/info.mdx | 2 +- .../forms/feature-fields/Email/info.mdx | 2 +- .../NationalIdentityNumber/info.mdx | 2 +- .../forms/feature-fields/PhoneNumber/info.mdx | 2 +- .../Field.mdx => fields.mdx} | 32 +++++---------- .../ListBaseInputComponents.tsx | 2 +- .../ListBaseSelectionComponents.tsx | 2 +- .../ListBaseToggleComponents.tsx | 2 +- 92 files changed, 166 insertions(+), 247 deletions(-) delete mode 100644 packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Context.mdx delete mode 100644 packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/Examples.tsx rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext.mdx (82%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/At.mdx (53%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/At/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/At/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/At/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/At/properties.mdx (100%) create mode 100644 packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Context.mdx rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/ListDataContextComponents.tsx (91%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/Provider.mdx (57%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/Provider/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/Provider/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/Provider/events.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/Provider/info.mdx (58%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/DataContext/Provider/properties.mdx (100%) delete mode 100644 packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/ListAdvancedAPIs.tsx rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value.mdx (89%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/BankAccountNumber.mdx (55%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/BankAccountNumber/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/BankAccountNumber/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/BankAccountNumber/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/BankAccountNumber/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Boolean.mdx (52%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Boolean/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Boolean/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Boolean/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Boolean/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Currency.mdx (55%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Currency/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Currency/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Currency/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Currency/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Date.mdx (55%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Date/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Date/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Date/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Date/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Email.mdx (55%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Email/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Email/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Email/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Email/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/ListBaseValueComponents.tsx (92%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/ListFeatureValueComponents.tsx (92%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/NationalIdentityNumber.mdx (55%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/NationalIdentityNumber/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/NationalIdentityNumber/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/NationalIdentityNumber/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/NationalIdentityNumber/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Number.mdx (53%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Number/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Number/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Number/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/Number/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/PhoneNumber.mdx (55%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/PhoneNumber/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/PhoneNumber/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/PhoneNumber/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/PhoneNumber/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/String.mdx (53%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/String/Examples.tsx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/String/demos.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/String/info.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/String/properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component => extended-features}/Value/value-properties.mdx (100%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component/Field.mdx => fields.mdx} (84%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component/Field => fields}/ListBaseInputComponents.tsx (92%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component/Field => fields}/ListBaseSelectionComponents.tsx (92%) rename packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/{create-component/Field => fields}/ListBaseToggleComponents.tsx (92%) diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms.mdx index 6b1c3870488..724f31d547c 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms.mdx @@ -91,7 +91,7 @@ In summary: - State management using the declarative [JSON Pointer](https://datatracker.ietf.org/doc/html/draft-ietf-appsawg-json-pointer-03) directive (i.e `path="/firstName"`). - Simple validation (like `minLength` on text fields) as well as [Ajv JSON schema validator](https://ajv.js.org/) support on both single fields and the whole data set. - Building blocks for [creating custom field components](/uilib/extensions/forms/create-component). -- Static [value components](/uilib/extensions/forms/create-component/Value/) for displaying data with proper formatting. +- Static [value components](/uilib/extensions/forms/extended-features/Value/) for displaying data with proper formatting. ### Basic field usage @@ -168,7 +168,7 @@ To build an entire form, there are surrounding components such as [Form.Handler] ### Value components -Beside the interactive [Field](/uilib/extensions/forms/create-component/Field/) components, there are also the static [Value](/uilib/extensions/forms/create-component/Value/) components. Use these to show summaries or read-only parts of your application with benefits such as linking to source data and standardized formatting based on the type of data to be displayed. +Beside the interactive [Field](/uilib/extensions/forms/fields/) components, there are also the static [Value](/uilib/extensions/forms/extended-features/Value/) components. Use these to show summaries or read-only parts of your application with benefits such as linking to source data and standardized formatting based on the type of data to be displayed. ## Create your own components diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields.mdx index 81b2d909083..b4a9ad22d50 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields.mdx @@ -1,6 +1,6 @@ --- title: 'Base fields' -order: 1 +order: 2 breadcrumb: - text: Forms href: /uilib/extensions/forms/ diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Boolean/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Boolean/info.mdx index f92db2252dd..6c5aee21211 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Boolean/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Boolean/info.mdx @@ -6,4 +6,4 @@ showTabs: true `Field.Boolean` is the base component for receiving user input where the target data is of type `boolean`. -There is a corresponding [Value.Boolean](/uilib/extensions/forms/create-component/Value/Boolean) component. +There is a corresponding [Value.Boolean](/uilib/extensions/forms/extended-features/Value/Boolean) component. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/info.mdx index 9aa69147488..95c8f17195f 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/info.mdx @@ -6,7 +6,7 @@ showTabs: true `Field.Number` is the base component for receiving user input where the target data is of type `number`. -There is a corresponding [Value.Number](/uilib/extensions/forms/create-component/Value/Number) component. +There is a corresponding [Value.Number](/uilib/extensions/forms/extended-features/Value/Number) component. ## When to use and not to use diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Option/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Option/info.mdx index da6fb7ac8d8..f1c5ec82dcd 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Option/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Option/info.mdx @@ -5,5 +5,3 @@ showTabs: true ## Description `Field.Option` is a part for building selection inputs with Field.Select. - -There is a corresponding [Value.Option](/uilib/extensions/forms/create-component/Value/Option) component. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/info.mdx index 40bde4acdbf..b8cda113efc 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/info.mdx @@ -6,7 +6,7 @@ showTabs: true `Field.String` is the base component for receiving user input where the target data is of type `string`. -There is a corresponding [Value.String](/uilib/extensions/forms/create-component/Value/String) component. +There is a corresponding [Value.String](/uilib/extensions/forms/extended-features/Value/String) component. ## Autocomplete and autofill diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component.mdx index 2d0bb77beda..081a181bb88 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component.mdx @@ -1,6 +1,6 @@ --- title: 'Create your own component' -order: 4 +order: 5 breadcrumb: - text: Forms href: /uilib/extensions/forms/ diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Context.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Context.mdx deleted file mode 100644 index 414b8b827e1..00000000000 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Context.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: 'Context' -description: 'The context object used in `DataContext.Provider`.' -showTabs: false -hideInMenu: true -breadcrumb: - - text: Forms - href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ - - text: DataContext - href: /uilib/extensions/forms/create-component/DataContext/ - - text: Context - href: /uilib/extensions/forms/create-component/DataContext/Context/ ---- - -# DataContext.Context - -## Description - -The main context for [DataContext.Provider](/uilib/extensions/forms/create-component/DataContext/Provider) which the [Field](/uilib/extensions/forms/base-fields/) and [Value](/uilib/extensions/forms/create-component/Value/) components connect to (optional) for sources and callbacks when it is present. It can be used for creating custom components in similar ways. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/Examples.tsx deleted file mode 100644 index db0f702041b..00000000000 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/Examples.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import ComponentBox from '../../../../../../shared/tags/ComponentBox' -import { Field } from '@dnb/eufemia/src/extensions/forms' - -export const FieldString = () => { - return ( - - console.log('onChange', value)} - /> - - ) -} - -export const FieldNumber = () => { - return ( - - console.log('onChange', value)} - /> - - ) -} - -export const FieldBoolean = () => { - return ( - - - - ) -} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/info.mdx index ed98c896825..ed7caaf6f17 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/info.mdx @@ -6,7 +6,7 @@ import Demos from 'Docs/uilib/extensions/forms/create-component/FieldBlock/demos ## Description -`FieldBlock` is a reusable wrapper for building [Field](/uilib/extensions/forms/create-component/Field) or [Value](/uilib/extensions/forms/create-component/Value) components. +`FieldBlock` is a reusable wrapper for building [Field](/uilib/extensions/forms/fields) or [Value](/uilib/extensions/forms/extended-features/Value) components. It shows surrounding elements through properties from `FieldProps` like `label` and `error`, and ensure that spacing between different fields work as required when put into surrounding components like [Flex.Container](/uilib/layout/flex/container/) or [Card](/uilib/components/card/). diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/properties.mdx index 9bd65849e8a..b2070a52b5d 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/properties.mdx @@ -4,11 +4,11 @@ showTabs: true ## Properties -| Property | Type | Description | -| ---------------------------------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------- | -| `width` | `string` or `false` | _(optional)_ `small`, `medium`, `large`, `stretch` or `false` for predefined standard widths. | -| `contentsWidth` | `string` or `false` | _(optional)_ `small`, `medium`, `large`, `stretch` or `false` for predefined standard widths. | -| `size` | `string` or `false` | _(optional)_ define one of the following [heading size](/uilib/elements/heading/): `medium` or `large`. | -| `asFieldset` | `boolean` | _(optional)_ use `true` when you have several form elements. This way a `fieldset` with a `legend` is used. | -| `disabled` | `boolean` | _(optional)_ set `true` to make the inner [FormLabel](/uilib/components/form-label/) behave as disabled. | -| `FieldProps` such as [Value.String-properties](/uilib/extensions/forms/create-component/Value/String/properties) | Various | _(optional)_ `FieldProps` properties. | +| Property | Type | Description | +| ----------------------------------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------- | +| `width` | `string` or `false` | _(optional)_ `small`, `medium`, `large`, `stretch` or `false` for predefined standard widths. | +| `contentsWidth` | `string` or `false` | _(optional)_ `small`, `medium`, `large`, `stretch` or `false` for predefined standard widths. | +| `size` | `string` or `false` | _(optional)_ define one of the following [heading size](/uilib/elements/heading/): `medium` or `large`. | +| `asFieldset` | `boolean` | _(optional)_ use `true` when you have several form elements. This way a `fieldset` with a `legend` is used. | +| `disabled` | `boolean` | _(optional)_ set `true` to make the inner [FormLabel](/uilib/components/form-label/) behave as disabled. | +| `FieldProps` such as [Value.String-properties](/uilib/extensions/forms/extended-features/Value/String/properties) | Various | _(optional)_ `FieldProps` properties. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/ValueBlock/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/ValueBlock/info.mdx index 67fa1f532dd..f8be1a269c8 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/ValueBlock/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/ValueBlock/info.mdx @@ -6,7 +6,7 @@ import Demos from 'Docs/uilib/extensions/forms/create-component/ValueBlock/demos ## Description -`ValueBlock` is a reusable wrapper component that can be used to easily create custom [Value-components](/uilib/extensions/forms/create-component/Value) that will display in the same way as other Value-components. +`ValueBlock` is a reusable wrapper component that can be used to easily create custom [Value-components](/uilib/extensions/forms/extended-features/Value) that will display in the same way as other Value-components. ```jsx import { ValueBlock } from '@dnb/eufemia/extensions/forms' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features.mdx index 3b8640b7ec3..ba6bbed1d9c 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features.mdx @@ -1,6 +1,6 @@ --- title: 'Extended features' -order: 3 +order: 4 breadcrumb: - text: Forms href: /uilib/extensions/forms/ @@ -8,8 +8,6 @@ breadcrumb: href: /uilib/extensions/forms/extended-features/ --- -import ListAdvancedAPIs from './extended-features/ListAdvancedAPIs' - # Extended features Forms is a flexible set of building blocks for form functionality. Besides field components and data display, it consists of more complex functionality for surrounding processes such as data flow, validation and building UI. @@ -35,6 +33,10 @@ render( `Forms.Handler` supports [JSON Schema](https://json-schema.org/) validation. JSON Schema is a flexible standard that makes it possible to describe the data's structure and validation needs, both for the individual value, and more complex rules across the data set. Descriptions and examples of such validation can be found [on a separate page](/uilib/extensions/forms/extended-features/Form/schema-validation). +## [Data context](/uilib/extensions/forms/extended-features/DataContext/) + +`DataContext` builds a surrounding [React context](https://react.dev/learn/passing-data-deeply-with-context) that binds an entire source dataset together with the fields placed within. It enables fields and other components to retrieve data from the source data using `path` parameters that identify where in the source data the target value is located, and the same components will report changes to the data back so the context can update the dataset. + ## [Steps layout](/uilib/extensions/forms/extended-features/StepsLayout) StepsLayout is a wrapper component for showing forms with a StepIndicator for navigation between several steps. It also includes components for navigating between steps. @@ -52,6 +54,14 @@ render( ) ``` -## Components +## [Value](/uilib/extensions/forms/extended-features/Value/) + +Value components are in practice like a field component whose value cannot be changed. They can be displayed with or without a label, and they format the value based on given rules. They can also connect to the surrounding [DataContext](/uilib/extensions/forms/extended-features/DataContext/). + +## [Iterate](/uilib/extensions/forms/extended-features/Iterate/) + +`Iterate` is components and functionality for traversing values and parts of data sets such as arrays, which contain a varying number of elements where the number of components on the screen depends on how many elements the data consists of. + +## [Visibility](/uilib/extensions/forms/extended-features/Visibility/) - +`Visibility` makes it possible to hide components and elements on the screen based on the dynamic state of data. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext.mdx similarity index 82% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext.mdx index 167ddc88bca..dbebb96ec77 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext.mdx @@ -1,23 +1,23 @@ --- title: 'DataContext' description: '`DataContext` interweaves your data-set with your form fields.' -componentType: 'basis-api' +componentType: 'advanced-api' hideInMenu: true showTabs: false breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: DataContext - href: /uilib/extensions/forms/create-component/DataContext/ + href: /uilib/extensions/forms/extended-features/DataContext/ --- import ListDataContextComponents from './DataContext/ListDataContextComponents' # DataContext -The `DataContext` interweaves your data-set with your form fields. +`DataContext` builds a surrounding [React context](https://react.dev/learn/passing-data-deeply-with-context) that binds an entire source dataset together with the fields placed within. It enables fields and other components to retrieve data from the source data using `path` parameters that identify where in the source data the target value is located, and the same components will report changes to the data back so the context can update the dataset. Example of using the `DataContext.Provider`: @@ -27,7 +27,7 @@ Example of using the `DataContext.Provider`: ``` -Please use [Form.Handler](/uilib/extensions/forms/extended-features/Form/Handler) for application forms. +For a more complete feature set tailored to building forms, please use [Form.Handler](/uilib/extensions/forms/extended-features/Form/Handler). It uses DataContext internally. ## Components @@ -35,7 +35,7 @@ Please use [Form.Handler](/uilib/extensions/forms/extended-features/Form/Handler ## More details -If you don't want to repeat all the logic that drills down to values in the source data, and ensure that changes are sent to the right place, you can surround the components with a [DataContext.Provider](/uilib/extensions/forms/create-component/DataContext/Provider) component. This means that you feed the form with source data in one place, and give it only one `onChange` callback. Then you only send the individual fields instructions about where in the data set the value that field is to process is located. The components then communicate internally and ensure that the values are retrieved and sent to the correct location. +If you don't want to repeat all the logic that drills down to values in the source data, and ensure that changes are sent to the right place, you can surround the components with a [DataContext.Provider](/uilib/extensions/forms/extended-features/DataContext/Provider) component. This means that you feed the form with source data in one place, and give it only one `onChange` callback. Then you only send the individual fields instructions about where in the data set the value that field is to process is located. The components then communicate internally and ensure that the values are retrieved and sent to the correct location. The reference to a specific field's value in the dataset is given with a prop called `path`. Paths are defined in a syntax called JSON Pointer, which is basically a slash-separated string that can go several levels, and consist of both object-properties and array indexes. Examples of paths are: `/firstName`, `/nested/path/to/value` and `/list/2/keyInThirdObject`. More information about JSON Pointers can be found on [the website of JSON Schema](https://json-schema.org/draft/2020-12/relative-json-pointer.html). diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At.mdx similarity index 53% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At.mdx index 624d7391c72..dd23d951a3c 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At.mdx @@ -13,16 +13,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: DataContext - href: /uilib/extensions/forms/create-component/DataContext/ + href: /uilib/extensions/forms/extended-features/DataContext/ - text: At - href: /uilib/extensions/forms/create-component/DataContext/At/ + href: /uilib/extensions/forms/extended-features/DataContext/At/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/DataContext/At/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/DataContext/At/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/DataContext/At/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/DataContext/At/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/At/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/At/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Context.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Context.mdx new file mode 100644 index 00000000000..60da4f768e2 --- /dev/null +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Context.mdx @@ -0,0 +1,21 @@ +--- +title: 'Context' +description: 'The context object used in `DataContext.Provider`.' +showTabs: false +hideInMenu: true +breadcrumb: + - text: Forms + href: /uilib/extensions/forms/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ + - text: DataContext + href: /uilib/extensions/forms/extended-features/DataContext/ + - text: Context + href: /uilib/extensions/forms/extended-features/DataContext/Context/ +--- + +# DataContext.Context + +## Description + +The main context for [DataContext.Provider](/uilib/extensions/forms/extended-features/DataContext/Provider) which the [Field](/uilib/extensions/forms/base-fields/) and [Value](/uilib/extensions/forms/extended-features/Value/) components connect to (optional) for sources and callbacks when it is present. It can be used for creating custom components in similar ways. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/ListDataContextComponents.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/ListDataContextComponents.tsx similarity index 91% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/ListDataContextComponents.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/ListDataContextComponents.tsx index 1f922cc6008..dd41413c498 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/ListDataContextComponents.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/ListDataContextComponents.tsx @@ -12,7 +12,7 @@ export default function ListDataContextComponents() { frontmatter: { title: { ne: null }, draft: { ne: true } } internal: { contentFilePath: { - glob: "**/uilib/extensions/forms/create-component/DataContext/**/*" + glob: "**/uilib/extensions/forms/extended-features/DataContext/**/*" } } } diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider.mdx similarity index 57% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider.mdx index 1d47be37a19..0a4ac6792c1 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider.mdx @@ -15,16 +15,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: DataContext - href: /uilib/extensions/forms/create-component/DataContext/ + href: /uilib/extensions/forms/extended-features/DataContext/ - text: Provider - href: /uilib/extensions/forms/create-component/DataContext/Provider/ + href: /uilib/extensions/forms/extended-features/DataContext/Provider/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/DataContext/Provider/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/DataContext/Provider/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/DataContext/Provider/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/DataContext/Provider/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/events.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/events.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/events.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/events.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/info.mdx similarity index 58% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/info.mdx index 0bcc3067c24..8c79cd94db1 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/info.mdx @@ -6,4 +6,4 @@ showTabs: true `DataContext.Provider` is the context provider that has to wrap the features if components of Field and Value is to be used with a common source instead of distributing values and events individually. -Please use [Form.Handler](/uilib/extensions/forms/extended-features/Form/Handler) for application forms. +For a more complete feature set tailored to building forms, please use [Form.Handler](/uilib/extensions/forms/extended-features/Form/Handler). It uses DataContext internally. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/DataContext/Provider/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/DataContext/Provider/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/events.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/events.mdx index b37a5e16444..344e200f6da 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/events.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/events.mdx @@ -4,6 +4,6 @@ showTabs: true ## Events -| Property | Description | -| -------------------------------------------------------------------------------------------------------- | --------------------------------------- | -| All [DataContext.Provider](/uilib/extensions/forms/create-component/DataContext/Provider/events) events. | _(optional)_ events such as `onSubmit`. | +| Property | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------- | +| All [DataContext.Provider](/uilib/extensions/forms/extended-features/DataContext/Provider/events) events. | _(optional)_ events such as `onSubmit`. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/properties.mdx index f4a35950094..45421db5468 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/Handler/properties.mdx @@ -4,10 +4,10 @@ showTabs: true ## Properties -| Property | Type | Description | -| ------------------------------------------------------------------------------------------------ | ------------ | --------------------------------------------------------------------------------------------------------------------------- | -| `children` | `React.Node` | _(required)_ The content of the form. | -| `autoComplete` | `boolean` | _(optional)_ Will set `autoComplete="on"` on all nested [Field.String](/uilib/extensions/forms/base-fields/String/)-fields. | -| [Space](/uilib/layout/space/properties) | Various | _(optional)_ spacing properties like `top` or `bottom` are supported. | -| [DataContext.Provider](/uilib/extensions/forms/create-component/DataContext/Provider/properties) | Various | _(optional)_ provider properties such as `data` and `onChange`. | -| [Form Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attributes) | Various | _(optional)_ all supported form element attributes. | +| Property | Type | Description | +| ------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- | +| `children` | `React.Node` | _(required)_ The content of the form. | +| `autoComplete` | `boolean` | _(optional)_ Will set `autoComplete="on"` on all nested [Field.String](/uilib/extensions/forms/base-fields/String/)-fields. | +| [Space](/uilib/layout/space/properties) | Various | _(optional)_ spacing properties like `top` or `bottom` are supported. | +| [DataContext.Provider](/uilib/extensions/forms/extended-features/DataContext/Provider/properties) | Various | _(optional)_ provider properties such as `data` and `onChange`. | +| [Form Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attributes) | Various | _(optional)_ all supported form element attributes. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/SubmitButton/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/SubmitButton/info.mdx index ca3ce6bf01e..bee8c24894f 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/SubmitButton/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/SubmitButton/info.mdx @@ -4,6 +4,6 @@ showTabs: true ## Description -`Form.SubmitButton` connects to the [DataContext.Provider](/uilib/extensions/forms/create-component/DataContext/Provider/) to submit the active state of the internal DataContext, triggering `onSubmit`. +`Form.SubmitButton` connects to the [DataContext.Provider](/uilib/extensions/forms/extended-features/DataContext/Provider/) to submit the active state of the internal DataContext, triggering `onSubmit`. The default button type is `type="submit"`, ready to be used with the [Form.Element](/uilib/extensions/forms/extended-features/Form/Element) diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/schema-validation/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/schema-validation/info.mdx index cdf0dcefbdf..092627d9e18 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/schema-validation/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Form/schema-validation/info.mdx @@ -40,7 +40,7 @@ To an object with both rules for required fields and validation rules for single ### Using schema with DataContext -Since a [DataContext](/uilib/extensions/forms/create-component/DataContext/) (used in isolation or through the use of [Form.Handler](/uilib/extensions/forms/extended-features/Form/Handler/)) supports JSON Schema, these two examples will result in the same validation for the user: +Since a [DataContext](/uilib/extensions/forms/extended-features/DataContext/) (used in isolation or through the use of [Form.Handler](/uilib/extensions/forms/extended-features/Form/Handler/)) supports JSON Schema, these two examples will result in the same validation for the user: ```jsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/ListAdvancedAPIs.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/ListAdvancedAPIs.tsx deleted file mode 100644 index 4f7f1b4cf70..00000000000 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/ListAdvancedAPIs.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react' -import { useStaticQuery, graphql } from 'gatsby' -import ListSummaryFromEdges from '../../../../../shared/parts/ListSummaryFromEdges' - -export default function ListAdvancedAPIs() { - const { - allMdx: { edges }, - } = useStaticQuery(graphql` - { - allMdx( - filter: { - frontmatter: { - title: { ne: null } - draft: { ne: true } - componentType: { in: "advanced-api" } - } - internal: { - contentFilePath: { glob: "**/uilib/extensions/forms/**/*" } - } - } - sort: [{ frontmatter: { title: ASC } }] - ) { - edges { - node { - fields { - slug - } - frontmatter { - title - description - } - } - } - } - } - `) - - return -} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value.mdx similarity index 89% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value.mdx index 4af42710165..ab870cbdc43 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value.mdx @@ -1,15 +1,15 @@ --- title: 'Value' description: '`Value` components can be used to summarize any kind of data.' -componentType: 'basis-api' +componentType: 'advanced-api' hideInMenu: true breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ --- import ListBaseValueComponents from './Value/ListBaseValueComponents' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber.mdx similarity index 55% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber.mdx index f5c938d1997..5408d46577b 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber.mdx @@ -14,16 +14,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: BankAccountNumber - href: /uilib/extensions/forms/create-component/BankAccountNumber/ + href: /uilib/extensions/forms/extended-features/BankAccountNumber/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/BankAccountNumber/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/BankAccountNumber/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean.mdx similarity index 52% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean.mdx index 35819d54e32..5c8107ce741 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean.mdx @@ -14,16 +14,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: Boolean - href: /uilib/extensions/forms/create-component/Boolean/ + href: /uilib/extensions/forms/extended-features/Boolean/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/Boolean/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/Boolean/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/Boolean/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/Boolean/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Boolean/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Boolean/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency.mdx similarity index 55% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency.mdx index 575384737e0..d43170761a2 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency.mdx @@ -14,16 +14,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: Currency - href: /uilib/extensions/forms/create-component/Currency/ + href: /uilib/extensions/forms/extended-features/Currency/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/Currency/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/Currency/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/Currency/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/Currency/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Currency/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Currency/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date.mdx similarity index 55% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date.mdx index bd7415a6f0b..5c82d725e78 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date.mdx @@ -14,16 +14,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: Date - href: /uilib/extensions/forms/create-component/Date/ + href: /uilib/extensions/forms/extended-features/Date/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/Date/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/Date/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/Date/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/Date/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Date/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Date/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email.mdx similarity index 55% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email.mdx index 5592b943b58..393ab019ed3 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email.mdx @@ -14,16 +14,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: Email - href: /uilib/extensions/forms/create-component/Email/ + href: /uilib/extensions/forms/extended-features/Email/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/Email/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/Email/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/Email/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/Email/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Email/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Email/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/ListBaseValueComponents.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/ListBaseValueComponents.tsx similarity index 92% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/ListBaseValueComponents.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/ListBaseValueComponents.tsx index 5573dc03983..c18bc210d86 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/ListBaseValueComponents.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/ListBaseValueComponents.tsx @@ -16,7 +16,7 @@ export default function ListBaseValueComponents() { } internal: { contentFilePath: { - glob: "**/uilib/extensions/forms/create-component/Value/**/*" + glob: "**/uilib/extensions/forms/extended-features/Value/**/*" } } } diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/ListFeatureValueComponents.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/ListFeatureValueComponents.tsx similarity index 92% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/ListFeatureValueComponents.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/ListFeatureValueComponents.tsx index 971a93cb440..84a92acfe3a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/ListFeatureValueComponents.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/ListFeatureValueComponents.tsx @@ -16,7 +16,7 @@ export default function ListFeatureValueComponents() { } internal: { contentFilePath: { - glob: "**/uilib/extensions/forms/create-component/Value/**/*" + glob: "**/uilib/extensions/forms/extended-features/Value/**/*" } } } diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber.mdx similarity index 55% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber.mdx index 27374ad46e5..8c3b40c4dfe 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber.mdx @@ -14,16 +14,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: NationalIdentityNumber - href: /uilib/extensions/forms/create-component/NationalIdentityNumber/ + href: /uilib/extensions/forms/extended-features/NationalIdentityNumber/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/NationalIdentityNumber/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number.mdx similarity index 53% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number.mdx index 495c768e2cd..020032ba4bb 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number.mdx @@ -15,16 +15,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: Number - href: /uilib/extensions/forms/create-component/Number/ + href: /uilib/extensions/forms/extended-features/Number/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/Number/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/Number/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/Number/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/Number/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/Number/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/Number/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber.mdx similarity index 55% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber.mdx index 4406c4d58d7..5217ea8e426 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber.mdx @@ -14,16 +14,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: PhoneNumber - href: /uilib/extensions/forms/create-component/PhoneNumber/ + href: /uilib/extensions/forms/extended-features/PhoneNumber/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/PhoneNumber/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/PhoneNumber/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/PhoneNumber/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/PhoneNumber/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String.mdx similarity index 53% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String.mdx index ad7f913b7e3..a9995134f5d 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String.mdx @@ -15,16 +15,16 @@ tabs: breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ + - text: Extended features + href: /uilib/extensions/forms/extended-features/ - text: Value - href: /uilib/extensions/forms/create-component/Value/ + href: /uilib/extensions/forms/extended-features/Value/ - text: String - href: /uilib/extensions/forms/create-component/String/ + href: /uilib/extensions/forms/extended-features/String/ --- -import Info from 'Docs/uilib/extensions/forms/create-component/Value/String/info' -import Demos from 'Docs/uilib/extensions/forms/create-component/Value/String/demos' +import Info from 'Docs/uilib/extensions/forms/extended-features/Value/String/info' +import Demos from 'Docs/uilib/extensions/forms/extended-features/Value/String/demos' diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/Examples.tsx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/Examples.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/Examples.tsx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/demos.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/demos.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/demos.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/info.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/info.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/info.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/String/properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/String/properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/value-properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/value-properties.mdx similarity index 100% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Value/value-properties.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/extended-features/Value/value-properties.mdx diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields.mdx index 0dcacfa40f2..5645ab2596c 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields.mdx @@ -1,6 +1,6 @@ --- title: 'Feature fields' -order: 2 +order: 3 breadcrumb: - text: Forms href: /uilib/extensions/forms/ diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/info.mdx index c1a363df6d2..fac25855e59 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/info.mdx @@ -14,4 +14,4 @@ import { Field } from '@dnb/eufemia/extensions/forms' render() ``` -There is a corresponding [Value.BankAccountNumber](/uilib/extensions/forms/create-component/Value/BankAccountNumber) component. +There is a corresponding [Value.BankAccountNumber](/uilib/extensions/forms/extended-features/Value/BankAccountNumber) component. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/info.mdx index e91a4bc1b02..71bcd30b677 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/info.mdx @@ -11,4 +11,4 @@ import { Field } from '@dnb/eufemia/extensions/forms' render() ``` -There is a corresponding [Value.Currency](/uilib/extensions/forms/create-component/Value/Currency) component. +There is a corresponding [Value.Currency](/uilib/extensions/forms/extended-features/Value/Currency) component. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/info.mdx index 33ab9d8955d..b86e1c7c61a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/info.mdx @@ -11,4 +11,4 @@ import { Field } from '@dnb/eufemia/extensions/forms' render() ``` -There is a corresponding [Value.Date](/uilib/extensions/forms/create-component/Value/Date) component. +There is a corresponding [Value.Date](/uilib/extensions/forms/extended-features/Value/Date) component. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/info.mdx index 6d146ed8fe5..feab5fd3cd6 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/info.mdx @@ -11,4 +11,4 @@ import { Field } from '@dnb/eufemia/extensions/forms' render() ``` -There is a corresponding [Value.Email](/uilib/extensions/forms/create-component/Value/Email) component. +There is a corresponding [Value.Email](/uilib/extensions/forms/extended-features/Value/Email) component. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/info.mdx index 78d2c97151b..498bc307e2f 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/info.mdx @@ -14,4 +14,4 @@ import { Field } from '@dnb/eufemia/extensions/forms' render() ``` -There is a corresponding [Value.NationalIdentityNumber](/uilib/extensions/forms/create-component/Value/NationalIdentityNumber) component. +There is a corresponding [Value.NationalIdentityNumber](/uilib/extensions/forms/extended-features/Value/NationalIdentityNumber) component. diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/info.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/info.mdx index f95b325548d..422f309336a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/info.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/info.mdx @@ -11,7 +11,7 @@ import { Field } from '@dnb/eufemia/extensions/forms' render() ``` -There is a corresponding [Value.PhoneNumber](/uilib/extensions/forms/create-component/Value/PhoneNumber) component. +There is a corresponding [Value.PhoneNumber](/uilib/extensions/forms/extended-features/Value/PhoneNumber) component. ## Value diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields.mdx similarity index 84% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field.mdx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields.mdx index 870ac6e5428..9709212c88e 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields.mdx @@ -1,26 +1,18 @@ --- -title: 'Field' -description: '`Field` for interactive data driven components.' -componentType: 'basis-api' -hideInMenu: true -showTabs: false +title: 'What are fields?' +order: 1 breadcrumb: - text: Forms href: /uilib/extensions/forms/ - - text: Create your component - href: /uilib/extensions/forms/create-component/ - - text: Field - href: /uilib/extensions/forms/create-component/Field/ + - text: What are fields? + href: /uilib/extensions/forms/fields/ --- -import ListBaseFieldComponents from '../base-fields/ListBaseFieldComponents' -import ListFeatureFieldComponents from '../feature-fields/ListFeatureFieldComponents' +import ListBaseInputComponents from './fields/ListBaseInputComponents' +import ListBaseSelectionComponents from './fields/ListBaseSelectionComponents' +import ListBaseToggleComponents from './fields/ListBaseToggleComponents' -import ListBaseInputComponents from './Field/ListBaseInputComponents' -import ListBaseSelectionComponents from './Field/ListBaseSelectionComponents' -import ListBaseToggleComponents from './Field/ListBaseToggleComponents' - -# Field +# About fields Both the naming and the way the components work are based on being data-driven. @@ -49,13 +41,9 @@ The base components exists of several kinds, such as the: - **toggle category** – which contains of field types that allow the user to toggle between two values, such as `true` and `false`: -## All base components - - - -## Feature fields +## Feature components - +[Feature fields](/uilib/extensions/forms/feature-fields/) builds on top of the base components to add more specific features targeting a given type of data. ## More info diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseInputComponents.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseInputComponents.tsx similarity index 92% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseInputComponents.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseInputComponents.tsx index d379061202d..1aef4d27a75 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseInputComponents.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseInputComponents.tsx @@ -1,6 +1,6 @@ import React from 'react' import { useStaticQuery, graphql } from 'gatsby' -import ListSummaryFromEdges from '../../../../../../shared/parts/ListSummaryFromEdges' +import ListSummaryFromEdges from '../../../../../shared/parts/ListSummaryFromEdges' export default function ListBaseInputComponents() { const { diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseSelectionComponents.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseSelectionComponents.tsx similarity index 92% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseSelectionComponents.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseSelectionComponents.tsx index 6f25ab9dfe3..81f74cfed47 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseSelectionComponents.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseSelectionComponents.tsx @@ -1,6 +1,6 @@ import React from 'react' import { useStaticQuery, graphql } from 'gatsby' -import ListSummaryFromEdges from '../../../../../../shared/parts/ListSummaryFromEdges' +import ListSummaryFromEdges from '../../../../../shared/parts/ListSummaryFromEdges' export default function ListBaseSelectionComponents() { const { diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseToggleComponents.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseToggleComponents.tsx similarity index 92% rename from packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseToggleComponents.tsx rename to packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseToggleComponents.tsx index 0fab427bcaf..c57b08b98a4 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/Field/ListBaseToggleComponents.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/fields/ListBaseToggleComponents.tsx @@ -1,6 +1,6 @@ import React from 'react' import { useStaticQuery, graphql } from 'gatsby' -import ListSummaryFromEdges from '../../../../../../shared/parts/ListSummaryFromEdges' +import ListSummaryFromEdges from '../../../../../shared/parts/ListSummaryFromEdges' export default function ListBaseToggleComponents() { const {