pro-design-vue 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.2.7 */
1
+ /*! Pro Design Vue v1.2.8 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue'), require('ant-design-vue/es/locale/zh_CN.js')) :
@@ -32,7 +32,7 @@
32
32
  const DEFAULT_NAMESPACE = "pro";
33
33
  const DEFAULT_LOCALE = "zh-CN";
34
34
 
35
- const version$1 = "1.2.7";
35
+ const version$1 = "1.2.8";
36
36
 
37
37
  const makeInstaller = (components = []) => {
38
38
  const install = (app) => {
@@ -8268,10 +8268,10 @@
8268
8268
  return vue.inject(proConfigProviderContextKey, {});
8269
8269
  };
8270
8270
 
8271
- function updateCSSVariables(variables, id = "__pro-styles__") {
8271
+ function updateCSSVariables(variables, className = ":root", id = "__pro-styles__") {
8272
8272
  const styleElement = document.querySelector(`#${id}`) || document.createElement("style");
8273
8273
  styleElement.id = id;
8274
- let cssText = ":root {";
8274
+ let cssText = className + " {";
8275
8275
  for (const key in variables) {
8276
8276
  if (Object.prototype.hasOwnProperty.call(variables, key)) {
8277
8277
  cssText += `${key}: ${variables[key]};`;
@@ -8335,7 +8335,10 @@
8335
8335
  document.documentElement.style.setProperty(targetVar, colorValue);
8336
8336
  }
8337
8337
  });
8338
- updateCSSVariables(colorVariables);
8338
+ updateCSSVariables(
8339
+ colorVariables,
8340
+ dark ? ".dark, .dark[data-theme='custom'], .dark[data-theme='default']" : ":root"
8341
+ );
8339
8342
  if (defaultToken.borderRadius !== newToken.borderRadius) {
8340
8343
  document.documentElement.style.setProperty(
8341
8344
  `--${DEFAULT_NAMESPACE}-radius`,