Skip to content

@digdir/[email protected]

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 20 Nov 09:59
· 78 commits to next since this release
566fa37

Major Changes

  • Search: New compound API (#2708)

  • Radio + Checkbox: (#2607)

    • Use label prop instead of children as label text
    • Remove Radio.Group and Checkbox.Group and use Fieldset instead

Minor Changes

  • React components and css now support custom colors through the data-color attribute. (#2703)

    BREAKING CHANGE: All React components that had a color prop have been changed to use data-color.

    All1 css targeting data-color has been changed to work with all custom colors generated by the CLI.

    Avatar, Badge, Button, and Link use --ds-color-accent-*2, unless data-color is set directly on the element.

    For components that had a color prop, but defaulted to something other than "accent", data-color must also be set directly on the element.

    All other components that defaulted to "accent", or previously only existed in "accent" color, now support data-color. They will also inherit their color from the closest data-color attribute. If none is found, they use --ds-color-accent-*2.

    1: ...except Alert, which only supports info, warning, danger and success colors.
    2: If an "accent" color is not defined in the theme, the --ds-color-accent-* variables will point to the first main-color.

  • Implemented a more flexible system of semantic border-radius tokens. (#2497)

Patch Changes

  • Accordion: Fix chevron abandoning parent in scroll container (#2699)

  • SkipLink: Add css variables (#2626)

  • ValidationMessage: Add icon when error={true} (#2596)

  • ValidationMessage: fix icon abandoning the component when scrolling (#2646)

  • Accordion: Add css variable for chevron (#2626)

  • CSS: base sizing on font-size so all components can have all sizes, and naturally inherits size from context (#2541)

  • CSS: Move default background-color to <body> element (#2754)

  • Dropdown: Add Dropdown.Button for more explicit API (#2694)

  • Breadcrumbs: Add css variable for chevron (#2626)

  • Input: Sufficient color contrast for readonly (#2621)

  • Alert: fix icon abandoning the component when scrolling (#2648)

  • chip: Fix wrong font sizes (#2595)

  • Button: Fix SVG and images shrinking in flex containers (#2612)

  • Fieldset: Move to compound components Fieldset.Legend and Fieldset.Description (#2705)

  • Table: add z-index to stickhy header (#2761)

  • Tooltip: Add more variables (#2626)

  • Button: Use font-weight --ds-font-weight-medium (#2618)

  • Field: Adds <Field> component wrapping and connecting internal form elements for better accessibility (#2502)

  • Chip: Use correct 32px height to align nicely with <Tag> (#2683)

  • Combobox: fix overflow on screens narrower than ~340px (#2570)

  • Label: Fix icon abandoning parent in scroll container (#2699)

  • Label: Use data attributes for styling (#2588)

    ValidationMessage: Use data attributes for styling

  • Select + Textarea: (#2571)

    • Remove label, hideLabel, description, characterLimit and error as these will be part of Field API
  • Pagination: Add css variable for chevron (#2626)

  • Field.Affix: (#2793)

    • Rename Field.AffixWrapper to Field.Affixes
    • Support inputs with size attribute
  • Remove baseline layer and fix layerorder for typography (#2588)

  • Modal backdrop was invisible in some browser versions. See https://caniuse.com/mdn-css_selectors_backdrop_inherit_from_originating_element for affected versions. (#2615)

  • Table: Add Table.Foot and style caption (#2744)