@godxjp/ui 5.0.1 → 5.0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to `@godxjp/ui`. Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
4
4
  and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [5.0.2] — 2026-05-19
7
+
8
+ ### Added
9
+
10
+ - **`<Popover anchor>` prop** — positioning-only anchor for the
11
+ combobox / typeahead / focus-managed pattern. Unlike `trigger`,
12
+ `anchor` does NOT register a click toggle handler. Parent controls
13
+ `open` directly.
14
+
15
+ ### Fixed
16
+
17
+ - **`<AutoComplete>` no longer closes the instant it opens.** The
18
+ primitive opened on `input.onFocus` AND was wrapped in a Radix
19
+ `PopoverTrigger` that toggled on click. A single click fired both
20
+ paths — open via focus, then close via trigger toggle. Switched to
21
+ the new `<Popover anchor={input}>` shape so focus-managed open/close
22
+ stays authoritative.
23
+
6
24
  ## [5.0.1] — 2026-05-18
7
25
 
8
26
  ### Fixed
@@ -5438,8 +5438,10 @@ var InputSearch = forwardRef(
5438
5438
  );
5439
5439
  var Root6 = PopoverPrimitive.Root;
5440
5440
  var Trigger4 = PopoverPrimitive.Trigger;
5441
+ var Anchor2 = PopoverPrimitive.Anchor;
5441
5442
  var Popover = forwardRef(function Popover2({
5442
5443
  trigger,
5444
+ anchor,
5443
5445
  children,
5444
5446
  align = "center",
5445
5447
  side,
@@ -5448,23 +5450,24 @@ var Popover = forwardRef(function Popover2({
5448
5450
  contentProps,
5449
5451
  ...rootProps
5450
5452
  }, ref) {
5451
- if (trigger === void 0) {
5453
+ if (trigger === void 0 && anchor === void 0) {
5452
5454
  return /* @__PURE__ */ jsx(Root6, { ...rootProps, children });
5453
5455
  }
5456
+ const content = /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
5457
+ PopoverPrimitive.Content,
5458
+ {
5459
+ ref,
5460
+ align,
5461
+ side,
5462
+ sideOffset,
5463
+ ...contentProps,
5464
+ className: cn("popover-content", className, contentProps?.className),
5465
+ children
5466
+ }
5467
+ ) });
5454
5468
  return /* @__PURE__ */ jsxs(Root6, { ...rootProps, children: [
5455
- /* @__PURE__ */ jsx(Trigger4, { asChild: true, children: trigger }),
5456
- /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
5457
- PopoverPrimitive.Content,
5458
- {
5459
- ref,
5460
- align,
5461
- side,
5462
- sideOffset,
5463
- ...contentProps,
5464
- className: cn("popover-content", className, contentProps?.className),
5465
- children
5466
- }
5467
- ) })
5469
+ anchor !== void 0 ? /* @__PURE__ */ jsx(Anchor2, { asChild: true, children: anchor }) : /* @__PURE__ */ jsx(Trigger4, { asChild: true, children: trigger }),
5470
+ content
5468
5471
  ] });
5469
5472
  });
5470
5473
  function isOptionGroup(opt) {