@kouji-ui/core 0.11.0 → 0.11.1

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.
@@ -8807,6 +8807,10 @@ function bindPresets(configToken) {
8807
8807
  provide: KJ_VARIANT_PRESET,
8808
8808
  useFactory: () => {
8809
8809
  const c = inject(configToken);
8810
+ // A config without a variant list (e.g. one that only sizes) keeps the
8811
+ // enclosing preset, so it never hands descendants `values: undefined`.
8812
+ if (!c.variants)
8813
+ return inject(KJ_VARIANT_PRESET, { skipSelf: true });
8810
8814
  return { values: c.variants, default: c.defaults.variant };
8811
8815
  },
8812
8816
  },
@@ -8814,6 +8818,10 @@ function bindPresets(configToken) {
8814
8818
  provide: KJ_SIZE_PRESET,
8815
8819
  useFactory: () => {
8816
8820
  const c = inject(configToken);
8821
+ // Same for sizes: `KjTabs` binds a variant-only config, and a `KjSize`
8822
+ // descendant (a `kj-kbd` in a tab panel) must see the enclosing preset.
8823
+ if (!c.sizes)
8824
+ return inject(KJ_SIZE_PRESET, { skipSelf: true });
8817
8825
  return { values: c.sizes, default: c.defaults.size };
8818
8826
  },
8819
8827
  },