import type { CategoricalIndex, ControlSize, } from "@charcuterie/tokens" import { CATEGORICAL_INDEX_COUNT, CATEGORICAL_SEQUENCE, } from "@charcuterie/tokens" import type { CSSProperties, ReactNode } from "react" import { getAccentEdgeClassName } from "../Card/cardAccentEdge.ts" import { CATEGORICAL_CONTENT_CLASS, CATEGORICAL_HOVER_BORDER_CLASS, CATEGORICAL_HOVER_CLASS, } from "../categoricalStyles.ts" import { FOCUS_RING_CLASS } from "../intentStyles.ts" import { useRouterLink } from "../RouterLink/RouterLinkProvider.tsx" import { getIsRoutedHref } from "../RouterLink/routerLink.ts" import { TILE_ACCENT_EDGE_PADDING_CLASS, TILE_BOX_CLASS, TILE_COLUMNS_CLASS, TILE_GAP_CLASS, TILE_HINT_TEXT_CLASS, TILE_MIN_INLINE_SIZE_PROPERTY, TILE_PADDING_CLASS, TILE_TEXT_SIZE_CLASS, } from "../tileStyles.ts" import { toClassName } from "../toClassName.ts" import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.tsx" export type ActionTileItem = { /** * Which of the ten hues this tile wears, overriding the one its * position would have given it. * * Reach for it when a tile's colour means something outside the * set — a destination that is red everywhere else in the app, a * pair that must not drift apart when a third tile is inserted * between them. An overridden tile keeps its hue and the rest go * on walking `CATEGORICAL_SEQUENCE` from their own positions, so * naming one does not force naming all of them. * * Ignored when the set is `accent="none"`. */ categorical?: CategoricalIndex /** * A line of help under the name. Drawn one step down the type ramp * in `content-muted`, **inside** the tile — so `getByRole` computes * it into the accessible name. A hint a screen reader never reads * is a hint half the audience does not have. */ hint?: ReactNode /** * Makes this tile a real ``: middle-click, ctrl-click, * "open in new tab", "copy link address" and the status bar all * come from the element rather than from the paint. Routed through * the injected `RouterLink` when the destination is same-origin and * not a fragment. * * Without one, the tile is a ` ) })} ) }