Skip to content

Commit 2102c8a

Browse files
authored
release of v10.98.0 (#6614)
2 parents 89e0b1b + 1cc5ebb commit 2102c8a

File tree

158 files changed

+7479
-553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+7479
-553
lines changed

.github/workflows/preview.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Deploy Preview
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
branches:
7+
- '**'
8+
- '!**--skip-ci'
9+
- '!**--visual-reports'
10+
- '!wip/**'
11+
- '!experiments/**'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
20+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
21+
22+
jobs:
23+
deploy-preview:
24+
name: Build and deploy (branch preview)
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 20
27+
28+
permissions:
29+
contents: read
30+
pull-requests: write
31+
32+
steps:
33+
- name: Git checkout
34+
uses: actions/checkout@v5
35+
with:
36+
persist-credentials: false
37+
38+
- name: Use Node.js
39+
uses: actions/setup-node@v5
40+
with:
41+
node-version-file: 'package.json'
42+
cache: yarn
43+
44+
- name: Install dependencies
45+
run: yarn install --immutable
46+
47+
- name: Build
48+
run: yarn workspace dnb-design-system-portal build:mini
49+
50+
- name: Deploy to Cloudflare Pages (branch preview)
51+
id: pages_deploy
52+
run: |
53+
set -euo pipefail
54+
55+
OUTPUT="$(yarn workspace dnb-design-system-portal wrangler pages deploy ./public \
56+
--project-name eufemia \
57+
--branch "${{ github.head_ref || github.ref_name }}" \
58+
--commit-dirty=true)"
59+
60+
echo "$OUTPUT"
61+
62+
ALIAS_URL="$(echo "$OUTPUT" | sed -nE 's/.*Deployment alias URL:\s*(https:\/\/[^ ]+).*/\1/p')"
63+
DEPLOYMENT_URL="$(echo "$OUTPUT" | sed -nE 's/.*Take a peek over at\s*(https:\/\/[^ ]+).*/\1/p')"
64+
65+
echo "alias_url=$ALIAS_URL" >> "$GITHUB_OUTPUT"
66+
echo "deployment_url=$DEPLOYMENT_URL" >> "$GITHUB_OUTPUT"
67+
env:
68+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
69+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
70+
71+
- name: Post or update preview comment
72+
if: success() && github.event.pull_request
73+
uses: actions/github-script@v7
74+
env:
75+
ALIAS_URL: ${{ steps.pages_deploy.outputs.alias_url }}
76+
DEPLOYMENT_URL: ${{ steps.pages_deploy.outputs.deployment_url }}
77+
with:
78+
script: |
79+
const aliasUrl = process.env.ALIAS_URL;
80+
const deploymentUrl = process.env.DEPLOYMENT_URL;
81+
const marker = "<!-- pages-preview-comment -->";
82+
83+
const body = [
84+
marker,
85+
"**Branch Preview URL (stable):**",
86+
aliasUrl,
87+
"",
88+
"```",
89+
aliasUrl,
90+
"```",
91+
"",
92+
"**Deployment URL (unique):**",
93+
deploymentUrl,
94+
"",
95+
"```",
96+
deploymentUrl,
97+
"```",
98+
""
99+
].join("\n");
100+
101+
const { data: comments } = await github.rest.issues.listComments({
102+
owner: context.repo.owner,
103+
repo: context.repo.repo,
104+
issue_number: context.issue.number,
105+
});
106+
107+
const existing = comments.find(c => c.body?.includes(marker));
108+
109+
if (existing) {
110+
await github.rest.issues.updateComment({
111+
owner: context.repo.owner,
112+
repo: context.repo.repo,
113+
comment_id: existing.id,
114+
body,
115+
});
116+
} else {
117+
await github.rest.issues.createComment({
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
issue_number: context.issue.number,
121+
body,
122+
});
123+
}

.vscode/mcp.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"servers": {
3-
"eufemia": {
4-
"command": "bash",
5-
"args": [
6-
"${workspaceFolder}/packages/dnb-eufemia/src/mcp/run-mcp-server.sh"
7-
],
8-
"env": {
9-
"EUFEMIA_DOCS_ROOT": "${workspaceFolder}/packages/dnb-eufemia/build/docs"
10-
}
11-
}
3+
// Commented out to avoid MCP server being activated by default
4+
// This is only useful for development purposes
5+
// "eufemia": {
6+
// "command": "bash",
7+
// "args": [
8+
// "${workspaceFolder}/packages/dnb-eufemia/src/mcp/run-mcp-server.sh"
9+
// ],
10+
// "env": {
11+
// "EUFEMIA_DOCS_ROOT": "${workspaceFolder}/packages/dnb-eufemia/build/docs"
12+
// }
13+
// }
1214
}
1315
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"gatsby/browserslist": "4.21.4"
4343
},
4444
"engines": {
45-
"node": ">=18.x",
45+
"node": ">=24.x",
4646
"yarn": ">=4.0.0"
4747
},
4848
"volta": {

packages/dnb-design-system-portal/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
"stylelint-config-recommended": "12.0.0",
111111
"stylelint-config-standard-scss": "9.0.0",
112112
"typescript": "5.9.3",
113-
"unist-util-visit": "^2"
113+
"unist-util-visit": "^2",
114+
"wrangler": "4.66.0"
114115
},
115116
"buildVersion": "[LOCAL BUILD]",
116117
"changelogVersion": "[LOCAL BUILD]",

