Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

release of v10.57 #4295

Merged
merged 33 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1cafd1e
chore(Field.Date): add docs example on how to enable auto close (#4287)
joakbjerk Nov 18, 2024
7ccdabd
docs(Field.Upload): adds asyncFileHandler property
langz Nov 18, 2024
bbab4c8
chore(Field.Upload): adds a tests
langz Nov 18, 2024
f1485ee
chore(Field.Upload): adds asyncFileHandler tests (#4289)
langz Nov 18, 2024
fb09758
docs(Field.Upload): adds `asyncFileHandler` property (#4288)
langz Nov 18, 2024
09a050d
chore(Field.Upload): adds asyncFileHandler test (#4291)
whitneymarkov Nov 18, 2024
2cc816a
feat(Field.Upload): adds support for async and sync fn in `fileHandle…
langz Nov 19, 2024
8786d5d
feat(DrawerList, Dropdown, Autocomplete, Field.Selection, Field.Array…
snorrekim Nov 19, 2024
82e939e
chore: update version in changelog
langz Nov 19, 2024
b862dc8
chore(Field.Upload): improves example (#4296)
langz Nov 19, 2024
664e88e
chore: minor spelling improvements (#4306)
langz Nov 20, 2024
ed9db4b
chore: adds headings to helper docs (#4297)
langz Nov 20, 2024
a15cf4b
chore(Flex.Container): move desc to below import (#4298)
langz Nov 20, 2024
69bbdaf
chore(Flex): adds import (#4299)
langz Nov 20, 2024
b25736d
chore(Forms): rename internal process name (#4301)
tujoworker Nov 20, 2024
0e2d918
chore(Forms): remove unnecessary checks in useFieldProps (#4302)
tujoworker Nov 20, 2024
c585491
fix(Forms): show indicator with async onBlurValidator call when `vali…
tujoworker Nov 20, 2024
235b823
fix(Icon): ensure icon name is rendered as `data-testid` (#4304)
tujoworker Nov 20, 2024
f14bacc
fix(Forms): safeguard errorMessages to avoid infinite loops when not …
tujoworker Nov 20, 2024
54cd00d
chore: move blocks out of beta (#3994)
langz Nov 20, 2024
e726e20
fix(Forms): ensure fields inside composition share submit indicator (…
tujoworker Nov 20, 2024
53cd4e6
chore(Fragments): adds description header (#4313)
langz Nov 20, 2024
e0ad211
chore: renames bankaccount to bank account (#4315)
langz Nov 21, 2024
a58c999
chore: adds Indeterminate to list of base fields components (#4300)
langz Nov 21, 2024
4a8880f
chore: be continued -> continue (#4316)
langz Nov 21, 2024
5a06b2e
feat(Forms): deprecate `validator` in favor of `onChangeValidator` (#…
langz Nov 21, 2024
6008d9a
feat(Card, Section): add `outset` property for moderate layout breako…
tujoworker Nov 21, 2024
9dfe66d
feat(Typography): add general `.dnb-t` helper classes and add typogra…
snorrekim Nov 21, 2024
b6621c2
fix(Forms): align Value.SummaryList when Value.* has no label (#4311)
langz Nov 21, 2024
46f68ae
feat(Forms): add `labelSrOnly` to Value.* components (#4319)
tujoworker Nov 21, 2024
7bbc0ca
feat(Forms): add `Form.Card` with different default appearance than C…
tujoworker Nov 22, 2024
6e29f8d
chore: adds changelog for v10.57.0 (#4310)
langz Nov 22, 2024
61be7b2
chore(Card): adds outset prop docs (#4320)
langz Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
setTheme,
} from 'gatsby-plugin-eufemia-theme-handler'

export default function ChangeStyleTheme({ label = null } = {}) {
export default function ChangeStyleTheme({ label = null, ...rest } = {}) {
const themes = getThemes()
const { name } = getTheme()
const { update } = React.useContext(Context)
Expand All @@ -31,6 +31,7 @@ export default function ChangeStyleTheme({ label = null } = {}) {
update({ skeleton: false })
})
}}
{...rest}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { H3 } from '@dnb/eufemia/src'

# Font Families

<VisibilityByTheme hidden="sbanken">
## Font Families

The default font family for all web applications is the `DNB` font.

## DNB Regular

<TypographyBox>
<p className="dnb-p dnb-typo-regular">
<p className="dnb-p dnb-t__weight--regular dnb-t__family--default">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand All @@ -20,7 +21,7 @@ The default font family for all web applications is the `DNB` font.
## DNB Medium

<TypographyBox>
<p className="dnb-p dnb-typo-medium">
<p className="dnb-p dnb-t__weight--medium dnb-t__family--default">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand All @@ -31,8 +32,10 @@ The default font family for all web applications is the `DNB` font.

## DNB Bold

**NB!** bold is generally not used, use medium, unless there is a specific unique use case.

<TypographyBox>
<p className="dnb-p dnb-typo-bold">
<p className="dnb-p dnb-t__weight--bold dnb-t__family--default">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand All @@ -44,7 +47,7 @@ The default font family for all web applications is the `DNB` font.
## DNBMono Regular

<TypographyBox>
<p className="dnb-p dnb-typo-mono-regular">
<p className="dnb-p dnb-t__weight--regular dnb-t__family--monospace">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand All @@ -53,21 +56,35 @@ The default font family for all web applications is the `DNB` font.
</p>
</TypographyBox>
</VisibilityByTheme>

<VisibilityByTheme visible="sbanken">
## Font Families

The default font family for all web applications is `Roboto`, however for headlines and some other items we use `Maison Neue`.

### Maison Neue

<TypographyBox>
<H3>This is a headline in Maison Neue</H3>
<p className="dnb-p dnb-t__size--large dnb-t__line-height--large dnb-t__family--heading">
This is a paragraph using the headline font Maison Neue
</p>
</TypographyBox>

### Roboto regular

<TypographyBox>
<p className="dnb-p dnb-typo-regular">
<p className="dnb-p dnb-t__weight--regular dnb-t__family--default">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et
Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC.
</p>
</TypographyBox>

## Roboto Medium

<TypographyBox>
<p className="dnb-p dnb-t__weight--medium dnb-t__family--default">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand All @@ -78,8 +95,10 @@ The default font family for all web applications is `Roboto`, however for headli

### Roboto bold

**NB!** bold is generally not used, use medium, unless there is a specific unique use case.

<TypographyBox>
<p className="dnb-p dnb-typo-bold">
<p className="dnb-p dnb-t__weight--bold dnb-t__family--default">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## Font Weights

Achieved with HTML classes: `.dnb-typo-regular`, <VisibilityByTheme hidden="sbanken">`.dnb-typo-medium`, </VisibilityByTheme>`.dnb-typo-bold`
Achieved with HTML classes: `.dnb-t__weight--regular`,`.dnb-t__weight--medium` or `.dnb-t__weight--bold`.

The old classes, `.dnb-typo-regular`, `.dnb-typo-medium` and `.dnb-typo-bold`, still work, but will also set font-family and font-style.

### Body Regular

**NB!** body text is automatically set to use **regular** weight so there is
no need to use a class.

<TypographyBox>
<p className="dnb-typo-regular">
<p className="dnb-t__weight--regular">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand All @@ -17,24 +19,24 @@ no need to use a class.
</p>
</TypographyBox>

<VisibilityByTheme hidden="sbanken">
### Body Medium

<TypographyBox>
<p className="dnb-typo-medium">
<p className="dnb-t__weight--medium">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et
Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC.
</p>
</TypographyBox>
</VisibilityByTheme>

### Body Bold

**NB!** bold is generally not used, use medium, unless there is a specific unique use case.

<TypographyBox>
<p className="dnb-typo-bold">
<p className="dnb-t__weight--bold">
Here is a paragraph with some nonsense lipsum text. Contrary to popular
belief, Lorem Ipsum passage, and going through the cites of the word in
classical literature, discovered the undoubtable source. Lorem Ipsum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ This is an overview of the default, basic typographic elements such as **heading

### Note:

There are two methods to create small text. One, is to use the `.dnb-p--small` modifier class which can be used on paragraphs etc. and allows you to use a bottom margin. The other method is to just use a `<small>` tag which is inline and cannot have a margin.
There are two methods to create small text. One, is to use the `.dnb-t__size--small` modifier class. The other method is to just use a `<small>` tag.

### Example

<TypographyBox>
<p className="dnb-p dnb-p--small">
This is a paragraph with a <b>modifier class</b>. This is the small
content. Quem facilisi moderatius id eam, id tamquam albucius per. Vel
quem congue appareat cu, mei te eros convenire. Sea bonorum epicuri ea,
ei exerci tacimates pro, aliquam pertinacia eu vim.
<p className="dnb-p dnb-t__size--small">
This is a paragraph with a <b>modifier class</b> `.dnb-t__size--small`.
This is the small content. Quem facilisi moderatius id eam, id tamquam
albucius per. Vel quem congue appareat cu, mei te eros convenire. Sea
bonorum epicuri ea, ei exerci tacimates pro, aliquam pertinacia eu vim.
</p>
<p className="dnb-p">
<small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ The Anchor was moved from `/elements` to `/components`.

2. Only camelCase props are supported for Drawer, so you will need to update the prop names.
3. `Modal.Inner` or `Modal.Content` converts to `Drawer.Body`.
4. `Modal.Bar` converts to `Drawer.Navigaton`.
4. `Modal.Bar` converts to `Drawer.Navigation`.
5. `Modal` was a class component and `Drawer` is a functional component.

When you convert from `<Modal />` or `<Modal mode="dialog" />` to `<Dialog />` – follow these steps:
Expand All @@ -378,7 +378,7 @@ The Anchor was moved from `/elements` to `/components`.

2. Only camelCase props are supported for Dialog, so you will need to update the prop names.
3. `Modal.Inner` or `Modal.Content` converts to `Dialog.Body`.
4. `Modal.Bar` converts to `Dialog.Navigaton`.
4. `Modal.Bar` converts to `Dialog.Navigation`.
5. `Modal` was a class component and `Dialog` is a functional component.

### [Lists](/uilib/elements/lists)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ The `InputPassword` component has been moved to `Field.Password`, and is now a p
- replace `useError` with `useValidation`.
- replace Form.Iterate label variable `{itemNr}` with `{itemNo}`.
- replace `Form.FieldProps` with `Field.Provider`.
- replace `<Card stack>...</Card>` with `<Form.Card>...</Form.Card>`.
- replace `<Card>...</Card>` with `<Form.Card>...</Form.Card>`.

## NumberFormat

Expand Down Expand Up @@ -199,4 +201,9 @@ const errorMessages = {

- Got removed. Simply provide your error message as a object in the `errorMessages` property with an `useMemo` hook.

## DrawerList

- replace type `DrawerListDataObjectUnion` with `DrawerListDataArrayItem`.
- replace type `DrawerListDataObject` with `DrawerListDataArrayObject`.

_February, 6. 2024_
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,50 @@ export const AutocompleteDisabledExample = () => (
</Wrapper>
)

export const AutocompleteDisabledOptionsExample = () => (
<Wrapper>
<ComponentBox data-visual-test="autocomplete-disabled-options">
<Autocomplete
show_submit_button
data={[
{
disabled: true,
content: (
<Autocomplete.HorizontalItem>
<IconPrimary size="medium" icon="bell" right="x-small" />
The Shawshank Redemption
</Autocomplete.HorizontalItem>
),
year: 1994,
},
{
disabled: true,
content: ['The Godfather', 'Line with more info'],
year: 1972,
},
{
disabled: true,
content: [
'The Godfather: Part II',
<a key="a-1" className="dnb-anchor" href="/">
Anchor 1
</a>,
<a key="a-2" className="dnb-anchor" href="/">
Anchor 2
</a>,
'Line with more info',
],
year: 1974,
},
{ disabled: true, content: 'The Dark Knight', year: 2008 },
]}
label="Label"
bottom
/>
</ComponentBox>
</Wrapper>
)

export const AutocompleteContentAsArrayExample = () => (
<Wrapper>
<ComponentBox hidePreview>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import TranslationsTable from 'dnb-design-system-portal/src/shared/parts/Transla
import PropertiesTable from 'dnb-design-system-portal/src/shared/parts/PropertiesTable'
import { autocompleteProperties } from '@dnb/eufemia/src/components/autocomplete/AutocompleteDocs'
import { DrawerListProperties } from '@dnb/eufemia/src/fragments/drawer-list/DrawerListDocs'
import DrawerListDataDoc from '../fragments/drawer-list/_prop-data.mdx'

## Properties

Expand All @@ -17,59 +18,7 @@ You may check out the [DrawerList Properties](#drawerlist-properties) down below

<PropertiesTable props={DrawerListProperties} />

## Data structure

```js
// 1. as array
const data = [
// Every data item can, beside "content" - contain what ever
{
// (optional) can be what ever
selected_key: 'key_0',

// (optional) is show instead of "content", once selected
selected_value: 'Item 1 Value',
suffix_value: 'Addition 1',

// Item content as a string, array or React Element
content: 'Item 1 Content',
},

// more items ...
{
selected_key: 'key_1',
content: (
<>
<IconPrimary icon="bell" />
<span className="dnb-typo-bold">Searchable content</span>
</>
),
},
{
selected_key: 'key_2',
selected_value: 'Item 3 Value',
suffix_value: 'Addition 3',
content: (
<Autocomplete.HorizontalItem>
<IconPrimary icon="bell" />
<span className="dnb-typo-bold">Searchable content</span>
</Autocomplete.HorizontalItem>
),
},
{
selected_key: 'key_3',
selected_value: 'Item 4 Value',
suffix_value: 'Addition 4',
content: ['Item 4 Content A', <>Custom Component</>],
},
]

// 2. as object
const data = {
a: 'A',
b: 'B',
}
```
<DrawerListDataDoc />

## Translations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ draft: true
import {
AutocompleteOpened,
AutocompleteDisabledExample,
AutocompleteDisabledOptionsExample,
} from 'Docs/uilib/components/autocomplete/Examples'

<VisibleWhenVisualTest>
<AutocompleteOpened />
<AutocompleteDisabledExample />
<AutocompleteDisabledOptionsExample />
</VisibleWhenVisualTest>
Loading
Loading