@the-portland-company/shell 0.90.0 → 0.92.0
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 +17 -0
- package/README.md +4 -47
- package/dist/app-chrome.cjs +5 -0
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +2 -2
- package/dist/app-chrome.d.ts +2 -2
- package/dist/app-chrome.js +8 -3
- package/dist/app-chrome.js.map +1 -1
- package/dist/chrome.css +0 -20
- package/dist/{chunk-LZ5TLJDG.js → chunk-WDVQBUWF.js} +3 -3
- package/dist/{chunk-LZ5TLJDG.js.map → chunk-WDVQBUWF.js.map} +1 -1
- package/dist/{chunk-VBDI7UZS.js → chunk-ZS7MQXDQ.js} +13 -361
- package/dist/chunk-ZS7MQXDQ.js.map +1 -0
- package/dist/{index-CaMJSRDb.d.cts → index-Cg5aEImm.d.cts} +5 -200
- package/dist/{index-C3jzqN9K.d.ts → index-DG32i0jC.d.ts} +5 -200
- package/dist/index.cjs +15 -375
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -11
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +10 -364
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/native.js +2 -2
- package/package.json +2 -13
- package/dist/chunk-VBDI7UZS.js.map +0 -1
- package/eslint/index.cjs +0 -172
- package/eslint/index.d.ts +0 -6
- package/eslint/index.mjs +0 -5
package/dist/native.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var react = require('react');
|
|
5
|
-
var
|
|
5
|
+
var clsx4 = require('clsx');
|
|
6
6
|
var fi = require('react-icons/fi');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -10,7 +10,7 @@ var lu = require('react-icons/lu');
|
|
|
10
10
|
|
|
11
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var clsx4__default = /*#__PURE__*/_interopDefault(clsx4);
|
|
14
14
|
|
|
15
15
|
// src/native/index.tsx
|
|
16
16
|
function useTopBarIconSlotGlyph(slot) {
|
|
@@ -2210,7 +2210,7 @@ function useThemePreference() {
|
|
|
2210
2210
|
return { value, setValue };
|
|
2211
2211
|
}
|
|
2212
2212
|
function FormColumn({ children, className }) {
|
|
2213
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-form-column": "", className:
|
|
2213
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-form-column": "", className: clsx4__default.default("w-full max-w-[960px]", className), children });
|
|
2214
2214
|
}
|
|
2215
2215
|
var MODE_EYEBROW_LABEL = {
|
|
2216
2216
|
relationship: "Relationship mode",
|
|
@@ -2256,7 +2256,7 @@ function PageHeaderView({
|
|
|
2256
2256
|
"div",
|
|
2257
2257
|
{
|
|
2258
2258
|
"data-shell-page-header": "",
|
|
2259
|
-
className:
|
|
2259
|
+
className: clsx4__default.default("pt-[22px] text-[color:var(--color-text,#2F3136)]", tabBar ? "pb-0" : "pb-4", {
|
|
2260
2260
|
"md:ml-60": !hideSidebar
|
|
2261
2261
|
}),
|
|
2262
2262
|
children: [
|
|
@@ -2314,7 +2314,7 @@ function BreadcrumbBarView({
|
|
|
2314
2314
|
{
|
|
2315
2315
|
className: "ml-0 border-b border-gray-200 px-4 py-3 md:ml-60",
|
|
2316
2316
|
style: { backgroundColor: "var(--app-tab-header-bg, #888888)" },
|
|
2317
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2317
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx4__default.default("mx-auto w-full px-0", maxWClass), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [
|
|
2318
2318
|
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center gap-2 text-sm text-slate-100", children: breadcrumbs.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-2", children: [
|
|
2319
2319
|
index > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: ">" }) : null,
|
|
2320
2320
|
item.href ? renderCrumbLink(item.href, item.label, "text-slate-100 hover:underline") : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-100", children: item.label })
|
|
@@ -2349,7 +2349,7 @@ function HeaderTabBar({
|
|
|
2349
2349
|
{
|
|
2350
2350
|
role: "tablist",
|
|
2351
2351
|
"aria-label": ariaLabel,
|
|
2352
|
-
className:
|
|
2352
|
+
className: clsx4__default.default(
|
|
2353
2353
|
// Header-wide tab strip: background + bottom border only (no outer box).
|
|
2354
2354
|
// Left-aligned and fluid: the container spans the full content width,
|
|
2355
2355
|
// the tabs keep their natural width packed from the left (Global-Rules
|
|
@@ -2373,7 +2373,7 @@ function HeaderTabBar({
|
|
|
2373
2373
|
"aria-label": item.label,
|
|
2374
2374
|
disabled: isDisabled,
|
|
2375
2375
|
onClick: () => onChange(item.id),
|
|
2376
|
-
className:
|
|
2376
|
+
className: clsx4__default.default(
|
|
2377
2377
|
// `group/tbtip relative` powers the shared <TopBarTooltip>.
|
|
2378
2378
|
// Natural width (no flex-1 stretch); 40px square hit area for the
|
|
2379
2379
|
// icon-only tab so the strip stays tappable.
|
|
@@ -2399,375 +2399,27 @@ function HeaderTabBar({
|
|
|
2399
2399
|
}
|
|
2400
2400
|
);
|
|
2401
2401
|
}
|
|
2402
|
-
var PADDING = {
|
|
2403
|
-
none: "p-0",
|
|
2404
|
-
sm: "p-4",
|
|
2405
|
-
md: "p-6",
|
|
2406
|
-
lg: "p-8"
|
|
2407
|
-
};
|
|
2408
2402
|
function Card({
|
|
2409
2403
|
title,
|
|
2410
|
-
subtitle,
|
|
2411
|
-
aside,
|
|
2412
|
-
actions,
|
|
2413
|
-
footer,
|
|
2414
2404
|
children,
|
|
2415
|
-
padding = "md",
|
|
2416
|
-
bodyClassName,
|
|
2417
2405
|
minH,
|
|
2418
2406
|
className,
|
|
2419
2407
|
style,
|
|
2420
2408
|
...props
|
|
2421
2409
|
}) {
|
|
2422
|
-
const structured = Boolean(subtitle || aside || actions || footer || bodyClassName);
|
|
2423
|
-
const surface = "rounded-lg border border-[color:var(--app-card-border,var(--color-border))] bg-[color:var(--app-card-bg,var(--color-panel))] text-[color:var(--app-card-fg,var(--color-text))] shadow-sm";
|
|
2424
|
-
if (!structured) {
|
|
2425
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2426
|
-
"div",
|
|
2427
|
-
{
|
|
2428
|
-
"data-shell-card": "",
|
|
2429
|
-
className: clsx5__default.default(surface, PADDING[padding], className),
|
|
2430
|
-
style: { minHeight: minH, ...style },
|
|
2431
|
-
...props,
|
|
2432
|
-
children: [
|
|
2433
|
-
title ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-4 text-lg font-semibold", children: title }) : null,
|
|
2434
|
-
children
|
|
2435
|
-
]
|
|
2436
|
-
}
|
|
2437
|
-
);
|
|
2438
|
-
}
|
|
2439
|
-
const hasHeader = Boolean(title || subtitle || aside || actions);
|
|
2440
|
-
const divider = "border-[color:var(--app-card-border,var(--color-border))]";
|
|
2441
2410
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2442
2411
|
"div",
|
|
2443
2412
|
{
|
|
2444
|
-
|
|
2445
|
-
"data-shell-card-structured": "",
|
|
2446
|
-
className: clsx5__default.default(surface, "overflow-hidden", className),
|
|
2413
|
+
className: `rounded-lg border border-slate-200 bg-white p-6 shadow-sm ${className || ""}`,
|
|
2447
2414
|
style: { minHeight: minH, ...style },
|
|
2448
2415
|
...props,
|
|
2449
2416
|
children: [
|
|
2450
|
-
|
|
2451
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2452
|
-
title ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold", children: title }) : null,
|
|
2453
|
-
subtitle ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-sm text-[color:var(--app-card-fg-muted,var(--color-text-muted))]", children: subtitle }) : null
|
|
2454
|
-
] }),
|
|
2455
|
-
aside || actions ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
2456
|
-
aside,
|
|
2457
|
-
actions
|
|
2458
|
-
] }) : null
|
|
2459
|
-
] }) : null,
|
|
2460
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: bodyClassName ?? PADDING[padding], children }),
|
|
2461
|
-
footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx5__default.default("border-t px-5 py-3", divider), children: footer }) : null
|
|
2462
|
-
]
|
|
2463
|
-
}
|
|
2464
|
-
);
|
|
2465
|
-
}
|
|
2466
|
-
var VARIANT_CLASS = {
|
|
2467
|
-
primary: "border border-transparent bg-[color:var(--app-btn-primary-bg,var(--color-accent))] text-[color:var(--app-btn-primary-fg,var(--color-white))] hover:bg-[color:var(--app-btn-primary-bg-hover,var(--color-accent-hover))]",
|
|
2468
|
-
secondary: "border border-[color:var(--app-btn-secondary-border,var(--color-border))] bg-[color:var(--app-btn-secondary-bg,var(--color-white))] text-[color:var(--app-btn-secondary-fg,var(--color-text))] hover:bg-[color:var(--app-btn-secondary-bg-hover,var(--color-bg))]",
|
|
2469
|
-
ghost: "border border-transparent bg-transparent text-[color:var(--app-btn-secondary-fg,var(--color-text))] hover:bg-[color:var(--app-btn-secondary-bg-hover,var(--color-bg))]",
|
|
2470
|
-
danger: "border border-transparent bg-[color:var(--chrome-danger,var(--color-race-red))] text-[color:var(--color-white)] hover:bg-[color:var(--color-race-red-600)]"
|
|
2471
|
-
};
|
|
2472
|
-
var SIZE_CLASS = {
|
|
2473
|
-
md: "h-[44px]",
|
|
2474
|
-
sm: "h-[36px]"
|
|
2475
|
-
};
|
|
2476
|
-
var Button = react.forwardRef(function Button2({
|
|
2477
|
-
variant = "primary",
|
|
2478
|
-
size = "md",
|
|
2479
|
-
loading = false,
|
|
2480
|
-
disabled = false,
|
|
2481
|
-
href,
|
|
2482
|
-
as,
|
|
2483
|
-
type,
|
|
2484
|
-
className,
|
|
2485
|
-
children,
|
|
2486
|
-
onClick,
|
|
2487
|
-
...props
|
|
2488
|
-
}, ref) {
|
|
2489
|
-
const Component = as ?? (href ? "a" : "button");
|
|
2490
|
-
const isNativeButton = Component === "button";
|
|
2491
|
-
const inactive = disabled || loading;
|
|
2492
|
-
const linkProps = isNativeButton ? { type: type ?? "button", disabled: inactive } : {
|
|
2493
|
-
href,
|
|
2494
|
-
"aria-disabled": inactive || void 0,
|
|
2495
|
-
tabIndex: inactive ? -1 : void 0
|
|
2496
|
-
};
|
|
2497
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2498
|
-
Component,
|
|
2499
|
-
{
|
|
2500
|
-
ref,
|
|
2501
|
-
"data-shell-button": "",
|
|
2502
|
-
"data-variant": variant,
|
|
2503
|
-
"aria-busy": loading || void 0,
|
|
2504
|
-
className: clsx5__default.default(
|
|
2505
|
-
"inline-flex items-center justify-center gap-2 rounded-[5px] px-3 text-sm font-semibold no-underline transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--app-field-focus,var(--color-accent))] focus-visible:ring-offset-2",
|
|
2506
|
-
SIZE_CLASS[size],
|
|
2507
|
-
VARIANT_CLASS[variant],
|
|
2508
|
-
inactive && "cursor-not-allowed opacity-50",
|
|
2509
|
-
className
|
|
2510
|
-
),
|
|
2511
|
-
onClick: inactive ? (event) => {
|
|
2512
|
-
event.preventDefault();
|
|
2513
|
-
event.stopPropagation();
|
|
2514
|
-
} : onClick,
|
|
2515
|
-
...linkProps,
|
|
2516
|
-
...props,
|
|
2517
|
-
children: [
|
|
2518
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2519
|
-
"span",
|
|
2520
|
-
{
|
|
2521
|
-
"aria-hidden": "true",
|
|
2522
|
-
"data-shell-button-spinner": "",
|
|
2523
|
-
className: "inline-block h-4 w-4 animate-spin motion-reduce:animate-none rounded-full border-2 border-current border-t-transparent"
|
|
2524
|
-
}
|
|
2525
|
-
) : null,
|
|
2417
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-4 text-lg font-semibold", children: title }),
|
|
2526
2418
|
children
|
|
2527
2419
|
]
|
|
2528
2420
|
}
|
|
2529
2421
|
);
|
|
2530
|
-
});
|
|
2531
|
-
var Button_default = Button;
|
|
2532
|
-
function FormField({
|
|
2533
|
-
id,
|
|
2534
|
-
label,
|
|
2535
|
-
helperText,
|
|
2536
|
-
error,
|
|
2537
|
-
required,
|
|
2538
|
-
className,
|
|
2539
|
-
children
|
|
2540
|
-
}) {
|
|
2541
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx5__default.default("flex w-full flex-col gap-1", className), children: [
|
|
2542
|
-
label ? /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: id, className: "text-sm font-semibold text-[color:var(--color-text)]", children: [
|
|
2543
|
-
label,
|
|
2544
|
-
required ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: " *" }) : null
|
|
2545
|
-
] }) : null,
|
|
2546
|
-
children,
|
|
2547
|
-
error ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2548
|
-
"p",
|
|
2549
|
-
{
|
|
2550
|
-
id: `${id}-error`,
|
|
2551
|
-
role: "alert",
|
|
2552
|
-
className: "text-xs text-[color:var(--chrome-danger,var(--color-race-red))]",
|
|
2553
|
-
children: error
|
|
2554
|
-
}
|
|
2555
|
-
) : helperText ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-helper`, className: "text-xs text-[color:var(--color-text-muted)]", children: helperText }) : null
|
|
2556
|
-
] });
|
|
2557
|
-
}
|
|
2558
|
-
function describedBy(id, helperText, error, extra) {
|
|
2559
|
-
const generated = error ? `${id}-error` : helperText ? `${id}-helper` : void 0;
|
|
2560
|
-
const merged = [generated, extra].filter(Boolean).join(" ");
|
|
2561
|
-
return merged || void 0;
|
|
2562
2422
|
}
|
|
2563
|
-
|
|
2564
|
-
// src/components/fieldStyles.ts
|
|
2565
|
-
var FIELD_BASE = "w-full rounded-[5px] border bg-[color:var(--app-field-bg,var(--color-white))] px-3 text-sm text-[color:var(--color-text)] placeholder:text-[color:var(--color-text-muted)] focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50";
|
|
2566
|
-
var FIELD_VALID = "border-[color:var(--app-field-border,var(--color-border))] hover:border-[color:var(--app-field-border-hover,var(--color-g4))] focus:border-[color:var(--app-field-focus,var(--color-accent))] focus:ring-[color:var(--app-field-focus,var(--color-accent))]";
|
|
2567
|
-
var FIELD_INVALID = "border-[color:var(--chrome-danger,var(--color-race-red))] focus:ring-[color:var(--chrome-danger,var(--color-race-red))]";
|
|
2568
|
-
var Input = react.forwardRef(function Input2({ label, helperText, error, invalid, className, wrapperClassName, id, required, "aria-describedby": ariaDescribedBy, ...props }, ref) {
|
|
2569
|
-
const autoId = react.useId();
|
|
2570
|
-
const fieldId = id ?? autoId;
|
|
2571
|
-
const isInvalid = Boolean(error) || Boolean(invalid);
|
|
2572
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2573
|
-
FormField,
|
|
2574
|
-
{
|
|
2575
|
-
id: fieldId,
|
|
2576
|
-
label,
|
|
2577
|
-
helperText,
|
|
2578
|
-
error,
|
|
2579
|
-
required,
|
|
2580
|
-
className: wrapperClassName,
|
|
2581
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2582
|
-
"input",
|
|
2583
|
-
{
|
|
2584
|
-
ref,
|
|
2585
|
-
id: fieldId,
|
|
2586
|
-
required,
|
|
2587
|
-
"data-shell-field": "",
|
|
2588
|
-
"aria-invalid": isInvalid || void 0,
|
|
2589
|
-
"aria-describedby": describedBy(fieldId, helperText, error, ariaDescribedBy),
|
|
2590
|
-
className: clsx5__default.default(FIELD_BASE, "h-[44px]", isInvalid ? FIELD_INVALID : FIELD_VALID, className),
|
|
2591
|
-
...props
|
|
2592
|
-
}
|
|
2593
|
-
)
|
|
2594
|
-
}
|
|
2595
|
-
);
|
|
2596
|
-
});
|
|
2597
|
-
var Input_default = Input;
|
|
2598
|
-
var Select = react.forwardRef(function Select2({ label, helperText, error, invalid, className, wrapperClassName, id, required, children, "aria-describedby": ariaDescribedBy, ...props }, ref) {
|
|
2599
|
-
const autoId = react.useId();
|
|
2600
|
-
const fieldId = id ?? autoId;
|
|
2601
|
-
const isInvalid = Boolean(error) || Boolean(invalid);
|
|
2602
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2603
|
-
FormField,
|
|
2604
|
-
{
|
|
2605
|
-
id: fieldId,
|
|
2606
|
-
label,
|
|
2607
|
-
helperText,
|
|
2608
|
-
error,
|
|
2609
|
-
required,
|
|
2610
|
-
className: wrapperClassName,
|
|
2611
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2612
|
-
"select",
|
|
2613
|
-
{
|
|
2614
|
-
ref,
|
|
2615
|
-
id: fieldId,
|
|
2616
|
-
required,
|
|
2617
|
-
"data-shell-field": "",
|
|
2618
|
-
"aria-invalid": isInvalid || void 0,
|
|
2619
|
-
"aria-describedby": describedBy(fieldId, helperText, error, ariaDescribedBy),
|
|
2620
|
-
className: clsx5__default.default(FIELD_BASE, "h-[44px]", isInvalid ? FIELD_INVALID : FIELD_VALID, className),
|
|
2621
|
-
...props,
|
|
2622
|
-
children
|
|
2623
|
-
}
|
|
2624
|
-
)
|
|
2625
|
-
}
|
|
2626
|
-
);
|
|
2627
|
-
});
|
|
2628
|
-
var Select_default = Select;
|
|
2629
|
-
var Textarea = react.forwardRef(function Textarea2({ label, helperText, error, invalid, className, wrapperClassName, id, required, "aria-describedby": ariaDescribedBy, ...props }, ref) {
|
|
2630
|
-
const autoId = react.useId();
|
|
2631
|
-
const fieldId = id ?? autoId;
|
|
2632
|
-
const isInvalid = Boolean(error) || Boolean(invalid);
|
|
2633
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2634
|
-
FormField,
|
|
2635
|
-
{
|
|
2636
|
-
id: fieldId,
|
|
2637
|
-
label,
|
|
2638
|
-
helperText,
|
|
2639
|
-
error,
|
|
2640
|
-
required,
|
|
2641
|
-
className: wrapperClassName,
|
|
2642
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2643
|
-
"textarea",
|
|
2644
|
-
{
|
|
2645
|
-
ref,
|
|
2646
|
-
id: fieldId,
|
|
2647
|
-
required,
|
|
2648
|
-
"data-shell-field": "",
|
|
2649
|
-
"aria-invalid": isInvalid || void 0,
|
|
2650
|
-
"aria-describedby": describedBy(fieldId, helperText, error, ariaDescribedBy),
|
|
2651
|
-
className: clsx5__default.default(FIELD_BASE, "min-h-[88px] py-3", isInvalid ? FIELD_INVALID : FIELD_VALID, className),
|
|
2652
|
-
...props
|
|
2653
|
-
}
|
|
2654
|
-
)
|
|
2655
|
-
}
|
|
2656
|
-
);
|
|
2657
|
-
});
|
|
2658
|
-
var Textarea_default = Textarea;
|
|
2659
|
-
var Checkbox = react.forwardRef(function Checkbox2({
|
|
2660
|
-
label,
|
|
2661
|
-
description,
|
|
2662
|
-
indeterminate,
|
|
2663
|
-
invalid,
|
|
2664
|
-
className,
|
|
2665
|
-
wrapperClassName,
|
|
2666
|
-
id,
|
|
2667
|
-
disabled,
|
|
2668
|
-
"aria-describedby": ariaDescribedBy,
|
|
2669
|
-
...props
|
|
2670
|
-
}, ref) {
|
|
2671
|
-
const autoId = react.useId();
|
|
2672
|
-
const fieldId = id ?? autoId;
|
|
2673
|
-
const descId = description ? `${fieldId}-description` : void 0;
|
|
2674
|
-
const inner = react.useRef(null);
|
|
2675
|
-
const setRef = react.useCallback(
|
|
2676
|
-
(node) => {
|
|
2677
|
-
inner.current = node;
|
|
2678
|
-
if (typeof ref === "function") ref(node);
|
|
2679
|
-
else if (ref) ref.current = node;
|
|
2680
|
-
},
|
|
2681
|
-
[ref]
|
|
2682
|
-
);
|
|
2683
|
-
react.useEffect(() => {
|
|
2684
|
-
if (inner.current) inner.current.indeterminate = Boolean(indeterminate);
|
|
2685
|
-
}, [indeterminate]);
|
|
2686
|
-
const describedBy2 = [descId, ariaDescribedBy].filter(Boolean).join(" ") || void 0;
|
|
2687
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2688
|
-
"label",
|
|
2689
|
-
{
|
|
2690
|
-
htmlFor: fieldId,
|
|
2691
|
-
"data-shell-checkbox": "",
|
|
2692
|
-
className: clsx5__default.default(
|
|
2693
|
-
"flex min-h-[44px] items-start gap-3 py-[10px] text-sm text-[color:var(--app-card-fg,var(--color-text))]",
|
|
2694
|
-
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
2695
|
-
wrapperClassName
|
|
2696
|
-
),
|
|
2697
|
-
children: [
|
|
2698
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2699
|
-
"input",
|
|
2700
|
-
{
|
|
2701
|
-
...props,
|
|
2702
|
-
ref: setRef,
|
|
2703
|
-
id: fieldId,
|
|
2704
|
-
type: "checkbox",
|
|
2705
|
-
disabled,
|
|
2706
|
-
"data-shell-field": "",
|
|
2707
|
-
"aria-invalid": invalid || void 0,
|
|
2708
|
-
"aria-describedby": describedBy2,
|
|
2709
|
-
className: clsx5__default.default(
|
|
2710
|
-
"mt-[2px] h-5 w-5 shrink-0 rounded-[5px] border focus:outline-none focus-visible:ring-2",
|
|
2711
|
-
"accent-[color:var(--color-accent-bg-safe,var(--color-accent))]",
|
|
2712
|
-
"focus-visible:ring-[color:var(--app-field-focus,var(--color-accent))]",
|
|
2713
|
-
invalid ? "border-[color:var(--chrome-danger,var(--color-race-red))] outline outline-2 outline-[color:var(--chrome-danger,var(--color-race-red))]" : "border-[color:var(--app-field-border,var(--color-border))]",
|
|
2714
|
-
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2715
|
-
className
|
|
2716
|
-
)
|
|
2717
|
-
}
|
|
2718
|
-
),
|
|
2719
|
-
label || description ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0", children: [
|
|
2720
|
-
label ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block font-medium", children: label }) : null,
|
|
2721
|
-
description ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2722
|
-
"span",
|
|
2723
|
-
{
|
|
2724
|
-
id: descId,
|
|
2725
|
-
className: "block text-xs text-[color:var(--app-card-fg-muted,var(--color-text-muted))]",
|
|
2726
|
-
children: description
|
|
2727
|
-
}
|
|
2728
|
-
) : null
|
|
2729
|
-
] }) : null
|
|
2730
|
-
]
|
|
2731
|
-
}
|
|
2732
|
-
);
|
|
2733
|
-
});
|
|
2734
|
-
var Checkbox_default = Checkbox;
|
|
2735
|
-
var FileInput = react.forwardRef(function FileInput2({ label, helperText, error, invalid, className, wrapperClassName, id, required, "aria-describedby": ariaDescribedBy, ...props }, ref) {
|
|
2736
|
-
const autoId = react.useId();
|
|
2737
|
-
const fieldId = id ?? autoId;
|
|
2738
|
-
const isInvalid = Boolean(error) || Boolean(invalid);
|
|
2739
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2740
|
-
FormField,
|
|
2741
|
-
{
|
|
2742
|
-
id: fieldId,
|
|
2743
|
-
label,
|
|
2744
|
-
helperText,
|
|
2745
|
-
error,
|
|
2746
|
-
required,
|
|
2747
|
-
className: wrapperClassName,
|
|
2748
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2749
|
-
"input",
|
|
2750
|
-
{
|
|
2751
|
-
...props,
|
|
2752
|
-
ref,
|
|
2753
|
-
id: fieldId,
|
|
2754
|
-
type: "file",
|
|
2755
|
-
required,
|
|
2756
|
-
"data-shell-field": "",
|
|
2757
|
-
"aria-invalid": isInvalid || void 0,
|
|
2758
|
-
"aria-describedby": describedBy(fieldId, helperText, error, ariaDescribedBy),
|
|
2759
|
-
className: clsx5__default.default(
|
|
2760
|
-
FIELD_BASE,
|
|
2761
|
-
"h-[44px] cursor-pointer py-[5px] file:mr-3 file:h-[32px] file:cursor-pointer file:rounded-[5px] file:border file:border-[color:var(--app-btn-secondary-border,var(--color-border))] file:bg-[color:var(--app-btn-secondary-bg,var(--color-white))] file:px-3 file:text-sm file:font-medium file:text-[color:var(--app-btn-secondary-fg,var(--color-text))]",
|
|
2762
|
-
isInvalid ? FIELD_INVALID : FIELD_VALID,
|
|
2763
|
-
className
|
|
2764
|
-
)
|
|
2765
|
-
}
|
|
2766
|
-
)
|
|
2767
|
-
}
|
|
2768
|
-
);
|
|
2769
|
-
});
|
|
2770
|
-
var FileInput_default = FileInput;
|
|
2771
2423
|
var standardNavIcons = {
|
|
2772
2424
|
home: lu.LuHouse,
|
|
2773
2425
|
users: lu.LuUsers,
|
|
@@ -3317,7 +2969,7 @@ function NavSidebar({
|
|
|
3317
2969
|
role: open ? "dialog" : void 0,
|
|
3318
2970
|
"aria-modal": open ? "true" : void 0,
|
|
3319
2971
|
"aria-label": open ? "Navigation" : void 0,
|
|
3320
|
-
className:
|
|
2972
|
+
className: clsx4__default.default(
|
|
3321
2973
|
"fixed inset-y-0 left-0 flex flex-col border-r border-[color:var(--sidebar-line,var(--line))] bg-[color:var(--sidebar-bg,var(--nav-surface))]",
|
|
3322
2974
|
// Never hidden: the 64px icon rail below `md`, the full rail from
|
|
3323
2975
|
// `md` up, and the full rail as a drawer when expanded below `md`.
|
|
@@ -4713,20 +4365,16 @@ function NavAppShell({
|
|
|
4713
4365
|
|
|
4714
4366
|
exports.BETA_BANNER_DISMISS_KEY = BETA_BANNER_DISMISS_KEY;
|
|
4715
4367
|
exports.BreadcrumbBar = BreadcrumbBar;
|
|
4716
|
-
exports.Button = Button_default;
|
|
4717
4368
|
exports.CAMPAIGN_FEATURE_AVAILABILITY = CAMPAIGN_FEATURE_AVAILABILITY;
|
|
4718
4369
|
exports.CORE_APP_ORIGIN = CORE_APP_ORIGIN;
|
|
4719
4370
|
exports.CORE_BILLING_PATH = CORE_BILLING_PATH;
|
|
4720
4371
|
exports.CREDIT_TYPE_LABELS = CREDIT_TYPE_LABELS;
|
|
4721
4372
|
exports.CREDIT_TYPE_ORDER = CREDIT_TYPE_ORDER;
|
|
4722
4373
|
exports.Card = Card;
|
|
4723
|
-
exports.Checkbox = Checkbox_default;
|
|
4724
4374
|
exports.CreditsAction = CreditsAction;
|
|
4725
|
-
exports.FileInput = FileInput_default;
|
|
4726
4375
|
exports.FormColumn = FormColumn;
|
|
4727
4376
|
exports.FuelAction = FuelAction;
|
|
4728
4377
|
exports.HeaderTabBar = HeaderTabBar;
|
|
4729
|
-
exports.Input = Input_default;
|
|
4730
4378
|
exports.NavAppShell = NavAppShell;
|
|
4731
4379
|
exports.NavBetaBanner = NavBetaBanner;
|
|
4732
4380
|
exports.NavChromeProvider = NavChromeProvider;
|
|
@@ -4738,10 +4386,8 @@ exports.NavTopBar = NavTopBar;
|
|
|
4738
4386
|
exports.NotificationsAction = NotificationsAction;
|
|
4739
4387
|
exports.PageHeader = PageHeader;
|
|
4740
4388
|
exports.SPECS_ORIGIN = SPECS_ORIGIN;
|
|
4741
|
-
exports.Select = Select_default;
|
|
4742
4389
|
exports.SpecOverlayAction = SpecOverlayAction;
|
|
4743
4390
|
exports.SupportAction = SupportAction;
|
|
4744
|
-
exports.Textarea = Textarea_default;
|
|
4745
4391
|
exports.TopBarCountBadge = TopBarCountBadge;
|
|
4746
4392
|
exports.TopBarPanelArrow = TopBarPanelArrow;
|
|
4747
4393
|
exports.TopBarPopover = TopBarPopover;
|