Skip to content

Commit

Permalink
release of v10.15.1 (#3071)
Browse files Browse the repository at this point in the history
  • Loading branch information
langz authored Dec 14, 2023
2 parents e40e17e + ce28f3e commit b3e59bc
Show file tree
Hide file tree
Showing 41 changed files with 1,402 additions and 160 deletions.
12 changes: 10 additions & 2 deletions packages/dnb-design-system-portal/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,20 @@ const plugins = [
filesGlobs: shouldUsePrebuild()
? [
'**/build/style/dnb-ui-core.min.css',
'**/build/style/themes/**/*-theme-*.min.css',
'**/build/style/themes/**/*-theme-{basis,components}.min.css',
'**/build/extensions/payment-card/**/dnb-*.min.css',
]
: [
'**/src/style/dnb-ui-core.scss',
'**/src/style/themes/**/*-theme-*.scss',
'**/src/style/themes/**/*-theme-{basis,components}.scss',
'**/src/extensions/payment-card/**/dnb-*.scss',
],
includeFiles: [
'**/dnb-ui-core.*',
'**/*-theme-components.*',
'**/*-theme-basis.*',
'**/payment-card/**/*',
],
// also load the extensions CSS package
defaultTheme,
wrapWithThemeProvider: false, // The portal uses its own wrapper: ThemeProvider
Expand Down
14 changes: 14 additions & 0 deletions packages/dnb-design-system-portal/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,20 @@ exports.onCreateWebpackConfig = ({
plugins: [
// Webpack 4 to 5 migration
plugins.provide({ process: 'process/browser' }),

// Algolia info
plugins.define({
'process.env.ALGOLIA_INDEX_NAME': JSON.stringify(
process.env.ALGOLIA_INDEX_NAME || 'dev_eufemia_docs',
),
'process.env.ALGOLIA_APP_ID': JSON.stringify(
process.env.ALGOLIA_APP_ID || 'SLD6KEYMQ9',
),
'process.env.ALGOLIA_SEARCH_KEY': JSON.stringify(
process.env.ALGOLIA_SEARCH_KEY ||
'6cf238b7456ffd9f7a400d8de37318a3',
),
}),
],
}

Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-design-system-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"gatsby-plugin-babel-react-live": "1.4.2",
"gatsby-plugin-catch-links": "5.12.0",
"gatsby-plugin-emotion": "8.12.0",
"gatsby-plugin-eufemia-theme-handler": "1.6.4",
"gatsby-plugin-eufemia-theme-handler": "1.7.0",
"gatsby-plugin-gatsby-cloud": "5.12.0",
"gatsby-plugin-manifest": "5.12.0",
"gatsby-plugin-mdx": "5.12.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ The only folders you should need to know about to add new features are:

### dnb-design-system-portal

The documentation in markdown is located at `src/docs` and the portal will automatically create pages and menu items based on that current structure.
The documentation in markdown (MDX) is located at `src/docs` and the portal will automatically create pages and menu items based on that current structure.

All you need to do to add a new page is to create a new markdown (`.md`) file within one of the folders. All documentation for components and elements are located at `src/docs/uilib`, which corresponds to the URL [eufemia.dnb.no/uilib](eufemia.dnb.no/uilib).
All you need to do to add a new page is to create a new markdown (`.mdx`) file within one of the folders. All documentation for components and elements are located at `src/docs/uilib`, which corresponds to the URL [eufemia.dnb.no/uilib](eufemia.dnb.no/uilib).

### Configuration files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ From a clone:
- Make a _Pull Request_ to `origin/main`.
- Watch the result of the tests.

## Run Algolia search queries locally
## Submit Algolia search queries locally

In order to commit Algolia search queries to the `dev_eufemia_docs` index, you have to:
In order to submit Algolia search queries to the `dev_eufemia_docs` index, you have to:

Create a `.env` file inside `dnb-design-system-portal` with valid:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

// Checkbox

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as React from 'react'
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Button } from '@dnb/eufemia/src'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

// Dropdown

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const ValueOn = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ tabs:
key: '/info'
- title: Demos
key: '/demos'
- title: Properties
key: '/properties'
breadcrumb:
- text: Forms
href: /uilib/extensions/forms/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'
import { Provider } from '@dnb/eufemia/src/shared'

export const Empty = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ComponentBox from '../../../../../../shared/tags/ComponentBox'
import { Field } from '@dnb/eufemia/src/extensions/forms'
import { FormError } from '@dnb/eufemia/src/extensions/forms/types'
import { Field, FormError } from '@dnb/eufemia/src/extensions/forms'

export const Empty = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ListBaseInputComponents() {
return (
<ListSummaryFromEdges
space={{ top: 'x-small' }}
level={4}
level={3}
description=""
edges={edges}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ListBaseSelectionComponents() {
return (
<ListSummaryFromEdges
space={{ top: 'x-small' }}
level={4}
level={3}
description=""
edges={edges}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ListBaseToggleComponents() {
return (
<ListSummaryFromEdges
space={{ top: 'x-small' }}
level={4}
level={3}
description=""
edges={edges}
/>
Expand Down
14 changes: 7 additions & 7 deletions packages/dnb-design-system-portal/src/shared/menu/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ import {
drawerClassStyle,
} from './SearchBar.module.scss'
import { scrollToAnimation } from '../parts/Layout'
import { getIndexName } from '../../uilib/search/searchHelpers'
import { applyPageFocus } from '@dnb/eufemia/src/shared/helpers'

const indexName = getIndexName()
const algoliaApplicationID = 'SLD6KEYMQ9'
const algoliaAPIKey = '6cf238b7456ffd9f7a400d8de37318a3'

export const SearchBarInput = () => {
const searchIndex = React.useRef(null)
const [status, setStatus] = React.useState(null)
Expand Down Expand Up @@ -63,8 +58,13 @@ export const SearchBarInput = () => {
}

const onFocusHandler = () => {
const searchClient = algoliasearch(algoliaApplicationID, algoliaAPIKey)
searchIndex.current = searchClient.initIndex(indexName)
const searchClient = algoliasearch(
process.env.ALGOLIA_APP_ID,
process.env.ALGOLIA_SEARCH_KEY,
)
searchIndex.current = searchClient.initIndex(
process.env.ALGOLIA_INDEX_NAME,
)
}

return (
Expand Down
14 changes: 7 additions & 7 deletions packages/dnb-eufemia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@
"color": "4.0.1",
"conventional-changelog-conventionalcommits": "5.0.0",
"cross-env": "7.0.3",
"css-loader": "6.7.3",
"cssnano": "5.0.10",
"css-loader": "6.8.1",
"cssnano": "6.0.1",
"current-git-branch": "1.1.0",
"del": "6.0.0",
"detect-port": "1.3.0",
Expand Down Expand Up @@ -241,9 +241,9 @@
"opentype.js": "1.3.4",
"ora": "5.4.1",
"packpath": "0.1.0",
"postcss": "8.4.31",
"postcss-calc": "8.0.0",
"postcss-preset-env": "6.7.0",
"postcss": "8.4.32",
"postcss-calc": "9.0.1",
"postcss-preset-env": "9.3.0",
"prettier": "3.0.3",
"prettier-package-json": "2.8.0",
"prettier-v2": "npm:prettier@^2",
Expand All @@ -257,8 +257,8 @@
"rollup": "3.11.0",
"rollup-plugin-node-globals": "1.4.0",
"rollup-plugin-terser": "7.0.2",
"sass": "1.57.1",
"sass-loader": "13.2.0",
"sass": "1.62.0",
"sass-loader": "13.3.2",
"semantic-release": "20.1.0",
"simple-git": "3.16.0",
"start-server-and-test": "2.0.1",
Expand Down
11 changes: 11 additions & 0 deletions packages/dnb-eufemia/scripts/postbuild/__tests__/postbuild.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,5 +489,16 @@ describe('style build', () => {
)
expect(content).toContain(`.dnb-button {`)
}

{
const content = fs.readFileSync(
path.resolve(
packpath.self(),
`build${stage}/style/themes/theme-ui/ui-theme-components.css`
),
'utf-8'
)
expect(content).not.toContain(`\\`)
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ button.dnb-button::-moz-focus-inner {
position: absolute;
inset: 0;
box-shadow: var(--drop-shadow, none);
border-radius: var(--rounded-corner, 0);
}
.dnb-section::after {
content: "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ button.dnb-button::-moz-focus-inner {
position: absolute;
inset: 0;
box-shadow: var(--drop-shadow, none);
border-radius: var(--rounded-corner, 0);
}
.dnb-section::after {
content: "";
Expand Down
25 changes: 14 additions & 11 deletions packages/dnb-eufemia/src/components/modal/__tests__/Modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,13 @@ describe('Modal component', () => {
</Modal>
)
fireEvent.click(document.querySelector('button'))
await wait(2)

// and check the class of that element
expect(document.activeElement.classList).toContain('dnb-dialog__inner')
await waitFor(() => {
expect(document.activeElement.classList).toContain(
'dnb-dialog__inner'
)
})

fireEvent.keyDown(document.querySelector('div.dnb-dialog'), {
key: 'Esc',
Expand Down Expand Up @@ -363,9 +366,9 @@ describe('Modal component', () => {
'dnb-modal__trigger'
)

await wait(1)

expect(document.activeElement).not.toHaveAttribute('data-autofocus')
await waitFor(() => {
expect(document.activeElement).not.toHaveAttribute('data-autofocus')
})
})

it('will warn if first heading is not h1', async () => {
Expand Down Expand Up @@ -656,15 +659,15 @@ describe('Modal component', () => {

fireEvent.click(document.querySelector('button#toggle'))

await wait(3)

expect(on_open).toBeCalledTimes(1)
await waitFor(() => {
expect(on_open).toBeCalledTimes(1)
})

fireEvent.click(document.querySelector('button#toggle'))

await wait(10)

expect(on_close).toBeCalledTimes(1)
await waitFor(() => {
expect(on_close).toBeCalledTimes(1)
})
})

it('will prevent closing the modal on prevent_close', async () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ exports[`Section scss has to match style dependencies css 1`] = `
position: absolute;
inset: 0;
box-shadow: var(--drop-shadow, none);
border-radius: var(--rounded-corner, 0);
}
.dnb-section::after {
content: "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
position: absolute;
inset: 0;
box-shadow: var(--drop-shadow, none);
border-radius: var(--rounded-corner, 0);
}

&::after {
Expand Down
Loading

0 comments on commit b3e59bc

Please sign in to comment.