Skip to content

Commit

Permalink
Merge branch 'next' into refactor/auto-generate-builtin-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz authored Mar 3, 2025
2 parents cce92fd + 484d7cc commit e4ed2d2
Show file tree
Hide file tree
Showing 188 changed files with 2,724 additions and 3,562 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-camels-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

**tokens**: Renamed `font.family` to `font-family`
5 changes: 5 additions & 0 deletions .changeset/cool-dancers-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

**Dialog**: Remove `backdropClose`, and replace with `closedby="none | closerequest | any"` to align with [upcoming browser standard](https://chromestatus.com/feature/5097714453577728)
5 changes: 5 additions & 0 deletions .changeset/early-houses-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

**tokens**: `extra-bold` token should now have correct value according to Token Studio
5 changes: 5 additions & 0 deletions .changeset/flat-turtles-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

**tokens**: Added `font-weight` to token name for fontWeight tokens (e.g. `font-weight.medium`)
5 changes: 5 additions & 0 deletions .changeset/good-melons-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

**Radio**: fix filled error state in `Fieldset`
5 changes: 5 additions & 0 deletions .changeset/happy-hornets-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

**Tabs**: Focus now fully encompasses `Tab`
5 changes: 5 additions & 0 deletions .changeset/khaki-cows-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

**MultiSelect**: New experimental component replacing `Combobox` in multiple mode
5 changes: 5 additions & 0 deletions .changeset/lazy-starfishes-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

**Details**: Change to inset focus
10 changes: 10 additions & 0 deletions .changeset/loud-trees-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@digdir/designsystemet-react": major
"@digdir/designsystemet-theme": major
"@digdir/designsystemet": major
"@digdir/designsystemet-css": major
---

🎉 Version 1.0 of Designsystemet! 🎉

We are excited to announce the release of Version 1.0 of Designsystemet! This marks a significant milestone as we establish a solid foundation for future development. 🚀
5 changes: 5 additions & 0 deletions .changeset/nine-worms-spend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": minor
---

**`Badge`, `Card`, `Details`, `Popover`**: Rename `data-variant` prop to `variant`
5 changes: 5 additions & 0 deletions .changeset/ninety-oranges-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Fix `peerDependencies` definition for React 19
5 changes: 5 additions & 0 deletions .changeset/old-monkeys-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

**Dropdown**: Move dropdown closer to trigger
6 changes: 6 additions & 0 deletions .changeset/purple-tigers-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet": patch
"@digdir/designsystemet-css": patch
---

Removed `--ds-global` colors from tokens build
5 changes: 5 additions & 0 deletions .changeset/quick-loops-send.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

Some options supplied to the CLI were being overridden by their default values
5 changes: 5 additions & 0 deletions .changeset/seven-hornets-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

**Breadcrumbs**: Fix arrow to inherit color when in a link
5 changes: 5 additions & 0 deletions .changeset/sour-tips-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": minor
---

**`ToggleGroup.Item`**: Disallow setting `variant` directly, it should only be set based on which item in the group is active
5 changes: 5 additions & 0 deletions .changeset/thick-horses-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Rename `--ds-disabled-opacity` to `--ds-opacity-disabled`
5 changes: 5 additions & 0 deletions .changeset/tricky-baboons-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Added `:not([hidden])` around `display` CSS properties to respect native `hidden` attribute
6 changes: 6 additions & 0 deletions .changeset/warm-walls-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet": patch
"@digdir/designsystemet-css": patch
---

Added `--ds-link-color-visited` for styling visited links
16 changes: 8 additions & 8 deletions .github/workflows/deploy-storefront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Set default environment value if push event is triggered
id: defaultenvironment
- name: Set Vercel environment
id: environment
run: |
ENVIRONMENT=${{ github.event.inputs.environment }}
echo "value=${ENVIRONMENT:-"next"}" >> "$GITHUB_OUTPUT"
ENVIRONMENT=${{ github.event.inputs.environment == 'production' && 'production' || 'preview' }}
echo "vercel=${ENVIRONMENT}" >> "$GITHUB_OUTPUT"
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel pull --yes --environment=${{steps.environment.outputs.vercel}} --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel build ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }}

