diff --git a/.changeset/ninety-baboons-join.md b/.changeset/ninety-baboons-join.md
deleted file mode 100644
index 4b3a51f5739..00000000000
--- a/.changeset/ninety-baboons-join.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@talend/upgrade-deps': major
----
-Make upgrade-deps compatible with pnpm
-[Breaking Change]remove security option (has it's not used)
diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml
index 384865fe44e..5708a6312eb 100644
--- a/.github/workflows/changeset.yml
+++ b/.github/workflows/changeset.yml
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml
index 0b6e54b73bb..64f5aeffcc0 100644
--- a/.github/workflows/dependencies.yml
+++ b/.github/workflows/dependencies.yml
@@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Use Node.js
uses: ./.github/actions/setup-node
diff --git a/.github/workflows/design-system-component-testing.yml b/.github/workflows/design-system-component-testing.yml
index 7061b7b18c2..1139d31531c 100644
--- a/.github/workflows/design-system-component-testing.yml
+++ b/.github/workflows/design-system-component-testing.yml
@@ -22,7 +22,7 @@ jobs:
browser: ["chrome", "firefox"]
steps:
- name: Checkout repository
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Use Node.js
uses: ./.github/actions/setup-node
@@ -42,7 +42,7 @@ jobs:
pnpm --filter @talend/design-tokens run build:lib
- name: Cypress Component Testing
- uses: cypress-io/github-action@59810ebfa5a5ac6fcfdcfdf036d1cd4d083a88f2 #v6.5.0
+ uses: cypress-io/github-action@ebe8b24c4428922d0f793a5c4c96853a633180e3 #v6.6.0
with:
install: false
browser: ${{ matrix.browser }}
diff --git a/.github/workflows/icons.yml b/.github/workflows/icons.yml
index 04d6a4b7b2d..e76739fdfbf 100644
--- a/.github/workflows/icons.yml
+++ b/.github/workflows/icons.yml
@@ -19,7 +19,7 @@ jobs:
working-directory: ./packages/icons
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
with:
# Required when using a PAT for opening the PR
persist-credentials: false
diff --git a/.github/workflows/pr-demo.yml b/.github/workflows/pr-demo.yml
index 2b31647703b..5d08de2243d 100644
--- a/.github/workflows/pr-demo.yml
+++ b/.github/workflows/pr-demo.yml
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Use Node.js
uses: ./.github/actions/setup-node
diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml
index 8710bdf3737..c18a81180ff 100644
--- a/.github/workflows/pr-lint.yml
+++ b/.github/workflows/pr-lint.yml
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
diff --git a/.github/workflows/pr-playground.yml b/.github/workflows/pr-playground.yml
index 21d4d975526..e83703d6b29 100644
--- a/.github/workflows/pr-playground.yml
+++ b/.github/workflows/pr-playground.yml
@@ -24,7 +24,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Use Node.js
uses: ./.github/actions/setup-node
@@ -69,7 +69,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Use Node.js
uses: ./.github/actions/setup-node
diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml
index 7a5e44cd55a..2a2b1fe6b91 100644
--- a/.github/workflows/pr-test.yml
+++ b/.github/workflows/pr-test.yml
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Use Node.js
uses: ./.github/actions/setup-node
@@ -33,7 +33,7 @@ jobs:
run: pnpm run test --coverage --coverageReporters json-summary
- name: Jest Coverage Comment
- uses: MishaKav/jest-coverage-comment@41b5ca01d1250de84537448d248b8d18152cb277 #1.0.23
+ uses: MishaKav/jest-coverage-comment@f2e8b560403c4fd8234a2b268af3c28ca91e5cc7 #1.0.24
with:
multiple-files: |
assets-api, ./packages/assets-api/coverage/coverage-summary.json
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
index 67cb34df4dd..ff096eebcb9 100644
--- a/.github/workflows/security-scan.yml
+++ b/.github/workflows/security-scan.yml
@@ -13,7 +13,7 @@ jobs:
environment: main
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Scan
uses: ./.github/actions/sourceclear
env:
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
index d39b9aba049..3db50260f25 100644
--- a/.github/workflows/semgrep.yml
+++ b/.github/workflows/semgrep.yml
@@ -26,7 +26,7 @@ jobs:
if: (github.actor != 'dependabot[bot]')
steps:
- - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
# Run the "semgrep ci" command on the command line of the docker image.
- run: semgrep ci
env:
diff --git a/.github/workflows/tests-cron.yml b/.github/workflows/tests-cron.yml
index cfd51122f8b..0941816a3db 100644
--- a/.github/workflows/tests-cron.yml
+++ b/.github/workflows/tests-cron.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
- name: Use Node.js
uses: ./.github/actions/setup-node
diff --git a/.github/workflows/visual-testing.yml b/.github/workflows/visual-testing.yml
index 7f832ef95a6..88f5f037075 100644
--- a/.github/workflows/visual-testing.yml
+++ b/.github/workflows/visual-testing.yml
@@ -28,7 +28,7 @@ jobs:
environment: pull_request_unsafe
if: ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'need visual approval') )
steps:
- - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
with:
fetch-depth: 0
diff --git a/.github/workflows/yarn-deduplicate.yml b/.github/workflows/yarn-deduplicate.yml
index 590f16bcfe5..4c07d4ea56f 100644
--- a/.github/workflows/yarn-deduplicate.yml
+++ b/.github/workflows/yarn-deduplicate.yml
@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
diff --git a/fork/module-to-cdn/README.md b/fork/module-to-cdn/README.md
index 617044f8732..32d5e511d17 100644
--- a/fork/module-to-cdn/README.md
+++ b/fork/module-to-cdn/README.md
@@ -1,30 +1,14 @@
# @talend/module-to-cdn
-[![Build Status](https://travis-ci.org/toutpt/module-to-cdn.svg?branch=jmfrancois/chore/fork)](https://travis-ci.org/toutpt/module-to-cdn)
-[![NPM][npm-icon] ][npm-url]
-[![dependencies][dependencies-image] ][dependencies-url]
-[![devdependencies][devdependencies-image] ][devdependencies-url]
-
-[npm-icon]: https://img.shields.io/npm/v/@talend/module-to-cdn.svg
-[npm-url]: https://npmjs.org/package/@talend/module-to-cdn
-[travis-ci-image]: https://travis-ci.org/toutpt/module-to-cdn.svg?branch=jmfrancois/chore/fork
-[travis-ci-url]: https://travis-ci.org/toutpt/module-to-cdn
-[dependencies-image]: https://david-dm.org/toutpt/module-to-cdn/status.svg
-[dependencies-url]: https://david-dm.org/toutpt/module-to-cdn
-[devdependencies-image]: https://david-dm.org/toutpt/module-to-cdn/dev-status.svg
-[devdependencies-url]: https://david-dm.org/toutpt/module-to-cdn?type=dev
-
-
> Get cdn config from npm module name
## Fork
This module is fork of module-to-cdn from [Thomas Sileghem](http://mastilver.com).
-Because unpkg is great for free usage [but not for production usage](https://kentcdodds.com/blog/unpkg-an-open-source-cdn-for-npm) we decided to made some changes to go forward.
-
-After the following [big PR]() on the repository and an email to the author we have got no news from the author as all other PRs. So we decided to fork.
+Because unpkg is great for free usage [but not for production usage](https://kentcdodds.com/blog/unpkg-an-open-source-cdn-for-npm) we decided to made some changes to going forward.
+After big PR on the repository and an email to the author we have got no news as all other PRs. So we decided to fork.
## Install
@@ -32,7 +16,6 @@ After the following [big PR]() on the repository and an email to the author we
$ npm install --save @talend/module-to-cdn
```
-
## Usage
```js
@@ -50,6 +33,7 @@ moduleToCdn('react', '15.3.0');
*/
```
+Note if the package comes with css you will have them under `styleUrl` and `stylePath` properties
## API
@@ -79,12 +63,12 @@ Default: `development`
### Result
-* `name`: name of the module
-* `var`: name of the global variable exposing the module
-* `url`: url where the module is available
-* `version`: the version asked for
-* `path`: relative path of the umd file in the distributed package
-* `local`: absolute path on the current system to the file
+- `name`: name of the module
+- `var`: name of the global variable exposing the module
+- `url`: url where the module is available
+- `version`: the version asked for
+- `path`: relative path of the umd file in the distributed package
+- `local`: absolute path on the current system to the file
## Configuration of the resolver
@@ -118,9 +102,9 @@ moduleToCdn.add({
'@talend/my-private-module': {
var: 'TalendMyPrivateModule',
versions: {
- '>= 0.0.0' : {
- 'development': '/dist/build.js',
- 'production': '/dist/build.min.js',
+ '>= 0.0.0': {
+ development: '/dist/build.js',
+ production: '/dist/build.min.js'
}
}
}
@@ -141,17 +125,45 @@ LIMIT=";ag-grid;ag-grid-community;ag-grid-enterprise;" ava -v
## Excluded modules
+- hoist-non-react-statics: the umd build contains JS errors (process.env.NODE and require) on every versions.
+
+## style-versions
-* hoist-non-react-statics: the umd build contains JS errors (process.env.NODE and require) on every versions.
+For the sake of simplicity, range must match between js and styles.
+Here is the line in the code that read it:
+
+```javascript
+const styleConfig = moduleConf['style-versions'] && moduleConf['style-versions'][range];
+```
+
+So take it as a constraint, for example:
+
+```json
+ "@talend/design-tokens": {
+ "var": "TalendDesignTokens",
+ "versions": {
+ "> 2.6.0": {
+ "development": "/dist/TalendDesignTokens.js",
+ "production": "/dist/TalendDesignTokens.min.js"
+ }
+ },
+ "style-versions": {
+ "> 2.6.0": {
+ "development": "/dist/TalendDesignTokens.css",
+ "production": "/dist/TalendDesignTokens.min.css"
+ }
+ }
+ }
+```
## Contribute
To add your modules you have to
-* checkout this package on github
-* install and run the tests (it will load the cache for the tests)
-* add your module in the module.json file
-* ensure everytime the provided umd path exists and is valid.
+- checkout this package on github
+- install and run the tests (it will load the cache for the tests)
+- add your module in the module.json file
+- ensure everytime the provided umd path exists and is valid.
Example of not valid umd: https://unpkg.com/browse/react-popper@1.3.7/dist/index.umd.js
createContext,deepEqual dependencies are always null.
diff --git a/fork/module-to-cdn/jsonschema.json b/fork/module-to-cdn/jsonschema.json
new file mode 100644
index 00000000000..9fe15150035
--- /dev/null
+++ b/fork/module-to-cdn/jsonschema.json
@@ -0,0 +1,34 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://github.com/Talend/ui/modules.schema.json",
+ "title": "cdn modules schema",
+ "description": "Help you edit the file in vscode",
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "object",
+
+ "properties": {
+ "var": {
+ "type": "string"
+ },
+ "versions": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "object",
+ "properties": {
+ "development": {
+ "type": "string"
+ },
+ "production": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/packages/dataviz/cypress.config.ts b/packages/dataviz/cypress.config.js
similarity index 77%
rename from packages/dataviz/cypress.config.ts
rename to packages/dataviz/cypress.config.js
index 4ea4a9840cb..66e194d133d 100644
--- a/packages/dataviz/cypress.config.ts
+++ b/packages/dataviz/cypress.config.js
@@ -1,11 +1,11 @@
/* eslint-disable import/no-extraneous-dependencies */
-import { defineConfig } from 'cypress';
-import path from 'path';
+const { defineConfig } = require('cypress');
+const path = require('path');
-import {
+const {
getWebpackRules,
getWebpackPlugins,
-} from '@talend/scripts-config-react-webpack/config/webpack.config.common';
+} = require('@talend/scripts-config-react-webpack/config/webpack.config.common');
const webpack = require('webpack');
const srcDirectories = [
@@ -34,7 +34,7 @@ const webpackConfig = {
},
},
module: {
- rules: getWebpackRules(srcDirectories, true, true),
+ rules: getWebpackRules([path.resolve(process.cwd(), './src/')], true, true),
},
plugins: getWebpackPlugins().concat([
new webpack.ProvidePlugin({
@@ -43,7 +43,7 @@ const webpackConfig = {
]),
};
-export default defineConfig({
+module.exports = defineConfig({
viewportWidth: 400,
viewportHeight: 400,
video: false,
diff --git a/packages/dataviz/cypress.d.ts b/packages/dataviz/cypress.d.ts
deleted file mode 100644
index c6bd409bf2a..00000000000
--- a/packages/dataviz/cypress.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-declare global {
- namespace Cypress {
- interface Chainable {
- mount: typeof mount;
- }
- }
-}
-
-declare module '@talend/scripts-config-react-webpack/config/webpack.config.common';
diff --git a/packages/dataviz/cypress/support/commands.ts b/packages/dataviz/cypress/support/commands.ts
index 21e9cbfdc88..df3bce713e8 100644
--- a/packages/dataviz/cypress/support/commands.ts
+++ b/packages/dataviz/cypress/support/commands.ts
@@ -1,19 +1,9 @@
/* eslint-disable import/no-extraneous-dependencies */
///
-
+import '@testing-library/cypress/add-commands';
import { mount } from 'cypress/react';
-declare global {
- // eslint-disable-next-line @typescript-eslint/no-namespace
- namespace Cypress {
- interface Chainable {
- mount: typeof mount;
- }
- }
-}
Cypress.Commands.add('mount', (component, options) => {
const wrapper = component;
return mount(wrapper, options);
});
-
-import '@testing-library/cypress/add-commands';
diff --git a/packages/dataviz/package.json b/packages/dataviz/package.json
index 7b9a3c9da6b..45523635968 100644
--- a/packages/dataviz/package.json
+++ b/packages/dataviz/package.json
@@ -74,7 +74,7 @@
"@types/react": "^18.2.38",
"@types/topojson-client": "^3.1.4",
"@types/topojson-specification": "^1.0.5",
- "cypress": "^12.17.4",
+ "cypress": "^13.6.0",
"cross-env": "^7.0.3",
"i18next": "^23.7.6",
"react": "^18.2.0",
diff --git a/packages/dataviz/src/components/BarChart/HorizontalBarChart/HorizontalBarChart.cy.tsx b/packages/dataviz/src/components/BarChart/HorizontalBarChart/HorizontalBarChart.cy.tsx
index 91aaaacc74c..4c6fe09f4e7 100644
--- a/packages/dataviz/src/components/BarChart/HorizontalBarChart/HorizontalBarChart.cy.tsx
+++ b/packages/dataviz/src/components/BarChart/HorizontalBarChart/HorizontalBarChart.cy.tsx
@@ -1,8 +1,8 @@
/* eslint-disable testing-library/await-async-queries */
-/* eslint-disable testing-library/prefer-screen-queries */
-import HorizontalBarChart from './HorizontalBarChart.component';
+/* eslint-disable testing-library/prefer-screen-queries */
import { ChartStyle } from '../../../types';
+import HorizontalBarChart from './HorizontalBarChart.component';
context('', () => {
it('Should trigger onBarClick', () => {
@@ -51,7 +51,7 @@ context('', () => {
height={300}
width={400}
onBarClick={onBarClick}
- getTooltipContent={() =>
tooltip
}
+ getTooltipContent={() => tooltip
}
/>,
);
@@ -60,7 +60,7 @@ context('', () => {
.first()
.trigger('mousemove')
.trigger('click', { force: true });
- cy.get('[data-test="myTooltipContent"]').should('be.visible');
+ cy.get('[data-test="tooltip"]').should('be.visible');
});
it('Should not grow to available size if not enough data provided', () => {
const onBarClick = cy.stub().as('onBarClick');
diff --git a/packages/design-system/CHANGELOG.md b/packages/design-system/CHANGELOG.md
index eba73ba1755..59b56ddf022 100644
--- a/packages/design-system/CHANGELOG.md
+++ b/packages/design-system/CHANGELOG.md
@@ -1,5 +1,25 @@
# @talend/design-system
+## 8.5.0
+
+### Minor Changes
+
+- 0e6c82e25: feat: rework some part of Message component
+
+ - The size of a message fit the container width while before, it has a max width of `28rem`
+ - add a new prop `titleInfo` that allow to display an information message aside the title
+ - add new prop `additionalIconAction` to allow to display an additional button icon instead (there was only the dropdown action available before)
+ - rename prop `additionalActions` to `additionalDropdownActions` to make the API more explicit
+ - remove the shadow on the message to make it more consistent with the rest of the design and integrate better in the page
+
+- ea026ec12: Error state for tabs
+
+## 8.4.1
+
+### Patch Changes
+
+- 88a17d7e7: fix: theme provider override is not working as expected
+
## 8.4.0
### Minor Changes
diff --git a/packages/design-system/cypress.config.ts b/packages/design-system/cypress.config.js
similarity index 78%
rename from packages/design-system/cypress.config.ts
rename to packages/design-system/cypress.config.js
index 69702a31a33..52a35972d42 100644
--- a/packages/design-system/cypress.config.ts
+++ b/packages/design-system/cypress.config.js
@@ -1,10 +1,11 @@
-import { defineConfig } from 'cypress';
-import path from 'path';
+const { defineConfig } = require('cypress');
-import {
+const path = require('path');
+
+const {
getWebpackRules,
getWebpackPlugins,
-} from '@talend/scripts-config-react-webpack/config/webpack.config.common';
+} = require('@talend/scripts-config-react-webpack/config/webpack.config.common');
const webpackConfig = {
mode: 'development',
@@ -33,7 +34,7 @@ const webpackConfig = {
plugins: getWebpackPlugins(),
};
-export default defineConfig({
+module.exports = defineConfig({
component: {
devServer: {
framework: 'react',
diff --git a/packages/design-system/package.json b/packages/design-system/package.json
index 68e134993ad..4d2ee479072 100644
--- a/packages/design-system/package.json
+++ b/packages/design-system/package.json
@@ -1,6 +1,6 @@
{
"name": "@talend/design-system",
- "version": "8.4.0",
+ "version": "8.5.0",
"description": "Talend Design System",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -69,7 +69,7 @@
"@talend/locales-design-system": "^7.15.1",
"@talend/scripts-core": "^16.3.0",
"@talend/scripts-config-babel": "^13.2.0",
- "@talend/scripts-config-react-webpack": "^16.3.1",
+ "@talend/scripts-config-react-webpack": "^16.3.2",
"@talend/scripts-config-storybook-lib": "^5.2.0",
"@talend/scripts-config-typescript": "^11.2.0",
"@talend/storybook-docs": "^2.2.0",
@@ -85,7 +85,7 @@
"browser-sync-webpack-plugin": "^2.3.0",
"concurrently": "^7.6.0",
"core-js": "^3.33.3",
- "cypress": "^12.17.4",
+ "cypress": "^13.6.0",
"focus-outline-manager": "^1.0.2",
"i18next": "^23.7.6",
"i18next-scanner": "^4.4.0",
diff --git a/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx b/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx
index 68802033632..6e782e9e336 100644
--- a/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx
+++ b/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx
@@ -1,40 +1,56 @@
import { forwardRef, HTMLAttributes, ReactNode, Ref } from 'react';
+import type { ReactElement } from 'react';
import { useTranslation } from 'react-i18next';
+import classnames from 'classnames';
+
+import tokens from '@talend/design-tokens';
// eslint-disable-next-line @talend/import-depth
import { IconNameWithSize } from '@talend/icons/dist/typeUtils';
-import tokens from '@talend/design-tokens';
-import classnames from 'classnames';
-import { SizedIcon } from '../../Icon';
-import Link, { LinkProps } from '../../Link/Link';
-import { StackHorizontal, StackVertical } from '../../Stack';
-import { ButtonTertiaryPropsType } from '../../Button/variations/ButtonTertiary';
import { ButtonTertiary } from '../../Button';
-import { Dropdown, DropdownPropsType } from '../../Dropdown';
+import { ButtonTertiaryPropsType } from '../../Button/variations/ButtonTertiary';
import { ButtonIcon } from '../../ButtonIcon';
+import type { ButtonIconType } from '../../ButtonIcon/variations/ButtonIcon';
import { I18N_DOMAIN_DESIGN_SYSTEM } from '../../constants';
+import { Dropdown, DropdownPropsType } from '../../Dropdown';
+import { SizedIcon } from '../../Icon';
+import Link, { LinkProps } from '../../Link/Link';
+import { StackHorizontal, StackVertical } from '../../Stack';
import styles from './MessageStyles.module.scss';
+type SharedMessageWithActionsPropsType = {
+ additionalIconAction?: ButtonIconType<'XS'>;
+ additionalDropdownActions?: never;
+};
+
+type SharedMessageWithActionPropsType = {
+ additionalIconAction?: never;
+ additionalDropdownActions?: Omit;
+};
+
export type SharedMessageCollectionProps = Omit<
HTMLAttributes,
'style' | 'children' | 'className'
> & {
action: ButtonTertiaryPropsType<'S'>;
- additionalActions?: Omit;
- description: string;
+ additionalIconAction?: ButtonIconType<'XS'>;
+ additionalDropdownActions?: Omit;
+ description: string | ReactElement | string[] | ReactElement[];
title: string;
-};
+} & (SharedMessageWithActionPropsType | SharedMessageWithActionsPropsType);
export type SharedMessageProps = Omit, 'style' | 'className'> & {
action?: ButtonTertiaryPropsType<'S'>;
- additionalActions?: Omit;
+ additionalIconAction?: ButtonIconType<'XS'>;
+ additionalDropdownActions?: Omit;
children?: ReactNode | ReactNode[];
- description: string;
+ description: string | ReactElement | string[] | ReactElement[];
link?: LinkProps;
title?: string;
-};
+ titleInfo?: string;
+} & (SharedMessageWithActionPropsType | SharedMessageWithActionsPropsType);
export type BaseMessageProps = Omit &
SharedMessageProps & {
@@ -48,11 +64,13 @@ export const MessagePrimitive = forwardRef(
borderClassname,
description,
title,
+ titleInfo,
link,
icon,
children,
action,
- additionalActions,
+ additionalIconAction,
+ additionalDropdownActions,
...props
}: BaseMessageProps,
ref: Ref,
@@ -68,23 +86,25 @@ export const MessagePrimitive = forwardRef(
ref={ref}
>
- {title && (
+ {title || titleInfo ? (
-
+
{icon && (
)}
{title}
+ {titleInfo ? {titleInfo}
: null}
- )}
+ ) : null}
{description}
{link && }
{children}
{action && }
- {additionalActions && (
-
+ {additionalIconAction && }
+ {additionalDropdownActions && (
+
{}}>
{t('ADDITIONAL_ACTIONS', 'Additional actions')}
diff --git a/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss b/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss
index b8cc9808f56..69f4694ae20 100644
--- a/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss
+++ b/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss
@@ -3,10 +3,9 @@
.message {
display: flex;
border-radius: tokens.$coral-radius-s;
- box-shadow: tokens.$coral-elevation-shadow-neutral-m;
+ border: tokens.$coral-border-s-solid tokens.$coral-color-neutral-border-weak;
background-color: tokens.$coral-color-neutral-background;
height: 100%;
- width: 28rem;
border-top-left-radius: tokens.$coral-radius-s;
border-bottom-left-radius: tokens.$coral-radius-s;
@@ -14,6 +13,14 @@
&__title {
font: tokens.$coral-heading-m;
+ width: 100%;
+
+ &__info {
+ font: tokens.$coral-paragraph-s;
+ color: tokens.$coral-color-neutral-text-weak;
+ white-space: nowrap;
+ margin-left: auto;
+ }
}
&__description {
diff --git a/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap b/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap
index 37779e46381..9628b326ead 100644
--- a/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap
+++ b/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap
@@ -14,7 +14,7 @@ exports[`Message should render a11y html 1`] = `
class="theme-message__title"
>
All good
@@ -80,7 +80,7 @@ exports[`Message should render a11y html 1`] = `
class="theme-message__title"
>
Something went wrong
@@ -146,7 +146,7 @@ exports[`Message should render a11y html 1`] = `
class="theme-message__title"
>
Type incompatibilities
@@ -212,7 +212,7 @@ exports[`Message should render a11y html 1`] = `
class="theme-message__title"
>
Auto mapping
diff --git a/packages/design-system/src/components/Tabs/Primitive/TabStyles.module.scss b/packages/design-system/src/components/Tabs/Primitive/TabStyles.module.scss
index d0224816457..76737107486 100644
--- a/packages/design-system/src/components/Tabs/Primitive/TabStyles.module.scss
+++ b/packages/design-system/src/components/Tabs/Primitive/TabStyles.module.scss
@@ -102,4 +102,24 @@
margin-right: tokens.$coral-spacing-s;
}
}
+
+ &_error {
+ color: tokens.$coral-color-danger-text;
+
+ &[aria-selected='true'] {
+ color: tokens.$coral-color-danger-text;
+ }
+ }
+
+ &_error::after {
+ content: '';
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ border-top: tokens.$coral-border-m-solid tokens.$coral-color-danger-text;
+ opacity: 0;
+ transition: tokens.$coral-transition-fast;
+ transform: translateY(100%);
+ }
}
diff --git a/packages/design-system/src/components/Tabs/Primitive/Tabs.tsx b/packages/design-system/src/components/Tabs/Primitive/Tabs.tsx
index 2efcab63ffe..afb41f25541 100644
--- a/packages/design-system/src/components/Tabs/Primitive/Tabs.tsx
+++ b/packages/design-system/src/components/Tabs/Primitive/Tabs.tsx
@@ -1,12 +1,16 @@
import { useContext } from 'react';
+
+import classNames from 'classnames';
+
+import { IconNameWithSize } from '@talend/icons';
+
import { SizedIcon } from '../../Icon';
-import { TagDefault } from '../../Tag';
import { StackHorizontal } from '../../Stack';
-import { TabsInternalContext } from './TabsProvider';
+import { TagDefault } from '../../Tag';
import { Tooltip } from '../../Tooltip';
+import { TabsInternalContext } from './TabsProvider';
+
import style from './TabStyles.module.scss';
-import { IconNameWithSize } from '@talend/icons';
-import classNames from 'classnames';
export type TabsPropTypes = {
children: React.ReactNode[];
@@ -28,6 +32,7 @@ export type TabPropTypes = {
icon?: IconNameWithSize<'S'>;
tag?: string | number;
tooltip?: string;
+ error?: boolean;
};
export function Tab(props: TabPropTypes) {
@@ -36,7 +41,10 @@ export function Tab(props: TabPropTypes) {