@epilot/volt-ui-experimental-griffel 0.2.0 → 0.2.1
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 +5 -0
- package/dist/index.d.ts +8766 -65
- package/dist/tokens/index.d.ts +1057 -1053
- package/dist/tokens.json +1 -1
- package/package.json +6 -4
- package/dist/components/accordion/accordion.d.ts +0 -14
- package/dist/components/alert-dialog/alert-dialog.d.ts +0 -36
- package/dist/components/avatar/avatar-group.d.ts +0 -7
- package/dist/components/avatar/avatar.d.ts +0 -17
- package/dist/components/badge/badge.d.ts +0 -41
- package/dist/components/breadcrumb/breadcrumb.d.ts +0 -37
- package/dist/components/button/button.d.ts +0 -18
- package/dist/components/button-group/button-group.d.ts +0 -30
- package/dist/components/callout/callout.d.ts +0 -23
- package/dist/components/card/card.d.ts +0 -9
- package/dist/components/checkbox/checkbox.d.ts +0 -4
- package/dist/components/collapsible-sidebar/collapsible-sidebar.d.ts +0 -33
- package/dist/components/command/command.d.ts +0 -85
- package/dist/components/data-table/data-table-body.d.ts +0 -21
- package/dist/components/data-table/data-table-column-header.d.ts +0 -13
- package/dist/components/data-table/data-table-column-visibility.d.ts +0 -21
- package/dist/components/data-table/data-table-content.d.ts +0 -13
- package/dist/components/data-table/data-table-context.d.ts +0 -66
- package/dist/components/data-table/data-table-error.d.ts +0 -21
- package/dist/components/data-table/data-table-header.d.ts +0 -14
- package/dist/components/data-table/data-table-loading.d.ts +0 -13
- package/dist/components/data-table/data-table-pagination.d.ts +0 -17
- package/dist/components/data-table/data-table-pinning-utils.d.ts +0 -17
- package/dist/components/data-table/data-table-row.d.ts +0 -14
- package/dist/components/data-table/data-table-toolbar.d.ts +0 -7
- package/dist/components/data-table/data-table.d.ts +0 -92
- package/dist/components/data-table/get-selected-row-data.d.ts +0 -18
- package/dist/components/data-table/hooks/index.d.ts +0 -2
- package/dist/components/data-table/hooks/use-data-table-content.d.ts +0 -1
- package/dist/components/data-table/hooks/use-data-table.d.ts +0 -2
- package/dist/components/date-range-picker/date-range-picker-utils.d.ts +0 -2
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -34
- package/dist/components/date-range-picker/range-calendar.d.ts +0 -15
- package/dist/components/date-time-picker/calendar.d.ts +0 -28
- package/dist/components/date-time-picker/date-time-picker-context.d.ts +0 -39
- package/dist/components/date-time-picker/date-time-picker-input.d.ts +0 -13
- package/dist/components/date-time-picker/date-time-picker-panel.d.ts +0 -15
- package/dist/components/date-time-picker/date-time-picker-popover.d.ts +0 -6
- package/dist/components/date-time-picker/date-time-picker-utils.d.ts +0 -37
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -47
- package/dist/components/date-time-picker/time-picker.d.ts +0 -12
- package/dist/components/dialog/dialog.d.ts +0 -27
- package/dist/components/drawer/drawer.d.ts +0 -27
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +0 -41
- package/dist/components/field/field-combobox.d.ts +0 -90
- package/dist/components/field/field-select.d.ts +0 -4
- package/dist/components/field/field.d.ts +0 -76
- package/dist/components/label/label.d.ts +0 -21
- package/dist/components/list/list.d.ts +0 -46
- package/dist/components/option-card/option-card.d.ts +0 -39
- package/dist/components/pill/pill.d.ts +0 -27
- package/dist/components/popover/popover.d.ts +0 -14
- package/dist/components/radio/radio.d.ts +0 -6
- package/dist/components/scroll-overflow/scroll-overflow.d.ts +0 -38
- package/dist/components/segmented-control/segmented-control.d.ts +0 -11
- package/dist/components/select/select.d.ts +0 -26
- package/dist/components/separator/separator.d.ts +0 -30
- package/dist/components/skeleton/skeleton.d.ts +0 -24
- package/dist/components/spinner/spinner.d.ts +0 -25
- package/dist/components/switch/switch.d.ts +0 -17
- package/dist/components/table/table-pagination.d.ts +0 -45
- package/dist/components/table/table.d.ts +0 -50
- package/dist/components/tabs/tabs.d.ts +0 -18
- package/dist/components/text/text.d.ts +0 -22
- package/dist/components/toast/toast.d.ts +0 -10
- package/dist/components/toggle/toggle-group.d.ts +0 -10
- package/dist/components/toggle/toggle.d.ts +0 -10
- package/dist/components/tooltip/tooltip.d.ts +0 -15
- package/dist/lib/clear-button.d.ts +0 -5
- package/dist/lib/icons.d.ts +0 -3
- package/dist/lib/pagination.d.ts +0 -71
- package/dist/renderer/contract.d.ts +0 -12
- package/dist/renderer/index.d.ts +0 -10
- package/dist/styles/make-styles.d.ts +0 -37
- package/dist/tokens/core.generated.d.ts +0 -3
- package/dist/tokens/install.d.ts +0 -38
- package/dist/tokens/palette.generated.d.ts +0 -3
package/dist/tokens.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "GENERATED. Design token values for consumers that do not render this package's React components. Compile these into your own CSS under your own names at your own build time; do not reference this package's runtime custom properties, whose names are content-hashed and change with their values.",
|
|
3
3
|
"package": "@epilot/volt-ui-experimental-griffel",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"themes": {
|
|
6
6
|
"light": {
|
|
7
7
|
"accent-1": "#fcfdfe",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/volt-ui-experimental-griffel",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Experimental Volt UI rebuild: Radix primitives styled with Griffel, bundled per micro-frontend instead of shared as a singleton",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"prepack": "bun run build",
|
|
39
|
-
"build": "rm -rf dist && bun run tokens && tsc --project tsconfig.build.json && vite build && cp src/tokens/values.generated.json dist/tokens.json",
|
|
39
|
+
"build": "rm -rf dist && bun run tokens && tsc --project tsconfig.build.json && vite build && node scripts/bundle-dts.mjs && cp src/tokens/values.generated.json dist/tokens.json",
|
|
40
40
|
"tokens": "bun ../tokens/scripts/build.ts",
|
|
41
41
|
"test": "vitest run",
|
|
42
42
|
"react18:test": "vitest run --config vitest.react18.config.ts",
|
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
"release": "npm publish --tag experiment",
|
|
48
48
|
"gate:token-value-skew": "node gates/token-value-skew/run.mjs",
|
|
49
49
|
"gate:class-salt-skew": "node gates/class-salt-skew/run.mjs",
|
|
50
|
-
"gates": "bun run gate:vr && bun run gate:isolation && bun run gate:token-value-skew && bun run gate:class-salt-skew && bun run gate:cascade && bun run gate:griffel-contract",
|
|
50
|
+
"gates": "bun run gate:vr && bun run gate:isolation && bun run gate:token-value-skew && bun run gate:class-salt-skew && bun run gate:cascade && bun run gate:griffel-contract && bun run gate:dts-self-contained",
|
|
51
51
|
"measure:coresidency": "bun scripts/pilot-coresidency.mjs",
|
|
52
52
|
"migration:sweep": "bun scripts/migration-sweep.mjs",
|
|
53
|
-
"gate:one-bare-specifier": "node gates/one-bare-specifier.mjs"
|
|
53
|
+
"gate:one-bare-specifier": "node gates/one-bare-specifier.mjs",
|
|
54
|
+
"gate:dts-self-contained": "node gates/dts-self-contained.mjs"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"react": ">=18",
|
|
@@ -88,6 +89,7 @@
|
|
|
88
89
|
"react-18": "npm:react@^18.3.1",
|
|
89
90
|
"react-dom-18": "npm:react-dom@^18.3.1",
|
|
90
91
|
"rifm": "0.12.1",
|
|
92
|
+
"rollup-plugin-dts": "^6.5.1",
|
|
91
93
|
"sonner": "2.0.7",
|
|
92
94
|
"typescript": "^5.6.3",
|
|
93
95
|
"vite": "^5.4.9",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
-
export type AccordionType = "single" | "multiple";
|
|
4
|
-
export type AccordionAlign = "start" | "end";
|
|
5
|
-
export type AccordionProps = React.ComponentProps<typeof AccordionPrimitive.Root>;
|
|
6
|
-
export type AccordionItemProps = React.ComponentProps<typeof AccordionPrimitive.Item>;
|
|
7
|
-
export type AccordionTriggerProps = React.ComponentProps<typeof AccordionPrimitive.Trigger> & {
|
|
8
|
-
align?: AccordionAlign;
|
|
9
|
-
};
|
|
10
|
-
export type AccordionContentProps = React.ComponentProps<typeof AccordionPrimitive.Content>;
|
|
11
|
-
export declare const Accordion: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
export declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
-
export declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
-
import { type ButtonProps, type ButtonSize, type ButtonVariant } from "../button/button";
|
|
4
|
-
export type AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>;
|
|
5
|
-
export type AlertDialogTriggerProps = React.ComponentProps<typeof AlertDialogPrimitive.Trigger>;
|
|
6
|
-
export type AlertDialogPortalProps = React.ComponentProps<typeof AlertDialogPrimitive.Portal>;
|
|
7
|
-
export type AlertDialogOverlayProps = React.ComponentProps<typeof AlertDialogPrimitive.Overlay>;
|
|
8
|
-
export type AlertDialogSize = "xl" | "lg" | "md" | "sm";
|
|
9
|
-
export type AlertDialogContentProps = React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
10
|
-
size?: AlertDialogSize;
|
|
11
|
-
};
|
|
12
|
-
export type AlertDialogHeaderProps = React.ComponentProps<"div">;
|
|
13
|
-
export type AlertDialogFooterProps = React.ComponentProps<"div">;
|
|
14
|
-
export type AlertDialogTitleProps = React.ComponentProps<typeof AlertDialogPrimitive.Title>;
|
|
15
|
-
export type AlertDialogDescriptionProps = React.ComponentProps<typeof AlertDialogPrimitive.Description>;
|
|
16
|
-
export type AlertDialogActionProps = Omit<ButtonProps, "variant" | "size" | "destructive"> & {
|
|
17
|
-
variant?: ButtonVariant;
|
|
18
|
-
size?: ButtonSize;
|
|
19
|
-
destructive?: boolean;
|
|
20
|
-
};
|
|
21
|
-
export type AlertDialogCancelProps = Omit<ButtonProps, "variant" | "size" | "destructive"> & {
|
|
22
|
-
variant?: ButtonVariant;
|
|
23
|
-
size?: ButtonSize;
|
|
24
|
-
destructive?: boolean;
|
|
25
|
-
};
|
|
26
|
-
export declare const AlertDialog: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogProps & React.RefAttributes<HTMLElement>>;
|
|
27
|
-
export declare const AlertDialogTrigger: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
28
|
-
export declare const AlertDialogPortal: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogPortalProps & React.RefAttributes<HTMLElement>>;
|
|
29
|
-
export declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
-
export declare const AlertDialogHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
export declare const AlertDialogFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
export declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
34
|
-
export declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
35
|
-
export declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogActionProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
36
|
-
export declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogCancelProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type AvatarSize } from "./avatar";
|
|
3
|
-
export type AvatarGroupProps = Omit<React.ComponentProps<"div">, "color"> & {
|
|
4
|
-
max?: number;
|
|
5
|
-
size?: AvatarSize;
|
|
6
|
-
};
|
|
7
|
-
export declare const AvatarGroup: React.ForwardRefExoticComponent<Omit<AvatarGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
|
-
export type AvatarColor = "gray" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "lime" | "yellow" | "orange" | "bronze" | "red" | "pink" | "purple" | "indigo";
|
|
4
|
-
export type AvatarSize = "sm" | "base" | "lg";
|
|
5
|
-
declare const AvatarGroupContext: React.Context<{
|
|
6
|
-
size?: AvatarSize;
|
|
7
|
-
} | null>;
|
|
8
|
-
export type AvatarProps = Omit<React.ComponentProps<typeof AvatarPrimitive.Root>, "className" | "color" | "children"> & {
|
|
9
|
-
className?: string;
|
|
10
|
-
src?: string;
|
|
11
|
-
alt?: string;
|
|
12
|
-
initials?: string;
|
|
13
|
-
color?: AvatarColor;
|
|
14
|
-
size?: AvatarSize;
|
|
15
|
-
};
|
|
16
|
-
export declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
17
|
-
export { AvatarGroupContext };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* REFERENCE COMPONENT — the colour-matrix collapse. Read this before writing another component
|
|
4
|
-
* that takes a `color` prop.
|
|
5
|
-
*
|
|
6
|
-
* v1 enumerates 20 colours x 3 styles as 60 `compoundVariants`, each a distinct class string like
|
|
7
|
-
* `volt-bg-mint-soft`. Because those names are built by interpolation, Tailwind's scanner cannot
|
|
8
|
-
* see them, which is what `safelist.css` exists to force — 9 lines that emit ~945 rules, 65.6 KB
|
|
9
|
-
* and 59% of v1's entire rule count. The Griffel PoC carried the same shape forward as 60 static
|
|
10
|
-
* style objects.
|
|
11
|
-
*
|
|
12
|
-
* Here the colour is a VALUE, not part of a class name. Three atoms read three custom properties;
|
|
13
|
-
* the component sets those properties inline from the `color` prop. Total rules: one small set per
|
|
14
|
-
* style variant, regardless of how many colours exist. Adding a 22nd palette family costs zero
|
|
15
|
-
* rules.
|
|
16
|
-
*
|
|
17
|
-
* Two consequences worth knowing:
|
|
18
|
-
* - `color` may legitimately arrive from a runtime expression (`getColorForEntityLabel(label)` and
|
|
19
|
-
* `WCAG_BADGE_MAP[level].color` both exist in consumer code today), which no build step can
|
|
20
|
-
* resolve. That is exactly why the palette sheet cannot be statically shaken, and why this
|
|
21
|
-
* component calls `ensurePaletteTokens()`.
|
|
22
|
-
* - Selectors key on SLOT_ATTR, never on `data-slot`. `data-slot` values are shared with v1, so a
|
|
23
|
-
* rule keyed on one also matches v1-rendered DOM — the StyleX track had a v1 icon compute to
|
|
24
|
-
* 0x0 through a green gate this way. `data-slot` is still emitted, purely as a diagnostic.
|
|
25
|
-
*/
|
|
26
|
-
declare const COLORS: readonly ["accent", "neutral", "gray", "success", "warning", "error", "info", "blue", "sky", "mint", "lime", "green", "teal", "cyan", "indigo", "purple", "pink", "red", "orange", "yellow", "bronze"];
|
|
27
|
-
export type BadgeColor = (typeof COLORS)[number];
|
|
28
|
-
export type BadgeVariant = "soft" | "solid" | "surface";
|
|
29
|
-
export type BadgeSize = "sm" | "base" | "lg";
|
|
30
|
-
export type BadgeProps = Omit<React.ComponentProps<"span">, "color"> & {
|
|
31
|
-
color?: BadgeColor;
|
|
32
|
-
/**
|
|
33
|
-
* Named `variant`, not `style`. v1 called this `style`, which shadows the HTML `style` attribute
|
|
34
|
-
* and made a badge unable to take both a visual treatment and an inline style. Retrocompat is
|
|
35
|
-
* not a requirement here, so the collision is fixed rather than inherited.
|
|
36
|
-
*/
|
|
37
|
-
variant?: BadgeVariant;
|
|
38
|
-
size?: BadgeSize;
|
|
39
|
-
};
|
|
40
|
-
export declare const Badge: React.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
41
|
-
export { COLORS as BADGE_COLORS };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Breadcrumb — Card's compound pattern applied to the nav / ol / li structure.
|
|
4
|
-
*
|
|
5
|
-
* v1's `Breadcrumb` walks its children and interleaves a presentational separator `<li>` between
|
|
6
|
-
* them; `BreadcrumbItem` decides between a link and a plain page by whether a `href` exists. The
|
|
7
|
-
* `nav` / `ol` / `li` semantics and the `aria-current="page"` handling are the real value of this
|
|
8
|
-
* component and are reproduced exactly.
|
|
9
|
-
*
|
|
10
|
-
* v1 renders the link branch through Radix `Slot` when `asChild` is set — dropped here per
|
|
11
|
-
* CONVENTIONS rule 6 (no Radix dependency). There is no `asChild` escape hatch; a consumer wanting
|
|
12
|
-
* a non-`<a>` link anchors it themselves.
|
|
13
|
-
*
|
|
14
|
-
* `BreadcrumbItem` with a `href` renders an `<a>` (slot `breadcrumb-link`); without one, a `<span>`
|
|
15
|
-
* (slot `breadcrumb-page`). Either way the item is wrapped in a `breadcrumb-item` `<li>`. The nav
|
|
16
|
-
* itself has no base styles in v1 — it is left to the caller's className — so it carries only the
|
|
17
|
-
* slot attributes.
|
|
18
|
-
*
|
|
19
|
-
* The link's `transition-colors` expands to Tailwind v4's default property list plus the 150ms
|
|
20
|
-
* `cubic-bezier(0.4, 0, 0.2, 1)` easing — literals from the framework's default theme, which is
|
|
21
|
-
* visible motion and cannot be read from the v1 file (Rule 0: flagged, not approximated away).
|
|
22
|
-
*/
|
|
23
|
-
export type BreadcrumbProps = React.ComponentProps<"nav"> & {
|
|
24
|
-
separator?: React.ReactNode;
|
|
25
|
-
};
|
|
26
|
-
export declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<BreadcrumbProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
27
|
-
export type BreadcrumbItemProps = Omit<React.ComponentProps<"a">, "href"> & {
|
|
28
|
-
href?: string;
|
|
29
|
-
isCurrent?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Render the child instead of the built-in `a`, keeping the link styling and slot markers. This
|
|
32
|
-
* is how a consumer supplies a router link. v1 supports it; it was dropped here while the package
|
|
33
|
-
* was on Base UI and restored once it moved back to Radix.
|
|
34
|
-
*/
|
|
35
|
-
asChild?: boolean;
|
|
36
|
-
};
|
|
37
|
-
export declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<BreadcrumbItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type ButtonVariant = "primary" | "secondary" | "tertiary" | "ghost";
|
|
3
|
-
export type ButtonSize = "xs" | "sm" | "base" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg";
|
|
4
|
-
export type ButtonShape = "normal" | "rounded";
|
|
5
|
-
export type ButtonProps = Omit<React.ComponentProps<"button">, "variant" | "size" | "shape" | "destructive" | "className" | "render"> & {
|
|
6
|
-
variant?: ButtonVariant;
|
|
7
|
-
size?: ButtonSize;
|
|
8
|
-
shape?: ButtonShape;
|
|
9
|
-
destructive?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Render the child element instead of a `button`, keeping Button's styling and slot markers.
|
|
13
|
-
* v1 supports this and consumers rely on it to wrap links; it was dropped here while the package
|
|
14
|
-
* was briefly on Base UI, and restored once it moved back to Radix.
|
|
15
|
-
*/
|
|
16
|
-
asChild?: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type SeparatorProps } from "../separator/separator";
|
|
3
|
-
/**
|
|
4
|
-
* ButtonGroup — compound component family for grouping buttons, text, and separators.
|
|
5
|
-
*
|
|
6
|
-
* One `makeVoltStyles` call for the whole family, one slot per sub-component (following `card.tsx`).
|
|
7
|
-
*
|
|
8
|
-
* No Base UI primitive is needed: v1 only used Radix `Slot` for `asChild` on `ButtonGroupText`,
|
|
9
|
-
* which CONVENTIONS rule 6 drops.
|
|
10
|
-
*
|
|
11
|
-
* `ButtonGroup` handles both `horizontal` and `vertical` orientations, removing adjoining border
|
|
12
|
-
* radius and borders on adjacent children. Sibling focus-visible elements are elevated (`z-index: 10`)
|
|
13
|
-
* and made relative so focus rings are never obscured by subsequent siblings.
|
|
14
|
-
*
|
|
15
|
-
* Nested button groups gain a gap via a `:has()` selector keyed on `SLOT_ATTR` (never on `data-slot`,
|
|
16
|
-
* per CONVENTIONS rule 4).
|
|
17
|
-
*
|
|
18
|
-
* `ButtonGroupText` provides a matching text container (`gray-a4`, subtle border, `shadow-xs`).
|
|
19
|
-
*
|
|
20
|
-
* `ButtonGroupSeparator` composes `Separator` with transparent background and stretch alignment.
|
|
21
|
-
*/
|
|
22
|
-
export type ButtonGroupOrientation = "horizontal" | "vertical";
|
|
23
|
-
export type ButtonGroupProps = React.ComponentProps<"div"> & {
|
|
24
|
-
orientation?: ButtonGroupOrientation;
|
|
25
|
-
};
|
|
26
|
-
export declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<ButtonGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
export type ButtonGroupTextProps = React.ComponentProps<"div">;
|
|
28
|
-
export declare const ButtonGroupText: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
export type ButtonGroupSeparatorProps = SeparatorProps;
|
|
30
|
-
export declare const ButtonGroupSeparator: React.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type CalloutVariant = "info" | "gray" | "success" | "warning" | "destructive";
|
|
3
|
-
export type CalloutProps = React.ComponentProps<"div"> & {
|
|
4
|
-
variant?: CalloutVariant;
|
|
5
|
-
hideIcon?: boolean;
|
|
6
|
-
customIcon?: React.ReactNode;
|
|
7
|
-
/** Shows a top-right close button that dismisses the callout. */
|
|
8
|
-
dismissible?: boolean;
|
|
9
|
-
/** Called when the close button is clicked, after the callout hides itself. */
|
|
10
|
-
onDismiss?: () => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const Callout: React.ForwardRefExoticComponent<Omit<CalloutProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export type CalloutTitleProps = React.ComponentProps<"div">;
|
|
14
|
-
export declare const CalloutTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
export type CalloutDescriptionProps = React.ComponentProps<"div">;
|
|
16
|
-
export declare const CalloutDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
export type CalloutActionProps = React.ComponentProps<"div"> & {
|
|
18
|
-
align?: "start" | "end";
|
|
19
|
-
};
|
|
20
|
-
export declare const CalloutAction: React.ForwardRefExoticComponent<Omit<CalloutActionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export type CalloutIconProps = React.ComponentProps<"svg"> & {
|
|
22
|
-
customIcon?: React.ReactNode;
|
|
23
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type CardProps = React.ComponentProps<"div">;
|
|
3
|
-
export declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export declare const CardHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export declare const CardTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export declare const CardDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export declare const CardAction: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export declare const CardContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
export declare const CardFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
-
export type CheckboxProps = React.ComponentProps<typeof CheckboxPrimitive.Root>;
|
|
4
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface CollapsibleSidebarContextValue {
|
|
3
|
-
collapsed: boolean;
|
|
4
|
-
onCollapsedChange: (collapsed: boolean) => void;
|
|
5
|
-
width: number | string;
|
|
6
|
-
collapsedWidth: number | string;
|
|
7
|
-
isHovered: boolean;
|
|
8
|
-
expandOnHover: boolean;
|
|
9
|
-
skipTransition: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function useCollapsibleSidebar(): CollapsibleSidebarContextValue;
|
|
12
|
-
export type CollapsibleSidebarProps = React.ComponentProps<"div"> & {
|
|
13
|
-
collapsed?: boolean;
|
|
14
|
-
defaultCollapsed?: boolean;
|
|
15
|
-
onCollapsedChange?: (collapsed: boolean) => void;
|
|
16
|
-
width?: number | string;
|
|
17
|
-
collapsedWidth?: number | string;
|
|
18
|
-
expandOnHover?: boolean;
|
|
19
|
-
hoverDelay?: number;
|
|
20
|
-
};
|
|
21
|
-
export declare const CollapsibleSidebar: React.ForwardRefExoticComponent<Omit<CollapsibleSidebarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export type CollapsibleSidebarContentProps = React.ComponentProps<"aside"> & {
|
|
23
|
-
floatingClassName?: string;
|
|
24
|
-
};
|
|
25
|
-
export declare const CollapsibleSidebarContent: React.ForwardRefExoticComponent<Omit<CollapsibleSidebarContentProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
26
|
-
export type CollapsibleSidebarCondensedProps = React.ComponentProps<"div">;
|
|
27
|
-
export declare const CollapsibleSidebarCondensed: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
-
export type CollapsibleSidebarToggleProps = Omit<React.ComponentProps<"button">, "onClick" | "children"> & {
|
|
29
|
-
children?: React.ReactNode | ((props: {
|
|
30
|
-
collapsed: boolean;
|
|
31
|
-
}) => React.ReactNode);
|
|
32
|
-
};
|
|
33
|
-
export declare const CollapsibleSidebarToggle: React.ForwardRefExoticComponent<Omit<CollapsibleSidebarToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
-
import { Dialog } from "../dialog/dialog";
|
|
4
|
-
export type CommandProps = React.ComponentProps<typeof CommandPrimitive> & {
|
|
5
|
-
"data-slot"?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const Command: React.ForwardRefExoticComponent<Omit<CommandProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export type CommandDialogProps = Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
title?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
showCloseButton?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const CommandDialog: React.ForwardRefExoticComponent<Omit<CommandDialogProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
16
|
-
export type CommandInputProps = React.ComponentProps<typeof CommandPrimitive.Input> & {
|
|
17
|
-
wrapperClassName?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const CommandInput: React.ForwardRefExoticComponent<Omit<CommandInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
-
export type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List>;
|
|
21
|
-
export declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
24
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
25
|
-
} & {
|
|
26
|
-
asChild?: boolean;
|
|
27
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
28
|
-
label?: string;
|
|
29
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export type CommandEmptyProps = React.ComponentProps<typeof CommandPrimitive.Empty>;
|
|
31
|
-
export declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
32
|
-
children?: React.ReactNode;
|
|
33
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
34
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
35
|
-
} & {
|
|
36
|
-
asChild?: boolean;
|
|
37
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
-
export type CommandGroupProps = React.ComponentProps<typeof CommandPrimitive.Group>;
|
|
39
|
-
export declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
42
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
43
|
-
} & {
|
|
44
|
-
asChild?: boolean;
|
|
45
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "heading" | "value"> & {
|
|
46
|
-
heading?: React.ReactNode;
|
|
47
|
-
value?: string;
|
|
48
|
-
forceMount?: boolean;
|
|
49
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
export type CommandSeparatorProps = React.ComponentProps<typeof CommandPrimitive.Separator>;
|
|
51
|
-
export declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
52
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
53
|
-
} & {
|
|
54
|
-
asChild?: boolean;
|
|
55
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
56
|
-
alwaysRender?: boolean;
|
|
57
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
-
export type CommandItemProps = React.ComponentProps<typeof CommandPrimitive.Item>;
|
|
59
|
-
export declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
60
|
-
children?: React.ReactNode;
|
|
61
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
62
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
63
|
-
} & {
|
|
64
|
-
asChild?: boolean;
|
|
65
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
|
|
66
|
-
disabled?: boolean;
|
|
67
|
-
onSelect?: (value: string) => void;
|
|
68
|
-
value?: string;
|
|
69
|
-
keywords?: string[];
|
|
70
|
-
forceMount?: boolean;
|
|
71
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
-
export type CommandShortcutProps = React.ComponentProps<"span">;
|
|
73
|
-
export declare const CommandShortcut: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
74
|
-
export type CommandLoadingProps = React.ComponentProps<typeof CommandPrimitive.Loading>;
|
|
75
|
-
export declare const CommandLoading: React.ForwardRefExoticComponent<Omit<{
|
|
76
|
-
children?: React.ReactNode;
|
|
77
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
78
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
79
|
-
} & {
|
|
80
|
-
asChild?: boolean;
|
|
81
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
82
|
-
progress?: number;
|
|
83
|
-
label?: string;
|
|
84
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
-
export { Command as CommandRoot };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableBodyProps = {
|
|
4
|
-
/** Additional class name */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** Custom empty state content */
|
|
7
|
-
emptyState?: ReactNode;
|
|
8
|
-
/** Loading state content (shown when isLoading is true) */
|
|
9
|
-
loadingState?: ReactNode;
|
|
10
|
-
/** Whether the table is in loading state */
|
|
11
|
-
isLoading?: boolean;
|
|
12
|
-
/** Error state content (shown when isError is true) */
|
|
13
|
-
errorState?: ReactNode;
|
|
14
|
-
/** Whether the table is in error state */
|
|
15
|
-
isError?: boolean;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Renders the table body with rows.
|
|
19
|
-
* Must be used within a DataTable component.
|
|
20
|
-
*/
|
|
21
|
-
export declare const DataTableBody: React.ForwardRefExoticComponent<DataTableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { Column } from "@tanstack/react-table";
|
|
3
|
-
export type DataTableColumnHeaderProps<TData = unknown, TValue = unknown> = {
|
|
4
|
-
/** The column instance from Tanstack Table */
|
|
5
|
-
column: Column<TData, TValue>;
|
|
6
|
-
/** The header title to display */
|
|
7
|
-
title: string;
|
|
8
|
-
/** Additional class name */
|
|
9
|
-
className?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const DataTableColumnHeader: <TData = unknown, TValue = unknown>(props: DataTableColumnHeaderProps<TData, TValue> & {
|
|
12
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
13
|
-
}) => React.ReactElement | null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import { DropdownMenu } from "../dropdown-menu/dropdown-menu";
|
|
4
|
-
export type DataTableColumnVisibilityProps = {
|
|
5
|
-
/** Custom icon for the default trigger button. Falls back to settings gear icon. */
|
|
6
|
-
icon?: ReactNode;
|
|
7
|
-
/** Custom trigger element. Defaults to a settings icon button. */
|
|
8
|
-
trigger?: ReactNode;
|
|
9
|
-
/** Label shown at top of dropdown and as screen reader text for default trigger. Required for i18n. */
|
|
10
|
-
label: string;
|
|
11
|
-
/** Additional class name for the dropdown content */
|
|
12
|
-
contentClassName?: string;
|
|
13
|
-
/** Alignment of dropdown relative to trigger. Default: "end" */
|
|
14
|
-
align?: "start" | "center" | "end";
|
|
15
|
-
} & Omit<ComponentProps<typeof DropdownMenu>, "children">;
|
|
16
|
-
/**
|
|
17
|
-
* A dropdown menu for toggling column visibility in DataTable.
|
|
18
|
-
* Shows checkboxes for each column that can be hidden.
|
|
19
|
-
* Place in DataTableToolbar for consistent layout.
|
|
20
|
-
*/
|
|
21
|
-
export declare const DataTableColumnVisibility: React.ForwardRefExoticComponent<Omit<DataTableColumnVisibilityProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableContentProps = {
|
|
4
|
-
/** Children to render inside the table (DataTableHeader, DataTableBody) */
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
/** Additional class name */
|
|
7
|
-
className?: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Container component for DataTable that handles the table structure.
|
|
11
|
-
* If no children are provided, renders DataTableHeader and DataTableBody by default.
|
|
12
|
-
*/
|
|
13
|
-
export declare const DataTableContent: React.ForwardRefExoticComponent<DataTableContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { MouseEvent } from "react";
|
|
2
|
-
import type { Table as TanstackTable, PaginationState, Row } from "@tanstack/react-table";
|
|
3
|
-
/**
|
|
4
|
-
* @no-host-element Constant configuration value.
|
|
5
|
-
*/
|
|
6
|
-
export declare const DEFAULT_ROW_HEIGHT = 48;
|
|
7
|
-
/**
|
|
8
|
-
* @no-host-element Constant configuration value.
|
|
9
|
-
*/
|
|
10
|
-
export declare const DEFAULT_OVERSCAN = 10;
|
|
11
|
-
/**
|
|
12
|
-
* @no-host-element Constant configuration value.
|
|
13
|
-
*/
|
|
14
|
-
export declare const DEFAULT_CONTAINER_HEIGHT = 600;
|
|
15
|
-
/** Controls how cell content handles overflow */
|
|
16
|
-
export type DataTableCellOverflow = "grow" | "wrap" | "truncate";
|
|
17
|
-
export type DataTablePaginationConfig = {
|
|
18
|
-
/** Controlled page index (0-indexed) */
|
|
19
|
-
pageIndex?: number;
|
|
20
|
-
/** Page size (items per page). Default: 10 */
|
|
21
|
-
pageSize?: number;
|
|
22
|
-
/** Available page size options. Default: [10, 25, 50, 100] */
|
|
23
|
-
pageSizeOptions?: number[];
|
|
24
|
-
/** Total items count for server-side pagination */
|
|
25
|
-
totalItems?: number;
|
|
26
|
-
/** Total page count for server-side pagination (optional if totalItems provided) */
|
|
27
|
-
pageCount?: number;
|
|
28
|
-
/** Callback for pagination state changes */
|
|
29
|
-
onPaginationChange?: (state: PaginationState) => void;
|
|
30
|
-
};
|
|
31
|
-
export type DataTableContextValue<TData> = {
|
|
32
|
-
table: TanstackTable<TData>;
|
|
33
|
-
pagination?: DataTablePaginationConfig;
|
|
34
|
-
/** Handler called when a row is clicked. Enables clickable row mode. */
|
|
35
|
-
onRowClick?: (row: Row<TData>, event: MouseEvent<HTMLTableRowElement>) => void;
|
|
36
|
-
/** Custom hover class for clickable rows. Default: 'hover:bg-accent-a3' */
|
|
37
|
-
clickableRowClassName?: string;
|
|
38
|
-
/** Custom class for selected rows. Default: 'data-[state=selected]:bg-accent-a3' */
|
|
39
|
-
selectedRowClassName?: string;
|
|
40
|
-
/** Controls how cell content handles overflow. 'grow' expands cells (default), 'wrap' wraps text, 'truncate' shows ellipsis. */
|
|
41
|
-
cellOverflow?: DataTableCellOverflow;
|
|
42
|
-
/** Whether column resizing is disabled (enabled by default) */
|
|
43
|
-
disableColumnResizing?: boolean;
|
|
44
|
-
/** Show bottom border on header row. Default: true */
|
|
45
|
-
showHeaderBorder?: boolean;
|
|
46
|
-
/** Show bottom borders on data rows. Default: true */
|
|
47
|
-
showRowBorders?: boolean;
|
|
48
|
-
/** Ensure columns have minimum width to fit header content (prevents hover clipping on sortable headers) */
|
|
49
|
-
fitHeaderWidth?: boolean;
|
|
50
|
-
};
|
|
51
|
-
export type DataTableContentContextValue = {
|
|
52
|
-
/** Sync column widths to visual values before resize starts (prevents snap/jump) */
|
|
53
|
-
syncColumnWidthsBeforeResize: () => void;
|
|
54
|
-
/** Width of the spacer column to fill remaining container space (0 if columns fill or exceed container) */
|
|
55
|
-
spacerWidth: number;
|
|
56
|
-
} | null;
|
|
57
|
-
/**
|
|
58
|
-
* Context for accessing table instance in compound components
|
|
59
|
-
* @no-host-element Context object, renders no DOM element.
|
|
60
|
-
*/
|
|
61
|
-
export declare const DataTableContext: import("react").Context<DataTableContextValue<any> | null>;
|
|
62
|
-
/**
|
|
63
|
-
* Context for content-level functions (sync widths before resize)
|
|
64
|
-
* @no-host-element Context object, renders no DOM element.
|
|
65
|
-
*/
|
|
66
|
-
export declare const DataTableContentContext: import("react").Context<DataTableContentContextValue>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableErrorProps = {
|
|
4
|
-
/** Error title text */
|
|
5
|
-
title?: string;
|
|
6
|
-
/** Error description/message */
|
|
7
|
-
description?: ReactNode;
|
|
8
|
-
/** Retry button text */
|
|
9
|
-
retryLabel?: string;
|
|
10
|
-
/** Callback when retry is clicked */
|
|
11
|
-
onRetry?: () => void;
|
|
12
|
-
/** Additional class name */
|
|
13
|
-
className?: string;
|
|
14
|
-
/** Custom error content (overrides default error display) */
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Error state display for DataTable.
|
|
19
|
-
* Shows an error icon, message, and optional retry button.
|
|
20
|
-
*/
|
|
21
|
-
export declare const DataTableError: React.ForwardRefExoticComponent<DataTableErrorProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type DataTableHeaderProps = {
|
|
3
|
-
/** Additional class name */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** Whether to make header sticky */
|
|
6
|
-
sticky?: boolean;
|
|
7
|
-
/** Background color for sticky header. Default: tokens.gray2 */
|
|
8
|
-
stickyBackground?: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Renders the table header with column headers.
|
|
12
|
-
* Must be used within a DataTable component.
|
|
13
|
-
*/
|
|
14
|
-
export declare const DataTableHeader: React.ForwardRefExoticComponent<DataTableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableLoadingProps = {
|
|
4
|
-
/** Additional class name */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** Custom loading content (overrides default spinner) */
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Loading state display for DataTable.
|
|
11
|
-
* Renders a centered spinner by default, or custom content when children are provided.
|
|
12
|
-
*/
|
|
13
|
-
export declare const DataTableLoading: React.ForwardRefExoticComponent<DataTableLoadingProps & React.RefAttributes<HTMLDivElement>>;
|