@sanity/ui 2.12.0 → 2.12.2

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/theme.mjs CHANGED
@@ -3604,11 +3604,46 @@ function buildTheme(config) {
3604
3604
  };
3605
3605
  return v2_v0(v2);
3606
3606
  }
3607
+ function themeColor_v0_v2_9(color2) {
3608
+ if ("neutral" in color2.badge)
3609
+ return color2;
3610
+ const colors2 = color2;
3611
+ return {
3612
+ ...colors2,
3613
+ badge: {
3614
+ ...colors2.badge,
3615
+ neutral: colors2.badge.default,
3616
+ suggest: colors2.badge.primary
3617
+ },
3618
+ button: {
3619
+ bleed: {
3620
+ ...colors2.button.bleed,
3621
+ neutral: colors2.button.bleed.default,
3622
+ suggest: colors2.button.bleed.primary
3623
+ },
3624
+ default: {
3625
+ ...colors2.button.default,
3626
+ neutral: colors2.button.default.default,
3627
+ suggest: colors2.button.default.primary
3628
+ },
3629
+ ghost: {
3630
+ ...colors2.button.ghost,
3631
+ neutral: colors2.button.ghost.default,
3632
+ suggest: colors2.button.ghost.primary
3633
+ }
3634
+ },
3635
+ selectable: {
3636
+ ...colors2.selectable,
3637
+ neutral: colors2.selectable.default,
3638
+ suggest: colors2.selectable.primary
3639
+ }
3640
+ };
3641
+ }
3607
3642
  const cache = /* @__PURE__ */ new Map();
3608
3643
  function getScopedTheme(themeProp, scheme, tone) {
3609
3644
  const cachedTheme = _getCachedTheme(themeProp, scheme, tone);
3610
3645
  if (cachedTheme) return cachedTheme;
3611
- const v0 = is_v2(themeProp) ? v2_v0(themeProp) : themeProp, v2 = is_v2(themeProp) ? themeProp : v0_v2(themeProp), colorScheme_v0 = v0.color[scheme] || v0.color.light, color_v0 = colorScheme_v0[tone] || colorScheme_v0.default, layer_v0 = v0.layer || defaultThemeConfig.layer, colorScheme_v2 = v2.color[scheme] || v2.color.light, color_v2 = colorScheme_v2[tone] || colorScheme_v2.default, layer_v2 = v2.layer || defaultThemeConfig.layer, theme = {
3646
+ const v0 = is_v2(themeProp) ? v2_v0(themeProp) : themeProp, v2 = is_v2(themeProp) ? themeProp : v0_v2(themeProp), colorScheme_v0 = v0.color[scheme] || v0.color.light, color_v0 = colorScheme_v0[tone] || colorScheme_v0.default, layer_v0 = v0.layer || defaultThemeConfig.layer, colorScheme_v2 = v2.color[scheme] || v2.color.light, color_v2 = colorScheme_v2[tone] || colorScheme_v2.default, color_v2_9 = themeColor_v0_v2_9(color_v2), layer_v2 = v2.layer || defaultThemeConfig.layer, theme = {
3612
3647
  sanity: {
3613
3648
  ...v0,
3614
3649
  color: color_v0,
@@ -3616,7 +3651,7 @@ function getScopedTheme(themeProp, scheme, tone) {
3616
3651
  v2: {
3617
3652
  ...v2,
3618
3653
  _resolved: !0,
3619
- color: color_v2,
3654
+ color: color_v2_9,
3620
3655
  layer: layer_v2
3621
3656
  }
3622
3657
  }