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.55 #4220

Merged
merged 40 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c966bc1
feat(Forms): add `transformLabel` to Value.Composition (#4207)
tujoworker Nov 4, 2024
4292be1
chore(Upload): adds screenshot test for disabled file max size
langz Nov 4, 2024
5bafc69
chore: adds screenshot tests
langz Nov 4, 2024
ad3ce2d
chore(Upload): adds screenshot test for disabled file max size (#4209)
langz Nov 4, 2024
c7459e2
chore(Card): add "no padding" example (#4212)
tujoworker Nov 4, 2024
67a4fbd
feat(Card): remove `beta` badge (#4211)
tujoworker Nov 4, 2024
6b64868
chore(Forms): add Iterate test for Field.SelectCountry (#4216)
tujoworker Nov 5, 2024
6f80ed9
fix(Forms): add Iterate support for Field.PostalCodeAndCity when usin…
tujoworker Nov 5, 2024
8d84d97
feat(Forms): add `layoutOptions` for enhanced horizontal label layout…
tujoworker Nov 5, 2024
0ec1388
refactor: center cards on ultra-wide monitors and fix capitalization …
Vikl5 Nov 5, 2024
5f745f5
fix(Upload): alignment when displaying single DL item (#4210)
langz Nov 5, 2024
83f0b37
fix(Forms): fix vertical gap between Field.ArraySelection toggle butt…
tujoworker Nov 5, 2024
9b9c517
feat(ChildrenWithAge): add maximum possible value to joint-responsibi…
langz Nov 5, 2024
b24fdfd
fix(Upload): fix `UploadFile` type to include `id` as required (#4218)
tujoworker Nov 6, 2024
3e92934
feat(Upload): add `download` prop to enable file downloads instead of…
tujoworker Nov 6, 2024
5600766
chore(DatePicker): add example for date correction (#4222)
joakbjerk Nov 6, 2024
c7a3838
chore: adds link to properties tab when linked to from properties doc…
langz Nov 6, 2024
a662e8b
chore: removes ## showTabs: true header (#4226)
langz Nov 6, 2024
d260a9c
docs: display all Value components in the Value menu (#4231)
langz Nov 6, 2024
96fa2a5
fix(Forms): ensure `Field.Number` with `percent` and without a value …
tujoworker Nov 6, 2024
7f19a41
chore(Forms): align docs and add more tests for Iterate.Toolbar and t…
tujoworker Nov 6, 2024
092abcd
feat(Forms): add EditButton, CancelButton and DoneButton to Form.Sect…
tujoworker Nov 6, 2024
9dc57cb
feat(CountryFlag): add iso to properties table (#4232)
thaytharma Nov 6, 2024
cab3c32
docs(CountryFlag): `iso` defaults to `NO` (#4234)
langz Nov 6, 2024
a2f368b
fix: remove legacy `fieldset` reset (#4237)
tujoworker Nov 6, 2024
d4e4334
fix: ensure components having `fieldset` inside still can use spacing…
tujoworker Nov 6, 2024
55c7ad3
chore(FormLabel): replace `label_direction` with `vertical` & `labelD…
langz Nov 7, 2024
ce08bc8
chore(ProgressIndicator): replace `show_label` & `label_direction` (#…
langz Nov 7, 2024
1a3ea60
chore: value specific properties, not field (#4243)
langz Nov 7, 2024
88443d2
chore(FormLabel): replace `for_id` with `forId` (#4239)
langz Nov 7, 2024
17e53ad
chore(FormLabel): replace `sr_only` with `srOnly` (#4240)
langz Nov 7, 2024
1f10e88
chore(Anchor): make it possible to remove launch icon (#4245)
langz Nov 8, 2024
45687ea
feat(DatePicker): Convert to functional components with typescript an…
joakbjerk Nov 8, 2024
f45aa4a
feat(Card): add style for nested cards (#4244)
tujoworker Nov 8, 2024
8b96fd1
fix(Forms): remove extra space from Value.* components with `inline` …
tujoworker Nov 8, 2024
63613f1
feat(ListFormat): add `ListFormat` component (#4238)
langz Nov 8, 2024
c0f1a02
fix(Forms): should display error underneath fields when nested inside…
langz Nov 8, 2024
3adddac
feat(Forms): add `Value.Upload` component (#4233)
langz Nov 8, 2024
e213c48
chore: update changelog for v10.55 (#4221)
langz Nov 8, 2024
b6c465a
chore: align nested Cards style (#4247)
tujoworker Nov 8, 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 @@ -2,7 +2,7 @@
title: 'Card'
description: '`Card` is a block section element showing the white box with rounded gray borders, adding spacing automatically.'
showTabs: true
status: 'beta'
status: 'new'
tabs:
- title: Info
key: '/info'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ export const Default = () => {
)
}

export const NestedCards = () => {
return (
<ComponentBox data-visual-test="layout-card-nested">
<Card>
<P>First Card</P>
<Card top>
<P>Second Card</P>
<Card top>
<P>Third Card (for edge cases only)</P>
</Card>
</Card>
</Card>
</ComponentBox>
)
}

export const WithTable = () => {
return (
<ComponentBox data-visual-test="layout-card-table">
Expand Down Expand Up @@ -208,6 +224,16 @@ export const WithHeadingsAndAriaLabel = () => {
)
}

export const WithoutPadding = () => {
return (
<ComponentBox>
<Card innerSpace={false} align="stretch">
<P>no inner space</P>
</Card>
</ComponentBox>
)
}

export const WithNestedSection = () => {
return (
<ComponentBox data-visual-test="card-nested-section">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,22 @@ import * as Examples from './Examples'

### Stack

The Card components needs to have `stack={true}` or `align="stretch"` in order to stretch its children components.

For [form components](uilib/extensions/forms/), you should use `stack={true}` to get the correct spacing.

<Examples.Stack />

### Nested Cards

Nested cards have `responsive={false}` by default and will not behave responsive.

<Examples.NestedCards />

### Without padding

<Examples.WithoutPadding />

### With nested Section

The Card components needs to have `stack={true}` or `align="stretch"` in order to stretch its children components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import { Card } from '@dnb/eufemia'

It uses [Flex.Item](/uilib/layout/flex/item) under the hood. When one of these properties were given, `stack`, `direction` or `spacing` – the [Flex.Container](/uilib/layout/flex/container) will be used.

**BETA:** The design is not 100% finalised and may change to be officially approved by UX through an RFC.

```jsx
import { Card } from '@dnb/eufemia'
import { Form, Field } from '@dnb/eufemia/extensions/forms'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import '@dnb/eufemia/components/country-flag/style/dnb-country-flag-icons.scss'

## Description

The CountryFlag component lets you display a country flag based on a [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) like `NO` for Norway.
The `CountryFlag` component lets you display a country flag based on a [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) like `NO` for Norway.

In order to use the CountryFlag component, you need to import the flag styles as CSS or SASS. The flag styles are available in the `dnb-country-flag-icons.min.css` and `dnb-country-flag-icons.scss` files. See the import example above.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,14 @@ export const DatePickerDateFnsRangeIsWeekend = () => (
/>
</ComponentBox>
)

export const DatePickerCorrectInvalidDate = () => (
<ComponentBox>
<DatePicker
show_input
min_date="2024-11-01"
max_date="2024-12-31"
correct_invalid_date
/>
</ComponentBox>
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
DatePickerCalendar,
DatePickerScreenshotTestSizes,
DatePickerScreenshotTestDisabled,
DatePickerCorrectInvalidDate,
} from 'Docs/uilib/components/date-picker/Examples'
import ChangeLocale from 'dnb-design-system-portal/src/core/ChangeLocale'

Expand Down Expand Up @@ -81,6 +82,10 @@ import enUS from '@dnb/eufemia/shared/locales/en-US'

<DatePickerLinked />

### Min and Max date correction

<DatePickerCorrectInvalidDate />

### DatePicker with error status (no input)

<DatePickerNoInputStatus />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
| `link` | _(optional)_ link both calendars, once to the user is navigating between months. Only meant to use if the range is set to `true`. Defaults to `false`. |
| `sync` | _(optional)_ sync input values with the calendars views. Once the input values get changed, the calendar changes its views in sync. Defaults to `true`. |
| `first_day` | _(optional)_ to define the first day of the week. Defaults to `monday`. |
| `locale` | _(optional)_ to define the locale used in the calendar. Needs to be an `date-fns` **v2** locale object, like `import enLocale from 'date-fns/locale/en-GB'`. Defaults to `nb-NO`. |
| `align_picker` | _(optional)_ use `right` to change the calendar alignment direction. Defaults to `left`. |
| `only_month` | _(optional)_ use `true` to only show the defined month. Disables the month navigation possibility. Defaults to `false`. |
| `hide_last_week` | _(optional)_ use `true` to only show the last week in the current month if it needs to be shown. The result is that there will mainly be shows five (5) weeks (rows) instead of six (6). Defaults to `false`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ export const DialogExampleProgressIndicator = () => (
maxWidth="12rem"
>
<ProgressIndicator
show_label
label_direction="vertical"
showDefaultLabel
labelDirection="vertical"
top="large"
bottom="large"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { FormLabel, Checkbox, Switch } from '@dnb/eufemia/src'

export const Default = () => (
<ComponentBox data-visual-test="form-label-default">
<FormLabel for_id="alone-1">Default horizontal FormLabel</FormLabel>
<FormLabel forId="alone-1">Default horizontal FormLabel</FormLabel>
<Checkbox id="alone-1" label="Checkbox" />
</ComponentBox>
)

export const Vertical = () => (
<ComponentBox data-visual-test="form-label-vertical">
<FormLabel for_id="alone-2" label_direction="vertical">
<FormLabel forId="alone-2" vertical>
Vertical FormLabel
</FormLabel>
<Checkbox id="alone-2" label="Checkbox" />
Expand All @@ -25,7 +25,7 @@ export const Vertical = () => (

export const NoForId = () => (
<ComponentBox>
<FormLabel vertical={true}>Without for_id (select me)</FormLabel>
<FormLabel vertical={true}>Without forId (select me)</FormLabel>
<Checkbox label="Checkbox" />
</ComponentBox>
)
Expand All @@ -35,7 +35,7 @@ export const LinkedLabel = () => (
<form>
<div>
<div>
<FormLabel for_id="switch-1" text="Form Label (click me):" />
<FormLabel forId="switch-1" text="Form Label (click me):" />
</div>
<div>
<Switch id="switch-1" value="Value of switch" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import * as Examples from 'Docs/uilib/components/form-label/Examples'

<Examples.Vertical />

### Vertical form-label without a `for_id`
### Vertical form-label without a `forId`

<Examples.NoForId />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const InputExampleSubmit = () => (
console.log(event)
}}
>
<FormLabel for_id="search">Label</FormLabel>
<FormLabel forId="search">Label</FormLabel>
<Flex.Horizontal align="baseline">
<Input
id="search"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: 'ListFormat'
description: 'A ready to use DNB list formatter.'
showTabs: true
tabs:
- title: Info
key: /uilib/components/list-format/info
- title: Demos
key: /uilib/components/list-format/demos
- title: Properties
key: /uilib/components/list-format/properties
theme: 'sbanken'
status: 'new'
---

import ListFormatInfo from 'Docs/uilib/components/list-format/info'
import ListFormatDemos from 'Docs/uilib/components/list-format/demos'

<ListFormatInfo />
<ListFormatDemos />
Loading
Loading