@seedgrid/fe-components 2026.3.31-2 → 2026.3.31-4
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/inputs/SgCombobox.js +2 -2
- package/dist/layout/SgScreen.d.ts.map +1 -1
- package/dist/layout/SgScreen.js +5 -32
- package/dist/sandbox.cjs +12 -12
- package/package.json +1 -1
|
@@ -261,7 +261,7 @@ function SgComboboxBase(props) {
|
|
|
261
261
|
}
|
|
262
262
|
openDropdown();
|
|
263
263
|
}, "aria-label": t(i18n, "components.actions.openList"), children: _jsx(ChevronDown, { size: 16 }) }));
|
|
264
|
-
return (_jsxs("div", { className: "relative", ref: wrapperRef, children: [_jsx(SgInputText, { ...rest, enabled: enabled, borderRadius: borderRadius, clearButton: false, readOnly: true, iconButtons: [dropdownButton], inputProps: {
|
|
264
|
+
return (_jsxs("div", { className: open ? "relative z-[1100]" : "relative", ref: wrapperRef, children: [_jsx(SgInputText, { ...rest, enabled: enabled, borderRadius: borderRadius, clearButton: false, readOnly: true, iconButtons: [dropdownButton], inputProps: {
|
|
265
265
|
...inputProps,
|
|
266
266
|
value: displayedValue,
|
|
267
267
|
onMouseDown: (event) => {
|
|
@@ -340,7 +340,7 @@ function SgComboboxBase(props) {
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
} }), open && !isDisabled ? (_jsxs("div", { className: "absolute left-0
|
|
343
|
+
} }), open && !isDisabled ? (_jsxs("div", { className: "absolute left-0 z-[1100] mt-1 min-w-full max-w-[min(32rem,calc(100vw-24px))] overflow-hidden rounded-md border border-border bg-[rgb(var(--sg-surface,var(--sg-bg)))] text-[rgb(var(--sg-text,var(--sg-fg)))] shadow-lg", style: resolvedBorderRadius ? { borderRadius: resolvedBorderRadius, width: "max-content" } : { width: "max-content" }, children: [_jsx("div", { className: "max-h-64 overflow-auto", children: loading ? (_jsx("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: loadingText })) : entries.length === 0 ? (_jsx("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText })) : groupedEntries ? (groupedEntries.map(({ group, list }) => (_jsxs("div", { className: "border-b border-border last:border-b-0", children: [_jsx("div", { className: "px-3 py-1 text-xs font-semibold text-muted-foreground", children: renderGroupHeader ? renderGroupHeader(group) : group || " " }), list.map(({ entry, index }) => {
|
|
344
344
|
const isActive = activeIndex === index;
|
|
345
345
|
return (_jsxs("div", { className: `group relative cursor-pointer px-3 py-2 text-sm ${isActive ? "bg-muted/60" : ""} ${entry.item.disabled ? "cursor-not-allowed opacity-50" : "hover:bg-muted/40"}`, onMouseEnter: () => setActiveIndex(index), onMouseDown: (event) => {
|
|
346
346
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SgScreen.d.ts","sourceRoot":"","sources":["../../src/layout/SgScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"SgScreen.d.ts","sourceRoot":"","sources":["../../src/layout/SgScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CA0CtD;yBA1Ce,QAAQ"}
|
package/dist/layout/SgScreen.js
CHANGED
|
@@ -1,46 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
3
|
import { cn, renderDockContent, toCssSpace } from "./sgDocking";
|
|
5
4
|
export function SgScreen(props) {
|
|
6
5
|
const { fullscreen = true, width, height, padding, className, style, children, ...rest } = props;
|
|
7
|
-
|
|
8
|
-
const [measuredSize, setMeasuredSize] = React.useState({});
|
|
9
|
-
React.useLayoutEffect(() => {
|
|
10
|
-
if (!fullscreen) {
|
|
11
|
-
setMeasuredSize({});
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
const element = ref.current;
|
|
15
|
-
const parent = element?.parentElement;
|
|
16
|
-
if (!element || !parent)
|
|
17
|
-
return;
|
|
18
|
-
const update = () => {
|
|
19
|
-
setMeasuredSize({
|
|
20
|
-
width: parent.clientWidth || undefined,
|
|
21
|
-
height: parent.clientHeight || undefined
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
update();
|
|
25
|
-
const observer = new ResizeObserver(update);
|
|
26
|
-
observer.observe(parent);
|
|
27
|
-
window.addEventListener("resize", update);
|
|
28
|
-
return () => {
|
|
29
|
-
observer.disconnect();
|
|
30
|
-
window.removeEventListener("resize", update);
|
|
31
|
-
};
|
|
32
|
-
}, [fullscreen]);
|
|
33
|
-
return (_jsx("div", { ref: ref, className: cn("relative box-border flex flex-1 self-stretch min-h-0 min-w-0 max-h-full max-w-full overflow-hidden", className), style: {
|
|
6
|
+
return (_jsx("div", { className: cn("relative box-border flex flex-1 self-stretch min-h-0 min-w-0 max-h-full max-w-full overflow-hidden", className), style: {
|
|
34
7
|
...style,
|
|
35
8
|
...(width !== undefined
|
|
36
9
|
? { width: toCssSpace(width) }
|
|
37
|
-
: fullscreen
|
|
38
|
-
? { width:
|
|
10
|
+
: fullscreen
|
|
11
|
+
? { width: "100%" }
|
|
39
12
|
: null),
|
|
40
13
|
...(height !== undefined
|
|
41
14
|
? { height: toCssSpace(height) }
|
|
42
|
-
: fullscreen
|
|
43
|
-
? { height:
|
|
15
|
+
: fullscreen
|
|
16
|
+
? { height: "100dvh" }
|
|
44
17
|
: null),
|
|
45
18
|
padding: toCssSpace(padding)
|
|
46
19
|
}, ...rest, children: _jsx("div", { className: "flex flex-1 min-h-0 min-w-0 flex-col", children: renderDockContent({
|