@kouji-ui/core 0.8.0 → 0.8.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.
@@ -4694,7 +4694,7 @@ const KJ_BUTTON_GROUP = new InjectionToken('KjButtonGroup');
4694
4694
  * them when extending: `[...KJ_BUTTON_DEFAULTS.variants, 'brand']`.
4695
4695
  */
4696
4696
  const KJ_BUTTON_DEFAULTS = {
4697
- variants: ['default', 'destructive', 'outline', 'ghost', 'link'],
4697
+ variants: ['default', 'destructive', 'outline', 'ghost', 'link', 'segmented'],
4698
4698
  sizes: ['xs', 'sm', 'md', 'lg', 'xl', 'icon'],
4699
4699
  defaults: { variant: 'default', size: 'md' },
4700
4700
  };
@@ -13880,8 +13880,14 @@ function nextConfirmPopupMessageId() {
13880
13880
  * @doc-category Core/Overlay
13881
13881
  */
13882
13882
  class KjConfirmPopup {
13883
- /** The overlay controller, when the trigger sits on this very element. */
13884
- selfController = inject(KjOverlayController, { optional: true });
13883
+ /**
13884
+ * The overlay controller, when the trigger sits on this very element.
13885
+ * `self: true` is load-bearing: without it the lookup walks up the injector
13886
+ * tree and, inside a service-launched dialog, resolves the DIALOG's
13887
+ * controller — so confirm / cancel closed the enclosing dialog instead of
13888
+ * the popup.
13889
+ */
13890
+ selfController = inject(KjOverlayController, { self: true, optional: true });
13885
13891
  /**
13886
13892
  * The controller of a nested `[kjConfirmPopupTrigger]`. The documented
13887
13893
  * composition puts the trigger on a CHILD of `[kjConfirmPopup]` (see every
@@ -14034,7 +14040,13 @@ class KjConfirmPopupContent {
14034
14040
  platformId = inject(PLATFORM_ID);
14035
14041
  destroyRef = inject(DestroyRef);
14036
14042
  ctx = inject(KJ_CONFIRM_POPUP);
14037
- _panel = inject(KjOverlayPanel, { optional: true });
14043
+ /**
14044
+ * The panel this directive is layered on (`<kj-popover-content>` composes
14045
+ * `KjOverlayPanel` as a host directive, so it lives on this very element).
14046
+ * `self: true` keeps the lookup from walking up to an enclosing overlay —
14047
+ * e.g. a `<kj-dialog>` — whose panel would be promoted / focused instead.
14048
+ */
14049
+ _panel = inject(KjOverlayPanel, { self: true, optional: true });
14038
14050
  get controller() {
14039
14051
  return this._panel?.controller ?? null;
14040
14052
  }