From 2c9a3975571e5bd8652f0fe40d5d93bebb67db4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Mon, 22 Jan 2024 10:46:04 +0100 Subject: [PATCH] fix(forms): rename `contents` to `content` (#3257) This PR should align the term we already use before in other components. Also, internally used only, we rename `contentsWidth` to `contentWidth`. --- .../extensions/forms/base-fields/Number/Examples.tsx | 2 +- .../extensions/forms/base-fields/Number/properties.mdx | 2 +- .../forms/base-fields/Selection/Examples.tsx | 2 +- .../forms/base-fields/Selection/properties.mdx | 2 +- .../extensions/forms/base-fields/String/Examples.tsx | 4 ++-- .../extensions/forms/base-fields/String/properties.mdx | 2 +- .../forms/create-component/FieldBlock/Examples.tsx | 8 ++++---- .../forms/create-component/FieldBlock/properties.mdx | 2 +- .../feature-fields/BankAccountNumber/Examples.tsx | 2 +- .../feature-fields/BankAccountNumber/properties.mdx | 10 +++++----- .../forms/feature-fields/Currency/Examples.tsx | 2 +- .../forms/feature-fields/Currency/properties.mdx | 10 +++++----- .../extensions/forms/feature-fields/Date/Examples.tsx | 2 +- .../forms/feature-fields/Date/properties.mdx | 8 ++++---- .../extensions/forms/feature-fields/Email/Examples.tsx | 2 +- .../forms/feature-fields/Email/properties.mdx | 8 ++++---- .../forms/feature-fields/Expiry/Examples.tsx | 2 +- .../feature-fields/NationalIdentityNumber/Examples.tsx | 2 +- .../NationalIdentityNumber/properties.mdx | 10 +++++----- .../feature-fields/OrganizationNumber/Examples.tsx | 2 +- .../feature-fields/OrganizationNumber/properties.mdx | 10 +++++----- .../forms/feature-fields/PhoneNumber/Examples.tsx | 2 +- .../forms/feature-fields/PhoneNumber/properties.mdx | 2 +- .../feature-fields/PostalCodeAndCity/Examples.tsx | 2 +- .../feature-fields/PostalCodeAndCity/properties.mdx | 2 +- .../forms/feature-fields/SelectCountry/Examples.tsx | 2 +- .../forms/feature-fields/SelectCountry/properties.mdx | 2 +- .../src/extensions/forms/Field/Date/Date.tsx | 2 +- .../src/extensions/forms/Field/Expiry/Expiry.tsx | 2 +- .../src/extensions/forms/Field/Number/Number.tsx | 6 +++--- .../forms/Field/SelectCountry/SelectCountry.tsx | 2 +- .../src/extensions/forms/Field/Selection/Selection.tsx | 2 +- .../src/extensions/forms/Field/String/String.tsx | 4 ++-- .../src/extensions/forms/FieldBlock/FieldBlock.tsx | 8 ++++---- .../forms/FieldBlock/__tests__/FieldBlock.test.tsx | 6 +++--- .../src/extensions/forms/Iterate/Array/Array.tsx | 2 +- packages/dnb-eufemia/src/extensions/forms/types.ts | 2 +- 37 files changed, 71 insertions(+), 71 deletions(-) diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/Examples.tsx index 5bc9adc7ef1..364ec279751 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/Examples.tsx @@ -82,7 +82,7 @@ export const WithHelp = () => { label="Label text" help={{ title: 'Help is available', - contents: + content: 'Here is what a team can do for you. . . . It allows you to help others do their best.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/properties.mdx index d37aa4c3ef8..e02ff4fcc5e 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Number/properties.mdx @@ -25,7 +25,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. | `width` | `string` or `false` | _(optional)_ `false` for no width (use browser default), `small`, `medium` or `large` for predefined standard widths, `stretch` for fill available width. | | `size` | `string` or `number` | _(optional)_ Size of the input field, see Input's properties for available options. Accepts, but will not forward `number` values as input's element attribute. | | `align` | `string` | _(optional)_ Lateral alignment of contents of input field, one of `left` (default), `center`, or `right`. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | | `autoComplete` | `on` or `string` | _(optional)_ For HTML `autocomplete` [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete). | | `step` | `number` | _(optional)_ Determines step granularity when in/decreasing value input through step controls buttons or arrow keys. | | `showStepControls` | `boolean` | _(optional)_ Show buttons that in/decreases value input by the step value. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/Examples.tsx index c710fd70a90..3d029e02650 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/Examples.tsx @@ -110,7 +110,7 @@ export const WithHelp = () => { label="Label text" help={{ title: 'Help is available', - contents: + content: 'Somewhere along the way, we must learn that there is nothing greater than to do something for others.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/properties.mdx index 37d99c2a762..062ca615b49 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/Selection/properties.mdx @@ -13,7 +13,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. | `variant` | `string` | _(optional)_ Choice of UI feature. Can be: `dropdown`, `radio` or `button`. | | `optionsLayout` | `string` | _(optional)_ Layout for the list of options. Can be `horizontal` or `vertical`. | | `width` | `string` or `false` | _(optional)_ `small`, `medium` or `large` for predefined standard widths, `stretch` for fill available width. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | | `clear` | `boolean` | _(optional)_ True to have a clear-option to remove selected option as value. | | `children` | `React.Node` | _(optional)_ For providing Option components. | | [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/Examples.tsx index 6386a828399..f618457ab3c 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/Examples.tsx @@ -56,7 +56,7 @@ export const WithHelp = () => { value="foo" help={{ title: 'Help is available', - contents: + content: 'Take the time to help other people without expecting a reward or gratitude is definitely important in living an optimistic life.', }} onChange={(value) => console.log('onChange', value)} @@ -393,7 +393,7 @@ export const MultipleWithHelp = () => { label="Label text" help={{ title: 'Help is available', - contents: 'There is more happiness in giving than in receiving.', + content: 'There is more happiness in giving than in receiving.', }} multiline onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/properties.mdx index 0668d223dbb..c3b8f7b2eb7 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/String/properties.mdx @@ -26,7 +26,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. | `maxLength` | `number` | _(optional)_ Validation for maximum length of the text (number of characters). | | `pattern` | `string` | _(optional)_ Validation based on regex pattern. | | `width` | `string` or `false` | _(optional)_ `false` for no width (use browser default), `small`, `medium` or `large` for predefined standard widths, `stretch` for fill available width. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | | [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | ## Properties diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/Examples.tsx index 36ad515c95d..efb5de5bc2e 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/create-component/FieldBlock/Examples.tsx @@ -87,25 +87,25 @@ export const Widths = () => { Contents Contents Contents Contents 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 b2070a52b5d..9142a648911 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 @@ -7,7 +7,7 @@ showTabs: true | 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. | +| `contentWidth` | `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. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/Examples.tsx index 671513f21a7..b2489a2a90b 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/Examples.tsx @@ -64,7 +64,7 @@ export const WithHelp = () => { value="20001234567" help={{ title: 'Help is available', - contents: + content: 'The real point is that we all need help somewhere along life’s path whether we think we will or not. And, if you are the one giving and helping, just remember this: no matter what happens later, you will always be secure in the fact knowing that you have remained strong and true to assist those that need your help.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/properties.mdx index 6cb72acf04d..defd4ef654a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/BankAccountNumber/properties.mdx @@ -8,10 +8,10 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. ### Component-specific props -| Property | Type | Description | -| --------------------------------------- | --------- | -------------------------------------------------------------------------------- | -| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | -| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | +| Property | Type | Description | +| --------------------------------------- | --------- | ------------------------------------------------------------------------------- | +| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | +| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/Examples.tsx index 35fadbb6b61..eaff952fe49 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/Examples.tsx @@ -56,7 +56,7 @@ export const WithHelp = () => { label="Amount" help={{ title: 'Help is available', - contents: + content: 'Helping others, without expecting anything in return is what true self-worth is all about.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/properties.mdx index 03d9ba8b4b8..5f58eb21976 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Currency/properties.mdx @@ -8,10 +8,10 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. ### Component-specific props -| Property | Type | Description | -| --------------------------------------- | -------- | -------------------------------------------------------------------------------- | -| `currency` | `string` | _(optional)_ Currency to show the value in. I.e `NOK` or `USD`. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | -| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | +| Property | Type | Description | +| --------------------------------------- | -------- | ------------------------------------------------------------------------------- | +| `currency` | `string` | _(optional)_ Currency to show the value in. I.e `NOK` or `USD`. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | +| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/Examples.tsx index c99934d4a5b..0af4e74cf9d 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/Examples.tsx @@ -51,7 +51,7 @@ export const WithHelp = () => { label="Label text" help={{ title: 'Help is available', - contents: + content: 'Kindness and helping others will return to you when you least expect it, and maybe when you need it.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/properties.mdx index d41ed133e9f..3b94744d721 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Date/properties.mdx @@ -8,9 +8,9 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. ### Component-specific props -| Property | Type | Description | -| --------------------------------------- | -------- | -------------------------------------------------------------------------------- | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | -| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | +| Property | Type | Description | +| --------------------------------------- | -------- | ------------------------------------------------------------------------------- | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | +| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/Examples.tsx index 08fbcd41e6a..d2f047e83a6 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/Examples.tsx @@ -51,7 +51,7 @@ export const WithHelp = () => { value="my-m@il.com" help={{ title: 'Help is available', - contents: + content: 'Use your gifts to teach and help others. Acknowledge them as gifts (even if only in your mind). Take some time to list your strengths as well as the ways in which you could share them with the world around you and how that truly is a gift to others.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/properties.mdx index d41ed133e9f..3b94744d721 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Email/properties.mdx @@ -8,9 +8,9 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. ### Component-specific props -| Property | Type | Description | -| --------------------------------------- | -------- | -------------------------------------------------------------------------------- | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | -| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | +| Property | Type | Description | +| --------------------------------------- | -------- | ------------------------------------------------------------------------------- | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | +| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Expiry/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Expiry/Examples.tsx index 95c2344e6cf..409fcff1473 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Expiry/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/Expiry/Examples.tsx @@ -30,7 +30,7 @@ export const WithHelp = () => { label="Label text" help={{ title: 'Help is available', - contents: + content: 'Kindness and helping others will return to you when you least expect it, and maybe when you need it.', }} onChange={(expiry) => console.log('onChange', expiry)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx index e1907ead692..b785a73c1f9 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/Examples.tsx @@ -64,7 +64,7 @@ export const WithHelp = () => { value="01017501234" help={{ title: 'Help is available', - contents: + content: 'The more I help others to succeed, the more I succeed.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/properties.mdx index 6cb72acf04d..defd4ef654a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/NationalIdentityNumber/properties.mdx @@ -8,10 +8,10 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. ### Component-specific props -| Property | Type | Description | -| --------------------------------------- | --------- | -------------------------------------------------------------------------------- | -| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | -| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | +| Property | Type | Description | +| --------------------------------------- | --------- | ------------------------------------------------------------------------------- | +| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | +| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/Examples.tsx index ed092f572ee..c35f58de99b 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/Examples.tsx @@ -64,7 +64,7 @@ export const WithHelp = () => { value="987654321" help={{ title: 'Help is available', - contents: + content: 'Success has nothing to do with what you gain in life or accomplish for yourself. It’s what you do for others.', }} onChange={(value) => console.log('onChange', value)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/properties.mdx index 6cb72acf04d..defd4ef654a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/OrganizationNumber/properties.mdx @@ -8,10 +8,10 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. ### Component-specific props -| Property | Type | Description | -| --------------------------------------- | --------- | -------------------------------------------------------------------------------- | -| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | -| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | +| Property | Type | Description | +| --------------------------------------- | --------- | ------------------------------------------------------------------------------- | +| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | +| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/Examples.tsx index 95656ea94d1..7ba1bf032d4 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/Examples.tsx @@ -60,7 +60,7 @@ export const WithHelp = () => { onChange={(...args) => console.log('onChange', ...args)} help={{ title: 'Help is available', - contents: + content: 'Helping others, encouraging others, are often acts of being kind that have more meaning that you may realize.', }} /> diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/properties.mdx index a6c289d0d36..6b58a21f93a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PhoneNumber/properties.mdx @@ -11,7 +11,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. | Property | Type | Description | | --------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pattern` | `string` | _(optional)_ Validation based on regex pattern for the number field e.g. `pattern="^[49]+"`. | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | | `countries` | `string` | _(optional)_ List only a certain set of countries: `Scandinavia`, `Nordic`, `Europe` or `Prioritized`(all countries [sorted by priority](/uilib/extensions/forms/feature-fields/PhoneNumber/#filter-or-prioritize-country-listing)). Defaults to `Prioritized`. | | `omitCountryCodeField` | `boolean` | _(optional)_ If `true` is given, then everything related to country code is removed. | | `countryCodeFieldClassName` | `string` | _(optional)_ Class name for the country code component. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/Examples.tsx index cfc5186e173..fb680ab3e91 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/Examples.tsx @@ -80,7 +80,7 @@ export const WithHelp = () => { }} help={{ title: 'Help is available', - contents: + content: 'Helping others, encouraging others, are often acts of being kind that have more meaning that you may realize.', }} /> diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/properties.mdx index c46b6716419..c060f9f4f03 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/PostalCodeAndCity/properties.mdx @@ -6,7 +6,7 @@ showTabs: true | Property | Type | Description | | ---------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | | `postalCode` | `object` | _(required)_ Properties for the [Field.String](/uilib/extensions/forms/base-fields/String/) component for postal code. | | `city` | `object` | _(required)_ Properties for the [Field.String](/uilib/extensions/forms/base-fields/String/) component for city. | | [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/Examples.tsx index 440749836e6..7ed3ec43503 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/Examples.tsx @@ -64,7 +64,7 @@ export const WithHelp = () => { label="Label text" help={{ title: 'Help is available', - contents: + content: 'Helping others, encouraging others, are often acts of being kind that have more meaning that you may realize.', }} onChange={(value, obj) => console.log('onChange', value, obj)} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/properties.mdx index 0311509befa..902d16b3c44 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/feature-fields/SelectCountry/properties.mdx @@ -8,7 +8,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties. | Property | Type | Description | | --------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. | +| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. | | `countries` | `string` | _(optional)_ List only a certain set of countries: `Scandinavia`, `Nordic`, `Europe` or `Prioritized`(all countries [sorted by priority](/uilib/extensions/forms/feature-fields/SelectCountry/#filter-or-prioritize-country-listing)). Defaults to `Prioritized` | | [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. | diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/Date/Date.tsx b/packages/dnb-eufemia/src/extensions/forms/Field/Date/Date.tsx index 962b4bfc8d1..f571947ba32 100644 --- a/packages/dnb-eufemia/src/extensions/forms/Field/Date/Date.tsx +++ b/packages/dnb-eufemia/src/extensions/forms/Field/Date/Date.tsx @@ -95,7 +95,7 @@ function DateComponent(props: Props) { status={hasError ? 'error' : undefined} suffix={ help ? ( - {help.contents} + {help.content} ) : undefined } on_change={handleChange} diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/Expiry/Expiry.tsx b/packages/dnb-eufemia/src/extensions/forms/Field/Expiry/Expiry.tsx index 95ec8145734..7fd02b836c9 100644 --- a/packages/dnb-eufemia/src/extensions/forms/Field/Expiry/Expiry.tsx +++ b/packages/dnb-eufemia/src/extensions/forms/Field/Expiry/Expiry.tsx @@ -117,7 +117,7 @@ function Expiry(props: ExpiryProps) { ]} suffix={ help ? ( - {help.contents} + {help.content} ) : undefined } /> diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/Number/Number.tsx b/packages/dnb-eufemia/src/extensions/forms/Field/Number/Number.tsx index 82141131449..8256f000789 100644 --- a/packages/dnb-eufemia/src/extensions/forms/Field/Number/Number.tsx +++ b/packages/dnb-eufemia/src/extensions/forms/Field/Number/Number.tsx @@ -240,7 +240,7 @@ function NumberComponent(props: Props) { error, disabled, width: width === 'stretch' ? width : undefined, - contentsWidth: width !== false ? width : undefined, + contentWidth: width !== false ? width : undefined, ...pickSpacingProps(props), } @@ -312,7 +312,7 @@ function NumberComponent(props: Props) { stretch: width !== undefined, suffix: help && !showStepControls ? ( - {help.contents} + {help.content} ) : undefined, ...ariaParams, } @@ -323,7 +323,7 @@ function NumberComponent(props: Props) { {showStepControls &&