@caqophony/ui 0.1.0 → 0.2.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 CHANGED
@@ -41,7 +41,9 @@ ships, after Tailwind, in your global CSS:
41
41
  @import '@caqophony/ui/styles.css';
42
42
  ```
43
43
 
44
- `styles.css` defines the token variables (light and `.dark`), maps them to
44
+ `styles.css` defines the token variables (light, and dark under
45
+ `@media (prefers-color-scheme: dark)`, the same OS setting Tailwind v4's `dark:`
46
+ variant follows), maps them to
45
47
  Tailwind v4 colour/radius/z-index/opacity/duration utilities and registers the
46
48
  package's built files as a Tailwind `@source`. Override any `--token` after the
47
49
  import to re-theme.
@@ -36,7 +36,7 @@ function getProseClasses(size, className) {
36
36
  // Emphasis/italic
37
37
  "prose-em:text-foreground dark:prose-em:text-foreground",
38
38
  // Links
39
- "prose-a:text-primary dark:prose-a:text-primary prose-a:no-underline hover:prose-a:underline",
39
+ "prose-a:text-primary-text dark:prose-a:text-primary-text prose-a:no-underline hover:prose-a:underline",
40
40
  // Lists
41
41
  "prose-li:text-foreground dark:prose-li:text-foreground",
42
42
  // Inline code
package/dist/index.d.mts CHANGED
@@ -6,6 +6,7 @@ import * as SwitchPrimitives from '@radix-ui/react-switch';
6
6
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  export { MarkdownRenderer } from './markdown.mjs';
9
+ import * as lucide_react from 'lucide-react';
9
10
  import { LucideIcon } from 'lucide-react';
10
11
  import { ClassValue } from 'clsx';
11
12
 
@@ -286,8 +287,12 @@ interface CollapsibleSidebarProps {
286
287
  collapsedWidth?: number;
287
288
  /** Custom expanded width (default: 256px) */
288
289
  expandedWidth?: number;
290
+ /** Below `lg`: the menu button's and the drawer's accessible name. */
291
+ navLabel?: string;
292
+ /** Below `lg`: the drawer starts open (the style sheet draws it so). */
293
+ defaultNavOpen?: boolean;
289
294
  }
290
- declare function CollapsibleSidebar({ storageKey, defaultCollapsed, header, collapsedHeader, items, isActive, linkComponent: LinkComponent, footer, collapsedFooter, className, collapsedWidth, expandedWidth, }: CollapsibleSidebarProps): react_jsx_runtime.JSX.Element;
295
+ declare function CollapsibleSidebar({ storageKey, defaultCollapsed, header, collapsedHeader, items, isActive, linkComponent: LinkComponent, footer, collapsedFooter, className, collapsedWidth, expandedWidth, navLabel, defaultNavOpen, }: CollapsibleSidebarProps): react_jsx_runtime.JSX.Element;
291
296
 
292
297
  interface AccordionSingleProps {
293
298
  type?: 'single';
@@ -426,6 +431,84 @@ interface DiceBearAvatarProps extends React.HTMLAttributes<HTMLDivElement>, Vari
426
431
  }
427
432
  declare const DiceBearAvatar: React.ForwardRefExoticComponent<DiceBearAvatarProps & React.RefAttributes<HTMLDivElement>>;
428
433
 
434
+ /** Each icon name and the glyph it draws. */
435
+ declare const ICONS: {
436
+ readonly 'arrow-left': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
437
+ readonly 'arrow-right': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
438
+ readonly bell: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
439
+ readonly calendar: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
440
+ readonly check: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
441
+ readonly 'chevron-down': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
442
+ readonly 'chevron-left': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
443
+ readonly 'chevron-right': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
444
+ readonly 'chevron-up': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
445
+ readonly 'circle-alert': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
446
+ readonly 'circle-check': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
447
+ readonly 'clipboard-list': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
448
+ readonly clock: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
449
+ readonly database: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
450
+ readonly download: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
451
+ readonly ellipsis: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
452
+ readonly 'external-link': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
453
+ readonly eye: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
454
+ readonly 'eye-off': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
455
+ readonly 'file-text': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
456
+ readonly filter: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
457
+ readonly folder: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
458
+ readonly heart: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
459
+ readonly house: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
460
+ readonly inbox: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
461
+ readonly info: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
462
+ readonly 'layout-grid': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
463
+ readonly link: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
464
+ readonly list: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
465
+ readonly loader: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
466
+ readonly lock: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
467
+ readonly 'log-out': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
468
+ readonly mail: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
469
+ readonly 'map-pin': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
470
+ readonly menu: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
471
+ readonly package: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
472
+ readonly pencil: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
473
+ readonly phone: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
474
+ readonly plus: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
475
+ readonly 'refresh-cw': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
476
+ readonly rocket: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
477
+ readonly search: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
478
+ readonly settings: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
479
+ readonly star: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
480
+ readonly tag: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
481
+ readonly trash: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
482
+ readonly 'triangle-alert': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
483
+ readonly upload: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
484
+ readonly user: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
485
+ readonly users: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
486
+ readonly x: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
487
+ };
488
+ type IconName = keyof typeof ICONS;
489
+ /**
490
+ * The icon sizes, each a step of the spacing scale (`size-3` is 12px …
491
+ * `size-8` 32px): the size comes from the tokens, never lucide's 24px
492
+ * default (the class sets the box; the SVG's own width/height give way).
493
+ */
494
+ declare const ICON_SIZES: {
495
+ readonly xs: "size-3";
496
+ readonly sm: "size-4";
497
+ readonly md: "size-5";
498
+ readonly lg: "size-6";
499
+ readonly xl: "size-8";
500
+ };
501
+ type IconSize = keyof typeof ICON_SIZES;
502
+ interface IconProps {
503
+ /** One name of the closed set (`ICONS`). */
504
+ name: IconName;
505
+ /** One step of the size scale (`ICON_SIZES`). */
506
+ size: IconSize;
507
+ className?: string;
508
+ }
509
+ /** A decorative icon from the closed set (hidden from assistive technology). */
510
+ declare function Icon({ name, size, className }: IconProps): React.ReactElement;
511
+
429
512
  interface IntentIconProps {
430
513
  intent?: 'success' | 'warning' | 'error' | 'info';
431
514
  size?: 'sm' | 'md';
@@ -731,6 +814,14 @@ declare const CommandPalette: React.ForwardRefExoticComponent<CommandPaletteProp
731
814
  * bg-card -> colors.card (sidebar bg)
732
815
  * border-border -> colors.border (sidebar border)
733
816
  *
817
+ * One-artifact W1 (#5823) — the app frame on a phone: the `sidebar`
818
+ * variant drew its 240px sidebar beside the content at every width, leaving
819
+ * a 150px column at 390px. Below `md` the sidebar now lives behind a menu
820
+ * button in a top bar and opens as a drawer over a scrim (`z-overlay`,
821
+ * Escape and the scrim close it); from `md` up it is the fixed column.
822
+ * The drawer is `NavDrawer` (`./nav-drawer`), shared with
823
+ * `CollapsibleSidebar`: one phone drawer in the library.
824
+ *
734
825
  * Issue #2629 — B-3: Application Shells
735
826
  * Authored by Caqophony
736
827
  */
@@ -742,6 +833,10 @@ interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {
742
833
  header?: React.ReactNode;
743
834
  sidebar?: React.ReactNode;
744
835
  detailPanel?: React.ReactNode;
836
+ /** `sidebar` variant: the menu button's accessible name on a phone. */
837
+ navLabel?: string;
838
+ /** `sidebar` variant: the phone drawer starts open (the style sheet draws it so). */
839
+ defaultNavOpen?: boolean;
745
840
  }
746
841
  declare const AppShell: React.ForwardRefExoticComponent<AppShellProps & React.RefAttributes<HTMLDivElement>>;
747
842
 
@@ -918,7 +1013,8 @@ interface ImageCardProps extends React.HTMLAttributes<HTMLDivElement> {
918
1013
  declare const ImageCard: React.ForwardRefExoticComponent<ImageCardProps & React.RefAttributes<HTMLDivElement>>;
919
1014
  interface StatCardExtendedProps extends React.HTMLAttributes<HTMLDivElement> {
920
1015
  label: string;
921
- value: string;
1016
+ /** W1 (#5823): `null` (not measured yet) draws `EmptyValue`, never a blank. */
1017
+ value: string | null;
922
1018
  trend?: {
923
1019
  direction: 'up' | 'down' | 'neutral';
924
1020
  text: string;
@@ -1427,21 +1523,27 @@ declare const StatGroup: React.ForwardRefExoticComponent<StatGroupProps & React.
1427
1523
  * import { DescriptionList, DescriptionItem } from '@caqophony/ui';
1428
1524
  * <DescriptionList layout="side-by-side">
1429
1525
  * <DescriptionItem label="Name" value="Jane Cooper" />
1430
- * <DescriptionItem label="Email" value="jane@example.com" />
1526
+ * <DescriptionItem label="Email" value={null} /> → "—"
1431
1527
  * </DescriptionList>
1432
1528
  *
1529
+ * One-artifact W1 (#5823): the list's `layout` is the ONE writer of every
1530
+ * item's layout (a context; an item had its own `layout` prop that a page
1531
+ * had to repeat on each item). An empty value (`isEmptyValue`) draws
1532
+ * `EmptyValue`, never a blank. A long value wraps instead of running off.
1533
+ *
1433
1534
  * Issue #2635 — B-9
1434
1535
  * Authored by Caqophony
1435
1536
  */
1436
1537
 
1538
+ type DescriptionLayout = 'stacked' | 'side-by-side' | 'grid';
1437
1539
  interface DescriptionListProps extends React.HTMLAttributes<HTMLDListElement> {
1438
- layout?: 'stacked' | 'side-by-side' | 'grid';
1540
+ layout?: DescriptionLayout;
1439
1541
  }
1440
1542
  declare const DescriptionList: React.ForwardRefExoticComponent<DescriptionListProps & React.RefAttributes<HTMLDListElement>>;
1441
1543
  interface DescriptionItemProps extends React.HTMLAttributes<HTMLDivElement> {
1442
1544
  label: string;
1545
+ /** Drawn as `EmptyValue` when empty (`isEmptyValue`). */
1443
1546
  value: React.ReactNode;
1444
- layout?: 'stacked' | 'side-by-side' | 'grid';
1445
1547
  }
1446
1548
  declare const DescriptionItem: React.ForwardRefExoticComponent<DescriptionItemProps & React.RefAttributes<HTMLDivElement>>;
1447
1549
 
@@ -1510,6 +1612,8 @@ interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
1510
1612
  dismissible?: boolean;
1511
1613
  onDismiss?: () => void;
1512
1614
  }
1615
+ /** The pale-tint intent styles; `IntentBadge` reads the same map (W1 #5823). */
1616
+ declare const INTENT_SUBTLE_STYLES: Record<'success' | 'warning' | 'error' | 'info', string>;
1513
1617
  declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
1514
1618
 
1515
1619
  interface EmptyStateProps {
@@ -1697,6 +1801,215 @@ interface MediaObjectProps extends React.HTMLAttributes<HTMLDivElement> {
1697
1801
  }
1698
1802
  declare const MediaObject: React.ForwardRefExoticComponent<MediaObjectProps & React.RefAttributes<HTMLDivElement>>;
1699
1803
 
1804
+ /** The glyph an empty value is drawn as. */
1805
+ declare const EMPTY_VALUE_GLYPH = "\u2014";
1806
+ /** A value with nothing to draw: `null`, `undefined`, `false`, or a string of only whitespace. */
1807
+ declare function isEmptyValue(value: React.ReactNode): boolean;
1808
+ interface EmptyValueProps {
1809
+ className?: string;
1810
+ }
1811
+ declare function EmptyValue({ className }: EmptyValueProps): react_jsx_runtime.JSX.Element;
1812
+
1813
+ /**
1814
+ * Page patterns — the composites every bake-off tree re-created by hand
1815
+ * (one-artifact W1, #5823). Each one owns its spacing, radius, overflow and
1816
+ * empty states, in the project's tokens, so a page composes them and never
1817
+ * re-decides them:
1818
+ *
1819
+ * PageGutter the page column: centred, a content width, the gutter
1820
+ * (3 of 3 trees: `max-w-* mx-auto px-4 sm:px-6 py-6 …`)
1821
+ * PageHeading the h1, its description, badges, actions (3 of 3)
1822
+ * SectionCard a titled card section; `flush` for a list (3 of 3)
1823
+ * TabbedCard a card whose top is a tab bar, its labels inset (run 7:
1824
+ * the tabs sat flush against the card edge)
1825
+ * SidePanelLayout main column + a side panel that stacks under it on a
1826
+ * narrow screen and sticks beside it on a wide one (2 of 3)
1827
+ *
1828
+ * Usage:
1829
+ * <PageGutter>
1830
+ * <PageHeading title="Senior Designer" description="Acme" actions={…} />
1831
+ * <SidePanelLayout aside={<SectionCard title="Next action">…</SectionCard>}>
1832
+ * <TabbedCard tabs={<><TabBarItem active>Overview</TabBarItem>…</>}>…</TabbedCard>
1833
+ * </SidePanelLayout>
1834
+ * </PageGutter>
1835
+ *
1836
+ * Authored by Caqophony
1837
+ */
1838
+
1839
+ declare const GUTTER_WIDTHS: {
1840
+ /** A single column of reading or a short list. */
1841
+ readonly narrow: "max-w-content-md";
1842
+ /** A detail or list page with a side panel. */
1843
+ readonly default: "max-w-content-xl";
1844
+ };
1845
+ interface PageGutterProps extends React.HTMLAttributes<HTMLDivElement> {
1846
+ width?: keyof typeof GUTTER_WIDTHS;
1847
+ }
1848
+ declare const PageGutter: React.ForwardRefExoticComponent<PageGutterProps & React.RefAttributes<HTMLDivElement>>;
1849
+ interface PageHeadingProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
1850
+ title: React.ReactNode;
1851
+ description?: React.ReactNode;
1852
+ /** Badges under the title (`IntentBadge`s); they wrap. */
1853
+ meta?: React.ReactNode;
1854
+ /** The page's actions: they sit beside the title, and under it on a phone. */
1855
+ actions?: React.ReactNode;
1856
+ }
1857
+ declare const PageHeading: React.ForwardRefExoticComponent<PageHeadingProps & React.RefAttributes<HTMLElement>>;
1858
+ interface SectionCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
1859
+ title?: React.ReactNode;
1860
+ description?: React.ReactNode;
1861
+ /** Actions at the right of the title row. */
1862
+ actions?: React.ReactNode;
1863
+ /** `compact`: a side panel's card (smaller title, tighter padding). */
1864
+ size?: 'default' | 'compact';
1865
+ /** The body has no padding: a `StackedList` or a table runs edge to edge. */
1866
+ flush?: boolean;
1867
+ }
1868
+ declare const SectionCard: React.ForwardRefExoticComponent<SectionCardProps & React.RefAttributes<HTMLDivElement>>;
1869
+ interface TabbedCardProps extends React.HTMLAttributes<HTMLDivElement> {
1870
+ /** The `TabBarItem`s. */
1871
+ tabs: React.ReactNode;
1872
+ /** The tab bar's accessible name. */
1873
+ tabsLabel: string;
1874
+ }
1875
+ declare const TabbedCard: React.ForwardRefExoticComponent<TabbedCardProps & React.RefAttributes<HTMLDivElement>>;
1876
+ interface SidePanelLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
1877
+ /** The side panel: a stack of compact `SectionCard`s. */
1878
+ aside: React.ReactNode;
1879
+ /** The panel's accessible name. */
1880
+ asideLabel: string;
1881
+ }
1882
+ declare const SidePanelLayout: React.ForwardRefExoticComponent<SidePanelLayoutProps & React.RefAttributes<HTMLDivElement>>;
1883
+
1884
+ /**
1885
+ * IntentBadge — a record's status (stage, priority, method) as a small pill.
1886
+ *
1887
+ * One-artifact W1 (#5823): run 7 drew three of these by hand
1888
+ * (`inline-flex px-3 py-1 rounded-full text-13 bg-primary-10 …`). The badge
1889
+ * owns its shape, size and colours; a page names only the intent. The intent
1890
+ * tints are the ones `Alert` draws (`INTENT_SUBTLE_STYLES`, one writer), so a
1891
+ * badge and an alert of one intent match. A long value is truncated with its
1892
+ * full text in `title`, never run off the row.
1893
+ *
1894
+ * Usage:
1895
+ * import { IntentBadge } from '@caqophony/ui';
1896
+ * <IntentBadge intent="success">Offer</IntentBadge>
1897
+ *
1898
+ * Authored by Caqophony
1899
+ */
1900
+
1901
+ type IntentBadgeIntent = 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info';
1902
+ interface IntentBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
1903
+ intent?: IntentBadgeIntent;
1904
+ }
1905
+ declare const IntentBadge: React.ForwardRefExoticComponent<IntentBadgeProps & React.RefAttributes<HTMLSpanElement>>;
1906
+
1907
+ interface OverflowMenuItem {
1908
+ label: string;
1909
+ onSelect: () => void;
1910
+ icon?: IconName;
1911
+ /** Drawn in the error colour (delete, remove). */
1912
+ destructive?: boolean;
1913
+ disabled?: boolean;
1914
+ }
1915
+ interface OverflowMenuProps {
1916
+ /** The trigger's accessible name ("More actions"). */
1917
+ label: string;
1918
+ items: readonly OverflowMenuItem[];
1919
+ /** Open on first render (the style sheet draws it open). */
1920
+ defaultOpen?: boolean;
1921
+ className?: string;
1922
+ }
1923
+ declare function OverflowMenu({ label, items, defaultOpen, className, }: OverflowMenuProps): react_jsx_runtime.JSX.Element;
1924
+
1925
+ /**
1926
+ * StageList — where a record stands in its sequence of stages (an
1927
+ * application's pipeline, an order's fulfilment), drawn as a vertical
1928
+ * `Stepper` the page never configures by hand.
1929
+ *
1930
+ * One-artifact W1 (#5823): run 7 passed `activeStep={4}` AND `completed` on
1931
+ * every step (two writers of one fact) and clamped the 9 steps in a scroll
1932
+ * box that cut the line. Here ONE value, `current`, decides every step: the
1933
+ * ones before it are complete, it is current, the rest upcoming. An
1934
+ * `outcome` (a stage off the sequence: rejected, withdrawn) ends the list as
1935
+ * an error step after the sequence. The list is drawn at its full height,
1936
+ * never clamped.
1937
+ *
1938
+ * A `current` that is neither a stage nor an outcome is a contract fault,
1939
+ * thrown with the value and the lists, never drawn as a guess.
1940
+ *
1941
+ * Usage:
1942
+ * <StageList
1943
+ * stages={[{ value: 'applied', label: 'Applied' }, …]}
1944
+ * outcomes={[{ value: 'rejected', label: 'Rejected' }]}
1945
+ * current={application.stage}
1946
+ * />
1947
+ *
1948
+ * Authored by Caqophony
1949
+ */
1950
+
1951
+ interface Stage {
1952
+ value: string;
1953
+ label: string;
1954
+ }
1955
+ interface StageListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
1956
+ /** The sequence, in order. */
1957
+ stages: readonly Stage[];
1958
+ /** Stages off the sequence that end it (rejected, withdrawn). */
1959
+ outcomes?: readonly Stage[];
1960
+ /** The record's stage: a `stages` or `outcomes` value. */
1961
+ current: string;
1962
+ }
1963
+ declare const StageList: React.ForwardRefExoticComponent<StageListProps & React.RefAttributes<HTMLDivElement>>;
1964
+
1965
+ /**
1966
+ * ClampedList — a list held to a height that scrolls inside itself.
1967
+ *
1968
+ * One-artifact W1 (#5823): run 7 wrapped a 9-step `Stepper` in
1969
+ * `max-h-[160px] overflow-y-auto`, which cut the stepper's line under the
1970
+ * clip with no sign there was more. This owns the clamp: a height from the
1971
+ * scale, the scroll, the scroll hint (`SCROLL_HINT_Y`: a chevron mark on the
1972
+ * end edge while there is more below), and keyboard access
1973
+ * (a scrolling region is focusable and named, WCAG 2.1.1). A page never
1974
+ * writes `max-h-*` with `overflow-*` around a library component.
1975
+ *
1976
+ * Usage:
1977
+ * import { ClampedList } from '@caqophony/ui';
1978
+ * <ClampedList label="Activity" maxHeight="md">…</ClampedList>
1979
+ *
1980
+ * Authored by Caqophony
1981
+ */
1982
+
1983
+ declare const MAX_HEIGHTS: {
1984
+ readonly sm: "max-h-48";
1985
+ readonly md: "max-h-72";
1986
+ readonly lg: "max-h-96";
1987
+ };
1988
+ interface ClampedListProps extends React.HTMLAttributes<HTMLDivElement> {
1989
+ /** The region's accessible name. */
1990
+ label: string;
1991
+ maxHeight?: keyof typeof MAX_HEIGHTS;
1992
+ }
1993
+ declare const ClampedList: React.ForwardRefExoticComponent<ClampedListProps & React.RefAttributes<HTMLDivElement>>;
1994
+
1995
+ /**
1996
+ * One-artifact W1 (#5823) — the scroll hint: the ONE writer of how a box
1997
+ * that scrolls says there is more. The last 1.5rem of the box (its end edge)
1998
+ * fades out through a mask (3rem for a vertical box, below); the box carries
1999
+ * the same length of end padding,
2000
+ * so when nothing is clipped only that empty padding fades, and when content
2001
+ * runs past the edge the clipped item fades, which is the hint.
2002
+ *
2003
+ * Static CSS (no script, no animation): it shows in a server render and in a
2004
+ * still capture alike. A mask is surface-agnostic (no gradient in a guessed
2005
+ * background colour). The style sheet's `scrollHint` check fails on a box
2006
+ * that overflows on an axis it scrolls without one of these.
2007
+ *
2008
+ * Authored by Caqophony
2009
+ */
2010
+ /** A horizontally scrolling box (a tab bar). */
2011
+ declare const SCROLL_HINT_X = "pr-6 [mask-image:linear-gradient(to_right,black_calc(100%-1.5rem),transparent)]";
2012
+
1700
2013
  /**
1701
2014
  * UI Package Utilities
1702
2015
  *
@@ -1713,4 +2026,4 @@ declare function cn(...inputs: ClassValue[]): string;
1713
2026
 
1714
2027
  declare function useDebounce<T>(value: T, ms: number): T;
1715
2028
 
1716
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCard, type ActionCardProps, ActionPanel, type ActionPanelProps, ActivityFeed, ActivityFeedItem, type ActivityFeedItemProps, type ActivityFeedProps, Alert, type AlertProps, AppShell, type AppShellProps, AvatarGroup, AvatarGroupItem, type AvatarGroupItemProps, type AvatarGroupProps, Button, ButtonGroup, ButtonGroupItem, type ButtonGroupItemProps, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarEvent, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollapsibleSidebar, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteProps, type CommandPaletteResult, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DiceBearAvatar, type DiceBearAvatarProps, type DiceBearStyle, DistributionChip, type DistributionChipProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerFooter, DrawerHeader, type DrawerProps, EmptyState, type EmptyStateProps, FilterChip, type FilterChipProps, FormError, type FormErrorProps, FormField, FormFieldGroup, type FormFieldGroupProps, type FormFieldProps, FormLayout, type FormLayoutProps, FormLayoutSection, type FormLayoutSectionProps, FormSection, type FormSectionProps, FormSuccess, type FormSuccessProps, GlobalErrorContent, type GlobalErrorContentProps, GridList, GridListItem, type GridListItemProps, type GridListProps, HorizontalCard, type HorizontalCardProps, HoverCard, type HoverCardProps, ImageCard, type ImageCardProps, Input, InputGroup, type InputGroupProps, type InputProps, IntentIcon, type IntentIconProps, MediaObject, type MediaObjectProps, ModalBody, ModalDialog, type ModalDialogProps, ModalFooter, ModalHeader, type NavItem, Navbar, NavbarLink, type NavbarLinkProps, type NavbarProps, NotificationBanner, type NotificationBannerProps, NotificationPanel, NotificationPanelItem, type NotificationPanelItemProps, type NotificationPanelProps, PageContent, type PageContentProps, Pagination, PaginationButton, type PaginationProps, Popover, type PopoverProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SectionHeading, type SectionHeadingProps, type NavItem as SidebarNavItem, SimpleAccordion, SkeletonBar, type SkeletonBarProps, SkeletonCard, SkeletonCardGrid, type SkeletonCardGridProps, type SkeletonCardProps, SkeletonDetail, type SkeletonDetailProps, SkeletonRow, type SkeletonRowProps, SkeletonTable, type SkeletonTableProps, StackedList, StackedListItem, type StackedListItemProps, type StackedListProps, StatCardExtended, type StatCardExtendedProps, StatGroup, type StatGroupProps, Stepper, type StepperProps, StepperStep, type StepperStepProps, StickyActionBar, type StickyActionBarProps, Switch, type SwitchProps, TabBar, TabBarItem, type TabBarItemProps, type TabBarProps, TableBody, TableCaption, TableCell, type TableCellProps, TableHeader, TableRow, type TableRowProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, buildDiceBearUrl, buttonVariants, cn, getPageRange, useDebounce, useSidebar };
2029
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCard, type ActionCardProps, ActionPanel, type ActionPanelProps, ActivityFeed, ActivityFeedItem, type ActivityFeedItemProps, type ActivityFeedProps, Alert, type AlertProps, AppShell, type AppShellProps, AvatarGroup, AvatarGroupItem, type AvatarGroupItemProps, type AvatarGroupProps, Button, ButtonGroup, ButtonGroupItem, type ButtonGroupItemProps, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarEvent, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ClampedList, type ClampedListProps, CollapsibleSidebar, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteProps, type CommandPaletteResult, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DiceBearAvatar, type DiceBearAvatarProps, type DiceBearStyle, DistributionChip, type DistributionChipProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerFooter, DrawerHeader, type DrawerProps, EMPTY_VALUE_GLYPH, EmptyState, type EmptyStateProps, EmptyValue, type EmptyValueProps, FilterChip, type FilterChipProps, FormError, type FormErrorProps, FormField, FormFieldGroup, type FormFieldGroupProps, type FormFieldProps, FormLayout, type FormLayoutProps, FormLayoutSection, type FormLayoutSectionProps, FormSection, type FormSectionProps, FormSuccess, type FormSuccessProps, GlobalErrorContent, type GlobalErrorContentProps, GridList, GridListItem, type GridListItemProps, type GridListProps, HorizontalCard, type HorizontalCardProps, HoverCard, type HoverCardProps, ICONS, ICON_SIZES, INTENT_SUBTLE_STYLES, Icon, type IconName, type IconProps, type IconSize, ImageCard, type ImageCardProps, Input, InputGroup, type InputGroupProps, type InputProps, IntentBadge, type IntentBadgeIntent, type IntentBadgeProps, IntentIcon, type IntentIconProps, MediaObject, type MediaObjectProps, ModalBody, ModalDialog, type ModalDialogProps, ModalFooter, ModalHeader, type NavItem, Navbar, NavbarLink, type NavbarLinkProps, type NavbarProps, NotificationBanner, type NotificationBannerProps, NotificationPanel, NotificationPanelItem, type NotificationPanelItemProps, type NotificationPanelProps, OverflowMenu, type OverflowMenuItem, type OverflowMenuProps, PageContent, type PageContentProps, PageGutter, type PageGutterProps, PageHeading, type PageHeadingProps, Pagination, PaginationButton, type PaginationProps, Popover, type PopoverProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SCROLL_HINT_X, SectionCard, type SectionCardProps, SectionHeading, type SectionHeadingProps, SidePanelLayout, type SidePanelLayoutProps, type NavItem as SidebarNavItem, SimpleAccordion, SkeletonBar, type SkeletonBarProps, SkeletonCard, SkeletonCardGrid, type SkeletonCardGridProps, type SkeletonCardProps, SkeletonDetail, type SkeletonDetailProps, SkeletonRow, type SkeletonRowProps, SkeletonTable, type SkeletonTableProps, StackedList, StackedListItem, type StackedListItemProps, type StackedListProps, type Stage, StageList, type StageListProps, StatCardExtended, type StatCardExtendedProps, StatGroup, type StatGroupProps, Stepper, type StepperProps, StepperStep, type StepperStepProps, StickyActionBar, type StickyActionBarProps, Switch, type SwitchProps, TabBar, TabBarItem, type TabBarItemProps, type TabBarProps, TabbedCard, type TabbedCardProps, TableBody, TableCaption, TableCell, type TableCellProps, TableHeader, TableRow, type TableRowProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, buildDiceBearUrl, buttonVariants, cn, getPageRange, isEmptyValue, useDebounce, useSidebar };