From 6d212ee34f5daac54b730da85bd5f5cf68df5b80 Mon Sep 17 00:00:00 2001 From: vagnerbarbosant Date: Fri, 20 Dec 2024 11:02:57 -0300 Subject: [PATCH] feat(natds-react): added theme FV2 affects: @naturacosmeticos/natds-react DSY-5392 --- packages/react/.storybook/globalTypes/index.js | 1 + packages/react/package.json | 2 +- packages/react/src/components/Select/Select.styles.ts | 7 ++----- yarn.lock | 8 ++++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/react/.storybook/globalTypes/index.js b/packages/react/.storybook/globalTypes/index.js index 3e68c57ca..dfa81b3ff 100644 --- a/packages/react/.storybook/globalTypes/index.js +++ b/packages/react/.storybook/globalTypes/index.js @@ -13,6 +13,7 @@ export const globalTypes = { { value: 'consultoriaDeBeleza', title: 'Consultoria de Beleza' }, { value: 'consultoriaDeBeleza_v2', title: 'Consultoria de Beleza V2' }, { value: 'forcaDeVendas', title: 'Força de Vendas' }, + { value: 'forcaDeVendas_v2', title: 'Força de Vendas V2' }, { value: 'natura_v2', title: 'Natura V2' }, { value: 'natura_v3', title: 'Natura V3' }, { value: 'casaEestilo', title: 'Casa & Estilo' }, diff --git a/packages/react/package.json b/packages/react/package.json index 19b3a8979..84aef613f 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -58,7 +58,7 @@ }, "dependencies": { "@naturacosmeticos/natds-icons": "1.27.5", - "@naturacosmeticos/natds-themes": "0.81.1", + "@naturacosmeticos/natds-themes": "0.82.0", "react-jss": "10.9.0" }, "devDependencies": { diff --git a/packages/react/src/components/Select/Select.styles.ts b/packages/react/src/components/Select/Select.styles.ts index 624b8324d..aca638b27 100644 --- a/packages/react/src/components/Select/Select.styles.ts +++ b/packages/react/src/components/Select/Select.styles.ts @@ -33,12 +33,9 @@ const getLabelColor = (theme: Theme) => ({ feedback, isDisabled }: SelectStylePr return theme.color.mediumEmphasis } const getThemeFocus = (theme: Theme) => ({ brand }: SelectStyleProps) => { - const themeSelectFocus = buildTheme(brand, 'light') + const themeSelectFocus = brand ? buildTheme(brand, 'light') : theme - if (brand) { - return themeSelectFocus.color.primary - } - return theme.color.primary + return themeSelectFocus.color.primary } const styles = createUseStyles((theme: Theme) => ({ diff --git a/yarn.lock b/yarn.lock index 625f3776c..9234bc563 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2707,10 +2707,10 @@ svg2vectordrawable "2.6.26" webp-converter "^2.3.3" -"@naturacosmeticos/natds-themes@0.81.1": - version "0.81.1" - resolved "https://registry.yarnpkg.com/@naturacosmeticos/natds-themes/-/natds-themes-0.81.1.tgz#febe6750e1e61457e1a94c4706b618fe461c0fd0" - integrity sha512-1hbB0pMeJg5gWoipPS80Ho942hh1xl6wKoiRoN0LhiSkgIqD7FLavufqY38BhCP9Xck8GHr7ObYZAZUi8U2T8g== +"@naturacosmeticos/natds-themes@0.82.0": + version "0.82.0" + resolved "https://registry.yarnpkg.com/@naturacosmeticos/natds-themes/-/natds-themes-0.82.0.tgz#9a5fe9a777c1606abf5bdba443e08da3ee5fc328" + integrity sha512-f4iruRFMURh1tZ86oc6nr7I33OvE510DTUPpT2g2D5SthBJu/idyuE+xBLo9swCYYC4/GjGR0EqQ7vC4LIvJSA== dependencies: open-color "^1.8.0" svg2vectordrawable "2.6.26"