@orangecheck/app-design 0.5.8 → 0.5.9
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/chrome.d.mts +2 -1
- package/dist/chrome.d.ts +2 -1
- package/dist/chrome.js +6 -2
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +6 -2
- package/dist/chrome.mjs.map +1 -1
- package/dist/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -7
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.js +14 -5
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +14 -5
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -378,16 +378,25 @@ function Field({ label, hint, optional, error, children, className, hideLabel, a
|
|
|
378
378
|
"aria-describedby": describedBy,
|
|
379
379
|
"aria-invalid": error ? true : void 0
|
|
380
380
|
}) : children;
|
|
381
|
+
const hintNode = hint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null;
|
|
381
382
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
382
383
|
/* @__PURE__ */ jsxs(Label, { htmlFor: id, className: hideLabel ? "sr-only" : "flex items-baseline gap-2", children: [
|
|
383
384
|
label,
|
|
384
385
|
optional ? /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] font-normal text-muted-foreground", children: "Optional" }) : null
|
|
385
386
|
] }),
|
|
386
|
-
action ?
|
|
387
|
-
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
390
|
-
|
|
387
|
+
action ? (
|
|
388
|
+
// The hint belongs to the input, so it sits under the input, not under the button.
|
|
389
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start", children: [
|
|
390
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-2 [&>input]:w-full", children: [
|
|
391
|
+
control,
|
|
392
|
+
hintNode
|
|
393
|
+
] }),
|
|
394
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
|
|
395
|
+
] })
|
|
396
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
397
|
+
control,
|
|
398
|
+
hintNode
|
|
399
|
+
] }),
|
|
391
400
|
error ? /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-[0.8125rem] leading-snug text-destructive", children: error }) : null
|
|
392
401
|
] });
|
|
393
402
|
}
|
|
@@ -2527,6 +2536,7 @@ function AppShell({
|
|
|
2527
2536
|
nav,
|
|
2528
2537
|
sections,
|
|
2529
2538
|
activeSection,
|
|
2539
|
+
page: pageOverride,
|
|
2530
2540
|
persistent = [],
|
|
2531
2541
|
home = "/",
|
|
2532
2542
|
account,
|
|
@@ -2541,8 +2551,11 @@ function AppShell({
|
|
|
2541
2551
|
warnDuplicateLabels(groups);
|
|
2542
2552
|
const page = activeItem(groups);
|
|
2543
2553
|
const place = useMemo(
|
|
2544
|
-
() => ({
|
|
2545
|
-
|
|
2554
|
+
() => ({
|
|
2555
|
+
section: current ? current.title ?? current.label : void 0,
|
|
2556
|
+
page: pageOverride ?? page?.label
|
|
2557
|
+
}),
|
|
2558
|
+
[current, page?.label, pageOverride]
|
|
2546
2559
|
);
|
|
2547
2560
|
const switcher = sections && current && sections.length > 1 ? /* @__PURE__ */ jsx(SectionSwitch, { sections, current, onNavigate: () => setOpen(false) }) : null;
|
|
2548
2561
|
return /* @__PURE__ */ jsx(ShellContext.Provider, { value: place, children: /* @__PURE__ */ jsxs("div", { className: cn("min-h-dvh bg-background", className), children: [
|