From 395ab60fe2ac45f59eed9b54f1fa2c326173a548 Mon Sep 17 00:00:00 2001 From: Alex Boungnaseng Date: Wed, 13 Nov 2024 14:58:53 +0100 Subject: [PATCH 1/5] feat(manager-react-components): udpate ods version 18.3.0 ref: MANAGER-14622 Signed-off-by: Alex Boungnaseng --- .../manager-react-components/package.json | 6 +- .../src/docs/introduction.mdx | 37 +++++++--- .../src/docs/whatsnew/changelog.stories.mdx | 13 ++++ yarn.lock | 71 +++++++++---------- 4 files changed, 76 insertions(+), 51 deletions(-) diff --git a/packages/manager-react-components/package.json b/packages/manager-react-components/package.json index fdb127b1438a..14e78374bc58 100644 --- a/packages/manager-react-components/package.json +++ b/packages/manager-react-components/package.json @@ -1,6 +1,6 @@ { "name": "@ovh-ux/manager-react-components", - "version": "2.1.0", + "version": "2.2.0", "license": "BSD-3-Clause", "author": "OVH SAS", "types": "dist/types/src/lib.d.ts", @@ -36,8 +36,8 @@ }, "dependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@ovhcloud/ods-components": "18.0.0", - "@ovhcloud/ods-themes": "18.0.0", + "@ovhcloud/ods-components": "18.3.0", + "@ovhcloud/ods-themes": "18.3.0", "@tanstack/react-query": "^5.51.21", "@tanstack/react-table": "^8.20.1", "clsx": "^2.1.1", diff --git a/packages/manager-react-components/src/docs/introduction.mdx b/packages/manager-react-components/src/docs/introduction.mdx index 80df37ec267b..9980f0f42b4a 100644 --- a/packages/manager-react-components/src/docs/introduction.mdx +++ b/packages/manager-react-components/src/docs/introduction.mdx @@ -1,18 +1,35 @@ import { Meta } from '@storybook/addon-docs/blocks'; import { Links, LinkType } from './../index.ts'; +import { version, dependencies } from './../../package.json'; # Welcome to the Manager Component Storybook! - +
+ +
+
-welcome +
+ +
+
+ +
+
+ welcome +
diff --git a/packages/manager-react-components/src/docs/whatsnew/changelog.stories.mdx b/packages/manager-react-components/src/docs/whatsnew/changelog.stories.mdx index 4234a24cabb1..d2552454438e 100644 --- a/packages/manager-react-components/src/docs/whatsnew/changelog.stories.mdx +++ b/packages/manager-react-components/src/docs/whatsnew/changelog.stories.mdx @@ -6,6 +6,19 @@ import { Meta } from '@storybook/addon-docs/blocks'; ## Release Notes +> ### Version 2.2.0 +> +> > #### What's news ? +> > +> > - **Bump Ods version 18.3.0** + +> ### Version 2.1.0 +> +> > #### Bugfixes +> > +> > - Fix units tests +> > - Update vite config, to build the library + > ### Version 2.0.0 > > > #### What's news ? diff --git a/yarn.lock b/yarn.lock index f87399828f27..d42cafcc4ffd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3198,7 +3198,22 @@ dependencies: "@floating-ui/utils" "^0.2.5" -"@floating-ui/dom@1.6.3", "@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.6.1": +"@floating-ui/core@^1.6.0": + version "1.6.8" + resolved "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz#aa43561be075815879305965020f492cdb43da12" + integrity sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA== + dependencies: + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/dom@1.6.11": + version "1.6.11" + resolved "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz#8631857838d34ee5712339eb7cbdfb8ad34da723" + integrity sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ== + dependencies: + "@floating-ui/core" "^1.6.0" + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.6.1": version "1.6.3" resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.3.tgz#954e46c1dd3ad48e49db9ada7218b0985cee75ef" integrity sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw== @@ -3223,6 +3238,11 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.5.tgz#105c37d9d9620ce69b7f692a20c821bf1ad2cbf9" integrity sha512-sTcG+QZ6fdEUObICavU+aB3Mp8HY4n14wYHdxK4fXjPmv3PXZZeY5RaguJmGyeH/CJQhX3fqKUtS4qc1LoHwhQ== +"@floating-ui/utils@^0.2.8": + version "0.2.8" + resolved "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62" + integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig== + "@fortawesome/fontawesome-free@^5.11.2": version "5.15.4" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5" @@ -5343,12 +5363,12 @@ "@ovhcloud/ods-common-stencil" "17.2.2" "@ovhcloud/ods-common-theming" "17.2.2" -"@ovhcloud/ods-components@18.0.0": - version "18.0.0" - resolved "https://registry.npmjs.org/@ovhcloud/ods-components/-/ods-components-18.0.0.tgz#b0e4da6c35c19004f35bac6b34abb1f78c6d1af0" - integrity sha512-Nhgi8iMX/+tWJb6D8WSN8qNqC32XEwdDL0rc7o9V0OwcXPwSqu7QtTYKB+1s1kGTDxfyl7HGrSDYbqgUI0niMw== +"@ovhcloud/ods-components@18.3.0": + version "18.3.0" + resolved "https://registry.npmjs.org/@ovhcloud/ods-components/-/ods-components-18.3.0.tgz#f5fa856bb45ad7df3ebe421d64ab334f41c7206c" + integrity sha512-E2bDV7RDnNty8fR7Fbvkxug2pySmsy4BQIt9rY0VTZWtcbaUlazmKbr+l+TjeL7vRxiPR4+9xLidI1kwt26O9A== dependencies: - "@floating-ui/dom" "1.6.3" + "@floating-ui/dom" "1.6.11" "@stencil/core" "4.16.0" google-libphonenumber "3.2.35" tom-select "2.3.1" @@ -5369,10 +5389,10 @@ dependencies: "@ovhcloud/ods-common-theming" "17.2.2" -"@ovhcloud/ods-themes@18.0.0": - version "18.0.0" - resolved "https://registry.npmjs.org/@ovhcloud/ods-themes/-/ods-themes-18.0.0.tgz#0a7c658e0e9d572262ed41896fee4819c2764167" - integrity sha512-0PfXUyF6bX9emb/a6S16QThKsSXyvrNYT3n1zQF/le8tMXP7292TGKIgqXhsZmkcD9tCdD6VLXuJTS8Zv3a5Yg== +"@ovhcloud/ods-themes@18.3.0": + version "18.3.0" + resolved "https://registry.npmjs.org/@ovhcloud/ods-themes/-/ods-themes-18.3.0.tgz#804e3502e6791f7ec2efc24abb107d27cd4e02e0" + integrity sha512-mTxtcM4tCUPk98x65PeslXqGONJraTryXgkbgbZuvtOYf9SgVl+zFJfyisD2sYGuJvVf6hJP1NvJkyrxOUqtSw== "@ovhcloud/reket-axios-client@^0.2.1": version "0.2.1" @@ -26619,16 +26639,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -26742,14 +26753,7 @@ stringify-entities@^3.0.0: character-entities-legacy "^1.0.0" xtend "^4.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -29590,7 +29594,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -29616,15 +29620,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From b419872b2f58ef18f8ffb78cc0f5db3218142a3f Mon Sep 17 00:00:00 2001 From: Alex Boungnaseng Date: Wed, 13 Nov 2024 15:20:50 +0100 Subject: [PATCH 2/5] fix(docs): fix prebuild documentation ref: MANAGER-14622 Signed-off-by: Alex Boungnaseng --- docs/.vitepress/.nojekyll | 0 docs/cli/prebuild.js | 4 ++-- docs/package.json | 2 +- packages/manager-react-components/.storybook/main.ts | 3 ++- .../manager-react-components/.storybook/ovh.theme.ts | 12 ++++++------ 5 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 docs/.vitepress/.nojekyll diff --git a/docs/.vitepress/.nojekyll b/docs/.vitepress/.nojekyll new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/docs/cli/prebuild.js b/docs/cli/prebuild.js index 2e8d61292122..a4a0fa6dd9f6 100644 --- a/docs/cli/prebuild.js +++ b/docs/cli/prebuild.js @@ -4,7 +4,7 @@ const path = require('path'); const pick = require('lodash/pick'); // Get all workspaces defined in the `package.json` file. -const { workspaces } = require('./../../package.json'); +const { workspaces } = require('../../package.json'); // Keep the bare minimum entries from all package.json files. const entries = ['name', 'version', 'description', 'repository']; @@ -19,7 +19,7 @@ const packages = getMonorepoPackages(directoryPath).map( ); // Group packages by their corresponding workspaces. -const groupedWorkspaces = workspaces.map((workspace) => { +const groupedWorkspaces = workspaces.packages.map((workspace) => { const packagesList = packages.filter((pkg) => { // Remove the pattern `/*` from the workspace name. if ( diff --git a/docs/package.json b/docs/package.json index ddbd4a36fd0b..72c6bb33774c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,7 +6,7 @@ "scripts": { "docs:build": "yarn docs:build:manager-react-components && node cli/prebuild.js && vitepress build --base /manager/", "docs:build:manager-react-components": "cd ../packages/manager-react-components && yarn build:storybook && rm -rf ../../docs/docs/public/storybook-static && mkdir -p ../../docs/docs/public/storybook-static && cp -r ./storybook-static/* ../../docs/docs/public/storybook-static", - "docs:deploy": "yarn run docs:build && gh-pages -d .vitepress/dist -m \"docs: update documentation [skip ci]\"", + "docs:deploy": "yarn run docs:build && touch .vitepress/dist/storybook-static/.nojekyll && touch .vitepress/dist/.nojekyll && gh-pages -d .vitepress/dist --dotfiles -m \"docs: update documentation [skip ci]\"", "docs:dev": "node cli/prebuild.js && vitepress dev", "docs:preview": "vitepress preview" }, diff --git a/packages/manager-react-components/.storybook/main.ts b/packages/manager-react-components/.storybook/main.ts index 7ed4ee9e4a04..aa9258722f86 100644 --- a/packages/manager-react-components/.storybook/main.ts +++ b/packages/manager-react-components/.storybook/main.ts @@ -1,4 +1,5 @@ import { StorybookConfig } from '@storybook/react-vite'; + const config: StorybookConfig = { stories: [ '../src/**/*.stories.@(js|jsx|ts|tsx|mdx)', @@ -10,7 +11,7 @@ const config: StorybookConfig = { '@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-styling', - '@storybook/addon-doc', + '@storybook/addon-docs', ], framework: { name: '@storybook/react-vite', diff --git a/packages/manager-react-components/.storybook/ovh.theme.ts b/packages/manager-react-components/.storybook/ovh.theme.ts index aae8c9aaebf5..60dd2f036147 100644 --- a/packages/manager-react-components/.storybook/ovh.theme.ts +++ b/packages/manager-react-components/.storybook/ovh.theme.ts @@ -4,11 +4,11 @@ export default create({ base: 'light', // Brand - colorPrimary: '#004FD6', - colorSecondary: '#004FD6', + // colorPrimary: '#004FD6', + // colorSecondary: '#004FD6', // UI - appBg: '#FF3358', + // appBg: '#FF3358', appBorderColor: '#004FD6', appBorderRadius: 0, appContentBg: '#ffffff', @@ -23,9 +23,9 @@ export default create({ textInverseColor: 'rgba(255,255,255,0.9)', // Toolbar default and active colors - barBg: '#f3fcff', - barSelectedColor: '#004FD6', - barTextColor: '#202124', + // barBg: '#f3fcff', + // barSelectedColor: '#004FD6', + // barTextColor: '#202124', // Form colors inputBg: '#ffffff', From be434c4f3f60b37adf64f90fdce0e827fe61d885 Mon Sep 17 00:00:00 2001 From: Alex Boungnaseng Date: Thu, 14 Nov 2024 09:45:23 +0100 Subject: [PATCH 3/5] feat(manager-react-components): move ods to peerDependencies ref: MANAGER-14622 Signed-off-by: Alex Boungnaseng --- .../manager-react-components/package.json | 7 +- yarn.lock | 73 ++++++++++--------- 2 files changed, 43 insertions(+), 37 deletions(-) diff --git a/packages/manager-react-components/package.json b/packages/manager-react-components/package.json index 14e78374bc58..2a3156435474 100644 --- a/packages/manager-react-components/package.json +++ b/packages/manager-react-components/package.json @@ -36,8 +36,6 @@ }, "dependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@ovhcloud/ods-components": "18.3.0", - "@ovhcloud/ods-themes": "18.3.0", "@tanstack/react-query": "^5.51.21", "@tanstack/react-table": "^8.20.1", "clsx": "^2.1.1", @@ -52,11 +50,12 @@ "devDependencies": { "@babel/core": "7.22.10", "@mdx-js/react": "^3.0.1", + "@ovhcloud/ods-components": "^18.3.0", + "@ovhcloud/ods-themes": "^18.3.0", "@ovh-ux/manager-core-api": "^0.9.0", "@ovh-ux/manager-react-shell-client": "^0.8.1", "@ovh-ux/manager-tailwind-config": "^0.2.0", "@ovh-ux/manager-vite-config": "^0.8.1", - "@storybook/addon-a11y": "8.0.4", "@storybook/addon-docs": "^7.5.3", "@storybook/addon-essentials": "7.5.3", "@storybook/addon-interactions": "7.5.3", @@ -115,6 +114,8 @@ "zustand": "^4.5.5" }, "peerDependencies": { + "@ovhcloud/ods-components": "^18.3.0", + "@ovhcloud/ods-themes": "^18.3.0", "@ovh-ux/manager-core-api": "^0.9.0-alpha.0", "@ovh-ux/manager-react-shell-client": "^0.8.0-alpha.3", "i18next": "^23.8.2", diff --git a/yarn.lock b/yarn.lock index d42cafcc4ffd..6c8acc53c7b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3198,22 +3198,7 @@ dependencies: "@floating-ui/utils" "^0.2.5" -"@floating-ui/core@^1.6.0": - version "1.6.8" - resolved "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz#aa43561be075815879305965020f492cdb43da12" - integrity sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA== - dependencies: - "@floating-ui/utils" "^0.2.8" - -"@floating-ui/dom@1.6.11": - version "1.6.11" - resolved "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz#8631857838d34ee5712339eb7cbdfb8ad34da723" - integrity sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ== - dependencies: - "@floating-ui/core" "^1.6.0" - "@floating-ui/utils" "^0.2.8" - -"@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.6.1": +"@floating-ui/dom@1.6.3", "@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.6.1": version "1.6.3" resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.3.tgz#954e46c1dd3ad48e49db9ada7218b0985cee75ef" integrity sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw== @@ -3238,11 +3223,6 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.5.tgz#105c37d9d9620ce69b7f692a20c821bf1ad2cbf9" integrity sha512-sTcG+QZ6fdEUObICavU+aB3Mp8HY4n14wYHdxK4fXjPmv3PXZZeY5RaguJmGyeH/CJQhX3fqKUtS4qc1LoHwhQ== -"@floating-ui/utils@^0.2.8": - version "0.2.8" - resolved "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62" - integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig== - "@fortawesome/fontawesome-free@^5.11.2": version "5.15.4" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5" @@ -5363,12 +5343,12 @@ "@ovhcloud/ods-common-stencil" "17.2.2" "@ovhcloud/ods-common-theming" "17.2.2" -"@ovhcloud/ods-components@18.3.0": - version "18.3.0" - resolved "https://registry.npmjs.org/@ovhcloud/ods-components/-/ods-components-18.3.0.tgz#f5fa856bb45ad7df3ebe421d64ab334f41c7206c" - integrity sha512-E2bDV7RDnNty8fR7Fbvkxug2pySmsy4BQIt9rY0VTZWtcbaUlazmKbr+l+TjeL7vRxiPR4+9xLidI1kwt26O9A== +"@ovhcloud/ods-components@18.0.0": + version "18.0.0" + resolved "https://registry.npmjs.org/@ovhcloud/ods-components/-/ods-components-18.0.0.tgz#b0e4da6c35c19004f35bac6b34abb1f78c6d1af0" + integrity sha512-Nhgi8iMX/+tWJb6D8WSN8qNqC32XEwdDL0rc7o9V0OwcXPwSqu7QtTYKB+1s1kGTDxfyl7HGrSDYbqgUI0niMw== dependencies: - "@floating-ui/dom" "1.6.11" + "@floating-ui/dom" "1.6.3" "@stencil/core" "4.16.0" google-libphonenumber "3.2.35" tom-select "2.3.1" @@ -5389,10 +5369,10 @@ dependencies: "@ovhcloud/ods-common-theming" "17.2.2" -"@ovhcloud/ods-themes@18.3.0": - version "18.3.0" - resolved "https://registry.npmjs.org/@ovhcloud/ods-themes/-/ods-themes-18.3.0.tgz#804e3502e6791f7ec2efc24abb107d27cd4e02e0" - integrity sha512-mTxtcM4tCUPk98x65PeslXqGONJraTryXgkbgbZuvtOYf9SgVl+zFJfyisD2sYGuJvVf6hJP1NvJkyrxOUqtSw== +"@ovhcloud/ods-themes@18.0.0": + version "18.0.0" + resolved "https://registry.npmjs.org/@ovhcloud/ods-themes/-/ods-themes-18.0.0.tgz#0a7c658e0e9d572262ed41896fee4819c2764167" + integrity sha512-0PfXUyF6bX9emb/a6S16QThKsSXyvrNYT3n1zQF/le8tMXP7292TGKIgqXhsZmkcD9tCdD6VLXuJTS8Zv3a5Yg== "@ovhcloud/reket-axios-client@^0.2.1": version "0.2.1" @@ -26639,7 +26619,16 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -26753,7 +26742,14 @@ stringify-entities@^3.0.0: character-entities-legacy "^1.0.0" xtend "^4.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -29594,7 +29590,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -29620,6 +29616,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -29971,4 +29976,4 @@ zustand@^4.5.5: zwitch@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.5.tgz#d11d7381ffed16b742f6af7b3f223d5cd9fe9920" - integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw== + integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw== \ No newline at end of file From 035a11128365638999ce0943d01ca8fe56d8d8f8 Mon Sep 17 00:00:00 2001 From: Alex Boungnaseng Date: Thu, 14 Nov 2024 14:22:42 +0100 Subject: [PATCH 4/5] fix(generator): update ods version ref: MANAGER-14622 Signed-off-by: Alex Boungnaseng --- .../manager/core/generator/app/templates/package.json.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manager/core/generator/app/templates/package.json.hbs b/packages/manager/core/generator/app/templates/package.json.hbs index 2df5530da2b6..7ab2fb8d9b6c 100644 --- a/packages/manager/core/generator/app/templates/package.json.hbs +++ b/packages/manager/core/generator/app/templates/package.json.hbs @@ -28,8 +28,8 @@ "@ovh-ux/request-tagger": "*", "@tanstack/react-query": "^5.51.21", "@tanstack/react-query-devtools": "^5.51.21", - "@ovhcloud/ods-components": "18.0.0", - "@ovhcloud/ods-themes": "18.0.0", + "@ovhcloud/ods-components": "^18.3.0", + "@ovhcloud/ods-themes": "^18.3.0", "@ovh-ux/manager-react-components": "2.0.0", "axios": "^1.1.2", "clsx": "^1.2.1", From 52c77cb77304c00f7799fd0f3b5d13b4e8d8d275 Mon Sep 17 00:00:00 2001 From: Alex Boungnaseng Date: Thu, 14 Nov 2024 15:49:52 +0100 Subject: [PATCH 5/5] fix(manager-react-component): correct some issues in ods 18 ref: MANAGER-14622 Signed-off-by: Alex Boungnaseng --- .../ManagerButton/ManagerButton.tsx | 4 +-- .../dashboard-tile.component.tsx | 9 ++++- .../content/headers/headers.stories.tsx | 2 +- .../menus/action/action.component.tsx | 34 +++++++++++-------- .../navigation/menus/action/action.spec.tsx | 1 + .../typography/links/links.component.tsx | 19 ++++++++++- .../typography/title/title.component.tsx | 4 +-- ...{1.x.x-to-2.0.0.mdx => 1.x.x-to-2.3.0.mdx} | 8 ++--- .../generator/app/templates/package.json.hbs | 2 +- 9 files changed, 56 insertions(+), 27 deletions(-) rename packages/manager-react-components/src/docs/whatsnew/migration-guide/{1.x.x-to-2.0.0.mdx => 1.x.x-to-2.3.0.mdx} (92%) diff --git a/packages/manager-react-components/src/components/ManagerButton/ManagerButton.tsx b/packages/manager-react-components/src/components/ManagerButton/ManagerButton.tsx index f696cfc788b0..5c63a111bae2 100644 --- a/packages/manager-react-components/src/components/ManagerButton/ManagerButton.tsx +++ b/packages/manager-react-components/src/components/ManagerButton/ManagerButton.tsx @@ -44,8 +44,8 @@ export const ManagerButton = ({ <>
) : ( = ({ title, items, + ...props }) => ( - +
{title && ( <> diff --git a/packages/manager-react-components/src/components/content/headers/headers.stories.tsx b/packages/manager-react-components/src/components/content/headers/headers.stories.tsx index 138d77884259..f246832d6acb 100644 --- a/packages/manager-react-components/src/components/content/headers/headers.stories.tsx +++ b/packages/manager-react-components/src/components/content/headers/headers.stories.tsx @@ -46,7 +46,7 @@ const guideItems = [ const HeadingWithActionButton: HeadersProps = { title: 'Example for header with actions ', description: 'description for header', - headerButton: , + headerButton: , }; const HeadingWithGuideButton: HeadersProps = { title: 'Example for header with guides', diff --git a/packages/manager-react-components/src/components/navigation/menus/action/action.component.tsx b/packages/manager-react-components/src/components/navigation/menus/action/action.component.tsx index 4635bd86b908..1da6c6057a4b 100644 --- a/packages/manager-react-components/src/components/navigation/menus/action/action.component.tsx +++ b/packages/manager-react-components/src/components/navigation/menus/action/action.component.tsx @@ -14,14 +14,13 @@ export interface ActionMenuItem { id: number; rel?: string; download?: string; - href?: string; target?: string; onClick?: () => void; label: string; variant?: ODS_BUTTON_VARIANT; - disabled?: boolean; iamActions?: string[]; urn?: string; + className?: string; } export interface ActionMenuProps { @@ -29,7 +28,8 @@ export interface ActionMenuProps { isCompact?: boolean; icon?: ODS_ICON_NAME; variant?: ODS_BUTTON_VARIANT; - disabled?: boolean; + id: string; + isDisabled?: boolean; } const MenuItem = ({ @@ -45,16 +45,13 @@ const MenuItem = ({ size: ODS_BUTTON_SIZE.sm, variant: ODS_BUTTON_VARIANT.ghost, displayTooltip: false, + className: 'w-full action-menu-item', ...item, }; return (
{!item?.iamActions || item?.iamActions?.length === 0 ? ( - + {item.label} @@ -66,7 +63,6 @@ const MenuItem = ({ iamActions={item.iamActions} urn={item.urn} {...buttonProps} - isDisabled={buttonProps.disabled || undefined} > {item.label} @@ -82,19 +78,22 @@ export const ActionMenu: React.FC = ({ isCompact, icon, variant = ODS_BUTTON_VARIANT.outline, - disabled, + isDisabled = false, + id, }) => { const { t } = useTranslation('buttons'); const [isTrigger, setIsTrigger] = React.useState(false); return ( <> -