@hirobius/design-system 0.11.0 → 0.13.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/README.md +50 -9
- package/dist/brand.js +36 -0
- package/dist/contexts.js +63 -59
- package/dist/hirobius-ui.js +22636 -3818
- package/dist/manifest.js +9 -9
- package/dist/scroll.js +42 -0
- package/dist/static.css +388 -0
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +14 -1
- package/dist/types/src/app/components/activity-feed.d.ts +24 -2
- package/dist/types/src/app/components/alert-dialog.d.ts +56 -0
- package/dist/types/src/app/components/app-shell.d.ts +38 -0
- package/dist/types/src/app/components/aspect-ratio.d.ts +25 -0
- package/dist/types/src/app/components/avatar-group.d.ts +22 -0
- package/dist/types/src/app/components/bleed.d.ts +39 -0
- package/dist/types/src/app/components/blockquote.d.ts +20 -0
- package/dist/types/src/app/components/box-sx.d.ts +69 -0
- package/dist/types/src/app/components/box.d.ts +42 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +5 -0
- package/dist/types/src/app/components/button-group.d.ts +18 -0
- package/dist/types/src/app/components/calendar.d.ts +20 -0
- package/dist/types/src/app/components/card.d.ts +29 -13
- package/dist/types/src/app/components/carousel.d.ts +24 -0
- package/dist/types/src/app/components/center.d.ts +36 -0
- package/dist/types/src/app/components/circular-progress.d.ts +28 -0
- package/dist/types/src/app/components/cluster.d.ts +39 -0
- package/dist/types/src/app/components/code-block.d.ts +19 -1
- package/dist/types/src/app/components/command-palette.d.ts +44 -0
- package/dist/types/src/app/components/container.d.ts +10 -0
- package/dist/types/src/app/components/context-menu.d.ts +55 -0
- package/dist/types/src/app/components/cover.d.ts +43 -0
- package/dist/types/src/app/components/date-input.d.ts +31 -0
- package/dist/types/src/app/components/date-range-input.d.ts +34 -0
- package/dist/types/src/app/components/date-time-input.d.ts +30 -0
- package/dist/types/src/app/components/disclosure.d.ts +5 -1
- package/dist/types/src/app/components/divider.d.ts +14 -10
- package/dist/types/src/app/components/doc-link-card.d.ts +5 -1
- package/dist/types/src/app/components/field.d.ts +9 -11
- package/dist/types/src/app/components/file-input.d.ts +28 -0
- package/dist/types/src/app/components/frame.d.ts +38 -0
- package/dist/types/src/app/components/heading-stack.d.ts +15 -5
- package/dist/types/src/app/components/hover-card.d.ts +31 -0
- package/dist/types/src/app/components/image-lightbox.d.ts +13 -0
- package/dist/types/src/app/components/inline-code.d.ts +14 -3
- package/dist/types/src/app/components/input-group.d.ts +23 -0
- package/dist/types/src/app/components/kbd.d.ts +18 -0
- package/dist/types/src/app/components/metadata-list.d.ts +43 -0
- package/dist/types/src/app/components/multi-selector.d.ts +40 -0
- package/dist/types/src/app/components/nav-group.d.ts +7 -2
- package/dist/types/src/app/components/nav-item.d.ts +12 -2
- package/dist/types/src/app/components/overflow-list.d.ts +19 -0
- package/dist/types/src/app/components/pin.d.ts +30 -0
- package/dist/types/src/app/components/reveal.d.ts +31 -0
- package/dist/types/src/app/components/segmented-control.d.ts +37 -3
- package/dist/types/src/app/components/selectable-card.d.ts +29 -0
- package/dist/types/src/app/components/side-nav.d.ts +21 -0
- package/dist/types/src/app/components/sidebar.d.ts +45 -0
- package/dist/types/src/app/components/stat.d.ts +8 -10
- package/dist/types/src/app/components/status-dot.d.ts +25 -0
- package/dist/types/src/app/components/status-list-item.d.ts +10 -11
- package/dist/types/src/app/components/stepper.d.ts +31 -0
- package/dist/types/src/app/components/switcher.d.ts +41 -0
- package/dist/types/src/app/components/table.d.ts +12 -1
- package/dist/types/src/app/components/tag.d.ts +19 -18
- package/dist/types/src/app/components/text.d.ts +8 -2
- package/dist/types/src/app/components/time-input.d.ts +24 -0
- package/dist/types/src/app/components/timestamp.d.ts +24 -0
- package/dist/types/src/app/components/toast.d.ts +8 -2
- package/dist/types/src/app/components/toggle-button.d.ts +32 -0
- package/dist/types/src/app/components/token.d.ts +26 -1
- package/dist/types/src/app/components/tokenizer.d.ts +24 -0
- package/dist/types/src/app/components/toolbar.d.ts +36 -0
- package/dist/types/src/app/components/top-nav.d.ts +21 -0
- package/dist/types/src/app/components/tree-list.d.ts +28 -0
- package/dist/types/src/app/components/visually-hidden.d.ts +17 -0
- package/dist/types/src/app/context/TenantContext.d.ts +1 -1
- package/dist/types/src/app/data/nav-model.d.ts +39 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +13 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +14 -1
- package/dist/types/src/app/{pages/hds → layouts}/HdsSystemDocLayout.d.ts +1 -1
- package/dist/types/src/app/lib/hds-search.d.ts +45 -0
- package/dist/types/src/brand/index.d.ts +9 -0
- package/dist/types/src/brand/overlay.d.ts +71 -0
- package/dist/types/src/index.d.ts +92 -2
- package/dist/types/src/scroll/index.d.ts +16 -0
- package/dist/types/src/scroll/smooth-scroll.d.ts +48 -0
- package/dist/types/src/scroll/use-scroll-progress.d.ts +34 -0
- package/dist/variables.css +16 -5
- package/hirobius.tokens.json +57 -10
- package/package.json +37 -67
- package/public/hds-manifest.json +6167 -4929
- package/dist/types/src/app/components/info-page.d.ts +0 -10
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
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 {};
|
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
5
|
*/
|
|
6
|
+
declare const blockContainerVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
|
+
declare const inlineWrapperVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
+
declare const blockHeaderVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
9
|
+
declare const collapsibleToggleVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
10
|
+
declare const chevronVariants: (props?: {
|
|
11
|
+
expanded?: boolean;
|
|
12
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
13
|
+
declare const copyButtonVariants: (props?: {
|
|
14
|
+
variant?: "block" | "inline";
|
|
15
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
16
|
+
declare const inlineCodeTextVariants: (props?: {
|
|
17
|
+
truncateFromStart?: boolean;
|
|
18
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
19
|
+
declare const blockCodeTextVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
20
|
+
declare const prePanelVariants: (props?: {
|
|
21
|
+
panelBackground?: boolean;
|
|
22
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
6
23
|
interface CodeBlockProps {
|
|
7
24
|
/** Code string displayed in the block. */
|
|
8
25
|
code: string;
|
|
@@ -26,4 +43,5 @@ interface CodeBlockProps {
|
|
|
26
43
|
}
|
|
27
44
|
/** @public */
|
|
28
45
|
export declare function CodeBlock({ code, variant, truncateFromStart, language, filename, collapsible, defaultExpanded, className, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
|
|
46
|
+
/** @internal — CVA variant helpers; compose via CodeBlock props instead. */
|
|
47
|
+
export { blockContainerVariants, inlineWrapperVariants, blockHeaderVariants, collapsibleToggleVariants, copyButtonVariants, inlineCodeTextVariants, blockCodeTextVariants, prePanelVariants, chevronVariants, };
|
|
@@ -0,0 +1,44 @@
|
|
|
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;
|
|
27
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
28
|
+
declare const cmdkKindBadgeVariants: (props?: {
|
|
29
|
+
active?: boolean;
|
|
30
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
31
|
+
declare const cmdkDescriptionVariants: (props?: {
|
|
32
|
+
active?: boolean;
|
|
33
|
+
} & import("class-variance-authority/dist/types").ClassProp) => 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
|
+
/** @internal — CVA variant helpers; compose via CommandPalette instead. */
|
|
44
|
+
export { cmdkRowVariants, cmdkKindBadgeVariants, cmdkDescriptionVariants };
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
* Container — semantic width-constrained layout.
|
|
3
3
|
* @category Layout
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @ai-intent Solves horizontal width constraint and page centering with a
|
|
6
|
+
* semantic max-width scale, so agents stop hand-rolling `marginInline: auto`
|
|
7
|
+
* plus an ad hoc max-width pixel value for page shells.
|
|
8
|
+
* @ai-rules Reach for this named layout intent before Box/sx. maxWidth MUST
|
|
9
|
+
* use the semantic width scale ('content' | 'max'), never a raw px value. Do
|
|
10
|
+
* NOT use the deprecated `padding` prop — it is a no-op; apply padding via
|
|
11
|
+
* Surface or a Stack instead. Do NOT import Container directly inside a page
|
|
12
|
+
* under src/app/pages — use Page, which wraps Container and owns vertical
|
|
13
|
+
* rhythm. Use Center instead when you also need a horizontal gutter, which
|
|
14
|
+
* Container does not support.
|
|
5
15
|
*
|
|
6
16
|
* Centers content horizontally and applies semantic max-width constraints.
|
|
7
17
|
* - maxWidth options: 'content' (760px prose) | 'max' (1200px full layout)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ContextMenu — right-click context menu on Radix ContextMenu.
|
|
3
|
+
* @category Overlays
|
|
4
|
+
* @tier primitive
|
|
5
|
+
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
6
|
+
*
|
|
7
|
+
* Radix ContextMenu (@radix-ui/react-context-menu) themed with the same overlay
|
|
8
|
+
* role tokens as Menu, so the dropdown and the right-click menu are visually
|
|
9
|
+
* identical. Provides roving focus, type-ahead, checkbox/radio items, submenus,
|
|
10
|
+
* cursor-anchored positioning, and portal mounting out of the box.
|
|
11
|
+
*
|
|
12
|
+
* <ContextMenu>
|
|
13
|
+
* <ContextMenu.Trigger>Right-click me</ContextMenu.Trigger>
|
|
14
|
+
* <ContextMenu.Content>
|
|
15
|
+
* <ContextMenu.Item onSelect={…}>Cut</ContextMenu.Item>
|
|
16
|
+
* <ContextMenu.Separator />
|
|
17
|
+
* <ContextMenu.Item disabled>Paste</ContextMenu.Item>
|
|
18
|
+
* </ContextMenu.Content>
|
|
19
|
+
* </ContextMenu>
|
|
20
|
+
*/
|
|
21
|
+
import * as React from 'react';
|
|
22
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
23
|
+
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
24
|
+
declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
27
|
+
declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
interface ContextMenuComponent extends React.FC<React.ComponentProps<typeof ContextMenuPrimitive.Root>> {
|
|
36
|
+
Trigger: typeof ContextMenuTrigger;
|
|
37
|
+
Content: typeof ContextMenuContent;
|
|
38
|
+
Item: typeof ContextMenuItem;
|
|
39
|
+
CheckboxItem: typeof ContextMenuCheckboxItem;
|
|
40
|
+
RadioGroup: typeof ContextMenuRadioGroup;
|
|
41
|
+
RadioItem: typeof ContextMenuRadioItem;
|
|
42
|
+
Label: typeof ContextMenuLabel;
|
|
43
|
+
Separator: typeof ContextMenuSeparator;
|
|
44
|
+
Group: typeof ContextMenuGroup;
|
|
45
|
+
Sub: typeof ContextMenuSub;
|
|
46
|
+
SubTrigger: typeof ContextMenuSubTrigger;
|
|
47
|
+
SubContent: typeof ContextMenuSubContent;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* ContextMenu root + parts. Wrap the right-clickable area in
|
|
51
|
+
* `ContextMenu.Trigger`. Controlled via `onOpenChange`.
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export declare const ContextMenu: ContextMenuComponent;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
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 {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DateInput — single-date text field with a calendar popover picker, so
|
|
3
|
+
* typing a date and picking one from a grid read as one input rather than
|
|
4
|
+
* two disconnected controls glued together by a consuming app.
|
|
5
|
+
* @category Inputs
|
|
6
|
+
* @tier pattern
|
|
7
|
+
* @public
|
|
8
|
+
*
|
|
9
|
+
* Composes the HDS Popover (trigger = calendar icon button) with Calendar
|
|
10
|
+
* for the grid, and date-fns for parse/format of the free-typed text. The
|
|
11
|
+
* text field and the picker stay in sync in both directions.
|
|
12
|
+
*
|
|
13
|
+
* <DateInput value={date} onChange={setDate} />
|
|
14
|
+
*/
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
/** @public */
|
|
17
|
+
export interface DateInputProps {
|
|
18
|
+
/** Currently selected date, or undefined when empty. */
|
|
19
|
+
value?: Date;
|
|
20
|
+
/** Fired with the next date, or undefined when the field is cleared/invalid. */
|
|
21
|
+
onChange?: (date: Date | undefined) => void;
|
|
22
|
+
/** date-fns format string used to display and parse the text value. */
|
|
23
|
+
displayFormat?: string;
|
|
24
|
+
/** Placeholder shown when the field is empty; defaults to the display format. */
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
id?: string;
|
|
28
|
+
'aria-label'?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Text field + calendar popover for picking a single date. */
|
|
31
|
+
export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DateRangeInput — date-range field composing the existing Popover with
|
|
3
|
+
* Calendar in range mode, so picking a start/end date reads as one overlay
|
|
4
|
+
* pattern with Combobox and Menu rather than a bespoke widget.
|
|
5
|
+
* @category Inputs
|
|
6
|
+
* @tier pattern
|
|
7
|
+
* @public
|
|
8
|
+
*
|
|
9
|
+
* No new primitive — built entirely on the HDS Popover + Calendar. The
|
|
10
|
+
* trigger reads like a secondary input, showing a placeholder or the
|
|
11
|
+
* formatted `from – to` range; the content is a two-month range calendar.
|
|
12
|
+
*
|
|
13
|
+
* <DateRangeInput value={range} onChange={setRange} />
|
|
14
|
+
*/
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import type { DateRange } from 'react-day-picker';
|
|
17
|
+
/** @public */
|
|
18
|
+
export interface DateRangeInputProps {
|
|
19
|
+
/** Currently selected range. */
|
|
20
|
+
value?: DateRange;
|
|
21
|
+
/** Fired with the next range whenever the calendar selection changes. */
|
|
22
|
+
onChange?: (range: DateRange | undefined) => void;
|
|
23
|
+
/** date-fns format string used to render the selected range on the trigger. */
|
|
24
|
+
displayFormat?: string;
|
|
25
|
+
/** Trigger text when nothing is selected. */
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Number of months rendered side by side in the calendar. */
|
|
29
|
+
numberOfMonths?: number;
|
|
30
|
+
id?: string;
|
|
31
|
+
'aria-label'?: string;
|
|
32
|
+
}
|
|
33
|
+
/** @public */
|
|
34
|
+
export declare const DateRangeInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DateTimeInput — combined date + time field pairing a text date input with
|
|
3
|
+
* a calendar popover and a native time field, so picking a moment in time
|
|
4
|
+
* reads as one control instead of two disconnected inputs glued together by
|
|
5
|
+
* a consuming app.
|
|
6
|
+
* @category Inputs
|
|
7
|
+
* @tier pattern
|
|
8
|
+
* @public
|
|
9
|
+
*
|
|
10
|
+
* Composes the HDS Popover (trigger = calendar icon button) with Calendar
|
|
11
|
+
* for the date grid, and TimeInput for the time-of-day, keeping both parts
|
|
12
|
+
* in sync with a single `Date` value via date-fns.
|
|
13
|
+
*
|
|
14
|
+
* <DateTimeInput value={date} onChange={setDate} />
|
|
15
|
+
*/
|
|
16
|
+
import * as React from 'react';
|
|
17
|
+
/** @public */
|
|
18
|
+
export interface DateTimeInputProps {
|
|
19
|
+
/** Currently selected date + time, or undefined when empty. */
|
|
20
|
+
value?: Date;
|
|
21
|
+
/** Fired with the next combined date/time, or undefined when cleared. */
|
|
22
|
+
onChange?: (date: Date | undefined) => void;
|
|
23
|
+
/** date-fns format string used to display and parse the date portion. */
|
|
24
|
+
dateFormat?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
id?: string;
|
|
27
|
+
'aria-label'?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Text date field + calendar popover, paired with a native time field, producing one Date. */
|
|
30
|
+
export declare const DateTimeInput: React.ForwardRefExoticComponent<DateTimeInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { type CSSProperties, type ReactNode } from 'react';
|
|
7
7
|
type DisclosureVariant = 'panel' | 'nav' | 'card';
|
|
8
|
+
declare const disclosureTriggerVariants: (props?: {
|
|
9
|
+
variant?: "nav" | "panel" | "card";
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
11
|
type DisclosureProps = {
|
|
9
12
|
/** Summary label rendered in the disclosure trigger. Accepts a string or ReactNode for icon+label combos. */
|
|
10
13
|
label: ReactNode;
|
|
@@ -29,4 +32,5 @@ type DisclosureProps = {
|
|
|
29
32
|
};
|
|
30
33
|
/** @public */
|
|
31
34
|
export declare const Disclosure: React.ForwardRefExoticComponent<DisclosureProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
|
|
35
|
+
/** @internal — CVA variant helper; compose via Disclosure props instead. */
|
|
36
|
+
export { disclosureTriggerVariants };
|
|
@@ -3,19 +3,23 @@
|
|
|
3
3
|
* @category Layout
|
|
4
4
|
* @tier primitive
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
orientation?:
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
+
declare const dividerVariants: (props?: {
|
|
9
|
+
orientation?: "horizontal" | "vertical";
|
|
10
|
+
variant?: "default" | "strong";
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
12
|
+
type DividerVariantProps = VariantProps<typeof dividerVariants>;
|
|
13
|
+
/** @public */
|
|
14
|
+
export interface DividerProps extends Omit<React.HTMLAttributes<HTMLHRElement>, 'children'>, DividerVariantProps {
|
|
10
15
|
/** Perpendicular spacing around the divider. */
|
|
11
16
|
spacing?: string | number;
|
|
12
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `variant="strong"` instead. Kept for backward
|
|
19
|
+
* compatibility; when set, it takes precedence over `variant`.
|
|
20
|
+
*/
|
|
13
21
|
strong?: boolean;
|
|
14
|
-
/** Optional inline styles for one-off layout adjustments. */
|
|
15
|
-
style?: CSSProperties;
|
|
16
|
-
/** Optional class hook for parent-level styling. */
|
|
17
|
-
className?: string;
|
|
18
22
|
}
|
|
19
23
|
/** @public */
|
|
20
|
-
export declare
|
|
24
|
+
export declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLHRElement>>;
|
|
21
25
|
export {};
|
|
@@ -21,6 +21,10 @@ interface DocLinkCardProps {
|
|
|
21
21
|
/** Directional affordance for the header icon. */
|
|
22
22
|
affordance?: 'up-right' | 'right' | 'left';
|
|
23
23
|
}
|
|
24
|
+
declare const docLinkCardVariants: (props?: {
|
|
25
|
+
variant?: "feature" | "pager";
|
|
26
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
24
27
|
/** @public */
|
|
25
28
|
export declare function DocLinkCard({ title, description, href, icon: CardIcon, meta, metaStyle, accent, variant, disabled, affordance, }: DocLinkCardProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
|
|
29
|
+
/** @internal — CVA variant helper; compose via DocLinkCard props instead. */
|
|
30
|
+
export { docLinkCardVariants };
|
|
@@ -3,23 +3,21 @@
|
|
|
3
3
|
* @tier primitive
|
|
4
4
|
*/
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export type FieldTone = keyof typeof VALUE_TONE;
|
|
6
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
7
|
+
declare const fieldValueVariants: (props?: {
|
|
8
|
+
tone?: "success" | "danger" | "warning" | "info" | "neutral";
|
|
9
|
+
mono?: boolean;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
11
|
+
type FieldValueVariantProps = VariantProps<typeof fieldValueVariants>;
|
|
13
12
|
/** @public */
|
|
14
|
-
export interface FieldProps extends React.HTMLAttributes<HTMLDivElement
|
|
13
|
+
export interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, FieldValueVariantProps {
|
|
15
14
|
label: string;
|
|
16
15
|
value?: React.ReactNode;
|
|
17
|
-
tone?: FieldTone;
|
|
18
|
-
mono?: boolean;
|
|
19
16
|
children?: React.ReactNode;
|
|
20
17
|
}
|
|
21
18
|
/**
|
|
22
19
|
* Caption label paired with a value — used in metadata grids and read-only forms.
|
|
23
20
|
*/
|
|
24
21
|
export declare const Field: React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
|
|
22
|
+
/** @internal — CVA variant helper; compose via Field props instead. */
|
|
23
|
+
export { fieldValueVariants };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileInput — styled dropzone that wraps a real native file input for full
|
|
3
|
+
* keyboard and screen-reader accessibility, with optional drag-and-drop.
|
|
4
|
+
* @category Inputs
|
|
5
|
+
* @tier pattern
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
declare const fileInputVariants: (props?: {
|
|
10
|
+
dragging?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
13
|
+
export interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
14
|
+
/** Called with the selected (or dropped) files. */
|
|
15
|
+
onFiles?: (files: File[]) => void;
|
|
16
|
+
/** Dropzone prompt content. */
|
|
17
|
+
label?: React.ReactNode;
|
|
18
|
+
/** Native `accept` attribute, e.g. `"image/*"`. */
|
|
19
|
+
accept?: string;
|
|
20
|
+
/** Allow selecting more than one file. */
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
/** Disable interaction. */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** A dashed dropzone that opens the native file picker or accepts a drag-and-drop. */
|
|
26
|
+
export declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
27
|
+
/** @internal — CVA variant helper; compose via FileInput props instead. */
|
|
28
|
+
export { fileInputVariants };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame — aspect-ratio-locked, token-clipped media box.
|
|
3
|
+
* @category Layout
|
|
4
|
+
* @tier primitive
|
|
5
|
+
* @ai-intent Solves "media that must reserve a fixed aspect ratio and never
|
|
6
|
+
* cause layout shift while it loads, cropped to a token-governed corner
|
|
7
|
+
* radius" — a thin, token-skinned wrapper over `AspectRatio`
|
|
8
|
+
* (`@radix-ui/react-aspect-ratio`), which already owns the ratio-lock
|
|
9
|
+
* mechanics. Frame adds the overflow-hidden clip and semantic radius that a
|
|
10
|
+
* bare media frame needs and `AspectRatio` deliberately leaves undecorated.
|
|
11
|
+
* @ai-rules Reach for this named layout intent before Box/sx when framing
|
|
12
|
+
* media (image, video, embed, map tile). radius MUST use a semantic
|
|
13
|
+
* borderRadius token, never a raw px value. Do NOT reach for bare
|
|
14
|
+
* `AspectRatio` in product code just to add a border-radius by hand — use
|
|
15
|
+
* Frame. Do NOT use Frame for non-media layout — it exists purely as a media
|
|
16
|
+
* clipping frame.
|
|
17
|
+
*
|
|
18
|
+
* Every Layout reference: https://every-layout.dev/layouts/frame/
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
type FrameRadius = 'none' | 'sm' | 'md' | 'full';
|
|
22
|
+
interface FrameProps {
|
|
23
|
+
/** Media rendered inside the locked-ratio, clipped frame. */
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
/** Desired width-to-height ratio, e.g. `16 / 9`. Defaults to `16 / 9`. */
|
|
26
|
+
ratio?: number;
|
|
27
|
+
/** Corner radius token applied to the clipped frame. Defaults to 'md'. */
|
|
28
|
+
radius?: FrameRadius;
|
|
29
|
+
/** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
|
|
32
|
+
style?: React.CSSProperties;
|
|
33
|
+
/** Element rendered as the outer clipping wrapper. Defaults to 'div'. */
|
|
34
|
+
as?: React.ElementType;
|
|
35
|
+
}
|
|
36
|
+
/** @public */
|
|
37
|
+
export declare const Frame: React.ForwardRefExoticComponent<FrameProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export {};
|
|
@@ -16,9 +16,18 @@
|
|
|
16
16
|
* @tier primitive
|
|
17
17
|
* @doc-exempt: internal typography lockup utility, documented through page composition rather than a standalone component page
|
|
18
18
|
*/
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
import { type ElementType } from 'react';
|
|
20
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
21
|
+
declare const headingStackVariants: (props?: {
|
|
22
|
+
gap?: "px4" | "px8";
|
|
23
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
24
|
+
declare const headingStackLevelVariants: (props?: {
|
|
25
|
+
level?: "heading1" | "heading2" | "heading3";
|
|
26
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
27
|
+
type HeadingStackGapVariantProps = VariantProps<typeof headingStackVariants>;
|
|
28
|
+
type HeadingStackLevelVariantProps = VariantProps<typeof headingStackLevelVariants>;
|
|
29
|
+
type HdsHeadingLevel = NonNullable<HeadingStackLevelVariantProps['level']>;
|
|
30
|
+
type HdsHeadingGap = NonNullable<HeadingStackGapVariantProps['gap']>;
|
|
22
31
|
type HdsHeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
23
32
|
type HdsSupportingTag = 'p' | 'div' | 'span';
|
|
24
33
|
interface HeadingStackProps {
|
|
@@ -38,5 +47,6 @@ interface HeadingStackProps {
|
|
|
38
47
|
subheadingAs?: HdsSupportingTag;
|
|
39
48
|
}
|
|
40
49
|
/** @public */
|
|
41
|
-
export declare const HeadingStack:
|
|
42
|
-
|
|
50
|
+
export declare const HeadingStack: import("react").ForwardRefExoticComponent<HeadingStackProps & import("react").RefAttributes<HTMLElement>>;
|
|
51
|
+
/** @internal — CVA variant helpers; compose via HeadingStack props instead. */
|
|
52
|
+
export { headingStackVariants, headingStackLevelVariants };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HoverCard — rich preview shown on hover/focus, on Radix HoverCard.
|
|
3
|
+
* @category Overlays
|
|
4
|
+
* @tier primitive
|
|
5
|
+
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
6
|
+
*
|
|
7
|
+
* Radix HoverCard (@radix-ui/react-hover-card) themed with the overlay role
|
|
8
|
+
* tokens to match Menu/Popover. For sighted-pointer preview affordances (user
|
|
9
|
+
* cards, link previews) — it is NOT a replacement for an accessible tooltip on
|
|
10
|
+
* an interactive control; use HdsTooltip for labelling.
|
|
11
|
+
*
|
|
12
|
+
* <HoverCard>
|
|
13
|
+
* <HoverCard.Trigger asChild><InlineLink href="…">@ada</InlineLink></HoverCard.Trigger>
|
|
14
|
+
* <HoverCard.Content>Ada Lovelace — first programmer.</HoverCard.Content>
|
|
15
|
+
* </HoverCard>
|
|
16
|
+
*/
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
19
|
+
declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
20
|
+
declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
interface HoverCardComponent extends React.FC<React.ComponentProps<typeof HoverCardPrimitive.Root>> {
|
|
22
|
+
Trigger: typeof HoverCardTrigger;
|
|
23
|
+
Content: typeof HoverCardContent;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* HoverCard root + parts. Controlled via `open`/`onOpenChange`, or uncontrolled
|
|
27
|
+
* with `defaultOpen`; tune timing with `openDelay`/`closeDelay`.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export declare const HoverCard: HoverCardComponent;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface LightboxProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
naturalWidth?: number;
|
|
7
|
+
naturalHeight?: number;
|
|
8
|
+
caption?: string;
|
|
9
|
+
captionHref?: string;
|
|
10
|
+
captionLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Lightbox({ open, onClose, src, alt, naturalWidth, naturalHeight, caption, captionHref, captionLabel, }: LightboxProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const inlineCodeVariants: (props?: {
|
|
4
|
+
density?: "compact" | "comfortable";
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
6
|
+
type InlineCodeVariantProps = VariantProps<typeof inlineCodeVariants>;
|
|
2
7
|
type InlineCodeProps = {
|
|
3
8
|
children: ReactNode;
|
|
4
9
|
style?: CSSProperties;
|
|
5
|
-
/**
|
|
10
|
+
/** Layout density. `compact` tightens vertical rhythm for dense body copy and table prose. Defaults to `comfortable`. */
|
|
11
|
+
density?: InlineCodeVariantProps['density'];
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use `density="compact"` instead. Kept for backward
|
|
14
|
+
* compatibility; when set, it takes precedence over `density`.
|
|
15
|
+
*/
|
|
6
16
|
compact?: boolean;
|
|
7
17
|
/** Show a copy-to-clipboard button. children must be a string when true. */
|
|
8
18
|
copyable?: boolean;
|
|
9
19
|
};
|
|
10
20
|
/** @public */
|
|
11
|
-
export declare function InlineCode({ children, style, compact, copyable }: InlineCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
|
|
21
|
+
export declare function InlineCode({ children, style, density, compact, copyable, }: InlineCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
/** @internal — CVA variant helper; compose via InlineCode props instead. */
|
|
23
|
+
export { inlineCodeVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InputGroup — a text input framed with leading and/or trailing adornments.
|
|
3
|
+
* @category Inputs
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*/
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
+
declare const inputGroupVariants: (props?: {
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
11
|
+
type InputGroupVariantProps = VariantProps<typeof inputGroupVariants>;
|
|
12
|
+
/** @public */
|
|
13
|
+
export interface InputGroupProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, InputGroupVariantProps {
|
|
14
|
+
/** Content rendered before the input, e.g. an icon or a static prefix. */
|
|
15
|
+
leading?: React.ReactNode;
|
|
16
|
+
/** Content rendered after the input, e.g. a unit or a clear button. */
|
|
17
|
+
trailing?: React.ReactNode;
|
|
18
|
+
/** Class applied to the wrapper (the input itself stays transparent). */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/** A single-line input with optional `leading`/`trailing` adornments. */
|
|
22
|
+
export declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export {};
|