@espressif/dashboard-ui-components 1.11.0 → 1.11.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
|
@@ -4,6 +4,31 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres
|
|
5
5
|
to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [1.11.2] - 2026-10-21
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **`SelectContent`** — a long list now stays on screen and scrolls. Its
|
|
11
|
+
height cap used the Tailwind v3 form `max-h-[--var]`, which Tailwind v4
|
|
12
|
+
compiles to invalid CSS, so the list had no max height: it opened past the
|
|
13
|
+
top of the viewport and could not scroll. It now uses `max-h-(--var)`.
|
|
14
|
+
- **`SelectContent`** — scrolling no longer snaps back to the top when it
|
|
15
|
+
starts without the mouse over an item (touch, scrollbar drag). When a scroll
|
|
16
|
+
arrow appears, Radix scrolls the focused item back into view; focus now
|
|
17
|
+
moves to the listbox once that item leaves the viewport. After a scroll,
|
|
18
|
+
arrow keys start again from the first item.
|
|
19
|
+
- **`SelectContent`, `PopoverContent`** — the open animation's transform
|
|
20
|
+
origin uses Tailwind v4 syntax (`origin-(--var)`), so it is applied again.
|
|
21
|
+
|
|
22
|
+
## [1.11.1] - 2026-10-21
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **`CopyButton`, `Code`, `CodeEditor`, `CopiableText`** — the copy button no
|
|
26
|
+
longer submits the form it sits in. It rendered a `<button>` with no `type`,
|
|
27
|
+
which a form treats as a submit button, so copying a `CodeEditor`'s payload
|
|
28
|
+
also sent the form. The animated button behind it now defaults to
|
|
29
|
+
`type="button"`, as `Button` already does; pass `type="submit"` to opt in.
|
|
30
|
+
`asChild` leaves `type` as passed. No API change.
|
|
31
|
+
|
|
7
32
|
## [1.11.0] - 2026-10-14
|
|
8
33
|
|
|
9
34
|
### Changed
|
|
@@ -4,10 +4,11 @@ import "react";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { motion } from "motion/react";
|
|
6
6
|
//#region src/core/animate-ui/primitives/buttons/button.tsx
|
|
7
|
-
function Button({ hoverScale = 1.05, tapScale = .95, asChild = false, ...props }) {
|
|
7
|
+
function Button({ hoverScale = 1.05, tapScale = .95, asChild = false, type, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(asChild ? Slot : motion.button, {
|
|
9
9
|
whileTap: { scale: tapScale },
|
|
10
10
|
whileHover: { scale: hoverScale },
|
|
11
|
+
type: asChild ? type : type ?? "button",
|
|
11
12
|
...props
|
|
12
13
|
});
|
|
13
14
|
}
|
package/dist/core/popover.js
CHANGED
|
@@ -21,7 +21,7 @@ var PopoverContent = React$1.forwardRef(({ className, align = "center", sideOffs
|
|
|
21
21
|
sideOffset,
|
|
22
22
|
onWheel: handleWheel,
|
|
23
23
|
onTouchMove: handleTouchMove,
|
|
24
|
-
className: cn("z-50 w-72 rounded-2xl border bg-popover p-4 text-popover-foreground shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-
|
|
24
|
+
className: cn("z-50 w-72 rounded-2xl border bg-popover p-4 text-popover-foreground shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)", className),
|
|
25
25
|
...props
|
|
26
26
|
});
|
|
27
27
|
return portal ? /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: content }) : content;
|
package/dist/core/select.js
CHANGED
|
@@ -80,15 +80,31 @@ var SelectScrollDownButton = React$1.forwardRef(({ className, ...props }, ref) =
|
|
|
80
80
|
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
81
81
|
}));
|
|
82
82
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
83
|
+
/**
|
|
84
|
+
* When a scroll arrow mounts, Radix scrolls the focused item back into view.
|
|
85
|
+
* Focus only follows a mouse, so a touch swipe or scrollbar drag that starts
|
|
86
|
+
* at the top snaps straight back. Once the focused item leaves the viewport,
|
|
87
|
+
* hand focus to the listbox (as Radix does when the pointer leaves an item).
|
|
88
|
+
*/
|
|
89
|
+
function releaseFocusScrolledOutOfView(event) {
|
|
90
|
+
const viewport = event.currentTarget;
|
|
91
|
+
const focused = document.activeElement;
|
|
92
|
+
if (!(focused instanceof HTMLElement) || !viewport.contains(focused)) return;
|
|
93
|
+
const itemRect = focused.getBoundingClientRect();
|
|
94
|
+
const viewportRect = viewport.getBoundingClientRect();
|
|
95
|
+
if (itemRect.top >= viewportRect.top && itemRect.bottom <= viewportRect.bottom) return;
|
|
96
|
+
viewport.closest("[role=\"listbox\"]")?.focus({ preventScroll: true });
|
|
97
|
+
}
|
|
83
98
|
var SelectContent = React$1.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
|
|
84
99
|
ref,
|
|
85
|
-
className: cn("relative z-50 max-h-
|
|
100
|
+
className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-2xl border bg-popover px-1.5 py-2 text-popover-foreground shadow-lg outline-none will-change-[opacity,transform] select-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-select-content-transform-origin)", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
86
101
|
position,
|
|
87
102
|
...props,
|
|
88
103
|
children: [
|
|
89
104
|
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
90
105
|
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
91
106
|
className: cn("p-0", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
|
|
107
|
+
onScroll: releaseFocusScrolledOutOfView,
|
|
92
108
|
children
|
|
93
109
|
}),
|
|
94
110
|
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
package/package.json
CHANGED