- id: deploy
name: Deploy Project Artifacts to Vercel
run: echo "url=$(vercel deploy --prebuilt ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT
run: echo "url=$(vercel deploy --prebuilt ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT

- name: Set Vercel alias
if: steps.environment.outputs.vercel == 'preview'
run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_TEAM }} set ${{ steps.deploy.outputs.url }} next.designsystemet.no
if: steps.defaultenvironment.outputs.value == 'next'
16 changes: 8 additions & 8 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Set default environment value if push event is triggered
id: defaultenvironment
- name: Set Vercel environment
id: environment
run: |
ENVIRONMENT=${{ github.event.inputs.environment }}
echo "value=${ENVIRONMENT:-"next"}" >> "$GITHUB_OUTPUT"
ENVIRONMENT=${{ github.event.inputs.environment == 'production' && 'production' || 'preview' }}
echo "vercel=${ENVIRONMENT}" >> "$GITHUB_OUTPUT"
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel pull --yes --environment=${{steps.environment.outputs.vercel}} --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel build ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }}

- id: deploy
name: Deploy Project Artifacts to Vercel
run: echo "url=$(vercel deploy --prebuilt ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT
run: echo "url=$(vercel deploy --prebuilt ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT

- name: Set Vercel alias
if: steps.environment.outputs.vercel == 'preview'
run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_TEAM }} set ${{ steps.deploy.outputs.url }} next.storybook.designsystemet.no
if: steps.defaultenvironment.outputs.value == 'next'
16 changes: 8 additions & 8 deletions .github/workflows/deploy-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Set default environment value if push event is triggered
id: defaultenvironment
- name: Set Vercel environment
id: environment
run: |
ENVIRONMENT=${{ github.event.inputs.environment }}
echo "value=${ENVIRONMENT:-"next"}" >> "$GITHUB_OUTPUT"
ENVIRONMENT=${{ github.event.inputs.environment == 'production' && 'production' || 'preview' }}
echo "vercel=${ENVIRONMENT}" >> "$GITHUB_OUTPUT"
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel pull --yes --environment=${{steps.environment.outputs.vercel}} --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel build ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }}

- id: deploy
name: Deploy Project Artifacts to Vercel
run: echo "url=$(vercel deploy --prebuilt ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT
run: echo "url=$(vercel deploy --prebuilt ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT

