diff --git a/change/@fluentui-babel-make-styles-b4fa7c16-4c1d-4712-b9c2-45e6d29c5eba.json b/change/@fluentui-babel-make-styles-b4fa7c16-4c1d-4712-b9c2-45e6d29c5eba.json new file mode 100644 index 00000000000000..d14f2fcb6344f3 --- /dev/null +++ b/change/@fluentui-babel-make-styles-b4fa7c16-4c1d-4712-b9c2-45e6d29c5eba.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "use latest @linaria/shaker version", + "packageName": "@fluentui/babel-make-styles", + "email": "olfedias@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-make-styles-webpack-loader-1f6d86af-2612-4368-a73f-5ced22f57014.json b/change/@fluentui-make-styles-webpack-loader-1f6d86af-2612-4368-a73f-5ced22f57014.json new file mode 100644 index 00000000000000..ed444e3f4cf0e2 --- /dev/null +++ b/change/@fluentui-make-styles-webpack-loader-1f6d86af-2612-4368-a73f-5ced22f57014.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "use latest @linaria/shaker version", + "packageName": "@fluentui/make-styles-webpack-loader", + "email": "olfedias@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-slider-76c93ea3-5f99-4a17-a9b6-1db7790de75a.json b/change/@fluentui-react-slider-76c93ea3-5f99-4a17-a9b6-1db7790de75a.json new file mode 100644 index 00000000000000..1e9bcf8fb8ab31 --- /dev/null +++ b/change/@fluentui-react-slider-76c93ea3-5f99-4a17-a9b6-1db7790de75a.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "remove temporary workaround with duplicated classes constants", + "packageName": "@fluentui/react-slider", + "email": "olfedias@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/babel-make-styles/package.json b/packages/babel-make-styles/package.json index d8a50ed28829b1..47e198451bfd9e 100644 --- a/packages/babel-make-styles/package.json +++ b/packages/babel-make-styles/package.json @@ -34,8 +34,8 @@ "@babel/template": "^7.12.13", "@babel/traverse": "^7.12.13", "@fluentui/make-styles": "9.0.0-beta.2", - "@linaria/babel-preset": "^3.0.0-beta.13", - "@linaria/shaker": "^3.0.0-beta.13", + "@linaria/babel-preset": "^3.0.0-beta.14", + "@linaria/shaker": "^3.0.0-beta.14", "ajv": "^8.4.0", "tslib": "^2.1.0" }, diff --git a/packages/make-styles-webpack-loader/package.json b/packages/make-styles-webpack-loader/package.json index 89f6f04b7bd83b..228abed057397f 100644 --- a/packages/make-styles-webpack-loader/package.json +++ b/packages/make-styles-webpack-loader/package.json @@ -27,7 +27,7 @@ "dependencies": { "@babel/core": "^7.10.4", "@fluentui/babel-make-styles": "9.0.0-beta.2", - "@linaria/babel-preset": "^3.0.0-beta.13", + "@linaria/babel-preset": "^3.0.0-beta.14", "enhanced-resolve": "^5.8.2", "loader-utils": "^2.0.0", "schema-utils": "^3.1.1", diff --git a/packages/react-slider/src/components/RangedSlider/useRangedSliderStyles.ts b/packages/react-slider/src/components/RangedSlider/useRangedSliderStyles.ts index be3dad800ebb9d..6ad6c5bc8cbce1 100644 --- a/packages/react-slider/src/components/RangedSlider/useRangedSliderStyles.ts +++ b/packages/react-slider/src/components/RangedSlider/useRangedSliderStyles.ts @@ -1,5 +1,7 @@ import { mergeClasses, makeStyles } from '@fluentui/react-make-styles'; import { + thumbClassName, + trackClassName, useActiveRailStyles, useMarksWrapperStyles, useRailStyles, @@ -13,11 +15,6 @@ import { import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster'; import type { RangedSliderState } from './RangedSlider.types'; -// These should be imported directly from useSliderStyles.ts, but currently it causes build issues -// https://github.com/microsoft/fluentui/issues/20480 -const thumbClassName = `fui-Slider-thumb`; -const trackClassName = `fui-Slider-track`; - export const rangedSliderClassName = 'fui-RangedSlider'; export const lowerThumbClassName = `${thumbClassName} ${thumbClassName + '-lower'}`; diff --git a/packages/react-slider/src/components/Slider/useSliderStyles.ts b/packages/react-slider/src/components/Slider/useSliderStyles.ts index 8349f59d7aca39..0cb66d4b37a6d0 100644 --- a/packages/react-slider/src/components/Slider/useSliderStyles.ts +++ b/packages/react-slider/src/components/Slider/useSliderStyles.ts @@ -4,13 +4,13 @@ import type { SliderState } from './Slider.types'; export const sliderClassName = 'fui-Slider'; -const thumbClassName = `${sliderClassName}-thumb`; -const trackClassName = `${sliderClassName}-track`; -const markContainerClassName = `${sliderClassName}-markItemContainer`; -const firstMarkClassName = `${sliderClassName}-firstMark`; -const lastMarkClassName = `${sliderClassName}-lastMark`; -const markClassName = `${sliderClassName}-mark`; -const markLabelClassName = `${sliderClassName}-label`; +export const thumbClassName = `${sliderClassName}-thumb`; +export const trackClassName = `${sliderClassName}-track`; +export const markContainerClassName = `${sliderClassName}-markItemContainer`; +export const firstMarkClassName = `${sliderClassName}-firstMark`; +export const lastMarkClassName = `${sliderClassName}-lastMark`; +export const markClassName = `${sliderClassName}-mark`; +export const markLabelClassName = `${sliderClassName}-label`; /** * Styles for the root slot diff --git a/packages/react-slider/src/utils/renderMarks.tsx b/packages/react-slider/src/utils/renderMarks.tsx index a777164c8e8cc6..c4cc9174de1fe0 100644 --- a/packages/react-slider/src/utils/renderMarks.tsx +++ b/packages/react-slider/src/utils/renderMarks.tsx @@ -1,13 +1,12 @@ import * as React from 'react'; import { mergeClasses } from '@fluentui/react-make-styles'; - -// These should be imported directly from useSliderStyles.ts, but currently it causes build issues -// https://github.com/microsoft/fluentui/issues/20480 -const markContainerClassName = `fui-Slider-markItemContainer`; -const firstMarkClassName = `fui-Slider-firstMark`; -const lastMarkClassName = `fui-Slider-lastMark`; -const markClassName = `fui-Slider-mark`; -const markLabelClassName = `fui-Slider-label`; +import { + firstMarkClassName, + lastMarkClassName, + markClassName, + markContainerClassName, + markLabelClassName, +} from '../components/Slider/useSliderStyles'; /** * Renders the marks diff --git a/yarn.lock b/yarn.lock index 160343118c49d3..8c75a41e50ea68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2531,10 +2531,10 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@linaria/babel-preset@^3.0.0-beta.13": - version "3.0.0-beta.13" - resolved "https://registry.yarnpkg.com/@linaria/babel-preset/-/babel-preset-3.0.0-beta.13.tgz#bce5c199bfd72f754fb962dc72c292f076150b72" - integrity sha512-UeurIwmORp1lG+f69bKquRug7ZFVSrQha6TJWvHmGQIFwFx5qpMCXJLhOp2dUpM4y7/NhbKYXqj58RtG3wi4ZQ== +"@linaria/babel-preset@^3.0.0-beta.14": + version "3.0.0-beta.14" + resolved "https://registry.yarnpkg.com/@linaria/babel-preset/-/babel-preset-3.0.0-beta.14.tgz#4f204e12948dd9e8a540374806b7c1a64d3b7918" + integrity sha512-NtR9g4VUy43J9g2rvhgb3lcVLs0V4cmDeZAA/BkiaRIrU1M/nEbnRRlpbD3U149Q9XuPU+cuyqvA/zk3zbrufw== dependencies: "@babel/generator" ">=7" "@babel/plugin-syntax-dynamic-import" ">=7" @@ -2557,25 +2557,25 @@ dependencies: debug "^4.1.1" -"@linaria/preeval@^3.0.0-beta.13": - version "3.0.0-beta.13" - resolved "https://registry.yarnpkg.com/@linaria/preeval/-/preeval-3.0.0-beta.13.tgz#360220c7d46db814d6278c2b6c1d09f856b17eb4" - integrity sha512-0tia6DHxJ9h3/9LWWxseZw8z2wuB0OHwakQrDFV138m3ym3LwHnRalk9VUpIESnnFOiATya20+drUSx0GRxq/Q== +"@linaria/preeval@^3.0.0-beta.14": + version "3.0.0-beta.14" + resolved "https://registry.yarnpkg.com/@linaria/preeval/-/preeval-3.0.0-beta.14.tgz#bf4e99bbb89237a68f5a56e23781b1f027bf0e0d" + integrity sha512-SnyHqUf5uKEiP7N7Dd1yK9TEEycqq6qomUiWnoaH1F4VVIeFCOfDE5zGaVl9o4fM1rS0BWkeZZTnzg5ggrjnnA== dependencies: - "@linaria/babel-preset" "^3.0.0-beta.13" + "@linaria/babel-preset" "^3.0.0-beta.14" -"@linaria/shaker@^3.0.0-beta.13": - version "3.0.0-beta.13" - resolved "https://registry.yarnpkg.com/@linaria/shaker/-/shaker-3.0.0-beta.13.tgz#df01ae1c182dfac984a04d05e56cab3e9411b5ab" - integrity sha512-/ejyBA63pY5OnGK4VxrcD7FxYdQ/weRuPZyy8YEWgh0vVkyeXegwrfupfn+Nt7Lodnej+hrMexloKjxe2NTKfA== +"@linaria/shaker@^3.0.0-beta.14": + version "3.0.0-beta.14" + resolved "https://registry.yarnpkg.com/@linaria/shaker/-/shaker-3.0.0-beta.14.tgz#81e575733bb6223733b8da147a2dd41806d2afae" + integrity sha512-K8yem6BLLJOc8lnqij836+vFEDNRTcQLw7IoQv0D3fhsgMAUy/O/MWizcrDB3FRdrrCKXr19y9Vt5eppjjY1ig== dependencies: "@babel/generator" ">=7" "@babel/plugin-transform-runtime" ">=7" "@babel/plugin-transform-template-literals" ">=7" "@babel/preset-env" ">=7" - "@linaria/babel-preset" "^3.0.0-beta.13" + "@linaria/babel-preset" "^3.0.0-beta.14" "@linaria/logger" "^3.0.0-beta.3" - "@linaria/preeval" "^3.0.0-beta.13" + "@linaria/preeval" "^3.0.0-beta.14" babel-plugin-transform-react-remove-prop-types "^0.4.24" ts-invariant "^0.9.0"