@estiva-app/ui 0.65.0 → 0.65.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/dist/BlockNodes.d.ts.map +1 -1
- package/dist/CollapsibleSection.d.ts +10 -1
- package/dist/CollapsibleSection.d.ts.map +1 -1
- package/dist/NavTree.d.ts +7 -1
- package/dist/NavTree.d.ts.map +1 -1
- package/dist/editor.js +15 -2
- package/dist/editor.js.map +2 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/registry.json +13 -1
- package/src/BlockNodes.test.tsx +96 -0
- package/src/BlockNodes.tsx +29 -3
- package/src/CollapsibleSection.mdx +7 -0
- package/src/CollapsibleSection.test.tsx +30 -0
- package/src/CollapsibleSection.tsx +15 -3
- package/src/NavTree.mdx +4 -1
- package/src/NavTree.test.tsx +10 -0
- package/src/NavTree.tsx +8 -1
package/dist/index.js
CHANGED
|
@@ -3486,7 +3486,7 @@ function writeStored(key, open) {
|
|
|
3486
3486
|
} catch {
|
|
3487
3487
|
}
|
|
3488
3488
|
}
|
|
3489
|
-
function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenChange, storageKey, icon, trailing, actions, menu, menuLabel, showActions, look = "heading", indent = false, children, className, contentClassName }) {
|
|
3489
|
+
function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenChange, pending = false, storageKey, icon, trailing, actions, menu, menuLabel, showActions, look = "heading", indent = false, children, className, contentClassName }) {
|
|
3490
3490
|
const [openState, setOpenState] = useState10(() => readStored(storageKey) ?? defaultOpen);
|
|
3491
3491
|
const open = openProp ?? openState;
|
|
3492
3492
|
const setOpen = (next) => {
|
|
@@ -3494,8 +3494,9 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
3494
3494
|
writeStored(storageKey, next);
|
|
3495
3495
|
onOpenChange?.(next);
|
|
3496
3496
|
};
|
|
3497
|
-
|
|
3498
|
-
|
|
3497
|
+
const shown = open && !pending;
|
|
3498
|
+
return /* @__PURE__ */ jsxs34(Collapsible2.Root, { open: shown, onOpenChange: (next, details) => setOpen(pending && details.reason === "trigger-press" ? !open : next), className: cn("flex flex-col", className), children: [
|
|
3499
|
+
/* @__PURE__ */ jsx51(SectionHeader, { title, chevron: true, icon, isExpanded: open, trailing, actions, menu, menuLabel, showActions, look, className: "shrink-0", render: /* @__PURE__ */ jsx51(Collapsible2.Trigger, { "aria-expanded": open, "aria-busy": pending && open ? true : void 0 }) }),
|
|
3499
3500
|
/* @__PURE__ */ jsx51(
|
|
3500
3501
|
Collapsible2.Panel,
|
|
3501
3502
|
{
|
|
@@ -3560,7 +3561,7 @@ function Group({ group, selected, onSelect, storageKey }) {
|
|
|
3560
3561
|
}
|
|
3561
3562
|
);
|
|
3562
3563
|
}
|
|
3563
|
-
function NavTreeSection({ id, title, message, loading = false, trailing, actions, menu, icon, defaultOpen = true, open, onOpenChange, storageKey, onIntent, children }) {
|
|
3564
|
+
function NavTreeSection({ id, title, message, loading = false, pending, trailing, actions, menu, icon, defaultOpen = true, open, onOpenChange, storageKey, onIntent, children }) {
|
|
3564
3565
|
const timer = useRef11(void 0);
|
|
3565
3566
|
useEffect6(() => () => clearTimeout(timer.current), []);
|
|
3566
3567
|
const intent = onIntent;
|
|
@@ -3583,6 +3584,7 @@ function NavTreeSection({ id, title, message, loading = false, trailing, actions
|
|
|
3583
3584
|
defaultOpen,
|
|
3584
3585
|
open,
|
|
3585
3586
|
onOpenChange,
|
|
3587
|
+
pending,
|
|
3586
3588
|
storageKey,
|
|
3587
3589
|
trailing,
|
|
3588
3590
|
actions,
|