Skip to content

Commit

Permalink
Merge branch 'digdir-next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Jansson committed Dec 2, 2024
2 parents e989fd3 + 37f51fc commit 1fcf5ca
Show file tree
Hide file tree
Showing 616 changed files with 22,553 additions and 22,376 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-stingrays-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Accordion: Fix chevron abandoning parent in scroll container
5 changes: 5 additions & 0 deletions .changeset/brown-walls-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-theme": patch
---

tokens: Removed validationmessage and label typography styles
5 changes: 5 additions & 0 deletions .changeset/dull-buttons-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Dropdown: Rename `DropdownContext` to `DropdownTriggerContext`
5 changes: 5 additions & 0 deletions .changeset/eleven-experts-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Textfield: Removed `htmlSize`, you can now use native `size`
6 changes: 6 additions & 0 deletions .changeset/fair-beds-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-css": patch
"@digdir/designsystemet-react": patch
---

CSS: base sizing on font-size so all components can have all sizes, and naturally inherits size from context
6 changes: 6 additions & 0 deletions .changeset/few-squids-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-css": major
"@digdir/designsystemet-react": major
---

Search: New compound API
5 changes: 5 additions & 0 deletions .changeset/fifty-hornets-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

CSS: Move default background-color to `<body>` element
5 changes: 5 additions & 0 deletions .changeset/five-pens-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Popover+Dropdown: Fix issue when combining controlled state with changing child elements
6 changes: 6 additions & 0 deletions .changeset/five-turkeys-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-css": patch
"@digdir/designsystemet-react": major
---

Dropdown: Add `Dropdown.Button` for more explicit API
5 changes: 5 additions & 0 deletions .changeset/fluffy-coins-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Modal: Rename `ModalContext` to `ModalTriggerContext`
5 changes: 5 additions & 0 deletions .changeset/funny-boxes-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

fix: Correct name on Figma collection for color schemes
5 changes: 5 additions & 0 deletions .changeset/fuzzy-needles-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": minor
---

Changed name of Tokens Studio theme "Mode" to "Color scheme", and updated the path in the token structure from `primitives/modes/colors` to `primitives/modes/color-scheme`
5 changes: 5 additions & 0 deletions .changeset/hungry-moles-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": major
---

Switch: Use `label` prop instead of `children` to render label
5 changes: 5 additions & 0 deletions .changeset/long-countries-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

Disable contrast color-scheme in tokens create script
5 changes: 5 additions & 0 deletions .changeset/loud-bobcats-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Textfield: Refactored `characterLimit` to `counter` and now use new `Field.Counter` sub-component
6 changes: 6 additions & 0 deletions .changeset/loud-dragons-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-theme": minor
"@digdir/designsystemet": minor
---

CLI: `tokens build` command now generates a `colors.d.ts` file which enables type safety for the `data-color` attribute when included in your `tsconfig.json`. The `@digdir/designsystemet-theme` package has been updated to include types for those themes.
5 changes: 5 additions & 0 deletions .changeset/mean-penguins-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": minor
---

`data-color` prop now supports type safety based on the token structure which was used to generate the theme CSS. Instructions for enabling this has been added to the README. An optional `react-types.d.ts` has also been added, which adds type hints for `data-color` and `data-size` to all HTML elements.
6 changes: 6 additions & 0 deletions .changeset/nasty-turtles-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-css": patch
"@digdir/designsystemet-react": major
---

Fieldset: Move to compound components `Fieldset.Legend` and `Fieldset.Description`
5 changes: 5 additions & 0 deletions .changeset/nine-countries-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

useRadioGroup: Add hook to easily control groups of `<Radio>` components
5 changes: 5 additions & 0 deletions .changeset/ninety-horses-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

useCheckboxGroup: Add hook to easily control groups of `<Checkbox>` components
5 changes: 5 additions & 0 deletions .changeset/ninety-jeans-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

