@hirobius/design-system 0.19.1 → 0.21.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/AGENTS.md +123 -0
- package/CONSUMING.md +11 -6
- package/DESIGN.md +34 -21
- package/NOTICE.md +1 -1
- package/README.md +48 -13
- package/codemods/hds-prefix.mjs +231 -0
- package/codemods/jsx-fold.mjs +515 -0
- package/codemods/not-found-pattern.mjs +71 -0
- package/codemods/patterns-subpath.mjs +242 -81
- package/codemods/patterns-subpath.names.json +41 -15
- package/codemods/removed-0.20.json +194 -0
- package/codemods/tile-grid.mjs +283 -0
- package/codemods/unrewritable.mjs +291 -0
- package/dist/chunks/DemoStateContext-Cz5TmrYu.js +32 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- package/dist/contexts.js +157 -78
- package/dist/fonts/geist-mono-400.woff2 +0 -0
- package/dist/fonts/satoshi-400.woff2 +0 -0
- package/dist/fonts/satoshi-500.woff2 +0 -0
- package/dist/fonts/satoshi-700.woff2 +0 -0
- package/dist/fonts.css +53 -0
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +1600 -5354
- package/dist/manifest.js +12 -13
- package/dist/patterns.js +796 -510
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +165 -65
- package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +2 -2
- package/dist/types/src/app/components/badge.d.ts +8 -3
- package/dist/types/src/app/components/blockquote.d.ts +2 -2
- package/dist/types/src/app/components/box-sx.d.ts +110 -13
- package/dist/types/src/app/components/box.d.ts +6 -3
- package/dist/types/src/app/components/breadcrumb.d.ts +0 -5
- package/dist/types/src/app/components/button.d.ts +35 -4
- package/dist/types/src/app/components/card.d.ts +10 -10
- package/dist/types/src/app/components/combobox.d.ts +47 -11
- package/dist/types/src/app/components/container.d.ts +2 -2
- package/dist/types/src/app/components/data-table-section.d.ts +2 -1
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +8 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -5
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -2
- package/dist/types/src/app/components/form-actions.d.ts +1 -0
- package/dist/types/src/app/components/form-control.d.ts +10 -0
- package/dist/types/src/app/components/grid.d.ts +15 -6
- package/dist/types/src/app/components/hds-tooltip.d.ts +12 -2
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-code.d.ts +1 -2
- package/dist/types/src/app/components/input.d.ts +8 -5
- package/dist/types/src/app/components/kbd.d.ts +2 -2
- package/dist/types/src/app/components/metadata-list.d.ts +2 -2
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/page-header.d.ts +0 -2
- package/dist/types/src/app/components/popover.d.ts +8 -0
- package/dist/types/src/app/components/progress.d.ts +33 -6
- package/dist/types/src/app/components/segmented-control.d.ts +2 -26
- package/dist/types/src/app/components/select.d.ts +10 -1
- package/dist/types/src/app/components/skeleton.d.ts +3 -4
- package/dist/types/src/app/components/spinner.d.ts +1 -2
- package/dist/types/src/app/components/stack.d.ts +4 -1
- package/dist/types/src/app/components/stat.d.ts +5 -5
- package/dist/types/src/app/components/status-list-item.d.ts +1 -2
- package/dist/types/src/app/components/status-tile.d.ts +3 -2
- package/dist/types/src/app/components/surface.d.ts +2 -3
- package/dist/types/src/app/components/switcher.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +6 -15
- package/dist/types/src/app/components/tag.d.ts +0 -6
- package/dist/types/src/app/components/text.d.ts +54 -8
- package/dist/types/src/app/components/textarea.d.ts +1 -2
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -2
- package/dist/types/src/app/components/tooltip.d.ts +1 -1
- package/dist/types/src/app/context/DemoStateContext.d.ts +1 -1
- package/dist/types/src/app/context/RouterContext.d.ts +5 -5
- package/dist/types/src/app/data/manifest-types.d.ts +10 -5
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +45 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +4 -0
- package/dist/types/src/app/design-system/tokens.d.ts +139 -18
- package/dist/types/src/icons.d.ts +1 -1
- package/dist/types/src/index.d.ts +76 -164
- package/dist/types/src/patterns.d.ts +20 -25
- package/dist/variables.css +47 -33
- package/docs/CONSUMING.md +80 -48
- package/hirobius.tokens.json +125 -88
- package/llms.txt +166 -59
- package/mcp/catalog.mjs +366 -0
- package/mcp/guide.mjs +315 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +48 -27
- package/public/hds-manifest.json +2667 -6705
- package/public/llms/components.txt +45 -426
- package/public/llms/layout.txt +5 -5
- package/public/llms-full.txt +245 -506
- package/public/llms.txt +166 -59
- package/scripts/eslint-plugin-hds/index.d.mts +29 -0
- package/scripts/eslint-plugin-hds/index.mjs +55 -0
- package/scripts/eslint-plugin-hds/package.json +30 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
- package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
- package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
- package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
- package/src/app/data/component-api.json +1082 -2913
- package/dist/chunks/LanguageContext-BxdCwiFg.js +0 -95
- package/dist/chunks/TokenDisplayContext-DKYJMVWk.js +0 -26
- package/dist/chunks/activity-feed-BGQ6v3wc.js +0 -22040
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/activity-feed.d.ts +0 -73
- package/dist/types/src/app/components/app-shell.d.ts +0 -40
- package/dist/types/src/app/components/aspect-ratio.d.ts +0 -25
- package/dist/types/src/app/components/bleed.d.ts +0 -39
- package/dist/types/src/app/components/button-group.d.ts +0 -22
- package/dist/types/src/app/components/calendar.d.ts +0 -22
- package/dist/types/src/app/components/carousel.d.ts +0 -26
- package/dist/types/src/app/components/center.d.ts +0 -36
- package/dist/types/src/app/components/cinematic-link.d.ts +0 -18
- package/dist/types/src/app/components/circular-progress.d.ts +0 -28
- package/dist/types/src/app/components/cluster.d.ts +0 -39
- package/dist/types/src/app/components/command-palette.d.ts +0 -46
- package/dist/types/src/app/components/component-instance-matrix.d.ts +0 -27
- package/dist/types/src/app/components/context-menu.d.ts +0 -78
- package/dist/types/src/app/components/cover.d.ts +0 -43
- package/dist/types/src/app/components/date-input.d.ts +0 -31
- package/dist/types/src/app/components/date-range-input.d.ts +0 -34
- package/dist/types/src/app/components/date-time-input.d.ts +0 -30
- package/dist/types/src/app/components/doc-link-card.d.ts +0 -32
- package/dist/types/src/app/components/error-boundary.d.ts +0 -25
- package/dist/types/src/app/components/file-input.d.ts +0 -30
- package/dist/types/src/app/components/foundation-swatch.d.ts +0 -45
- package/dist/types/src/app/components/frame.d.ts +0 -38
- package/dist/types/src/app/components/heading-stack.d.ts +0 -52
- package/dist/types/src/app/components/history-card.d.ts +0 -12
- package/dist/types/src/app/components/hover-card.d.ts +0 -46
- package/dist/types/src/app/components/icon-button.d.ts +0 -22
- package/dist/types/src/app/components/image-lightbox.d.ts +0 -14
- package/dist/types/src/app/components/input-group.d.ts +0 -23
- package/dist/types/src/app/components/multi-selector.d.ts +0 -40
- package/dist/types/src/app/components/nav-group.d.ts +0 -29
- package/dist/types/src/app/components/nav-item.d.ts +0 -33
- package/dist/types/src/app/components/not-found-pattern.d.ts +0 -1
- package/dist/types/src/app/components/overflow-list.d.ts +0 -21
- package/dist/types/src/app/components/selectable-card.d.ts +0 -29
- package/dist/types/src/app/components/side-nav.d.ts +0 -23
- package/dist/types/src/app/components/sketch.d.ts +0 -19
- package/dist/types/src/app/components/stacked-card-rail.d.ts +0 -32
- package/dist/types/src/app/components/status-dot.d.ts +0 -25
- package/dist/types/src/app/components/stepper-field.d.ts +0 -12
- package/dist/types/src/app/components/stepper.d.ts +0 -33
- package/dist/types/src/app/components/text-lockup.d.ts +0 -38
- package/dist/types/src/app/components/tile-grid.d.ts +0 -17
- package/dist/types/src/app/components/time-input.d.ts +0 -24
- package/dist/types/src/app/components/toggle-button.d.ts +0 -32
- package/dist/types/src/app/components/token.d.ts +0 -90
- package/dist/types/src/app/components/tokenUtils.d.ts +0 -38
- package/dist/types/src/app/components/tokenizer.d.ts +0 -24
- package/dist/types/src/app/components/toolbar.d.ts +0 -36
- package/dist/types/src/app/components/top-nav.d.ts +0 -23
- package/dist/types/src/app/components/tree-list.d.ts +0 -30
- package/dist/types/src/app/data/nav-model.d.ts +0 -39
- package/dist/types/src/app/hooks/useFocusVisible.d.ts +0 -9
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +0 -20
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -14
- package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +0 -6
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +0 -72
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +0 -14
- package/dist/types/src/app/lib/hds-search.d.ts +0 -45
- package/dist/types/src/app/lib/nav-active.d.ts +0 -16
- package/dist/types/src/app/lib/navLevels.d.ts +0 -4
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as m, jsxs as u } from "react/jsx-runtime";
|
|
3
|
-
import * as s from "react";
|
|
4
|
-
import { cn as p } from "../cn.js";
|
|
5
|
-
const g = /* @__PURE__ */ s.forwardRef(function({ className: e, ...l }, o) {
|
|
6
|
-
return /* @__PURE__ */ m("form", { ref: o, className: p("flex flex-col gap-4", e), ...l });
|
|
7
|
-
});
|
|
8
|
-
function F({
|
|
9
|
-
htmlFor: c,
|
|
10
|
-
childId: e,
|
|
11
|
-
description: l,
|
|
12
|
-
error: o
|
|
13
|
-
}) {
|
|
14
|
-
const i = s.useId(), r = c ?? e ?? i, n = `${r}-description`, d = `${r}-error`, a = [l ? n : null, o ? d : null].filter(Boolean).join(" ") || void 0;
|
|
15
|
-
return { controlId: r, descriptionId: n, errorId: d, describedBy: a };
|
|
16
|
-
}
|
|
17
|
-
const b = /* @__PURE__ */ s.forwardRef(
|
|
18
|
-
function({ controlId: e, label: l, description: o, error: i, required: r = !1, className: n, children: d }, a) {
|
|
19
|
-
const t = `${e}-description`, f = `${e}-error`;
|
|
20
|
-
return /* @__PURE__ */ u("div", { ref: a, className: p("flex flex-col gap-2", n), children: [
|
|
21
|
-
/* @__PURE__ */ u("label", { htmlFor: e, className: "text-sm font-medium text-foreground", children: [
|
|
22
|
-
l,
|
|
23
|
-
r ? /* @__PURE__ */ u("span", { "aria-hidden": "true", className: "text-destructive", children: [
|
|
24
|
-
" ",
|
|
25
|
-
"*"
|
|
26
|
-
] }) : null
|
|
27
|
-
] }),
|
|
28
|
-
d,
|
|
29
|
-
o && !i ? /* @__PURE__ */ m("p", { id: t, className: "text-xs text-muted-foreground", children: o }) : null,
|
|
30
|
-
i ? /* @__PURE__ */ m("p", { id: f, role: "alert", className: "text-xs text-destructive", children: i }) : null
|
|
31
|
-
] });
|
|
32
|
-
}
|
|
33
|
-
), N = /* @__PURE__ */ s.forwardRef(
|
|
34
|
-
function({ label: e, children: l, htmlFor: o, description: i, error: r, required: n = !1, className: d }, a) {
|
|
35
|
-
const t = s.Children.only(l), { controlId: f, describedBy: x } = F({
|
|
36
|
-
htmlFor: o,
|
|
37
|
-
childId: t.props.id,
|
|
38
|
-
description: i,
|
|
39
|
-
error: r
|
|
40
|
-
}), h = s.cloneElement(t, {
|
|
41
|
-
id: f,
|
|
42
|
-
required: t.props.required ?? n,
|
|
43
|
-
"aria-invalid": r ? !0 : t.props["aria-invalid"],
|
|
44
|
-
"aria-describedby": [t.props["aria-describedby"], x].filter(Boolean).join(" ") || void 0
|
|
45
|
-
});
|
|
46
|
-
return /* @__PURE__ */ m(
|
|
47
|
-
b,
|
|
48
|
-
{
|
|
49
|
-
ref: a,
|
|
50
|
-
controlId: f,
|
|
51
|
-
label: e,
|
|
52
|
-
description: i,
|
|
53
|
-
error: r,
|
|
54
|
-
required: n,
|
|
55
|
-
className: d,
|
|
56
|
-
children: h
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
export {
|
|
62
|
-
g as F,
|
|
63
|
-
b as a,
|
|
64
|
-
N as b,
|
|
65
|
-
F as u
|
|
66
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ActivityFeed — chronological system event log.
|
|
3
|
-
* @category Display
|
|
4
|
-
* @tier pattern
|
|
5
|
-
* @doc-exempt: internal portfolio and systems timeline pattern; no standalone component doc page
|
|
6
|
-
*
|
|
7
|
-
* Renders a list of activity events using white space as the sole separator.
|
|
8
|
-
* No dividers, no borders between items. 48px gap (space.12) creates the
|
|
9
|
-
* visual grouping between events; 16px gap inside each item structures the
|
|
10
|
-
* content hierarchy.
|
|
11
|
-
*
|
|
12
|
-
* Typography mapping:
|
|
13
|
-
* title → heading3 (24px/1.25)
|
|
14
|
-
* description → body (16px/1.5)
|
|
15
|
-
* timestamp → technical (12px/1.0 mono)
|
|
16
|
-
* category → ui (14px/1.5)
|
|
17
|
-
*/
|
|
18
|
-
import type { ReactNode } from 'react';
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Use `ActivityTone` instead — values are renamed to match the
|
|
21
|
-
* fixed HDS tone vocabulary (`neutral | danger | success | warning | info`,
|
|
22
|
-
* see docs/architecture/variant-contract.md). `'error'` remains supported
|
|
23
|
-
* here as a back-compat alias for `'danger'`; new code should use `tone`.
|
|
24
|
-
*
|
|
25
|
-
* @removeIn 1.0.0 — CHANGELOG 0.13.0 already states `status`/`ActivityStatus`
|
|
26
|
-
* go in a future major. Dropping a prop is breaking, so 1.0.0 is the first
|
|
27
|
-
* version that can carry it.
|
|
28
|
-
*/
|
|
29
|
-
export type ActivityStatus = 'success' | 'error' | 'warning' | 'info' | 'neutral';
|
|
30
|
-
/** @public */
|
|
31
|
-
export type ActivityTone = 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
32
|
-
export interface ActivityEvent {
|
|
33
|
-
id: string;
|
|
34
|
-
title: string;
|
|
35
|
-
description: string;
|
|
36
|
-
timestamp: string;
|
|
37
|
-
category: string;
|
|
38
|
-
icon: ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* Semantic tone for this event's icon and category color.
|
|
41
|
-
* `neutral | danger | success | warning | info`. Supersedes `status`.
|
|
42
|
-
*/
|
|
43
|
-
tone?: ActivityTone;
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated Use `tone` instead. Retained for back-compat; `'error'`
|
|
46
|
-
* resolves to the `danger` tone.
|
|
47
|
-
*
|
|
48
|
-
* @removeIn 1.0.0 — paired with ActivityStatus above; both go together.
|
|
49
|
-
*/
|
|
50
|
-
status?: ActivityStatus;
|
|
51
|
-
action?: {
|
|
52
|
-
label: string;
|
|
53
|
-
onClick?: () => void;
|
|
54
|
-
};
|
|
55
|
-
/** Optional structured metadata rendered between description and action.
|
|
56
|
-
* Reserved for compact metadata clusters like AgentTag (assignee,
|
|
57
|
-
* tier, cost). Keeps description as prose; meta is for chips/tags. */
|
|
58
|
-
meta?: ReactNode;
|
|
59
|
-
}
|
|
60
|
-
export interface ActivityFeedProps {
|
|
61
|
-
events: ActivityEvent[];
|
|
62
|
-
}
|
|
63
|
-
declare const activityToneVariants: (props?: ({
|
|
64
|
-
tone?: "success" | "danger" | "warning" | "info" | "neutral" | null | undefined;
|
|
65
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
66
|
-
declare const activityAvatarVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
67
|
-
/** @internal — demo placeholder data; supply your own ActivityEvent[] via the events prop. */
|
|
68
|
-
export declare const defaultActivityEvents: ActivityEvent[];
|
|
69
|
-
/**
|
|
70
|
-
*/
|
|
71
|
-
export declare function ActivityFeed({ events }: ActivityFeedProps): import("react/jsx-runtime").JSX.Element;
|
|
72
|
-
/** @internal — CVA variant helpers; compose via ActivityFeed/ActivityEvent props instead. */
|
|
73
|
-
export { activityToneVariants, activityAvatarVariants };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AppShell — application layout scaffold with semantic header, sidebar, and main regions, built for dashboards and admin surfaces.
|
|
3
|
-
* @category Layout
|
|
4
|
-
* @tier template
|
|
5
|
-
* @public
|
|
6
|
-
*
|
|
7
|
-
* Composes a full-height page frame from three optional/required regions: an
|
|
8
|
-
* optional top `header` (spans full width), an optional left `sidebar` (fixed
|
|
9
|
-
* width via `sidebarWidth`), and required `children` rendered in `<main>`.
|
|
10
|
-
* Regions map to native landmark elements (`<header>`, `<aside>`, `<main>`)
|
|
11
|
-
* so assistive tech gets banner/complementary/main roles for free.
|
|
12
|
-
*
|
|
13
|
-
* Usage:
|
|
14
|
-
* <AppShell header={<TopBar />} sidebar={<NavRail />}>
|
|
15
|
-
* <PageContent />
|
|
16
|
-
* </AppShell>
|
|
17
|
-
*/
|
|
18
|
-
import * as React from 'react';
|
|
19
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
20
|
-
declare const appShellVariants: (props?: ({
|
|
21
|
-
sidebarWidth?: "sm" | "md" | "lg" | null | undefined;
|
|
22
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
23
|
-
type AppShellVariantProps = VariantProps<typeof appShellVariants>;
|
|
24
|
-
/** @public */
|
|
25
|
-
export interface AppShellProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
26
|
-
/** Optional top region, rendered full-width above the sidebar/main row. */
|
|
27
|
-
header?: React.ReactNode;
|
|
28
|
-
/** Optional left region, rendered as a fixed-width `<aside>` beside main. */
|
|
29
|
-
sidebar?: React.ReactNode;
|
|
30
|
-
/** Main content, rendered inside `<main>`. */
|
|
31
|
-
children: React.ReactNode;
|
|
32
|
-
/** Sidebar width token: sm (224px) / md (256px) / lg (288px). Defaults to 'md'. */
|
|
33
|
-
sidebarWidth?: NonNullable<AppShellVariantProps['sidebarWidth']>;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Renders a header/sidebar/main application frame, e.g. `<AppShell sidebar={<Nav />}>...</AppShell>`.
|
|
37
|
-
*/
|
|
38
|
-
export declare const AppShell: React.ForwardRefExoticComponent<AppShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
/** @internal — CVA variant helper; compose via AppShell props instead. */
|
|
40
|
-
export { appShellVariants };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AspectRatio — constrains its child to a fixed width:height ratio.
|
|
3
|
-
* @category Layout
|
|
4
|
-
* @tier primitive
|
|
5
|
-
*
|
|
6
|
-
* Thin token-free wrapper over Radix AspectRatio (@radix-ui/react-aspect-ratio),
|
|
7
|
-
* which holds a responsive aspect box via the padding-bottom technique so media
|
|
8
|
-
* (images, video, embeds, map tiles) never causes layout shift while loading.
|
|
9
|
-
*
|
|
10
|
-
* <AspectRatio ratio={16 / 9}>
|
|
11
|
-
* <img src="…" alt="…" className="h-full w-full object-cover" />
|
|
12
|
-
* </AspectRatio>
|
|
13
|
-
*/
|
|
14
|
-
import * as React from 'react';
|
|
15
|
-
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
16
|
-
/** @public */
|
|
17
|
-
export interface AspectRatioProps extends React.ComponentPropsWithoutRef<typeof AspectRatioPrimitive.Root> {
|
|
18
|
-
/** Desired width-to-height ratio, e.g. `16 / 9`. Defaults to `1` (square). */
|
|
19
|
-
ratio?: number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Locks its single child to the given width-to-height `ratio` so media reserves
|
|
23
|
-
* its box up front and never causes layout shift while it loads.
|
|
24
|
-
*/
|
|
25
|
-
export declare const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bleed — controlled negative-margin full-bleed within a padded container.
|
|
3
|
-
* @category Layout
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @ai-intent Solves "this one child needs to visually escape its parent's
|
|
6
|
-
* padding" (a full-width image inside a padded card, a divider that should
|
|
7
|
-
* touch both edges) with a single tokenized negative-margin wrapper, so
|
|
8
|
-
* agents stop hand-rolling `margin: -24px` guesses that drift from the
|
|
9
|
-
* parent's actual padding token.
|
|
10
|
-
* @ai-rules Reach for this named layout intent before Box/sx. amount MUST
|
|
11
|
-
* use a semantic space step, never raw px, and MUST match the ancestor
|
|
12
|
-
* padding it is meant to cancel out. Do NOT use Bleed to fake extra spacing
|
|
13
|
-
* — its only job is canceling a specific known padding value on a specific
|
|
14
|
-
* axis.
|
|
15
|
-
*
|
|
16
|
-
* Every Layout reference: https://every-layout.dev/layouts/the-stack/ (bleed
|
|
17
|
-
* is the inverse of a padded Center/Container — HDS names it separately
|
|
18
|
-
* since "every-layout" itself does not ship a dedicated Bleed recipe).
|
|
19
|
-
*/
|
|
20
|
-
import React from 'react';
|
|
21
|
-
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
22
|
-
type BleedAxis = 'x' | 'y' | 'both';
|
|
23
|
-
export interface BleedProps {
|
|
24
|
-
/** Bleed content. */
|
|
25
|
-
children: React.ReactNode;
|
|
26
|
-
/** Semantic space step to negate. Defaults to 'normal'. */
|
|
27
|
-
amount?: LayoutGap;
|
|
28
|
-
/** Which axis the negative margin applies to. Defaults to 'x'. */
|
|
29
|
-
axis?: BleedAxis;
|
|
30
|
-
/** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
|
|
31
|
-
className?: string;
|
|
32
|
-
/** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
|
|
33
|
-
style?: React.CSSProperties;
|
|
34
|
-
/** Element rendered as the outer wrapper. Defaults to 'div'. */
|
|
35
|
-
as?: React.ElementType;
|
|
36
|
-
}
|
|
37
|
-
/** @public */
|
|
38
|
-
export declare const Bleed: React.ForwardRefExoticComponent<BleedProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ButtonGroup — attaches Button children into one segmented control.
|
|
3
|
-
* @category Actions
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @usage Attach related Buttons into one segmented row or column that reads as a single control.
|
|
6
|
-
* @whenNot Buttons that are unrelated, or choosing one of several views.
|
|
7
|
-
* @useInstead SegmentedControl choosing one of several views
|
|
8
|
-
* @useInstead Stack loosely spaced buttons
|
|
9
|
-
*/
|
|
10
|
-
import * as React from 'react';
|
|
11
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
12
|
-
declare const buttonGroupVariants: (props?: ({
|
|
13
|
-
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
14
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
15
|
-
type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>;
|
|
16
|
-
/** @public */
|
|
17
|
-
export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement>, ButtonGroupVariantProps {
|
|
18
|
-
}
|
|
19
|
-
/** Groups Button (or button-like) children into a single attached segment. */
|
|
20
|
-
export declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
/** @internal — CVA variant helper; compose via ButtonGroup props instead. */
|
|
22
|
-
export { buttonGroupVariants };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Calendar — month calendar / date picker, HDS-skinned over react-day-picker.
|
|
3
|
-
* @category Inputs
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @public
|
|
6
|
-
*
|
|
7
|
-
* A thin token-skin over react-day-picker's DayPicker (ADR-020). Passes through
|
|
8
|
-
* every DayPicker prop — `mode` ('single' | 'range' | 'multiple'), `selected`,
|
|
9
|
-
* `onSelect`, `disabled`, `month`, min/max, locale — and applies the HDS role
|
|
10
|
-
* tokens via `classNames` so the grid matches the rest of the system. Correct
|
|
11
|
-
* grid ARIA and keyboard navigation come from the underlying library.
|
|
12
|
-
*
|
|
13
|
-
* <Calendar mode="single" selected={date} onSelect={setDate} />
|
|
14
|
-
*/
|
|
15
|
-
import * as React from 'react';
|
|
16
|
-
import { DayPicker } from 'react-day-picker';
|
|
17
|
-
/** @public */
|
|
18
|
-
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
19
|
-
/**
|
|
20
|
-
* Renders an accessible month grid; compose it inside a Popover for the date inputs.
|
|
21
|
-
*/
|
|
22
|
-
export declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Carousel — a horizontally-scrollable, scroll-snap track of slides with
|
|
3
|
-
* Prev/Next affordances, implemented natively on top of CSS scroll-snap.
|
|
4
|
-
* @category Display
|
|
5
|
-
* @tier pattern
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
import * as React from 'react';
|
|
9
|
-
declare const carouselControlVariants: (props?: ({
|
|
10
|
-
variant?: "next" | "prev" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
|
-
/** @public */
|
|
13
|
-
export interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
-
/** Slides rendered inside the scroll-snap track. */
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
/** Accessible name for the carousel region. Defaults to 'Carousel'. */
|
|
17
|
-
ariaLabel?: string;
|
|
18
|
-
/** Show the Prev/Next scroll affordance buttons. Defaults to true. */
|
|
19
|
-
showControls?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Renders children as a snap-scrolling track with Prev/Next scroll buttons.
|
|
23
|
-
*/
|
|
24
|
-
export declare const Carousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<HTMLElement>>;
|
|
25
|
-
/** @internal — CVA variant helper; compose via Carousel instead. */
|
|
26
|
-
export { carouselControlVariants };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Center — max-width column, auto-centered horizontally.
|
|
3
|
-
* @category Layout
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @ai-intent Solves the "centered prose/content column" problem — a
|
|
6
|
-
* max-width box with auto horizontal margins and, optionally, matching
|
|
7
|
-
* horizontal gutters — so agents stop hand-rolling `marginInline: auto` plus
|
|
8
|
-
* an ad hoc max-width value.
|
|
9
|
-
* @ai-rules Reach for this named layout intent before Box/sx. maxWidth MUST
|
|
10
|
-
* use the semantic width scale ('content' | 'max'), never a raw px value.
|
|
11
|
-
* gutter, when set, MUST use a semantic space step, never raw px. Do NOT use
|
|
12
|
-
* Center for full-bleed page shells — use Container. Do NOT use Center when
|
|
13
|
-
* you need the deprecated Container padding prop — gutter replaces it.
|
|
14
|
-
*
|
|
15
|
-
* Every Layout reference: https://every-layout.dev/layouts/center/
|
|
16
|
-
*/
|
|
17
|
-
import React from 'react';
|
|
18
|
-
type CenterMaxWidth = 'content' | 'max';
|
|
19
|
-
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
20
|
-
export interface CenterProps {
|
|
21
|
-
/** Center content. */
|
|
22
|
-
children: React.ReactNode;
|
|
23
|
-
/** Max width: 'content' (760px prose) | 'max' (1200px full layouts). Defaults to 'content'. */
|
|
24
|
-
maxWidth?: CenterMaxWidth;
|
|
25
|
-
/** Optional matching horizontal gutter (padding-inline) from the semantic space scale. */
|
|
26
|
-
gutter?: LayoutGap;
|
|
27
|
-
/** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
|
|
28
|
-
className?: string;
|
|
29
|
-
/** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
|
|
30
|
-
style?: React.CSSProperties;
|
|
31
|
-
/** Element rendered as the outer wrapper. Defaults to 'div'. */
|
|
32
|
-
as?: React.ElementType;
|
|
33
|
-
}
|
|
34
|
-
/** @public */
|
|
35
|
-
export declare const Center: React.ForwardRefExoticComponent<CenterProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CinematicLink - cinematic editorial link treatment for portfolio surfaces.
|
|
3
|
-
* @category Branding
|
|
4
|
-
* @tier primitive
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
export interface CinematicLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
8
|
-
href: string;
|
|
9
|
-
children: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* CinematicLink - cinematic editorial link treatment for portfolio surfaces.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
* @deprecated CinematicLink is an HDS docs/lab internal (editorial link treatment for portfolio/case-study specimen surfaces), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
16
|
-
* @removeIn 1.0.0
|
|
17
|
-
*/
|
|
18
|
-
export declare function CinematicLink({ href, children, style, className, ...rest }: CinematicLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CircularProgress — an SVG ring showing determinate or indeterminate progress.
|
|
3
|
-
* @category Feedback
|
|
4
|
-
* @tier primitive
|
|
5
|
-
*/
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
-
declare const circularProgressVariants: (props?: ({
|
|
9
|
-
tone?: "success" | "danger" | "warning" | "info" | "neutral" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
|
-
type CircularProgressVariantProps = VariantProps<typeof circularProgressVariants>;
|
|
12
|
-
/** @public */
|
|
13
|
-
export interface CircularProgressProps extends React.HTMLAttributes<HTMLSpanElement>, CircularProgressVariantProps {
|
|
14
|
-
/** Current value. Ignored (and the ring animates) when `indeterminate`. */
|
|
15
|
-
value?: number;
|
|
16
|
-
/** Upper bound for `value`. Defaults to 100. */
|
|
17
|
-
max?: number;
|
|
18
|
-
/** Ring diameter preset. Defaults to `md`. */
|
|
19
|
-
size?: 'sm' | 'md' | 'lg';
|
|
20
|
-
/** Show a continuous spinner instead of a measured arc. */
|
|
21
|
-
indeterminate?: boolean;
|
|
22
|
-
/** Accessible name for the progress indicator. */
|
|
23
|
-
label?: string;
|
|
24
|
-
}
|
|
25
|
-
/** A circular progress ring; pass `value`/`max` or set `indeterminate`. */
|
|
26
|
-
export declare const CircularProgress: React.ForwardRefExoticComponent<CircularProgressProps & React.RefAttributes<HTMLSpanElement>>;
|
|
27
|
-
/** @internal — CVA variant helper; compose via CircularProgress props instead. */
|
|
28
|
-
export { circularProgressVariants };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cluster — wrapping horizontal group with even gaps.
|
|
3
|
-
* @category Layout
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @ai-intent Solves the "row of same-ish things that wraps gracefully" problem
|
|
6
|
-
* (tag rows, button groups, chip lists, filter pills) with a single flex-wrap
|
|
7
|
-
* wrapper and a tokenized gap in both axes, so agents stop hand-rolling
|
|
8
|
-
* `flexWrap` + `gap` + alignment combinations inline.
|
|
9
|
-
* @ai-rules Reach for this named layout intent before Box/sx. Use Cluster for
|
|
10
|
-
* horizontal groups that should wrap as a unit. Spacing MUST use semantic
|
|
11
|
-
* steps, never raw px. Do NOT use Cluster for a strict single-line row — use
|
|
12
|
-
* Stack with `direction="row"` when wrapping is never desired. Do NOT use
|
|
13
|
-
* Cluster for two-dimensional grid layouts — use Grid.
|
|
14
|
-
*
|
|
15
|
-
* Every Layout reference: https://every-layout.dev/layouts/cluster/
|
|
16
|
-
*/
|
|
17
|
-
import React from 'react';
|
|
18
|
-
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
19
|
-
type ClusterAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
20
|
-
type ClusterJustify = 'start' | 'center' | 'end' | 'space-between';
|
|
21
|
-
export interface ClusterProps {
|
|
22
|
-
/** Cluster content — items that wrap as a unit. */
|
|
23
|
-
children: React.ReactNode;
|
|
24
|
-
/** Gap token applied to both axes (row and column). Defaults to 'tight'. */
|
|
25
|
-
gap?: LayoutGap;
|
|
26
|
-
/** Cross-axis alignment of items within a wrapped row. Defaults to 'center'. */
|
|
27
|
-
align?: ClusterAlign;
|
|
28
|
-
/** Main-axis distribution. Defaults to 'start'. */
|
|
29
|
-
justify?: ClusterJustify;
|
|
30
|
-
/** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
|
|
31
|
-
className?: string;
|
|
32
|
-
/** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
|
|
33
|
-
style?: React.CSSProperties;
|
|
34
|
-
/** Element rendered as the outer wrapper. Defaults to 'div'. */
|
|
35
|
-
as?: React.ElementType;
|
|
36
|
-
}
|
|
37
|
-
/** @public */
|
|
38
|
-
export declare const Cluster: React.ForwardRefExoticComponent<ClusterProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CommandPalette — Cmd-K / Ctrl-K fuzzy-search over the HDS manifest.
|
|
3
|
-
* @category Overlays
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @public
|
|
6
|
-
*
|
|
7
|
-
* Built on Dialog (8s-7 / Radix) with a custom listbox + input. NO new
|
|
8
|
-
* npm deps — search is a hand-rolled subsequence + token-Levenshtein scorer
|
|
9
|
-
* (think micro-fzf). Indexes four corpora from `virtual:hds-manifest`:
|
|
10
|
-
*
|
|
11
|
-
* 1. componentSpecs — non-hidden, non-docExempt entries (primitive / pattern / template)
|
|
12
|
-
* 2. utilities — non-hidden entries (utility tier)
|
|
13
|
-
* 3. role tokens — `role.*` entries from manifest.tokens.role
|
|
14
|
-
* 4. section anchors — curated /hds foundation + tokens pages
|
|
15
|
-
*
|
|
16
|
-
* Each row carries a tier chip + brief description. Enter (or click)
|
|
17
|
-
* navigates via React Router; Esc closes. ↑/↓ wraps. Cmd-K / Ctrl-K
|
|
18
|
-
* toggles open from anywhere in the doc shell.
|
|
19
|
-
*
|
|
20
|
-
* Result rows sanitize free-text: HMAC-style tokens (long hex / signed
|
|
21
|
-
* URL fragments that may leak from upstream description fields) are
|
|
22
|
-
* stripped before render.
|
|
23
|
-
*/
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
declare const cmdkRowVariants: (props?: ({
|
|
26
|
-
active?: boolean | null | undefined;
|
|
27
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
28
|
-
declare const cmdkKindBadgeVariants: (props?: ({
|
|
29
|
-
active?: boolean | null | undefined;
|
|
30
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
31
|
-
declare const cmdkDescriptionVariants: (props?: ({
|
|
32
|
-
active?: boolean | null | undefined;
|
|
33
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
34
|
-
export interface CommandPaletteProps {
|
|
35
|
-
/** Optional className for the trigger button. */
|
|
36
|
-
className?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Mountable trigger + dialog. Drop into header slot; component manages its
|
|
40
|
-
* own open state and Cmd-K / Ctrl-K global keybinding.
|
|
41
|
-
*/
|
|
42
|
-
export declare const CommandPalette: React.ForwardRefExoticComponent<CommandPaletteProps & React.RefAttributes<HTMLInputElement>> & {
|
|
43
|
-
displayName: string;
|
|
44
|
-
};
|
|
45
|
-
/** @internal — CVA variant helpers; compose via CommandPalette instead. */
|
|
46
|
-
export { cmdkRowVariants, cmdkKindBadgeVariants, cmdkDescriptionVariants };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ComponentInstanceMatrix — responsive specimen matrix for variant and state parity.
|
|
3
|
-
*
|
|
4
|
-
* @category Utilities
|
|
5
|
-
* @tier primitive
|
|
6
|
-
* @doc-exempt: specimen matrix helper used by docs pages, not a consumer-facing HDS surface.
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
/**
|
|
10
|
-
* ComponentInstanceMatrix — responsive specimen matrix for variant and state parity.
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
* @deprecated ComponentInstanceMatrix is an HDS docs/lab internal (specimen matrix helper for the component doc pages), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
14
|
-
* @removeIn 1.0.0
|
|
15
|
-
*/
|
|
16
|
-
export declare function ComponentInstanceMatrix({ componentName, dimensionX, dimensionY, title, isMobile: _isMobile, rowLabelWidth: _rowLabelWidth, rowLabelTone, freezeRowState, renderInstance, }: {
|
|
17
|
-
componentName: string;
|
|
18
|
-
dimensionX: string;
|
|
19
|
-
dimensionY: string;
|
|
20
|
-
title?: string;
|
|
21
|
-
isMobile: boolean;
|
|
22
|
-
rowLabelWidth?: number;
|
|
23
|
-
rowLabelTone?: 'primary' | 'secondary';
|
|
24
|
-
/** Wrap each row's rendered instance in FreezeState so the visual state is frozen. */
|
|
25
|
-
freezeRowState?: boolean;
|
|
26
|
-
renderInstance: (rowKey: string, columnKey: string) => React.ReactNode;
|
|
27
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ContextMenu — right-click context menu on Radix ContextMenu.
|
|
3
|
-
* @category Overlays
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @usage Offer actions for an item on right-click, or the equivalent keyboard gesture.
|
|
6
|
-
* @whenNot The only way to reach an action, or actions from a visible trigger.
|
|
7
|
-
* @useInstead Menu actions from a visible trigger
|
|
8
|
-
* @slot trigger The area that opens the menu on right-click (ContextMenu.Trigger).
|
|
9
|
-
* @slot content The popup holding the items (ContextMenu.Content).
|
|
10
|
-
* @keyboard ArrowDown/ArrowUp Moves the highlight and stops at the first and last item.
|
|
11
|
-
* @keyboard End Jumps to the last item.
|
|
12
|
-
* @keyboard Character Highlights the next item that starts with the typed letter.
|
|
13
|
-
* @keyboard Enter Selects the highlighted item and closes the menu.
|
|
14
|
-
* @keyboard Escape Closes the menu without leaving focus inside the removed content.
|
|
15
|
-
* @keyboard Tab Does not leave the open menu.
|
|
16
|
-
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
17
|
-
*
|
|
18
|
-
* Radix ContextMenu (@radix-ui/react-context-menu) themed with the same overlay
|
|
19
|
-
* role tokens as Menu, so the dropdown and the right-click menu are visually
|
|
20
|
-
* identical. Provides roving focus, type-ahead, checkbox/radio items, submenus,
|
|
21
|
-
* cursor-anchored positioning, and portal mounting out of the box.
|
|
22
|
-
*
|
|
23
|
-
* <ContextMenu>
|
|
24
|
-
* <ContextMenu.Trigger>Right-click me</ContextMenu.Trigger>
|
|
25
|
-
* <ContextMenu.Content>
|
|
26
|
-
* <ContextMenu.Item onSelect={…}>Cut</ContextMenu.Item>
|
|
27
|
-
* <ContextMenu.Separator />
|
|
28
|
-
* <ContextMenu.Item disabled>Paste</ContextMenu.Item>
|
|
29
|
-
* </ContextMenu.Content>
|
|
30
|
-
* </ContextMenu>
|
|
31
|
-
*/
|
|
32
|
-
import * as React from 'react';
|
|
33
|
-
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
34
|
-
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
35
|
-
declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
38
|
-
declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
39
|
-
/**
|
|
40
|
-
* Element to portal into. Defaults to the nearest `data-hds` scope, so the
|
|
41
|
-
* overlay inherits its theme; pass `null` to use `document.body`.
|
|
42
|
-
*/
|
|
43
|
-
container?: HTMLElement | null;
|
|
44
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
-
declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
-
declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
-
declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
-
declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
-
declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
-
declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
52
|
-
/**
|
|
53
|
-
* Element to portal into. Defaults to the nearest `data-hds` scope, so the
|
|
54
|
-
* overlay inherits its theme; pass `null` to use `document.body`.
|
|
55
|
-
*/
|
|
56
|
-
container?: HTMLElement | null;
|
|
57
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
-
interface ContextMenuComponent extends React.FC<React.ComponentProps<typeof ContextMenuPrimitive.Root>> {
|
|
59
|
-
Trigger: typeof ContextMenuTrigger;
|
|
60
|
-
Content: typeof ContextMenuContent;
|
|
61
|
-
Item: typeof ContextMenuItem;
|
|
62
|
-
CheckboxItem: typeof ContextMenuCheckboxItem;
|
|
63
|
-
RadioGroup: typeof ContextMenuRadioGroup;
|
|
64
|
-
RadioItem: typeof ContextMenuRadioItem;
|
|
65
|
-
Label: typeof ContextMenuLabel;
|
|
66
|
-
Separator: typeof ContextMenuSeparator;
|
|
67
|
-
Group: typeof ContextMenuGroup;
|
|
68
|
-
Sub: typeof ContextMenuSub;
|
|
69
|
-
SubTrigger: typeof ContextMenuSubTrigger;
|
|
70
|
-
SubContent: typeof ContextMenuSubContent;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* ContextMenu root + parts. Wrap the right-clickable area in
|
|
74
|
-
* `ContextMenu.Trigger`. Controlled via `onOpenChange`.
|
|
75
|
-
* @public
|
|
76
|
-
*/
|
|
77
|
-
export declare const ContextMenu: ContextMenuComponent;
|
|
78
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cover — vertical shell with an auto-centered main region.
|
|
3
|
-
* @category Layout
|
|
4
|
-
* @tier primitive
|
|
5
|
-
* @ai-intent Solves the "full-height section with an optional header, a
|
|
6
|
-
* centered hero/main region that absorbs the remaining space, and an
|
|
7
|
-
* optional footer" problem via the flex auto-margin centering technique, so
|
|
8
|
-
* agents stop hand-rolling `position: absolute` centering or a fixed 50vh
|
|
9
|
-
* split.
|
|
10
|
-
* @ai-rules Reach for this named layout intent before Box/sx. gap MUST use a
|
|
11
|
-
* semantic space step, never raw px. minHeight is a CSS length dimension
|
|
12
|
-
* (not spacing) — defaults to '100svh' (small viewport height, safe against
|
|
13
|
-
* mobile browser chrome). Pass minHeight="100vh" explicitly if you need the
|
|
14
|
-
* classic viewport unit for a target that predates svh support. Do NOT use
|
|
15
|
-
* Cover for ordinary page content flow — use Stack.
|
|
16
|
-
*
|
|
17
|
-
* Every Layout reference: https://every-layout.dev/layouts/cover/
|
|
18
|
-
*/
|
|
19
|
-
import React from 'react';
|
|
20
|
-
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
21
|
-
export interface CoverProps {
|
|
22
|
-
/** The centered main region — takes the remaining space via auto margins. Also available as `centerSlot`. */
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
/** Alias for `children` — the centered main region. If both are set, `centerSlot` wins. */
|
|
25
|
-
centerSlot?: React.ReactNode;
|
|
26
|
-
/** Optional content pinned to the top. */
|
|
27
|
-
header?: React.ReactNode;
|
|
28
|
-
/** Optional content pinned to the bottom. */
|
|
29
|
-
footer?: React.ReactNode;
|
|
30
|
-
/** Minimum block size of the cover (CSS length). Defaults to '100svh'. */
|
|
31
|
-
minHeight?: string;
|
|
32
|
-
/** Gap enforced between header/main/footer, in addition to the auto-margin centering. Defaults to 'normal'. */
|
|
33
|
-
gap?: LayoutGap;
|
|
34
|
-
/** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
|
|
35
|
-
className?: string;
|
|
36
|
-
/** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
|
|
37
|
-
style?: React.CSSProperties;
|
|
38
|
-
/** Element rendered as the outer wrapper. Defaults to 'div'. */
|
|
39
|
-
as?: React.ElementType;
|
|
40
|
-
}
|
|
41
|
-
/** @public */
|
|
42
|
-
export declare const Cover: React.ForwardRefExoticComponent<CoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
-
export {};
|