@caqophony/ui 0.1.0 → 0.3.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 +3 -1
- package/dist/{chunk-K3SEIIA3.js → chunk-4YA6BZDJ.js} +1 -1
- package/dist/index.d.mts +580 -12
- package/dist/index.js +2083 -903
- package/dist/markdown.js +1 -1
- package/package.json +1 -1
- package/styles.css +97 -43
package/dist/index.d.mts
CHANGED
|
@@ -6,12 +6,13 @@ 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
|
|
|
12
13
|
declare const buttonVariants: (props?: ({
|
|
13
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" |
|
|
14
|
-
size?: "
|
|
14
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
15
|
+
size?: "sm" | "default" | "lg" | "icon" | null | undefined;
|
|
15
16
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
16
17
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
17
18
|
asChild?: boolean;
|
|
@@ -22,24 +23,35 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
|
|
|
22
23
|
}
|
|
23
24
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
24
25
|
|
|
26
|
+
declare const fieldVariants: (props?: ({
|
|
27
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
28
|
+
error?: boolean | null | undefined;
|
|
29
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
30
|
+
type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;
|
|
31
|
+
|
|
25
32
|
/**
|
|
26
33
|
* Input Component
|
|
27
34
|
*
|
|
28
35
|
* Standard form input with consistent sizing, focus ring, and disabled state.
|
|
29
|
-
* Mobile-first: 44px minimum height for touch targets.
|
|
36
|
+
* Mobile-first: 44px minimum height for touch targets (the default `md`).
|
|
37
|
+
* The surface (border, focus, error, size) is `fieldVariants` (W1.5 Batch 1,
|
|
38
|
+
* #5823), shared with Textarea and Select.
|
|
30
39
|
*
|
|
31
40
|
* Usage:
|
|
32
41
|
* import { Input } from '@caqophony/ui';
|
|
33
42
|
* <Input type="email" placeholder="Enter email" />
|
|
43
|
+
* <Input size="sm" placeholder="Filter" />
|
|
34
44
|
*
|
|
35
45
|
* Authored by Caqophony
|
|
36
46
|
*/
|
|
37
47
|
|
|
38
|
-
interface InputProps extends React.ComponentProps<'input'> {
|
|
48
|
+
interface InputProps extends Omit<React.ComponentProps<'input'>, 'size'> {
|
|
39
49
|
/** Show error styling (red border + aria-invalid) */
|
|
40
50
|
error?: boolean;
|
|
41
51
|
/** ID of the element describing the error, for aria-describedby */
|
|
42
52
|
errorMessageId?: string;
|
|
53
|
+
/** sm 36px, md 44px (the default, unchanged), lg 48px */
|
|
54
|
+
size?: FieldSize;
|
|
43
55
|
}
|
|
44
56
|
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
45
57
|
|
|
@@ -286,8 +298,12 @@ interface CollapsibleSidebarProps {
|
|
|
286
298
|
collapsedWidth?: number;
|
|
287
299
|
/** Custom expanded width (default: 256px) */
|
|
288
300
|
expandedWidth?: number;
|
|
301
|
+
/** Below `lg`: the menu button's and the drawer's accessible name. */
|
|
302
|
+
navLabel?: string;
|
|
303
|
+
/** Below `lg`: the drawer starts open (the style sheet draws it so). */
|
|
304
|
+
defaultNavOpen?: boolean;
|
|
289
305
|
}
|
|
290
|
-
declare function CollapsibleSidebar({ storageKey, defaultCollapsed, header, collapsedHeader, items, isActive, linkComponent: LinkComponent, footer, collapsedFooter, className, collapsedWidth, expandedWidth, }: CollapsibleSidebarProps): react_jsx_runtime.JSX.Element;
|
|
306
|
+
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
307
|
|
|
292
308
|
interface AccordionSingleProps {
|
|
293
309
|
type?: 'single';
|
|
@@ -407,7 +423,7 @@ declare function ConfirmDialog({ title, message, confirmLabel, onConfirm, onCanc
|
|
|
407
423
|
/** Supported DiceBear avatar styles */
|
|
408
424
|
type DiceBearStyle = 'adventurer' | 'adventurer-neutral' | 'avataaars' | 'avataaars-neutral' | 'big-ears' | 'big-ears-neutral' | 'bottts' | 'bottts-neutral' | 'croodles' | 'croodles-neutral' | 'fun-emoji' | 'icons' | 'identicon' | 'initials' | 'lorelei' | 'lorelei-neutral' | 'micah' | 'miniavs' | 'notionists' | 'notionists-neutral' | 'open-peeps' | 'personas' | 'pixel-art' | 'pixel-art-neutral' | 'rings' | 'shapes' | 'thumbs';
|
|
409
425
|
declare const avatarVariants: (props?: ({
|
|
410
|
-
size?: "sm" | "
|
|
426
|
+
size?: "sm" | "xs" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
411
427
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
412
428
|
/**
|
|
413
429
|
* Build a DiceBear avatar URL from a seed and style.
|
|
@@ -426,6 +442,84 @@ interface DiceBearAvatarProps extends React.HTMLAttributes<HTMLDivElement>, Vari
|
|
|
426
442
|
}
|
|
427
443
|
declare const DiceBearAvatar: React.ForwardRefExoticComponent<DiceBearAvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
428
444
|
|
|
445
|
+
/** Each icon name and the glyph it draws. */
|
|
446
|
+
declare const ICONS: {
|
|
447
|
+
readonly 'arrow-left': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
448
|
+
readonly 'arrow-right': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
449
|
+
readonly bell: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
450
|
+
readonly calendar: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
451
|
+
readonly check: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
452
|
+
readonly 'chevron-down': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
453
|
+
readonly 'chevron-left': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
454
|
+
readonly 'chevron-right': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
455
|
+
readonly 'chevron-up': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
456
|
+
readonly 'circle-alert': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
457
|
+
readonly 'circle-check': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
458
|
+
readonly 'clipboard-list': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
459
|
+
readonly clock: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
460
|
+
readonly database: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
461
|
+
readonly download: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
462
|
+
readonly ellipsis: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
463
|
+
readonly 'external-link': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
464
|
+
readonly eye: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
465
|
+
readonly 'eye-off': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
466
|
+
readonly 'file-text': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
467
|
+
readonly filter: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
468
|
+
readonly folder: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
469
|
+
readonly heart: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
470
|
+
readonly house: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
471
|
+
readonly inbox: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
472
|
+
readonly info: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
473
|
+
readonly 'layout-grid': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
474
|
+
readonly link: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
475
|
+
readonly list: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
476
|
+
readonly loader: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
477
|
+
readonly lock: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
478
|
+
readonly 'log-out': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
479
|
+
readonly mail: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
480
|
+
readonly 'map-pin': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
481
|
+
readonly menu: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
482
|
+
readonly package: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
483
|
+
readonly pencil: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
484
|
+
readonly phone: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
485
|
+
readonly plus: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
486
|
+
readonly 'refresh-cw': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
487
|
+
readonly rocket: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
488
|
+
readonly search: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
489
|
+
readonly settings: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
490
|
+
readonly star: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
491
|
+
readonly tag: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
492
|
+
readonly trash: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
493
|
+
readonly 'triangle-alert': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
494
|
+
readonly upload: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
495
|
+
readonly user: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
496
|
+
readonly users: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
497
|
+
readonly x: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
498
|
+
};
|
|
499
|
+
type IconName = keyof typeof ICONS;
|
|
500
|
+
/**
|
|
501
|
+
* The icon sizes, each a step of the spacing scale (`size-3` is 12px …
|
|
502
|
+
* `size-8` 32px): the size comes from the tokens, never lucide's 24px
|
|
503
|
+
* default (the class sets the box; the SVG's own width/height give way).
|
|
504
|
+
*/
|
|
505
|
+
declare const ICON_SIZES: {
|
|
506
|
+
readonly xs: "size-3";
|
|
507
|
+
readonly sm: "size-4";
|
|
508
|
+
readonly md: "size-5";
|
|
509
|
+
readonly lg: "size-6";
|
|
510
|
+
readonly xl: "size-8";
|
|
511
|
+
};
|
|
512
|
+
type IconSize = keyof typeof ICON_SIZES;
|
|
513
|
+
interface IconProps {
|
|
514
|
+
/** One name of the closed set (`ICONS`). */
|
|
515
|
+
name: IconName;
|
|
516
|
+
/** One step of the size scale (`ICON_SIZES`). */
|
|
517
|
+
size: IconSize;
|
|
518
|
+
className?: string;
|
|
519
|
+
}
|
|
520
|
+
/** A decorative icon from the closed set (hidden from assistive technology). */
|
|
521
|
+
declare function Icon({ name, size, className }: IconProps): React.ReactElement;
|
|
522
|
+
|
|
429
523
|
interface IntentIconProps {
|
|
430
524
|
intent?: 'success' | 'warning' | 'error' | 'info';
|
|
431
525
|
size?: 'sm' | 'md';
|
|
@@ -731,6 +825,14 @@ declare const CommandPalette: React.ForwardRefExoticComponent<CommandPaletteProp
|
|
|
731
825
|
* bg-card -> colors.card (sidebar bg)
|
|
732
826
|
* border-border -> colors.border (sidebar border)
|
|
733
827
|
*
|
|
828
|
+
* One-artifact W1 (#5823) — the app frame on a phone: the `sidebar`
|
|
829
|
+
* variant drew its 240px sidebar beside the content at every width, leaving
|
|
830
|
+
* a 150px column at 390px. Below `md` the sidebar now lives behind a menu
|
|
831
|
+
* button in a top bar and opens as a drawer over a scrim (`z-overlay`,
|
|
832
|
+
* Escape and the scrim close it); from `md` up it is the fixed column.
|
|
833
|
+
* The drawer is `NavDrawer` (`./nav-drawer`), shared with
|
|
834
|
+
* `CollapsibleSidebar`: one phone drawer in the library.
|
|
835
|
+
*
|
|
734
836
|
* Issue #2629 — B-3: Application Shells
|
|
735
837
|
* Authored by Caqophony
|
|
736
838
|
*/
|
|
@@ -742,6 +844,10 @@ interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
742
844
|
header?: React.ReactNode;
|
|
743
845
|
sidebar?: React.ReactNode;
|
|
744
846
|
detailPanel?: React.ReactNode;
|
|
847
|
+
/** `sidebar` variant: the menu button's accessible name on a phone. */
|
|
848
|
+
navLabel?: string;
|
|
849
|
+
/** `sidebar` variant: the phone drawer starts open (the style sheet draws it so). */
|
|
850
|
+
defaultNavOpen?: boolean;
|
|
745
851
|
}
|
|
746
852
|
declare const AppShell: React.ForwardRefExoticComponent<AppShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
747
853
|
|
|
@@ -918,7 +1024,8 @@ interface ImageCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
918
1024
|
declare const ImageCard: React.ForwardRefExoticComponent<ImageCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
919
1025
|
interface StatCardExtendedProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
920
1026
|
label: string;
|
|
921
|
-
|
|
1027
|
+
/** W1 (#5823): `null` (not measured yet) draws `EmptyValue`, never a blank. */
|
|
1028
|
+
value: string | null;
|
|
922
1029
|
trend?: {
|
|
923
1030
|
direction: 'up' | 'down' | 'neutral';
|
|
924
1031
|
text: string;
|
|
@@ -1191,7 +1298,7 @@ declare namespace SkeletonDetail {
|
|
|
1191
1298
|
* bg-transparent → transparent (inactive toggle)
|
|
1192
1299
|
* text-foreground → colors.foreground (active)
|
|
1193
1300
|
* text-muted-fg → colors.mutedFg (inactive)
|
|
1194
|
-
* border-
|
|
1301
|
+
* border-border → colors.border (outline variant)
|
|
1195
1302
|
*
|
|
1196
1303
|
* Usage:
|
|
1197
1304
|
* import { Toggle, ToggleGroup } from '@caqophony/ui';
|
|
@@ -1427,21 +1534,27 @@ declare const StatGroup: React.ForwardRefExoticComponent<StatGroupProps & React.
|
|
|
1427
1534
|
* import { DescriptionList, DescriptionItem } from '@caqophony/ui';
|
|
1428
1535
|
* <DescriptionList layout="side-by-side">
|
|
1429
1536
|
* <DescriptionItem label="Name" value="Jane Cooper" />
|
|
1430
|
-
* <DescriptionItem label="Email" value="
|
|
1537
|
+
* <DescriptionItem label="Email" value={null} /> → "—"
|
|
1431
1538
|
* </DescriptionList>
|
|
1432
1539
|
*
|
|
1540
|
+
* One-artifact W1 (#5823): the list's `layout` is the ONE writer of every
|
|
1541
|
+
* item's layout (a context; an item had its own `layout` prop that a page
|
|
1542
|
+
* had to repeat on each item). An empty value (`isEmptyValue`) draws
|
|
1543
|
+
* `EmptyValue`, never a blank. A long value wraps instead of running off.
|
|
1544
|
+
*
|
|
1433
1545
|
* Issue #2635 — B-9
|
|
1434
1546
|
* Authored by Caqophony
|
|
1435
1547
|
*/
|
|
1436
1548
|
|
|
1549
|
+
type DescriptionLayout = 'stacked' | 'side-by-side' | 'grid';
|
|
1437
1550
|
interface DescriptionListProps extends React.HTMLAttributes<HTMLDListElement> {
|
|
1438
|
-
layout?:
|
|
1551
|
+
layout?: DescriptionLayout;
|
|
1439
1552
|
}
|
|
1440
1553
|
declare const DescriptionList: React.ForwardRefExoticComponent<DescriptionListProps & React.RefAttributes<HTMLDListElement>>;
|
|
1441
1554
|
interface DescriptionItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1442
1555
|
label: string;
|
|
1556
|
+
/** Drawn as `EmptyValue` when empty (`isEmptyValue`). */
|
|
1443
1557
|
value: React.ReactNode;
|
|
1444
|
-
layout?: 'stacked' | 'side-by-side' | 'grid';
|
|
1445
1558
|
}
|
|
1446
1559
|
declare const DescriptionItem: React.ForwardRefExoticComponent<DescriptionItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
1447
1560
|
|
|
@@ -1510,6 +1623,8 @@ interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
1510
1623
|
dismissible?: boolean;
|
|
1511
1624
|
onDismiss?: () => void;
|
|
1512
1625
|
}
|
|
1626
|
+
/** The pale-tint intent styles; `IntentBadge` reads the same map (W1 #5823). */
|
|
1627
|
+
declare const INTENT_SUBTLE_STYLES: Record<'success' | 'warning' | 'error' | 'info', string>;
|
|
1513
1628
|
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
1514
1629
|
|
|
1515
1630
|
interface EmptyStateProps {
|
|
@@ -1697,6 +1812,459 @@ interface MediaObjectProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
1697
1812
|
}
|
|
1698
1813
|
declare const MediaObject: React.ForwardRefExoticComponent<MediaObjectProps & React.RefAttributes<HTMLDivElement>>;
|
|
1699
1814
|
|
|
1815
|
+
/** The glyph an empty value is drawn as. */
|
|
1816
|
+
declare const EMPTY_VALUE_GLYPH = "\u2014";
|
|
1817
|
+
/** A value with nothing to draw: `null`, `undefined`, `false`, or a string of only whitespace. */
|
|
1818
|
+
declare function isEmptyValue(value: React.ReactNode): boolean;
|
|
1819
|
+
interface EmptyValueProps {
|
|
1820
|
+
className?: string;
|
|
1821
|
+
}
|
|
1822
|
+
declare function EmptyValue({ className }: EmptyValueProps): react_jsx_runtime.JSX.Element;
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* Page patterns — the composites every bake-off tree re-created by hand
|
|
1826
|
+
* (one-artifact W1, #5823). Each one owns its spacing, radius, overflow and
|
|
1827
|
+
* empty states, in the project's tokens, so a page composes them and never
|
|
1828
|
+
* re-decides them:
|
|
1829
|
+
*
|
|
1830
|
+
* PageGutter the page column: centred, a content width, the gutter
|
|
1831
|
+
* (3 of 3 trees: `max-w-* mx-auto px-4 sm:px-6 py-6 …`)
|
|
1832
|
+
* PageHeading the h1, its description, badges, actions (3 of 3)
|
|
1833
|
+
* SectionCard a titled card section; `flush` for a list (3 of 3)
|
|
1834
|
+
* TabbedCard a card whose top is a tab bar, its labels inset (run 7:
|
|
1835
|
+
* the tabs sat flush against the card edge)
|
|
1836
|
+
* SidePanelLayout main column + a side panel that stacks under it on a
|
|
1837
|
+
* narrow screen and sticks beside it on a wide one (2 of 3)
|
|
1838
|
+
*
|
|
1839
|
+
* Usage:
|
|
1840
|
+
* <PageGutter>
|
|
1841
|
+
* <PageHeading title="Senior Designer" description="Acme" actions={…} />
|
|
1842
|
+
* <SidePanelLayout aside={<SectionCard title="Next action">…</SectionCard>}>
|
|
1843
|
+
* <TabbedCard tabs={<><TabBarItem active>Overview</TabBarItem>…</>}>…</TabbedCard>
|
|
1844
|
+
* </SidePanelLayout>
|
|
1845
|
+
* </PageGutter>
|
|
1846
|
+
*
|
|
1847
|
+
* Authored by Caqophony
|
|
1848
|
+
*/
|
|
1849
|
+
|
|
1850
|
+
declare const GUTTER_WIDTHS: {
|
|
1851
|
+
/** A single column of reading or a short list. */
|
|
1852
|
+
readonly narrow: "max-w-content-md";
|
|
1853
|
+
/** A detail or list page with a side panel. */
|
|
1854
|
+
readonly default: "max-w-content-xl";
|
|
1855
|
+
};
|
|
1856
|
+
interface PageGutterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1857
|
+
width?: keyof typeof GUTTER_WIDTHS;
|
|
1858
|
+
}
|
|
1859
|
+
declare const PageGutter: React.ForwardRefExoticComponent<PageGutterProps & React.RefAttributes<HTMLDivElement>>;
|
|
1860
|
+
interface PageHeadingProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
1861
|
+
title: React.ReactNode;
|
|
1862
|
+
description?: React.ReactNode;
|
|
1863
|
+
/** Badges under the title (`IntentBadge`s); they wrap. */
|
|
1864
|
+
meta?: React.ReactNode;
|
|
1865
|
+
/** The page's actions: they sit beside the title, and under it on a phone. */
|
|
1866
|
+
actions?: React.ReactNode;
|
|
1867
|
+
}
|
|
1868
|
+
declare const PageHeading: React.ForwardRefExoticComponent<PageHeadingProps & React.RefAttributes<HTMLElement>>;
|
|
1869
|
+
interface SectionCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1870
|
+
title?: React.ReactNode;
|
|
1871
|
+
description?: React.ReactNode;
|
|
1872
|
+
/** Actions at the right of the title row. */
|
|
1873
|
+
actions?: React.ReactNode;
|
|
1874
|
+
/** `compact`: a side panel's card (smaller title, tighter padding). */
|
|
1875
|
+
size?: 'default' | 'compact';
|
|
1876
|
+
/** The body has no padding: a `StackedList` or a table runs edge to edge. */
|
|
1877
|
+
flush?: boolean;
|
|
1878
|
+
}
|
|
1879
|
+
declare const SectionCard: React.ForwardRefExoticComponent<SectionCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
1880
|
+
interface TabbedCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1881
|
+
/** The `TabBarItem`s. */
|
|
1882
|
+
tabs: React.ReactNode;
|
|
1883
|
+
/** The tab bar's accessible name. */
|
|
1884
|
+
tabsLabel: string;
|
|
1885
|
+
}
|
|
1886
|
+
declare const TabbedCard: React.ForwardRefExoticComponent<TabbedCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
1887
|
+
interface SidePanelLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1888
|
+
/** The side panel: a stack of compact `SectionCard`s. */
|
|
1889
|
+
aside: React.ReactNode;
|
|
1890
|
+
/** The panel's accessible name. */
|
|
1891
|
+
asideLabel: string;
|
|
1892
|
+
}
|
|
1893
|
+
declare const SidePanelLayout: React.ForwardRefExoticComponent<SidePanelLayoutProps & React.RefAttributes<HTMLDivElement>>;
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* IntentBadge — a record's status (stage, priority, method) as a small pill.
|
|
1897
|
+
*
|
|
1898
|
+
* One-artifact W1 (#5823): run 7 drew three of these by hand
|
|
1899
|
+
* (`inline-flex px-3 py-1 rounded-full text-13 bg-primary-10 …`). The badge
|
|
1900
|
+
* owns its shape, size and colours; a page names only the intent. The intent
|
|
1901
|
+
* tints are the ones `Alert` draws (`INTENT_SUBTLE_STYLES`, one writer), so a
|
|
1902
|
+
* badge and an alert of one intent match. A long value is truncated with its
|
|
1903
|
+
* full text in `title`, never run off the row.
|
|
1904
|
+
*
|
|
1905
|
+
* Usage:
|
|
1906
|
+
* import { IntentBadge } from '@caqophony/ui';
|
|
1907
|
+
* <IntentBadge intent="success">Offer</IntentBadge>
|
|
1908
|
+
*
|
|
1909
|
+
* Authored by Caqophony
|
|
1910
|
+
*/
|
|
1911
|
+
|
|
1912
|
+
type IntentBadgeIntent = 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
1913
|
+
interface IntentBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
1914
|
+
intent?: IntentBadgeIntent;
|
|
1915
|
+
}
|
|
1916
|
+
declare const IntentBadge: React.ForwardRefExoticComponent<IntentBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
1917
|
+
|
|
1918
|
+
interface OverflowMenuItem {
|
|
1919
|
+
label: string;
|
|
1920
|
+
onSelect: () => void;
|
|
1921
|
+
icon?: IconName;
|
|
1922
|
+
/** Drawn in the error colour (delete, remove). */
|
|
1923
|
+
destructive?: boolean;
|
|
1924
|
+
disabled?: boolean;
|
|
1925
|
+
}
|
|
1926
|
+
interface OverflowMenuProps {
|
|
1927
|
+
/** The trigger's accessible name ("More actions"). */
|
|
1928
|
+
label: string;
|
|
1929
|
+
items: readonly OverflowMenuItem[];
|
|
1930
|
+
/** Open on first render (the style sheet draws it open). */
|
|
1931
|
+
defaultOpen?: boolean;
|
|
1932
|
+
className?: string;
|
|
1933
|
+
}
|
|
1934
|
+
declare function OverflowMenu({ label, items, defaultOpen, className, }: OverflowMenuProps): react_jsx_runtime.JSX.Element;
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* StageList — where a record stands in its sequence of stages (an
|
|
1938
|
+
* application's pipeline, an order's fulfilment), drawn as a vertical
|
|
1939
|
+
* `Stepper` the page never configures by hand.
|
|
1940
|
+
*
|
|
1941
|
+
* One-artifact W1 (#5823): run 7 passed `activeStep={4}` AND `completed` on
|
|
1942
|
+
* every step (two writers of one fact) and clamped the 9 steps in a scroll
|
|
1943
|
+
* box that cut the line. Here ONE value, `current`, decides every step: the
|
|
1944
|
+
* ones before it are complete, it is current, the rest upcoming. An
|
|
1945
|
+
* `outcome` (a stage off the sequence: rejected, withdrawn) ends the list as
|
|
1946
|
+
* an error step after the sequence. The list is drawn at its full height,
|
|
1947
|
+
* never clamped.
|
|
1948
|
+
*
|
|
1949
|
+
* A `current` that is neither a stage nor an outcome is a contract fault,
|
|
1950
|
+
* thrown with the value and the lists, never drawn as a guess.
|
|
1951
|
+
*
|
|
1952
|
+
* Usage:
|
|
1953
|
+
* <StageList
|
|
1954
|
+
* stages={[{ value: 'applied', label: 'Applied' }, …]}
|
|
1955
|
+
* outcomes={[{ value: 'rejected', label: 'Rejected' }]}
|
|
1956
|
+
* current={application.stage}
|
|
1957
|
+
* />
|
|
1958
|
+
*
|
|
1959
|
+
* Authored by Caqophony
|
|
1960
|
+
*/
|
|
1961
|
+
|
|
1962
|
+
interface Stage {
|
|
1963
|
+
value: string;
|
|
1964
|
+
label: string;
|
|
1965
|
+
}
|
|
1966
|
+
interface StageListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
1967
|
+
/** The sequence, in order. */
|
|
1968
|
+
stages: readonly Stage[];
|
|
1969
|
+
/** Stages off the sequence that end it (rejected, withdrawn). */
|
|
1970
|
+
outcomes?: readonly Stage[];
|
|
1971
|
+
/** The record's stage: a `stages` or `outcomes` value. */
|
|
1972
|
+
current: string;
|
|
1973
|
+
}
|
|
1974
|
+
declare const StageList: React.ForwardRefExoticComponent<StageListProps & React.RefAttributes<HTMLDivElement>>;
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* ClampedList — a list held to a height that scrolls inside itself.
|
|
1978
|
+
*
|
|
1979
|
+
* One-artifact W1 (#5823): run 7 wrapped a 9-step `Stepper` in
|
|
1980
|
+
* `max-h-[160px] overflow-y-auto`, which cut the stepper's line under the
|
|
1981
|
+
* clip with no sign there was more. This owns the clamp: a height from the
|
|
1982
|
+
* scale, the scroll, the scroll hint (`SCROLL_HINT_Y`: a chevron mark on the
|
|
1983
|
+
* end edge while there is more below), and keyboard access
|
|
1984
|
+
* (a scrolling region is focusable and named, WCAG 2.1.1). A page never
|
|
1985
|
+
* writes `max-h-*` with `overflow-*` around a library component.
|
|
1986
|
+
*
|
|
1987
|
+
* Usage:
|
|
1988
|
+
* import { ClampedList } from '@caqophony/ui';
|
|
1989
|
+
* <ClampedList label="Activity" maxHeight="md">…</ClampedList>
|
|
1990
|
+
*
|
|
1991
|
+
* Authored by Caqophony
|
|
1992
|
+
*/
|
|
1993
|
+
|
|
1994
|
+
declare const MAX_HEIGHTS: {
|
|
1995
|
+
readonly sm: "max-h-48";
|
|
1996
|
+
readonly md: "max-h-72";
|
|
1997
|
+
readonly lg: "max-h-96";
|
|
1998
|
+
};
|
|
1999
|
+
interface ClampedListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2000
|
+
/** The region's accessible name. */
|
|
2001
|
+
label: string;
|
|
2002
|
+
maxHeight?: keyof typeof MAX_HEIGHTS;
|
|
2003
|
+
}
|
|
2004
|
+
declare const ClampedList: React.ForwardRefExoticComponent<ClampedListProps & React.RefAttributes<HTMLDivElement>>;
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* One-artifact W1 (#5823) — the scroll hint: the ONE writer of how a box
|
|
2008
|
+
* that scrolls says there is more: a drawn chevron mark on the box's end
|
|
2009
|
+
* edge, on either axis (each below).
|
|
2010
|
+
*
|
|
2011
|
+
* The mark is static markup and shows in a server render and in a still
|
|
2012
|
+
* capture alike. On x a small client script (`watchScrollHintX`, run by
|
|
2013
|
+
* `ScrollHintXMark`) hides it after mount when there is nothing more; on y
|
|
2014
|
+
* the hide is a `scroll-state` container query (Chromium only). The style
|
|
2015
|
+
* sheet's `scrollHint` check fails on a box that overflows on an axis it
|
|
2016
|
+
* scrolls without a hint, and its `hintVisible` check on one whose hint
|
|
2017
|
+
* draws nothing on the end edge.
|
|
2018
|
+
*
|
|
2019
|
+
* Authored by Caqophony
|
|
2020
|
+
*/
|
|
2021
|
+
/**
|
|
2022
|
+
* A horizontally scrolling box (a tab bar, a stepper, nav links, a table).
|
|
2023
|
+
* W1.5 Batch 0 (#5823): the W1 x hint was a 1.5rem mask fade, and a fade
|
|
2024
|
+
* draws only what happens to sit in its band. Measured at 390px, the
|
|
2025
|
+
* underline TabBar's band fell on the gap between two tabs (the most any
|
|
2026
|
+
* pixel changed, content shown vs hidden, was 11/255) and the small
|
|
2027
|
+
* horizontal Stepper's on its 1px connector (5/255): a clipped row that
|
|
2028
|
+
* looked complete. So x carries a drawn mark as y does
|
|
2029
|
+
* (`SCROLL_HINT_X_MARK`, the box's last child, rendered by
|
|
2030
|
+
* `ScrollHintXMark`) and no mask (a mask fades the mark too).
|
|
2031
|
+
*
|
|
2032
|
+
* Fix round 1: the box itself needs no class any more. Whether the mark
|
|
2033
|
+
* shows is decided by one writer, the measuring script, in every browser;
|
|
2034
|
+
* the Batch 0 `[container-type:scroll-state]` query (Chromium only) is
|
|
2035
|
+
* removed so the two never disagree. The constant stays exported (it is in
|
|
2036
|
+
* the 0.2.0 barrel) as the empty string so a consumer that applied it keeps
|
|
2037
|
+
* compiling; on its own it draws nothing, so such a box needs the mark.
|
|
2038
|
+
*/
|
|
2039
|
+
declare const SCROLL_HINT_X = "";
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
* Label (W1.5 Batch 1, #5823) — the ONE writer of a form label: FormField,
|
|
2043
|
+
* Checkbox and a hand-composed field all draw it.
|
|
2044
|
+
*
|
|
2045
|
+
* A plain `<label>`: the native element already focuses its control on
|
|
2046
|
+
* click, so `@radix-ui/react-label` adds nothing here.
|
|
2047
|
+
*
|
|
2048
|
+
* - `required` draws an asterisk in the error intent (aria-hidden: the
|
|
2049
|
+
* control carries `required`, which assistive technology announces).
|
|
2050
|
+
* - `optional` draws a muted "(optional)".
|
|
2051
|
+
* - `disabled` dims the text through the muted token, never opacity: a
|
|
2052
|
+
* label is not a control, so WCAG 1.4.3's inactive-control exemption
|
|
2053
|
+
* does not reach it and it must stay AA.
|
|
2054
|
+
* - `error` draws the text in the error intent's text colour.
|
|
2055
|
+
*
|
|
2056
|
+
* Usage:
|
|
2057
|
+
* <Label htmlFor="email" required>Email</Label>
|
|
2058
|
+
* <Input id="email" required />
|
|
2059
|
+
*
|
|
2060
|
+
* Authored by Caqophony
|
|
2061
|
+
*/
|
|
2062
|
+
|
|
2063
|
+
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
2064
|
+
required?: boolean;
|
|
2065
|
+
/** Draws a muted "(optional)" after the text. */
|
|
2066
|
+
optional?: boolean;
|
|
2067
|
+
disabled?: boolean;
|
|
2068
|
+
error?: boolean;
|
|
2069
|
+
size?: 'sm' | 'md';
|
|
2070
|
+
}
|
|
2071
|
+
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
2072
|
+
|
|
2073
|
+
/**
|
|
2074
|
+
* Textarea (W1.5 Batch 1, #5823) — multi-line text on the shared field
|
|
2075
|
+
* surface (`fieldVariants`: border, focus, error, size), so it matches
|
|
2076
|
+
* Input and Select exactly.
|
|
2077
|
+
*
|
|
2078
|
+
* Its height is `rows` (no auto-grow: `field-sizing: content` is
|
|
2079
|
+
* Chromium-only). Text past the rows scrolls with the platform's own
|
|
2080
|
+
* scrollbar; the style sheet's scroll-hint checks exempt native form
|
|
2081
|
+
* controls for that reason.
|
|
2082
|
+
*
|
|
2083
|
+
* `showCount` draws the character count under the field (`12 / 280` with a
|
|
2084
|
+
* `maxLength`), and the count turns to the error intent at the limit.
|
|
2085
|
+
*
|
|
2086
|
+
* Usage:
|
|
2087
|
+
* <Textarea rows={4} maxLength={280} showCount placeholder="Notes" />
|
|
2088
|
+
*
|
|
2089
|
+
* Authored by Caqophony
|
|
2090
|
+
*/
|
|
2091
|
+
|
|
2092
|
+
interface TextareaProps extends Omit<React.ComponentProps<'textarea'>, 'size'> {
|
|
2093
|
+
error?: boolean;
|
|
2094
|
+
/** ID of the element describing the error, for aria-describedby */
|
|
2095
|
+
errorMessageId?: string;
|
|
2096
|
+
size?: FieldSize;
|
|
2097
|
+
resize?: 'none' | 'vertical';
|
|
2098
|
+
/** Draws the character count (against `maxLength`, when set). */
|
|
2099
|
+
showCount?: boolean;
|
|
2100
|
+
}
|
|
2101
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
2102
|
+
|
|
2103
|
+
/**
|
|
2104
|
+
* Select (W1.5 Batch 1, #5823) — a styled NATIVE `<select>` on the shared
|
|
2105
|
+
* field surface (`fieldVariants`), with the library chevron at its end.
|
|
2106
|
+
*
|
|
2107
|
+
* Native, not a custom listbox: it renders in server markup with no portal,
|
|
2108
|
+
* the operating system draws (and makes accessible) the option list, and on
|
|
2109
|
+
* a phone it opens the platform picker. A searchable or multi-value picker
|
|
2110
|
+
* is `Combobox`.
|
|
2111
|
+
*
|
|
2112
|
+
* - `color-scheme` follows the scheme (`scheme-light dark:scheme-dark`), so
|
|
2113
|
+
* the OS list the browser draws is dark on a dark page, not white.
|
|
2114
|
+
* - `placeholder` is a disabled, hidden first option with the empty value;
|
|
2115
|
+
* with no `value`/`defaultValue` it is what shows, in the muted colour.
|
|
2116
|
+
* - The chevron sits in the end padding (`pr-9`): a long label truncates
|
|
2117
|
+
* inside the box and never runs under it, and the box never widens.
|
|
2118
|
+
*
|
|
2119
|
+
* Usage:
|
|
2120
|
+
* <Select placeholder="Choose a stage" options={[{ value: 'a', label: 'Applied' }]} />
|
|
2121
|
+
*
|
|
2122
|
+
* Authored by Caqophony
|
|
2123
|
+
*/
|
|
2124
|
+
|
|
2125
|
+
interface SelectOption {
|
|
2126
|
+
value: string;
|
|
2127
|
+
label: string;
|
|
2128
|
+
disabled?: boolean;
|
|
2129
|
+
}
|
|
2130
|
+
interface SelectProps extends Omit<React.ComponentProps<'select'>, 'size' | 'multiple'> {
|
|
2131
|
+
/** The options; or pass `<option>` children instead. */
|
|
2132
|
+
options?: readonly SelectOption[];
|
|
2133
|
+
/** Shown (muted) while no option is chosen. */
|
|
2134
|
+
placeholder?: string;
|
|
2135
|
+
error?: boolean;
|
|
2136
|
+
/** ID of the element describing the error, for aria-describedby */
|
|
2137
|
+
errorMessageId?: string;
|
|
2138
|
+
size?: FieldSize;
|
|
2139
|
+
}
|
|
2140
|
+
declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
2141
|
+
|
|
2142
|
+
/**
|
|
2143
|
+
* Checkbox + CheckboxGroup (W1.5 Batch 1, #5823).
|
|
2144
|
+
*
|
|
2145
|
+
* A native `input type="checkbox"` (`appearance-none`) on a token-drawn box:
|
|
2146
|
+
* keyboard, form submission and the label click are the platform's.
|
|
2147
|
+
*
|
|
2148
|
+
* - checked: the box fills with the primary solid and draws the check.
|
|
2149
|
+
* - `indeterminate`: drawn FROM THE PROP at render time (the filled box and
|
|
2150
|
+
* a bar), with `aria-checked="mixed"`; the DOM property is also set after
|
|
2151
|
+
* mount. Server markup has no `indeterminate` property at all, so the
|
|
2152
|
+
* drawing cannot wait for `:indeterminate`.
|
|
2153
|
+
* - `appearance-none` drops the native focus ring, so the box draws
|
|
2154
|
+
* `focus-visible:ring` itself.
|
|
2155
|
+
* - the box's border is the field border (`--input`), which the owner kept
|
|
2156
|
+
* as the light hairline (2026-10-28, #5846), so it is not marked
|
|
2157
|
+
* `data-ui-boundary`.
|
|
2158
|
+
*
|
|
2159
|
+
* CheckboxGroup is a `fieldset` + `legend` of Checkboxes over a `string[]`.
|
|
2160
|
+
*
|
|
2161
|
+
* Usage:
|
|
2162
|
+
* <Checkbox label="Email me" defaultChecked />
|
|
2163
|
+
* <Checkbox label="Select all" indeterminate checked={false} onCheckedChange={toggleAll} />
|
|
2164
|
+
* <CheckboxGroup legend="Stages" options={stages} value={picked} onChange={setPicked} />
|
|
2165
|
+
*
|
|
2166
|
+
* Authored by Caqophony
|
|
2167
|
+
*/
|
|
2168
|
+
|
|
2169
|
+
interface CheckboxProps extends Omit<React.ComponentProps<'input'>, 'type' | 'size' | 'onChange'> {
|
|
2170
|
+
/** Drawn from the prop (filled box + bar, `aria-checked="mixed"`). */
|
|
2171
|
+
indeterminate?: boolean;
|
|
2172
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2173
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
2174
|
+
label?: React.ReactNode;
|
|
2175
|
+
description?: React.ReactNode;
|
|
2176
|
+
/** true: the error border; a string: also the message under it. */
|
|
2177
|
+
error?: boolean | string;
|
|
2178
|
+
size?: 'sm' | 'md';
|
|
2179
|
+
}
|
|
2180
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
2181
|
+
interface CheckboxGroupOption {
|
|
2182
|
+
value: string;
|
|
2183
|
+
label: string;
|
|
2184
|
+
description?: string;
|
|
2185
|
+
disabled?: boolean;
|
|
2186
|
+
}
|
|
2187
|
+
interface CheckboxGroupProps extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, 'onChange' | 'defaultValue'> {
|
|
2188
|
+
legend: string;
|
|
2189
|
+
options: readonly CheckboxGroupOption[];
|
|
2190
|
+
/** The checked values. */
|
|
2191
|
+
value: readonly string[];
|
|
2192
|
+
onChange?: (value: string[]) => void;
|
|
2193
|
+
orientation?: 'vertical' | 'horizontal';
|
|
2194
|
+
/** The group's error message (drawn under the options). */
|
|
2195
|
+
error?: string;
|
|
2196
|
+
name?: string;
|
|
2197
|
+
size?: 'sm' | 'md';
|
|
2198
|
+
}
|
|
2199
|
+
declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLFieldSetElement>>;
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* Progress (W1.5 Batch 1, #5823) — a linear progress bar, determinate
|
|
2203
|
+
* (`value` 0–100) or indeterminate (`value` omitted).
|
|
2204
|
+
*
|
|
2205
|
+
* - `role="progressbar"` with aria-valuemin/max, and aria-valuenow only when
|
|
2206
|
+
* determinate; named by `label` (aria-labelledby) or an `aria-label`.
|
|
2207
|
+
* - The fill is the intent's colour that stands out from the muted track at
|
|
2208
|
+
* 3:1 (WCAG 1.4.11; `data-ui-boundary`, measured by the style sheet's
|
|
2209
|
+
* `nonTextContrast` check): the solid fill in light, the base intent
|
|
2210
|
+
* colour in dark (the solids are darkened for white text, which sinks
|
|
2211
|
+
* them into a dark track).
|
|
2212
|
+
* - Indeterminate: a 40% segment sliding across (`animate-progress-
|
|
2213
|
+
* indeterminate`, keyframes in the library theme). Its resting position,
|
|
2214
|
+
* with animation off (reduced motion, a held-still capture), is the
|
|
2215
|
+
* track's first 40%: a visible segment, never an empty track.
|
|
2216
|
+
* - 0% still draws the track.
|
|
2217
|
+
*
|
|
2218
|
+
* Usage:
|
|
2219
|
+
* <Progress value={40} label="Uploading" showValue />
|
|
2220
|
+
* <Progress label="Loading candidates" />
|
|
2221
|
+
*
|
|
2222
|
+
* Authored by Caqophony
|
|
2223
|
+
*/
|
|
2224
|
+
|
|
2225
|
+
type ProgressIntent = 'primary' | 'success' | 'warning' | 'error';
|
|
2226
|
+
interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
2227
|
+
/** 0–100; omitted = indeterminate. */
|
|
2228
|
+
value?: number;
|
|
2229
|
+
intent?: ProgressIntent;
|
|
2230
|
+
size?: 'sm' | 'md';
|
|
2231
|
+
/** Drawn above the bar, and the bar's accessible name. */
|
|
2232
|
+
label?: string;
|
|
2233
|
+
/** Draws the percentage beside the label (determinate only). */
|
|
2234
|
+
showValue?: boolean;
|
|
2235
|
+
}
|
|
2236
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
2237
|
+
|
|
2238
|
+
/**
|
|
2239
|
+
* Spinner (W1.5 Batch 1, #5823) — the ONE writer of "busy": the closed
|
|
2240
|
+
* set's `loader` icon, spinning. Button's `loading` draws it too.
|
|
2241
|
+
*
|
|
2242
|
+
* Two forms, so an unnamed live region cannot be written:
|
|
2243
|
+
* - `label`: a `role="status"` region announcing the label, which is
|
|
2244
|
+
* visually hidden (`sr-only`: clipped to 1px, never low-contrast text);
|
|
2245
|
+
* - `decorative`: hidden from assistive technology, for a control that
|
|
2246
|
+
* already says it is busy (Button sets `aria-busy` and shows its text).
|
|
2247
|
+
*
|
|
2248
|
+
* Usage:
|
|
2249
|
+
* <Spinner label="Loading candidates" />
|
|
2250
|
+
* <Spinner decorative size="xs" />
|
|
2251
|
+
*
|
|
2252
|
+
* Authored by Caqophony
|
|
2253
|
+
*/
|
|
2254
|
+
|
|
2255
|
+
interface SpinnerBase {
|
|
2256
|
+
size?: IconSize;
|
|
2257
|
+
className?: string;
|
|
2258
|
+
}
|
|
2259
|
+
type SpinnerProps = SpinnerBase & ({
|
|
2260
|
+
label: string;
|
|
2261
|
+
decorative?: never;
|
|
2262
|
+
} | {
|
|
2263
|
+
decorative: true;
|
|
2264
|
+
label?: never;
|
|
2265
|
+
});
|
|
2266
|
+
declare function Spinner(props: SpinnerProps): React.ReactElement;
|
|
2267
|
+
|
|
1700
2268
|
/**
|
|
1701
2269
|
* UI Package Utilities
|
|
1702
2270
|
*
|
|
@@ -1713,4 +2281,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1713
2281
|
|
|
1714
2282
|
declare function useDebounce<T>(value: T, ms: number): T;
|
|
1715
2283
|
|
|
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 };
|
|
2284
|
+
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, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, 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, type FieldSize, 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, Label, type LabelProps, 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, Progress, type ProgressIntent, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SCROLL_HINT_X, SectionCard, type SectionCardProps, SectionHeading, type SectionHeadingProps, Select, type SelectOption, type SelectProps, 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, Spinner, type SpinnerProps, 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, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, buildDiceBearUrl, buttonVariants, cn, fieldVariants, getPageRange, isEmptyValue, useDebounce, useSidebar };
|