React: Set `"type": "module"` in `package.json`
5 changes: 5 additions & 0 deletions .changeset/old-melons-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Table: add `z-index` to stickhy header
5 changes: 5 additions & 0 deletions .changeset/old-sheep-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Modal: Expose native close event object to onClose callback
5 changes: 5 additions & 0 deletions .changeset/olive-waves-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Textfield: Now works as expected with `data-size`
5 changes: 5 additions & 0 deletions .changeset/popular-jeans-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Textfield: Added `multiline` for switching between `input` and `textarea`
66 changes: 66 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,84 +18,150 @@
"beige-grapes-report",
"blue-rocks-pull",
"blue-singers-switch",
"blue-stingrays-heal",
"brave-months-shop",
"brave-months-sleep",
"bright-knives-remain",
"brown-walls-smell",
"chatty-cheetahs-fetch",
"chilled-icons-chew",
"chilled-pumas-march",
"clean-insects-move",
"clean-lizards-chew",
"clever-cobras-rescue",
"cool-lamps-drive",
"curvy-oranges-notice",
"cyan-adults-roll",
"dull-buttons-argue",
"eight-dancers-deliver",
"eighty-cougars-think",
"eleven-bags-shop",
"eleven-experts-raise",
"eleven-peaches-agree",
"empty-pears-hide",
"empty-singers-yell",
"fair-beds-destroy",
"famous-pillows-cheat",
"few-brooms-confess",
"few-plums-drum",
"few-squids-speak",
"fifty-buses-beam",
"fifty-hornets-hang",
"five-apricots-scream",
"five-pens-accept",
"five-turkeys-confess",
"flat-experts-drop",
"fluffy-coins-run",
"four-pears-tie",
"four-schools-wait",
"friendly-cups-kiss",
"friendly-islands-punch",
"funny-boxes-remember",
"fuzzy-needles-explode",
"gold-chairs-jog",
"gorgeous-readers-burn",
"gorgeous-shrimps-crash",
"happy-hounds-tie",
"happy-worms-applaud",
"healthy-apples-explode",
"heavy-rabbits-boil",
"hip-brooms-brush",
"hip-masks-greet",
"hip-schools-greet",
"honest-roses-hunt",
"hot-crews-perform",
"hot-ligers-rush",
"hot-weeks-tease",
"hungry-moles-repeat",
"kind-eyes-cheat",
"lemon-countries-smoke",
"long-boxes-sniff",
"long-countries-check",
"loud-bobcats-look",
"loud-dragons-build",
"loud-tips-return",
"mean-ducks-argue",
"mean-penguins-sing",
"mean-snails-visit",
"metal-bananas-notice",
"metal-tomatoes-compete",
"mighty-buttons-yell",
"mighty-days-eat",
"nasty-turtles-happen",
"nine-cameras-peel",
"nine-countries-invent",
"ninety-horses-juggle",
"odd-hornets-sleep",
"old-melons-stare",
"old-sheep-dress",
"olive-tools-cry",
"olive-waves-build",
"orange-months-listen",
"plenty-parents-rest",
"plenty-singers-matter",
"plenty-vans-sneeze",
"popular-jeans-happen",
"pretty-dancers-taste",
"proud-walls-flash",
"purple-berries-repeat",
"quiet-mangos-cry",
"quiet-rings-heal",
"real-zoos-fail",
"red-queens-love",
"rich-carrots-deny",
"rotten-zoos-live",
"rude-lies-smile",
"selfish-meals-pump",
"serious-frogs-rescue",
"seven-ladybugs-admire",
"seven-tips-rest",
"shaggy-bears-tan",
"shaggy-rockets-repair",
"sharp-humans-itch",
"shiny-dryers-count",
"shiny-kiwis-switch",
"short-kiwis-turn",
"short-walls-judge",
"shy-cameras-approve",
"six-carrots-guess",
"six-trees-tie",
"slimy-bees-arrive",
"slimy-buttons-train",
"slow-impalas-vanish",
"slow-news-act",
"small-houses-stare",
"small-queens-breathe",
"smooth-radios-leave",
"smooth-wombats-grab",
"spotty-oranges-guess",
"spotty-pumas-cross",
"stale-tables-eat",
"strange-jars-compete",
"strong-flowers-ring",
"strong-ghosts-marry",
"stupid-tables-applaud",
"sweet-dolphins-hang",
"swift-forks-drop",
"tall-guests-arrive",
"tame-rats-mix",
"ten-wolves-yawn",
"tender-grapes-refuse",
"tender-ties-swim",
"thin-icons-pay",
"three-carrots-hammer",
"three-dingos-unite",
"three-ducks-chew",
"three-moles-attack",
"tidy-cheetahs-cry",
"twelve-onions-laugh",
"twenty-cheetahs-leave",
"violet-steaks-repeat",
"wet-scissors-tickle",
"wise-cooks-compare",
"wise-countries-double",
"witty-clouds-judge",
"witty-moons-sleep",
"witty-moose-scream",
"yellow-zoos-camp"
]
}
5 changes: 5 additions & 0 deletions .changeset/quiet-rings-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Tooltip: Be able to send `string` as children
5 changes: 5 additions & 0 deletions .changeset/real-zoos-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Textfield: Removed `hideLabel`, use `aria-label` or `aria-describedby` for "hidden" labels
21 changes: 21 additions & 0 deletions .changeset/rude-lies-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@digdir/designsystemet-react": major
"@digdir/designsystemet-css": minor
"@digdir/designsystemet-theme": minor
"@digdir/designsystemet": minor
---

React components and css now support custom colors through the `data-color` attribute.

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

All<sup>1</sup> 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-*`<sup>2</sup>, 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-*`<sup>2</sup>.

<sup>1</sup>: ...except `Alert`, which only supports `info`, `warning`, `danger` and `success` colors.
<sup>2</sup>: If an `"accent"` color is not defined in the theme, the `--ds-color-accent-*` variables will point to the first `main-color`.
5 changes: 5 additions & 0 deletions .changeset/selfish-meals-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": major
---

Input+Select: Use native HTML `size` prop instead of `htmlSize`
8 changes: 8 additions & 0 deletions .changeset/sharp-humans-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@digdir/designsystemet-react": major
"@digdir/designsystemet-theme": major
"@digdir/designsystemet-css": major
"@digdir/designsystemet": minor
---

**BREAKING CHANGE**: The attribute / prop `data-ds-color-mode` has been renamed to `data-color-scheme`
8 changes: 8 additions & 0 deletions .changeset/shiny-dryers-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@digdir/designsystemet-css": major
"@digdir/designsystemet-react": major
---

Radio + Checkbox:
- Use `label` prop instead of `children` as label text
- Remove `Radio.Group` and `Checkbox.Group` and use `Fieldset` instead
6 changes: 6 additions & 0 deletions .changeset/short-kiwis-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet": patch
"@digdir/designsystemet-theme": patch
---

chore: Reset `data-color` to degfault color when setting `data-color-scheme`
6 changes: 6 additions & 0 deletions .changeset/shy-cameras-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-css": patch
"@digdir/designsystemet-react": patch
---

Chip: Use correct `32px` height to align nicely with `<Tag>`
6 changes: 6 additions & 0 deletions .changeset/silver-penguins-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-react": patch
"@digdir/designsystemet-css": patch
---

Rename `Accordion` to `Details`
5 changes: 5 additions & 0 deletions .changeset/slow-impalas-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Label: Fix icon abandoning parent in scroll container
Loading

0 comments on commit 1fcf5ca

Please sign in to comment.