Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -14,33 +14,22 @@ import * as SubframeUtils from "../../utils";
import { Accordion } from "../Accordion";
import { Avatar } from "../Avatar";
export interface DropdownDividerProps
extends React.HTMLAttributes<HTMLDivElement> {
export interface DropdownDividerProps extends React.HTMLAttributes<HTMLDivElement> {
className?: string;
}
const DropdownDivider = React.forwardRef<HTMLDivElement, DropdownDividerProps>(
function DropdownDivider(
{ className, ...otherProps }: DropdownDividerProps,
ref
) {
return (
<div
className={SubframeUtils.twClassNames(
"flex w-full items-start gap-2 px-1 py-1",
className
)}
ref={ref}
{...otherProps}
>
<div className="flex h-px grow shrink-0 basis-0 flex-col items-center gap-2 bg-border-default" />
</div>
);
}
);
const DropdownDivider = React.forwardRef<HTMLDivElement, DropdownDividerProps>(function DropdownDivider(
{ className, ...otherProps }: DropdownDividerProps,
ref
) {
return (
<div className={SubframeUtils.twClassNames("flex w-full items-start gap-2 px-1 py-1", className)} ref={ref} {...otherProps}>
<div className="bg-border-default flex h-px shrink-0 grow basis-0 flex-col items-center gap-2" />
</div>
);
});
export interface DropdownItemProps
extends React.ComponentProps<typeof SubframeCore.DropdownMenu.Item> {
export interface DropdownItemProps extends React.ComponentProps<typeof SubframeCore.DropdownMenu.Item> {
children?: React.ReactNode;
icon?: React.ReactNode;
iconRight?: React.ReactNode;
@@ -50,124 +39,92 @@ export interface DropdownItemProps
className?: string;
}
const DropdownItem = React.forwardRef<HTMLDivElement, DropdownItemProps>(
function DropdownItem(
{
children,
icon = null,
iconRight = null,
image,
selected = false,
showCheckbox = false,
className,
...otherProps
}: DropdownItemProps,
ref
) {
return (
<SubframeCore.DropdownMenu.Item asChild={true} {...otherProps}>
const DropdownItem = React.forwardRef<HTMLDivElement, DropdownItemProps>(function DropdownItem(
{ children, icon = null, iconRight = null, image, selected = false, showCheckbox = false, className, ...otherProps }: DropdownItemProps,
ref
) {
return (
<SubframeCore.DropdownMenu.Item asChild={true} {...otherProps}>
<div
className={SubframeUtils.twClassNames(
"group/adcae8d6 group/dropdown-item hover:bg-surface-neutral-tertiary active:bg-surface-neutral-secondary flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-2",
{
"bg-surface-ui-subtle-blue-default hover:bg-surface-ui-subtle-blue-hover active:bg-surface-ui-subtle-blue-active": selected,
},
className
)}
ref={ref}
>
<div
className={SubframeUtils.twClassNames(
"group/adcae8d6 flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-2 group/dropdown-item hover:bg-surface-neutral-tertiary active:bg-surface-neutral-secondary",
"border-border-strong bg-surface-neutral-secondary hidden h-4 w-4 flex-none flex-col items-center justify-center rounded-sm border-2 border-solid",
{
"bg-surface-ui-subtle-blue-default hover:bg-surface-ui-subtle-blue-hover active:bg-surface-ui-subtle-blue-active":
selected,
},
className
flex: showCheckbox,
"border-brand-brand-border-solid-default bg-brand-brand-surface-solid-default border-2 border-solid": selected,
}
)}
ref={ref}
>
<div
<FeatherCheck
className={SubframeUtils.twClassNames("text-body-extra-small-semibold-150 font-body-extra-small-semibold-150 text-icon-neutral-on-solid hidden", {
"inline-flex": selected,
})}
/>
</div>
{image ? <img className="rounded-round h-6 w-6 flex-none object-cover" src={image} alt="" /> : null}
{icon ? (
<SubframeCore.IconWrapper
className={SubframeUtils.twClassNames("text-body-small-regular-150 font-body-small-regular-150 text-icon-neutral-tertiary", {
"text-icon-neutral-primary": selected,
})}
>
{icon}
</SubframeCore.IconWrapper>
) : null}
{children ? (
<span
className={SubframeUtils.twClassNames(
"hidden h-4 w-4 flex-none flex-col items-center justify-center rounded-sm border-2 border-solid border-border-strong bg-surface-neutral-secondary",
{
flex: showCheckbox,
"border-2 border-solid border-brand-brand-border-solid-default bg-brand-brand-surface-solid-default":
selected,
}
"text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-tertiary line-clamp-1 shrink-0 grow basis-0",
{ "text-text-neutral-primary": selected }
)}
>
<FeatherCheck
className={SubframeUtils.twClassNames(
"hidden text-body-extra-small-semibold-150 font-body-extra-small-semibold-150 text-icon-neutral-on-solid",
{ "inline-flex": selected }
)}
/>
</div>
{image ? (
<img
className="h-6 w-6 flex-none rounded-round object-cover"
src={image}
/>
) : null}
{icon ? (
<SubframeCore.IconWrapper
className={SubframeUtils.twClassNames(
"text-body-small-regular-150 font-body-small-regular-150 text-icon-neutral-tertiary",
{ "text-icon-neutral-primary": selected }
)}
>
{icon}
</SubframeCore.IconWrapper>
) : null}
{children ? (
<span
className={SubframeUtils.twClassNames(
"line-clamp-1 grow shrink-0 basis-0 text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-tertiary",
{ "text-text-neutral-primary": selected }
)}
>
{children}
</span>
) : null}
{iconRight ? (
<SubframeCore.IconWrapper
className={SubframeUtils.twClassNames(
"text-body-small-regular-150 font-body-small-regular-150 text-icon-neutral-tertiary",
{ "text-icon-neutral-primary": selected }
)}
>
{iconRight}
</SubframeCore.IconWrapper>
) : null}
</div>
</SubframeCore.DropdownMenu.Item>
);
}
);
{children}
</span>
) : null}
{iconRight ? (
<SubframeCore.IconWrapper
className={SubframeUtils.twClassNames("text-body-small-regular-150 font-body-small-regular-150 text-icon-neutral-tertiary", {
"text-icon-neutral-primary": selected,
})}
>
{iconRight}
</SubframeCore.IconWrapper>
) : null}
</div>
</SubframeCore.DropdownMenu.Item>
);
});
export interface DropdownUserItemProps
extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
export interface DropdownUserItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
title?: React.ReactNode;
subtitle?: React.ReactNode;
image?: string;
/** Avatar fallback shown when no image is set. */
initials?: React.ReactNode;
selected?: boolean;
showCheckbox?: boolean;
className?: string;
}
const DropdownUserItem = React.forwardRef<
HTMLDivElement,
DropdownUserItemProps
>(function DropdownUserItem(
{
title,
subtitle,
image,
selected = false,
showCheckbox = false,
className,
...otherProps
}: DropdownUserItemProps,
const DropdownUserItem = React.forwardRef<HTMLDivElement, DropdownUserItemProps>(function DropdownUserItem(
{ title, subtitle, image, initials, selected = false, showCheckbox = false, className, ...otherProps }: DropdownUserItemProps,
ref
) {
return (
<div
className={SubframeUtils.twClassNames(
"group/0d3c57ad flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-2 group/user-item hover:bg-surface-neutral-tertiary active:bg-surface-neutral-secondary",
"group/0d3c57ad group/user-item hover:bg-surface-neutral-tertiary active:bg-surface-neutral-secondary flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-2",
{
"bg-surface-ui-subtle-blue-default hover:bg-surface-ui-subtle-blue-hover active:bg-surface-ui-subtle-blue-active":
selected,
"bg-surface-ui-subtle-blue-default hover:bg-surface-ui-subtle-blue-hover active:bg-surface-ui-subtle-blue-active": selected,
},
className
)}
@@ -176,106 +133,78 @@ const DropdownUserItem = React.forwardRef<
>
<div
className={SubframeUtils.twClassNames(
"hidden h-4 w-4 flex-none flex-col items-center justify-center rounded-sm border-2 border-solid border-border-strong bg-surface-neutral-secondary",
"border-border-strong bg-surface-neutral-secondary hidden h-4 w-4 flex-none flex-col items-center justify-center rounded-sm border-2 border-solid",
{
flex: showCheckbox,
"border-2 border-solid border-brand-brand-border-solid-default bg-brand-brand-surface-solid-default":
selected,
"border-brand-brand-border-solid-default bg-brand-brand-surface-solid-default border-2 border-solid": selected,
}
)}
>
<FeatherCheck
className={SubframeUtils.twClassNames(
"hidden text-body-extra-small-semibold-150 font-body-extra-small-semibold-150 text-icon-neutral-on-solid",
{ "inline-flex": selected }
)}
className={SubframeUtils.twClassNames("text-body-extra-small-semibold-150 font-body-extra-small-semibold-150 text-icon-neutral-on-solid hidden", {
"inline-flex": selected,
})}
/>
</div>
<Avatar size="small" image={image}>
OR
{initials}
</Avatar>
<div className="flex grow shrink-0 basis-0 flex-col items-start">
{title ? (
<span className="line-clamp-1 w-full text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-primary">
{title}
</span>
) : null}
<div className="flex shrink-0 grow basis-0 flex-col items-start">
{title ? <span className="text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-primary line-clamp-1 w-full">{title}</span> : null}
{subtitle ? (
<span className="line-clamp-1 w-full text-body-extra-small-regular-150 font-body-extra-small-regular-150 text-text-neutral-tertiary">
{subtitle}
</span>
<span className="text-body-extra-small-regular-150 font-body-extra-small-regular-150 text-text-neutral-tertiary line-clamp-1 w-full">{subtitle}</span>
) : null}
</div>
</div>
);
});
export interface DropdownCustomItemProps
extends React.HTMLAttributes<HTMLDivElement> {
export interface DropdownCustomItemProps extends React.HTMLAttributes<HTMLDivElement> {
children?: React.ReactNode;
className?: string;
}
const DropdownCustomItem = React.forwardRef<
HTMLDivElement,
DropdownCustomItemProps
>(function DropdownCustomItem(
const DropdownCustomItem = React.forwardRef<HTMLDivElement, DropdownCustomItemProps>(function DropdownCustomItem(
{ children, className, ...otherProps }: DropdownCustomItemProps,
ref
) {
return children ? (
<div
className={SubframeUtils.twClassNames(
"flex w-full flex-col items-start gap-2 rounded-md px-3 py-2",
className
)}
ref={ref}
{...otherProps}
>
<div className={SubframeUtils.twClassNames("flex w-full flex-col items-start gap-2 rounded-md px-3 py-2", className)} ref={ref} {...otherProps}>
{children}
</div>
) : null;
});
export interface DropdownNestedItemProps
extends React.ComponentProps<typeof Accordion> {
export interface DropdownNestedItemProps extends React.ComponentProps<typeof Accordion> {
children?: React.ReactNode;
label?: React.ReactNode;
icon?: React.ReactNode;
className?: string;
}
const DropdownNestedItem = React.forwardRef<
React.ElementRef<typeof Accordion>,
DropdownNestedItemProps
>(function DropdownNestedItem(
{
children,
label,
icon = <FeatherLayers />,
className,
...otherProps
}: DropdownNestedItemProps,
const DropdownNestedItem = React.forwardRef<React.ElementRef<typeof Accordion>, DropdownNestedItemProps>(function DropdownNestedItem(
{ children, label, icon = <FeatherLayers />, className, ...otherProps }: DropdownNestedItemProps,
ref
) {
return (
<Accordion
className={SubframeUtils.twClassNames(
"group/ca3b20a3 cursor-pointer group/nested-item",
className
)}
className={SubframeUtils.twClassNames("group/ca3b20a3 group/nested-item cursor-pointer", className)}
variant="ghost"
role="none"
triggerRole="menuitem"
// @subframe/sync-disable -- local fix: group-hover/ca3b20a3 -> hover on the
// trigger row. The group is the whole accordion, so hovering an item in the
// expanded submenu also lit up the trigger above it — two highlighted rows at
// once. Only the trigger itself should react to its own hover.
trigger={
<div className="flex h-8 w-full flex-none items-center gap-2 rounded-md px-3 group-hover/ca3b20a3:bg-surface-neutral-tertiary">
<div className="hover:bg-surface-neutral-tertiary flex h-8 w-full flex-none items-center gap-2 rounded-md px-3">
{icon ? (
<SubframeCore.IconWrapper className="text-body-small-regular-150 font-body-small-regular-150 text-icon-neutral-primary">
{icon}
</SubframeCore.IconWrapper>
) : null}
{label ? (
<span className="line-clamp-1 grow shrink-0 basis-0 text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-primary">
{label}
</span>
<span className="text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-primary line-clamp-1 shrink-0 grow basis-0">{label}</span>
) : null}
<Accordion.Chevron />
</div>
@@ -283,30 +212,27 @@ const DropdownNestedItem = React.forwardRef<
ref={ref}
{...otherProps}
>
{children ? (
<div className="flex w-full flex-col items-start gap-1">{children}</div>
) : null}
{children ? <div className="flex w-full flex-col items-start gap-1">{children}</div> : null}
</Accordion>
);
});
export interface DropdownMenuRootProps
extends React.HTMLAttributes<HTMLDivElement> {
export interface DropdownMenuRootProps extends React.HTMLAttributes<HTMLDivElement> {
children?: React.ReactNode;
className?: string;
}
const DropdownMenuRoot = React.forwardRef<
HTMLDivElement,
DropdownMenuRootProps
>(function DropdownMenuRoot(
const DropdownMenuRoot = React.forwardRef<HTMLDivElement, DropdownMenuRootProps>(function DropdownMenuRoot(
{ children, className, ...otherProps }: DropdownMenuRootProps,
ref
) {
return children ? (
<div
className={SubframeUtils.twClassNames(
"flex min-w-[192px] flex-col items-start rounded-md border border-solid border-border-default bg-surface-neutral-secondary px-1 py-1 shadow-lg",
// Local adjustment: `relative z-50`. The panel opens in a portal whose
// wrapper has no z-index, so any positioned `z-10` in the page (e.g. the
// ProjectCard price row) paints over the open menu.
"border-border-default bg-surface-neutral-secondary relative z-50 flex min-w-[192px] flex-col items-start rounded-md border border-solid px-1 py-1 shadow-lg",
className
)}
ref={ref}