- name: Set Vercel alias
if: steps.environment.outputs.vercel == 'preview'
run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_TEAM }} set ${{ steps.deploy.outputs.url }} next.theme.designsystemet.no
if: steps.defaultenvironment.outputs.value == 'next'
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"html-css-class-completion.includeGlobPattern": "packages/css/**/*.{css,html}",
"[github-actions-workflow]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[html]": {
"editor.defaultFormatter": "biomejs.biome"
Expand Down
39 changes: 39 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Follow these steps to ensure a smooth and consistent release process.
# Release

We currently use [changesets](https://github.com/changesets/changesets) for tracking changes, generating changelogs, and publishing releases.

We don't use changesets prerelease mode yet as we want to avoid additonal steps when creating a new release.

## 1. Update Main with changes from next

- Make a PR from `next` into `main` branch

- Merge PR into `main` using a merge commit

## 2. Publish new package version

- [Changeset bot](https://github.com/apps/changeset-bot) should now pickup the changesets (inside `.changeset/`) and generate a PR with bumped version and changelog.

- Approve and merge the PR.

- [Changeset bot](https://github.com/apps/changeset-bot) will now publish new a package version to npmjs and create [github releases](https://github.com/digdir/designsystemet/releases)

- Verify that new version is available in [npmjs](https://www.npmjs.com/package/@digdir/designsystemet) (under `latest` tag) and on [github releases](https://github.com/digdir/designsystemet/releases)

## 3. Deploy new application version to production

- Manually trigger the github action deployment to `production` environment from `main` branch:
- Deploy Storefront
- Deploy Theme
- Deploy Storybook

## 4. Update next branch with changes from main

- Make a PR from `main` into `next` branch

- Merge PR into `next` using a rebase merge commit

### **Next**

- Use Release Snapshot to publish new version for testing on `@next` before releasing to production
2 changes: 1 addition & 1 deletion apps/_components/src/ClipboardButton/ClipboardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const ClipboardButton = ({
data-size='sm'
aria-label={ariaLabel}
>
<ClipboardIcon fontSize={'1.4rem'} />
<ClipboardIcon fontSize={'1.4rem'} aria-hidden='true' />
{text && <span className={classes.text}>{text}</span>}
</Button>
</Tooltip>
Expand Down
4 changes: 2 additions & 2 deletions apps/_components/src/CodeSnippet/CodeSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ const CodeSnippet = ({
onMouseEnter={() => setToolTipText('Kopier')}
onClick={() => onButtonClick()}
className={classes.copyButton}
aria-label='Kopier'
aria-label='Kopier kodesnutt'
icon
data-color='neutral'
data-size='sm'
>
<FilesIcon fontSize='1.5rem' />
<FilesIcon fontSize='1.5rem' aria-hidden='true' />
</Button>
</Tooltip>
{/* @ts-ignore -- This has yet to be updated to use react 19 */}
Expand Down
2 changes: 1 addition & 1 deletion apps/_components/src/ColorModal/ColorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export const ColorModal = ({
return (
<Dialog
ref={colorModalRef}
closedby='any'
style={{
maxWidth: '1100px',
}}
backdropClose
>
<Dialog.Block>
<Heading data-size='xs'>
Expand Down
2 changes: 1 addition & 1 deletion apps/_components/src/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

.tag {
background-color: var(--ds-global-purple-4);
background-color: light-dark(#e0d6eb, #4f2776);
border-radius: 4px;
padding: 4px 10px;
font-size: 16px;
Expand Down
46 changes: 29 additions & 17 deletions apps/_components/src/Showcase/Showcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ import {
Button,
Card,
Checkbox,
Combobox,
Details,
Divider,
Field,
Fieldset,
Heading,
Label,
Link,
Pagination,
Paragraph,
Radio,
Search,
Select,
EXPERIMENTAL_Suggestion as Suggestion,
Switch,
Table,
Tabs,
Expand All @@ -28,6 +30,16 @@ import cl from 'clsx/lite';
import { type HTMLAttributes, useState } from 'react';
import classes from './Showcase.module.css';

const DATA_PLACES = [
'Sogndal',
'Oslo',
'Brønnøysund',
'Stavanger',
'Trondheim',
'Bergen',
'Lillestrøm',
];

type ShowcaseProps = HTMLAttributes<HTMLDivElement>;

export function Showcase({ className, ...props }: ShowcaseProps) {
Expand Down Expand Up @@ -240,22 +252,22 @@ export function Showcase({ className, ...props }: ShowcaseProps) {
<ToggleGroup.Item value='sweden'>Sverige</ToggleGroup.Item>
<ToggleGroup.Item value='utlandet'>Utlandet</ToggleGroup.Item>
</ToggleGroup>
<Combobox
description='Velg et sted'
label='Hvor går reisen?'
portal={false}
multiple
>
<Combobox.Empty>Fant ingen treff</Combobox.Empty>
<Combobox.Option value='leikanger'>Leikanger</Combobox.Option>
<Combobox.Option value='oslo'>Oslo</Combobox.Option>
<Combobox.Option value='bronnoysund'>Brønnøysund</Combobox.Option>
<Combobox.Option value='stavanger'>Stavanger</Combobox.Option>
<Combobox.Option value='trondheim'>Trondheim</Combobox.Option>
<Combobox.Option value='tromso'>Tromsø</Combobox.Option>
<Combobox.Option value='bergen'>Bergen</Combobox.Option>
<Combobox.Option value='moirana'>Mo i Rana</Combobox.Option>
</Combobox>
<Field>
<Label>Velg en destinasjon</Label>
<Suggestion>
<Suggestion.Input />
<Suggestion.Clear />
<Suggestion.List>
<Suggestion.Empty>Tomt</Suggestion.Empty>
{DATA_PLACES.map((place) => (
<Suggestion.Option key={place} value={place}>
{place}
<div>Kommune</div>
</Suggestion.Option>
))}
</Suggestion.List>
</Suggestion>
</Field>
</div>
</div>
<div className={cl(classes.card, classes.tabs)}>
Expand Down
Loading

0 comments on commit e4ed2d2

Please sign in to comment.