@next-core/brick-kit 2.103.3 → 2.103.4

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.
package/dist/index.esm.js CHANGED
@@ -7053,7 +7053,7 @@ presetPalettes.magenta;
7053
7053
  presetPalettes.grey;
7054
7054
 
7055
7055
  function getStyleByBaseColors(theme, baseColors, backgroundColor) {
7056
- return (theme === "dark" ? getDarkStyle : getLightStyle)(getCssVariableDefinitionsByPalettes(generatePalettes(baseColors, theme, backgroundColor)));
7056
+ return (theme === "dark" ? getDarkStyle : getLightStyle)("".concat(getCssVariableDefinitionsByPalettes(generatePalettes(baseColors, theme, backgroundColor)), "\n").concat(getMigratedCssVariableDefinitions(theme, baseColors, backgroundColor)));
7057
7057
  }
7058
7058
  function getStyleByBrandColor(theme, brandColor) {
7059
7059
  return (theme === "dark" ? getDarkStyle : getLightStyle)(getCssVariableDefinitionsByBrand(brandColor));
@@ -7117,6 +7117,33 @@ function ensureBaseColorName(name) {
7117
7117
  }
7118
7118
  }
7119
7119
 
7120
+ function getMigratedCssVariableDefinitions(theme, baseColors, backgroundColor) {
7121
+ var migrateMap = {
7122
+ green: "green",
7123
+ red: "red",
7124
+ blue: "blue",
7125
+ orange: "orange",
7126
+ cyan: "cyan",
7127
+ purple: "purple",
7128
+ geekblue: "indigo"
7129
+ };
7130
+ return Object.entries(migrateMap).flatMap(_ref4 => {
7131
+ var [legacyColorName, newColorName] = _ref4;
7132
+ return [" --theme-".concat(legacyColorName, "-color-rgb-channel: ").concat(getRgbChannel(getActualBaseColor(baseColors[newColorName], theme, backgroundColor)), ";"), ...(theme === "dark" ? [] : [" --theme-".concat(legacyColorName, "-color: var(--palette-").concat(newColorName, "-6);"), " --theme-".concat(legacyColorName, "-border-color: var(--palette-").concat(newColorName, "-3);")]), " --theme-".concat(legacyColorName, "-background: var(--palette-").concat(newColorName, "-").concat(theme === "dark" ? 2 : 1, ");"), ""];
7133
+ }).join("\n");
7134
+ }
7135
+
7136
+ function getRgbChannel(color) {
7137
+ return color.match(/[0-9a-fA-F]{2}/g).map(hex => parseInt(hex, 16)).join(", ");
7138
+ }
7139
+
7140
+ function getActualBaseColor(baseColor, theme, backgroundColor) {
7141
+ return theme === "dark" ? generate(baseColor, {
7142
+ theme,
7143
+ backgroundColor
7144
+ })[5] : baseColor;
7145
+ }
7146
+
7120
7147
  function applyColorTheme(options) {
7121
7148
  var style = [];
7122
7149
  var themes = ["light", "dark"];