packages/dnb-design-system-portal/src/core/ChangeLocale.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const languageDisplayNames = {
77
'nb-NO': { label: 'Norsk' },
88
'sv-SE': { label: 'Svenska' },
99
'da-DK': { label: 'Dansk' },
10+
'en-NO': { label: 'English (NO)' },
1011
'en-GB': { label: 'English (GB)' },
1112
'en-US': { label: 'English (US)' },
1213
}

packages/dnb-design-system-portal/src/core/PortalProviders.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,17 @@ export const translations = mergeTranslations(
3939
translationsWithoutEnUS,
4040
enUS
4141
)
42-
export const supportedTranslationsKey = [
43-
...Object.keys(coreTranslations),
44-
...Object.keys(translations),
42+
const allSupportedTranslationsKey: InternalLocale[] = [
43+
...(Object.keys(coreTranslations) as InternalLocale[]),
44+
...(Object.keys(translations) as InternalLocale[]),
45+
'en-NO',
4546
]
4647

48+
export const supportedTranslationsKey: InternalLocale[] =
49+
allSupportedTranslationsKey.filter((locale, index, list) => {
50+
return list.indexOf(locale) === index
51+
})
52+
4753
// This ensures we processes also the css prop during build
4854
// More into in the docs: https://emotion.sh/docs/ssr#gatsby
4955
const createCacheInstance = () =>

packages/dnb-design-system-portal/src/docs/EUFEMIA_CHANGELOG.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ New [Icons](/icons/secondary):
312312
- `.dnb-h1--small` is now `.dnb-h--x-large`
313313
- `.dnb-h2` is now `.dnb-h--large`
314314
- `.dnb-h3` is now `.dnb-h--medium` / `.dnb-lead`
315-
- For `.dnb-h4`, `.dnb-h5` and `.dnb-h6` se [v7 release notes](/uilib/about-the-lib/releases/dnb-ui-lib/v7-info#heading-changes)
315+
- For `.dnb-h4`, `.dnb-h5` and `.dnb-h6` see [v7 release notes](/uilib/about-the-lib/releases/dnb-ui-lib/v7-info#heading-changes)
316316

317317
Check out the [detailed migration guide](/uilib/about-the-lib/releases/dnb-ui-lib/v7-info#migration)
318318

packages/dnb-design-system-portal/src/docs/contribute/first-contribution/before-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Eufemia has a couple of common parts, so every component behaves consistently:
185185
- Automatic id generation and linking of HTML elements to enhance accessibility.
186186
- Handling of `aria-describedby` with `combineDescribedBy` etc.
187187

188-
How to add support for every one of these are explained in [Additional support - Getting started](/contribute/getting-started#additional-support).
188+
How to add support for each of these is explained in [Additional support - Getting started](/contribute/getting-started#additional-support).
189189

190190
### Component folder
191191

packages/dnb-design-system-portal/src/docs/uilib/components/anchor/events.mdx

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/dnb-design-system-portal/src/docs/uilib/components/autocomplete/Examples.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export const AutocompleteDynamicallyUpdatedData = () => (
123123
showIndicator,
124124
hideIndicator,
125125
updateData,
126+
showNoOptionsItem,
126127
debounce,
127128
/* ... */
128129
}) => {
@@ -133,11 +134,36 @@ export const AutocompleteDynamicallyUpdatedData = () => (
133134
({ value }) => {
134135
console.log('debounced value:', value)
135136

137+
const normalizedValue = value.trim().toLowerCase()
138+
139+
const filteredData = topMovies.filter(({ content }) => {
140+
if (typeof content === 'string') {
141+
return content.toLowerCase().includes(normalizedValue)
142+
}
143+
144+
if (Array.isArray(content)) {
145+
return content
146+
.filter((part) => typeof part === 'string')
147+
.join(' ')
148+
.toLowerCase()
149+
.includes(normalizedValue)
150+
}
151+
152+
return false
153+
})
154+
155+
const newData =
156+
normalizedValue.length > 0 ? filteredData : topMovies
157+
136158
// simulate server delay
137159
const timeout = setTimeout(() => {
138160
// update the drawerList
139-
updateData(topMovies)
161+
updateData(newData)
140162
hideIndicator()
163+
164+
if (newData.length === 0) {
165+
showNoOptionsItem()
166+
}
141167
}, 600)
142168

143169
// cancel invocation method

0 commit comments

Comments
 (0)