@geomak/ui 7.18.5 → 7.19.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 +12 -12
- package/dist/{chunk-4V4U2W7K.cjs → chunk-4WD27VQX.cjs} +2 -2
- package/dist/chunk-4WD27VQX.cjs.map +1 -0
- package/dist/{chunk-KAFJJO5O.js → chunk-ILDMP2Q2.js} +2 -2
- package/dist/chunk-ILDMP2Q2.js.map +1 -0
- package/dist/{chunk-CNUDNGJM.cjs → chunk-LY3MZYWU.cjs} +3 -3
- package/dist/chunk-LY3MZYWU.cjs.map +1 -0
- package/dist/{chunk-DXOWXLKK.js → chunk-VM2725HH.js} +3 -3
- package/dist/chunk-VM2725HH.js.map +1 -0
- package/dist/icons/index.cjs +105 -105
- package/dist/icons/index.d.cts +2 -2
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/{index-BktppxXp.d.ts → index-B8P5qbWt.d.cts} +5 -5
- package/dist/{index-BktppxXp.d.cts → index-B8P5qbWt.d.ts} +5 -5
- package/dist/index.cjs +29 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +237 -237
- package/dist/index.d.ts +237 -237
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/tokens/index.cjs +4 -4
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-4V4U2W7K.cjs.map +0 -1
- package/dist/chunk-CNUDNGJM.cjs.map +0 -1
- package/dist/chunk-DXOWXLKK.js.map +0 -1
- package/dist/chunk-KAFJJO5O.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as COLORS, S as SemanticColorKey, a as SemanticSharedKey, V as VarColorKey, b as VarDensityKey, c as VarMotionKey, d as VarRadiusKey, e as VarShadowKey, f as VarTypoKey, g as VarZIndexKey, P as palette, s as semanticTokens, v as vars } from './index-
|
|
1
|
+
export { C as COLORS, S as SemanticColorKey, a as SemanticSharedKey, V as VarColorKey, b as VarDensityKey, c as VarMotionKey, d as VarRadiusKey, e as VarShadowKey, f as VarTypoKey, g as VarZIndexKey, P as palette, s as semanticTokens, v as vars } from './index-B8P5qbWt.cjs';
|
|
2
2
|
export { CreateIconOptions, Icon, IconComponent, IconProps, createIcon } from './icons/index.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import react__default from 'react';
|
|
@@ -7,7 +7,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
7
7
|
|
|
8
8
|
type ClassValue = string | number | false | null | undefined;
|
|
9
9
|
/**
|
|
10
|
-
* Join class names, dropping falsy values
|
|
10
|
+
* Join class names, dropping falsy values, a tiny `clsx` for the design system.
|
|
11
11
|
* Replaces the repeated `[a, b].filter(Boolean).join(' ')` idiom with a clearer,
|
|
12
12
|
* allocation-light call.
|
|
13
13
|
*
|
|
@@ -30,8 +30,8 @@ interface PortalProps {
|
|
|
30
30
|
target?: HTMLElement | (() => HTMLElement | null) | null;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* SSR-safe DOM relocator. Renders `children` at a detached DOM node
|
|
34
|
-
* default `document.body
|
|
33
|
+
* SSR-safe DOM relocator. Renders `children` at a detached DOM node, by
|
|
34
|
+
* default `document.body`, so that any `position: fixed` descendant resolves
|
|
35
35
|
* against the real viewport, never against a transformed, filtered, or
|
|
36
36
|
* contained ancestor.
|
|
37
37
|
*
|
|
@@ -40,7 +40,7 @@ interface PortalProps {
|
|
|
40
40
|
* Per the CSS spec, **any ancestor with `transform`, `filter`, `perspective`,
|
|
41
41
|
* `will-change`, or `contain: layout|paint|strict` creates a new containing
|
|
42
42
|
* block for `position: fixed` descendants**. The fixed element then resolves
|
|
43
|
-
* its coordinates against that ancestor, not the viewport
|
|
43
|
+
* its coordinates against that ancestor, not the viewport, silently breaking
|
|
44
44
|
* full-screen overlays, toast viewports, mobile drawers, and loading screens
|
|
45
45
|
* whenever a consumer wraps the component in:
|
|
46
46
|
*
|
|
@@ -57,7 +57,7 @@ interface PortalProps {
|
|
|
57
57
|
* ## When to use it
|
|
58
58
|
*
|
|
59
59
|
* Wrap any element that uses `position: fixed` to anchor itself to the
|
|
60
|
-
* viewport
|
|
60
|
+
* viewport, full-screen overlays, toast viewports, drawers, loading screens,
|
|
61
61
|
* command palettes, lightboxes.
|
|
62
62
|
*
|
|
63
63
|
* If you're already using a Radix primitive, prefer its built-in `*.Portal`
|
|
@@ -65,12 +65,12 @@ interface PortalProps {
|
|
|
65
65
|
*
|
|
66
66
|
* ## When NOT to use it
|
|
67
67
|
*
|
|
68
|
-
* - For inline elements that already flow naturally with the document
|
|
68
|
+
* - For inline elements that already flow naturally with the document, Portal
|
|
69
69
|
* is for **fixed/absolute escape**, not general layout.
|
|
70
|
-
* - For SSR-critical content that must appear before hydration
|
|
70
|
+
* - For SSR-critical content that must appear before hydration, Portal renders
|
|
71
71
|
* `null` on the server and the first client render.
|
|
72
72
|
* - For accessibility-critical content that depends on DOM proximity (form
|
|
73
|
-
* labels, ARIA `aria-controls` targets)
|
|
73
|
+
* labels, ARIA `aria-controls` targets), escaping the tree can break focus
|
|
74
74
|
* order and assistive-tech navigation.
|
|
75
75
|
*
|
|
76
76
|
* ## SSR / hydration
|
|
@@ -78,7 +78,7 @@ interface PortalProps {
|
|
|
78
78
|
* `document.body` isn't available during SSR or the first client render.
|
|
79
79
|
* `Portal` renders `null` until `useEffect` resolves the target post-mount,
|
|
80
80
|
* then re-renders with the portal in place. Content that needs to appear
|
|
81
|
-
* immediately on mount paints one frame later
|
|
81
|
+
* immediately on mount paints one frame later, acceptable for overlays
|
|
82
82
|
* (the trigger interaction is what kicks them off anyway).
|
|
83
83
|
*
|
|
84
84
|
* @example Full-screen loading overlay
|
|
@@ -113,7 +113,7 @@ type BoxRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
|
113
113
|
type BoxShadow = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
114
114
|
interface BoxProps {
|
|
115
115
|
as?: keyof react__default.JSX.IntrinsicElements;
|
|
116
|
-
/** Padding shorthand
|
|
116
|
+
/** Padding shorthand, applies to all sides. */
|
|
117
117
|
p?: Spacing;
|
|
118
118
|
/** Horizontal padding (left + right). */
|
|
119
119
|
px?: Spacing;
|
|
@@ -139,14 +139,14 @@ interface BoxProps {
|
|
|
139
139
|
width?: string | number;
|
|
140
140
|
/** Height via Tailwind class or CSS value. */
|
|
141
141
|
height?: string | number;
|
|
142
|
-
/** Click handler
|
|
142
|
+
/** Click handler, accepts any element-typed handler. */
|
|
143
143
|
onClick?: react__default.MouseEventHandler<HTMLElement>;
|
|
144
144
|
className?: string;
|
|
145
145
|
style?: react__default.CSSProperties;
|
|
146
146
|
children?: react__default.ReactNode;
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
|
-
* A polymorphic layout primitive
|
|
149
|
+
* A polymorphic layout primitive, a `<div>` (by default) styled via prop
|
|
150
150
|
* shortcuts to the design system's tokenised spacing, surface, border,
|
|
151
151
|
* radius, and shadow scales. Use it when you'd otherwise reach for a
|
|
152
152
|
* className-only `<div>` with `p-4 bg-surface border border-border rounded-lg`.
|
|
@@ -182,7 +182,7 @@ interface FlexProps extends BoxProps {
|
|
|
182
182
|
align?: FlexAlign;
|
|
183
183
|
justify?: FlexJustify;
|
|
184
184
|
wrap?: FlexWrap;
|
|
185
|
-
/** Gap between children
|
|
185
|
+
/** Gap between children, uses the same spacing token scale as Box. */
|
|
186
186
|
gap?: Spacing;
|
|
187
187
|
inline?: boolean;
|
|
188
188
|
}
|
|
@@ -257,13 +257,13 @@ type AvatarStatus = 'online' | 'offline' | 'away' | 'busy';
|
|
|
257
257
|
interface AvatarProps {
|
|
258
258
|
/** Image URL. If missing or fails to load, `fallback` renders instead. */
|
|
259
259
|
src?: string;
|
|
260
|
-
/** Alt text
|
|
260
|
+
/** Alt text, required when `src` is provided for screen readers. */
|
|
261
261
|
alt?: string;
|
|
262
262
|
/**
|
|
263
263
|
* Fallback rendered when the image is unavailable. Pass either:
|
|
264
|
-
* - a string (e.g. user initials like "JD")
|
|
264
|
+
* - a string (e.g. user initials like "JD"), rendered with semi-bold weight
|
|
265
265
|
* - any ReactNode (icon, emoji)
|
|
266
|
-
* - omit entirely
|
|
266
|
+
* - omit entirely, a generic "person" silhouette is used
|
|
267
267
|
*/
|
|
268
268
|
fallback?: react__default.ReactNode;
|
|
269
269
|
/** Size preset. Default `'md'`. */
|
|
@@ -288,7 +288,7 @@ interface AvatarProps {
|
|
|
288
288
|
* 2. Two-character initials extracted from `alt` if `alt` is provided
|
|
289
289
|
* 3. A generic "person" silhouette SVG
|
|
290
290
|
*
|
|
291
|
-
* **Status dot** is an optional presence indicator in the bottom-right
|
|
291
|
+
* **Status dot** is an optional presence indicator in the bottom-right -
|
|
292
292
|
* online (green), away (amber), busy (red), offline (grey).
|
|
293
293
|
*
|
|
294
294
|
* @example Basic with image
|
|
@@ -389,7 +389,7 @@ interface IconButtonProps {
|
|
|
389
389
|
* Square icon-only button.
|
|
390
390
|
*
|
|
391
391
|
* Uses `React.forwardRef` so it works as a Radix `asChild` trigger (Popover,
|
|
392
|
-
* PopConfirm, Tooltip, etc.)
|
|
392
|
+
* PopConfirm, Tooltip, etc.), those need a DOM ref to anchor floating content.
|
|
393
393
|
*
|
|
394
394
|
* @example
|
|
395
395
|
* <IconButton icon={<Icon.Search />} onClick={doSearch} />
|
|
@@ -402,16 +402,16 @@ interface ButtonProps extends Omit<react__default.ButtonHTMLAttributes<HTMLButto
|
|
|
402
402
|
content?: react__default.ReactNode;
|
|
403
403
|
/** Visual style variant */
|
|
404
404
|
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'warning' | 'success' | 'info';
|
|
405
|
-
/** Size
|
|
405
|
+
/** Size, controls height, padding, and font size */
|
|
406
406
|
size?: 'sm' | 'md' | 'lg';
|
|
407
407
|
/** HTML button type */
|
|
408
408
|
buttonType?: 'button' | 'submit' | 'reset';
|
|
409
409
|
/** Show a loading spinner and disable the control. */
|
|
410
410
|
loading?: boolean;
|
|
411
|
-
/** Leading icon
|
|
411
|
+
/** Leading icon, rendered before content */
|
|
412
412
|
icon?: react__default.ReactNode;
|
|
413
413
|
/**
|
|
414
|
-
* @deprecated Pass `variant` instead. Kept for API compat
|
|
414
|
+
* @deprecated Pass `variant` instead. Kept for API compat, currently no-op.
|
|
415
415
|
* Will be removed in the next major version.
|
|
416
416
|
*/
|
|
417
417
|
type?: string;
|
|
@@ -419,7 +419,7 @@ interface ButtonProps extends Omit<react__default.ButtonHTMLAttributes<HTMLButto
|
|
|
419
419
|
/**
|
|
420
420
|
* Primary action button with variant + size system.
|
|
421
421
|
*
|
|
422
|
-
* Width is never hardcoded
|
|
422
|
+
* Width is never hardcoded, set `style={{ width }}` or let the parent grid/flex control it.
|
|
423
423
|
* Uses `React.forwardRef` so it works as a Radix `asChild` trigger (Popover, Tooltip, etc.).
|
|
424
424
|
*
|
|
425
425
|
* @example
|
|
@@ -492,7 +492,7 @@ interface ModalProps {
|
|
|
492
492
|
*/
|
|
493
493
|
size?: ModalSize;
|
|
494
494
|
/**
|
|
495
|
-
* Explicit max-width escape hatch
|
|
495
|
+
* Explicit max-width escape hatch, a number (px) or any CSS length
|
|
496
496
|
* (e.g. `'48rem'`). Overrides `size` when set.
|
|
497
497
|
*
|
|
498
498
|
* Height is always content-driven (max 90 dvh): modals grow with their
|
|
@@ -534,7 +534,7 @@ interface DrawerProps {
|
|
|
534
534
|
open?: boolean;
|
|
535
535
|
onClose?: () => void;
|
|
536
536
|
hasFooter?: boolean;
|
|
537
|
-
/** 'left' | 'right'
|
|
537
|
+
/** 'left' | 'right', which edge the panel slides from */
|
|
538
538
|
placement?: 'left' | 'right';
|
|
539
539
|
/**
|
|
540
540
|
* Named width scale (default `'md'`): sm 280 · md 320 · lg 480 · xl 640 ·
|
|
@@ -542,7 +542,7 @@ interface DrawerProps {
|
|
|
542
542
|
*/
|
|
543
543
|
size?: DrawerSize;
|
|
544
544
|
/**
|
|
545
|
-
* Explicit width escape hatch
|
|
545
|
+
* Explicit width escape hatch, a number (px) or any CSS length
|
|
546
546
|
* (e.g. `'30rem'`). Overrides `size` when set.
|
|
547
547
|
*/
|
|
548
548
|
width?: number | string;
|
|
@@ -632,8 +632,8 @@ interface TabsProps {
|
|
|
632
632
|
*
|
|
633
633
|
* The active tab is marked by a thin cobalt indicator that *slides* between
|
|
634
634
|
* tabs (the design system's "one rare accent" rule, not a full-fill pill).
|
|
635
|
-
* Three variants
|
|
636
|
-
* `enclosed` (folder tabs)
|
|
635
|
+
* Three variants, `underline` (signature), `segmented` (lifted-pill track),
|
|
636
|
+
* `enclosed` (folder tabs), plus horizontal/vertical orientation, icons,
|
|
637
637
|
* count badges, closeable + add-tab, and overflow scrolling with chevrons that
|
|
638
638
|
* appear only when the strip actually overflows.
|
|
639
639
|
*
|
|
@@ -691,7 +691,7 @@ interface TabsPanelProps {
|
|
|
691
691
|
value: string;
|
|
692
692
|
/**
|
|
693
693
|
* Keep the panel mounted when inactive (preserves scroll / form state).
|
|
694
|
-
* Default `false
|
|
694
|
+
* Default `false`, panels mount lazily on first activation.
|
|
695
695
|
*/
|
|
696
696
|
keepMounted?: boolean;
|
|
697
697
|
/** Extra classes merged onto the panel. */
|
|
@@ -767,8 +767,8 @@ interface AccordionProps {
|
|
|
767
767
|
collapsible?: boolean;
|
|
768
768
|
/**
|
|
769
769
|
* Visual style:
|
|
770
|
-
* - `'separated'` (default)
|
|
771
|
-
* - `'contained'
|
|
770
|
+
* - `'separated'` (default), each item is its own bordered card with gaps.
|
|
771
|
+
* - `'contained'`, one bordered surface with divider lines between items.
|
|
772
772
|
*/
|
|
773
773
|
variant?: AccordionVariant;
|
|
774
774
|
/** Extra classes merged onto the root. */
|
|
@@ -779,7 +779,7 @@ interface AccordionProps {
|
|
|
779
779
|
* Vertically stacked, collapsible panels built on `@radix-ui/react-accordion`.
|
|
780
780
|
* Radix handles open/close state, keyboard navigation (↑/↓/Home/End), and ARIA;
|
|
781
781
|
* the content height animates via the shared `accordion-down` / `accordion-up`
|
|
782
|
-
* keyframes (reduced-motion safe
|
|
782
|
+
* keyframes (reduced-motion safe, the height var simply snaps).
|
|
783
783
|
*
|
|
784
784
|
* @example
|
|
785
785
|
* ```tsx
|
|
@@ -788,7 +788,7 @@ interface AccordionProps {
|
|
|
788
788
|
* Everything in the Pro plan, plus priority support.
|
|
789
789
|
* </Accordion.Item>
|
|
790
790
|
* <Accordion.Item value="b" title="Can I cancel anytime?">
|
|
791
|
-
* Yes
|
|
791
|
+
* Yes, cancel from billing settings, no questions asked.
|
|
792
792
|
* </Accordion.Item>
|
|
793
793
|
* </Accordion>
|
|
794
794
|
* ```
|
|
@@ -800,7 +800,7 @@ declare namespace Accordion {
|
|
|
800
800
|
interface AccordionItemProps {
|
|
801
801
|
/** Unique value identifying this panel (used for open state). */
|
|
802
802
|
value: string;
|
|
803
|
-
/** Header content
|
|
803
|
+
/** Header content, the always-visible trigger label. */
|
|
804
804
|
title: react__default.ReactNode;
|
|
805
805
|
/** Optional leading icon shown before the title. */
|
|
806
806
|
icon?: react__default.ReactNode;
|
|
@@ -871,7 +871,7 @@ interface BadgeProps {
|
|
|
871
871
|
/** Optional leading icon (label mode). */
|
|
872
872
|
icon?: react__default.ReactNode;
|
|
873
873
|
/**
|
|
874
|
-
* Indicator mode
|
|
874
|
+
* Indicator mode, a numeric counter. With `children` it overlays the
|
|
875
875
|
* top-right corner of the wrapped element; without, it renders inline.
|
|
876
876
|
*/
|
|
877
877
|
count?: number;
|
|
@@ -887,9 +887,9 @@ interface BadgeProps {
|
|
|
887
887
|
/**
|
|
888
888
|
* A small status / count indicator. Three uses:
|
|
889
889
|
*
|
|
890
|
-
* 1. **Label pill
|
|
891
|
-
* 2. **Inline count
|
|
892
|
-
* 3. **Overlay
|
|
890
|
+
* 1. **Label pill**, `<Badge tone="success">Active</Badge>`.
|
|
891
|
+
* 2. **Inline count**, `<Badge count={5} tone="error" />`.
|
|
892
|
+
* 3. **Overlay**, wrap an element to anchor a count/dot to its top-right:
|
|
893
893
|
* `<Badge count={3} tone="error"><IconButton … /></Badge>`.
|
|
894
894
|
*
|
|
895
895
|
* @example
|
|
@@ -900,7 +900,7 @@ declare function Badge({ children, tone, variant, size, icon, count, max, dot, s
|
|
|
900
900
|
|
|
901
901
|
type BannerTone = 'info' | 'success' | 'warning' | 'danger';
|
|
902
902
|
interface BannerProps {
|
|
903
|
-
/** Semantic tone
|
|
903
|
+
/** Semantic tone, drives the tint, icon colour, and default icon. */
|
|
904
904
|
tone: BannerTone;
|
|
905
905
|
/** Banner body. */
|
|
906
906
|
children: react__default.ReactNode;
|
|
@@ -924,7 +924,7 @@ interface BannerProps {
|
|
|
924
924
|
* </Banner>
|
|
925
925
|
*
|
|
926
926
|
* <Banner tone="danger" onDismiss={() => setShown(false)}>
|
|
927
|
-
* Sync failed
|
|
927
|
+
* Sync failed, changes were not saved.
|
|
928
928
|
* </Banner>
|
|
929
929
|
* ```
|
|
930
930
|
*/
|
|
@@ -957,7 +957,7 @@ interface StepperProps {
|
|
|
957
957
|
className?: string;
|
|
958
958
|
}
|
|
959
959
|
/**
|
|
960
|
-
* A configurable steps indicator for multi-step flows
|
|
960
|
+
* A configurable steps indicator for multi-step flows, wizards, onboarding,
|
|
961
961
|
* async pipelines. Completed steps show a check, the active step is highlighted
|
|
962
962
|
* (or a spinner via `status="loading"` for async work, or an error mark), and
|
|
963
963
|
* the connectors fill up to the current step. Horizontal or vertical, with an
|
|
@@ -999,7 +999,7 @@ interface TimelineProps {
|
|
|
999
999
|
className?: string;
|
|
1000
1000
|
}
|
|
1001
1001
|
/**
|
|
1002
|
-
* A vertical timeline of ordered events
|
|
1002
|
+
* A vertical timeline of ordered events, order tracking (Order placed →
|
|
1003
1003
|
* Packed → Shipped → Out for delivery → Delivered), audit trails, activity
|
|
1004
1004
|
* feeds, anything sequential. Completed events show a check on the accent rail;
|
|
1005
1005
|
* the current event pulses; upcoming events are muted.
|
|
@@ -1023,7 +1023,7 @@ interface KbdProps {
|
|
|
1023
1023
|
/** A single key's label when `keys` is not used. */
|
|
1024
1024
|
children?: react__default.ReactNode;
|
|
1025
1025
|
/**
|
|
1026
|
-
* A key combination
|
|
1026
|
+
* A key combination, each entry renders as its own key cap, joined by
|
|
1027
1027
|
* `separator`. e.g. `['Ctrl', 'K']` → `Ctrl + K`.
|
|
1028
1028
|
*/
|
|
1029
1029
|
keys?: string[];
|
|
@@ -1035,7 +1035,7 @@ interface KbdProps {
|
|
|
1035
1035
|
style?: react__default.CSSProperties;
|
|
1036
1036
|
}
|
|
1037
1037
|
/**
|
|
1038
|
-
* Renders keyboard keys as styled caps
|
|
1038
|
+
* Renders keyboard keys as styled caps, a single key via `children`, or a
|
|
1039
1039
|
* combination via `keys` (each rendered as its own cap, joined by `separator`).
|
|
1040
1040
|
*
|
|
1041
1041
|
* @example
|
|
@@ -1100,9 +1100,9 @@ declare function CardMedia({ children, className }: CardMediaProps): react_jsx_r
|
|
|
1100
1100
|
interface CardHeaderProps {
|
|
1101
1101
|
title?: react__default.ReactNode;
|
|
1102
1102
|
subtitle?: react__default.ReactNode;
|
|
1103
|
-
/** Trailing slot
|
|
1103
|
+
/** Trailing slot, actions, menu, badge. */
|
|
1104
1104
|
action?: react__default.ReactNode;
|
|
1105
|
-
/** Leading slot
|
|
1105
|
+
/** Leading slot, avatar / icon. */
|
|
1106
1106
|
avatar?: react__default.ReactNode;
|
|
1107
1107
|
children?: react__default.ReactNode;
|
|
1108
1108
|
className?: string;
|
|
@@ -1123,12 +1123,12 @@ declare function CardFooter({ children, noDivider, className }: CardFooterProps)
|
|
|
1123
1123
|
|
|
1124
1124
|
type CardCarouselVariant = 'flat' | 'rotating';
|
|
1125
1125
|
interface CardCarouselProps {
|
|
1126
|
-
/** The slides
|
|
1126
|
+
/** The slides, typically `Card`s. */
|
|
1127
1127
|
children: react__default.ReactNode;
|
|
1128
1128
|
/**
|
|
1129
1129
|
* Layout style. Default `'flat'`.
|
|
1130
|
-
* - `'flat'
|
|
1131
|
-
* - `'rotating'
|
|
1130
|
+
* - `'flat'`, a horizontal scroll-snap row (trackpad / touch / wheel).
|
|
1131
|
+
* - `'rotating'`, a coverflow stack: the active card sits centre-stage,
|
|
1132
1132
|
* prominent, with its neighbours scaled back and faded behind it.
|
|
1133
1133
|
*/
|
|
1134
1134
|
variant?: CardCarouselVariant;
|
|
@@ -1148,9 +1148,9 @@ interface CardCarouselProps {
|
|
|
1148
1148
|
/**
|
|
1149
1149
|
* A carousel for cards, in two flavours via `variant`:
|
|
1150
1150
|
*
|
|
1151
|
-
* - **`flat`** (default)
|
|
1151
|
+
* - **`flat`** (default), a native scroll-snap row driven by trackpad / touch /
|
|
1152
1152
|
* wheel, with optional arrows and dots. Arrows disable at the ends.
|
|
1153
|
-
* - **`rotating
|
|
1153
|
+
* - **`rotating`**, a coverflow stack. The active card is centre-stage and
|
|
1154
1154
|
* prominent; neighbours are scaled back and faded behind it. Stepping animates
|
|
1155
1155
|
* the stack with a Framer Motion spring (transform + opacity only, so it stays
|
|
1156
1156
|
* smooth). Click a side card, use the arrows/dots, or press ←/→.
|
|
@@ -1166,7 +1166,7 @@ declare function CardCarousel(props: CardCarouselProps): react_jsx_runtime.JSX.E
|
|
|
1166
1166
|
|
|
1167
1167
|
interface ChatMessage {
|
|
1168
1168
|
id: string | number;
|
|
1169
|
-
/** Author id
|
|
1169
|
+
/** Author id, compared to `currentUserId` to decide own vs. incoming. */
|
|
1170
1170
|
authorId: string | number;
|
|
1171
1171
|
/** Display name (shown above the first bubble of an incoming group). */
|
|
1172
1172
|
authorName?: string;
|
|
@@ -1174,18 +1174,18 @@ interface ChatMessage {
|
|
|
1174
1174
|
avatar?: string;
|
|
1175
1175
|
/** Message body. */
|
|
1176
1176
|
text: string;
|
|
1177
|
-
/** Timestamp
|
|
1177
|
+
/** Timestamp, Date or ISO string. */
|
|
1178
1178
|
timestamp?: Date | string;
|
|
1179
1179
|
/** Delivery status for own messages. */
|
|
1180
1180
|
status?: 'sent' | 'delivered' | 'read';
|
|
1181
1181
|
}
|
|
1182
1182
|
interface ChatProps {
|
|
1183
1183
|
messages: ChatMessage[];
|
|
1184
|
-
/** The viewer's id
|
|
1184
|
+
/** The viewer's id, their messages align right with the accent bubble. */
|
|
1185
1185
|
currentUserId: string | number;
|
|
1186
1186
|
/** Fires when the composer sends a non-empty trimmed message. */
|
|
1187
1187
|
onSend?: (text: string) => void;
|
|
1188
|
-
/** Names currently typing
|
|
1188
|
+
/** Names currently typing, shows an animated indicator at the bottom. */
|
|
1189
1189
|
typingNames?: string[];
|
|
1190
1190
|
/** Header: title, subtitle, avatar, trailing actions. Omit for no header. */
|
|
1191
1191
|
title?: react__default.ReactNode;
|
|
@@ -1202,7 +1202,7 @@ interface ChatProps {
|
|
|
1202
1202
|
loading?: boolean;
|
|
1203
1203
|
/** Shown when there are no messages. */
|
|
1204
1204
|
emptyState?: react__default.ReactNode;
|
|
1205
|
-
/** Overall height
|
|
1205
|
+
/** Overall height, the message list scrolls within it. Default `480`. */
|
|
1206
1206
|
height?: number | string;
|
|
1207
1207
|
className?: string;
|
|
1208
1208
|
style?: react__default.CSSProperties;
|
|
@@ -1267,7 +1267,7 @@ interface StatisticProps {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
/**
|
|
1269
1269
|
* A single metric: caption, value (with optional prefix/suffix and icon), and an
|
|
1270
|
-
* optional trend delta whose colour follows direction
|
|
1270
|
+
* optional trend delta whose colour follows direction, flipped for metrics
|
|
1271
1271
|
* where a rise is bad via `positiveIsGood: false`.
|
|
1272
1272
|
*
|
|
1273
1273
|
* @example
|
|
@@ -1288,7 +1288,7 @@ interface FABAction {
|
|
|
1288
1288
|
interface FABProps {
|
|
1289
1289
|
/** Main button icon. */
|
|
1290
1290
|
icon: react__default.ReactNode;
|
|
1291
|
-
/** Accessible label for the main button (required
|
|
1291
|
+
/** Accessible label for the main button (required, it's icon-only). */
|
|
1292
1292
|
label: string;
|
|
1293
1293
|
/** Click handler. Ignored when `actions` is provided (the button toggles the dial). */
|
|
1294
1294
|
onClick?: react__default.MouseEventHandler;
|
|
@@ -1302,7 +1302,7 @@ interface FABProps {
|
|
|
1302
1302
|
tone?: FABTone;
|
|
1303
1303
|
/**
|
|
1304
1304
|
* `position: fixed` to the viewport (default) or `absolute` to the nearest
|
|
1305
|
-
* positioned ancestor
|
|
1305
|
+
* positioned ancestor, set `false` to anchor inside a `relative` container.
|
|
1306
1306
|
*/
|
|
1307
1307
|
fixed?: boolean;
|
|
1308
1308
|
className?: string;
|
|
@@ -1380,7 +1380,7 @@ interface LogoutTimerProps {
|
|
|
1380
1380
|
onWarning?: () => void;
|
|
1381
1381
|
/** Activity events that reset the idle timer. */
|
|
1382
1382
|
events?: string[];
|
|
1383
|
-
/** Master switch
|
|
1383
|
+
/** Master switch, when false the timer is fully disabled. Default `true`. */
|
|
1384
1384
|
enabled?: boolean;
|
|
1385
1385
|
/** Warning dialog heading. Default `'Still there?'`. */
|
|
1386
1386
|
title?: react__default.ReactNode;
|
|
@@ -1395,7 +1395,7 @@ interface LogoutTimerProps {
|
|
|
1395
1395
|
* Inactivity / session-timeout guard. After `timeout` ms with no user activity
|
|
1396
1396
|
* it raises a warning dialog that counts down for `countdown` ms; if the user
|
|
1397
1397
|
* doesn't respond, `onLogout` fires. "Stay signed in" extends the session;
|
|
1398
|
-
* "Sign out now" logs out immediately. Activity resets the idle timer
|
|
1398
|
+
* "Sign out now" logs out immediately. Activity resets the idle timer, but not
|
|
1399
1399
|
* while the warning is up, so the user must make a choice.
|
|
1400
1400
|
*
|
|
1401
1401
|
* Mount it once near the app root, alongside (or just inside) your
|
|
@@ -1416,13 +1416,13 @@ type SchedulerView = 'month' | 'week';
|
|
|
1416
1416
|
interface SchedulerEvent {
|
|
1417
1417
|
id: string | number;
|
|
1418
1418
|
title: string;
|
|
1419
|
-
/** Start time
|
|
1419
|
+
/** Start time, Date or ISO string. */
|
|
1420
1420
|
start: Date | string;
|
|
1421
1421
|
/** End time. Defaults to start + 1h. */
|
|
1422
1422
|
end?: Date | string;
|
|
1423
1423
|
/** Any CSS colour for the event chip. Defaults to the accent token. */
|
|
1424
1424
|
color?: string;
|
|
1425
|
-
/** All-day event
|
|
1425
|
+
/** All-day event, pinned to the day header strip rather than a time slot. */
|
|
1426
1426
|
allDay?: boolean;
|
|
1427
1427
|
}
|
|
1428
1428
|
interface SchedulerRange {
|
|
@@ -1448,7 +1448,7 @@ interface SchedulerProps {
|
|
|
1448
1448
|
dayHours?: [number, number];
|
|
1449
1449
|
/** Pixel height of one hour row in the week view. Default `48`. */
|
|
1450
1450
|
hourHeight?: number;
|
|
1451
|
-
/** Click an empty day cell (month) or time slot (week)
|
|
1451
|
+
/** Click an empty day cell (month) or time slot (week), for creating events. */
|
|
1452
1452
|
onSelectSlot?: (date: Date) => void;
|
|
1453
1453
|
/** Click an event chip. */
|
|
1454
1454
|
onSelectEvent?: (event: SchedulerEvent) => void;
|
|
@@ -1460,7 +1460,7 @@ interface SchedulerProps {
|
|
|
1460
1460
|
style?: react__default.CSSProperties;
|
|
1461
1461
|
}
|
|
1462
1462
|
/**
|
|
1463
|
-
* An event scheduler with month and week views
|
|
1463
|
+
* An event scheduler with month and week views, the agenda-style calendar for
|
|
1464
1464
|
* dashboards and ops tools (think Google Calendar's month/week). Supply events
|
|
1465
1465
|
* directly via `events`, or hand it an async `loadEvents(range, view)` and it
|
|
1466
1466
|
* manages the loading / empty states as the user pages around.
|
|
@@ -1493,7 +1493,7 @@ interface CartLineItem {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
interface CartSummaryRow {
|
|
1495
1495
|
label: react__default.ReactNode;
|
|
1496
|
-
/** Signed amount
|
|
1496
|
+
/** Signed amount, negative for discounts. */
|
|
1497
1497
|
value: number;
|
|
1498
1498
|
/** Render in muted/normal style instead of emphasised. */
|
|
1499
1499
|
muted?: boolean;
|
|
@@ -1523,7 +1523,7 @@ interface CartProps {
|
|
|
1523
1523
|
* remove, plus a summary that totals the subtotal with any extra rows
|
|
1524
1524
|
* (shipping, tax, discount) and an optional checkout button.
|
|
1525
1525
|
*
|
|
1526
|
-
* Stateless and controlled
|
|
1526
|
+
* Stateless and controlled, you own the items array and react to
|
|
1527
1527
|
* `onQuantityChange` / `onRemove`.
|
|
1528
1528
|
*
|
|
1529
1529
|
* @example
|
|
@@ -1539,7 +1539,7 @@ interface CartProps {
|
|
|
1539
1539
|
*/
|
|
1540
1540
|
declare function Cart({ items, onQuantityChange, onRemove, summaryRows, formatPrice, checkoutLabel, onCheckout, emptyState, className, style, }: CartProps): react_jsx_runtime.JSX.Element;
|
|
1541
1541
|
|
|
1542
|
-
/** Shape accepted by `addToCart
|
|
1542
|
+
/** Shape accepted by `addToCart`, quantity is optional (defaults to 1). */
|
|
1543
1543
|
type CartItemInput = Omit<CartLineItem, 'quantity'> & {
|
|
1544
1544
|
quantity?: number;
|
|
1545
1545
|
};
|
|
@@ -1561,7 +1561,7 @@ interface CartContextValue {
|
|
|
1561
1561
|
isInCart: (id: CartLineItem['id']) => boolean;
|
|
1562
1562
|
/** Total number of units across all lines (sum of quantities). */
|
|
1563
1563
|
getItemCount: () => number;
|
|
1564
|
-
/** Subtotal
|
|
1564
|
+
/** Subtotal, sum of `price × quantity` across all lines. */
|
|
1565
1565
|
getCartTotal: () => number;
|
|
1566
1566
|
}
|
|
1567
1567
|
interface CartProviderProps {
|
|
@@ -1573,7 +1573,7 @@ interface CartProviderProps {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
/**
|
|
1575
1575
|
* Provides a robust, app-wide cart API. Wrap any subtree and call
|
|
1576
|
-
* {@link useCart} from anywhere inside to add, remove, and total items
|
|
1576
|
+
* {@link useCart} from anywhere inside to add, remove, and total items -
|
|
1577
1577
|
* the cart panel, a product grid, and a topbar badge all stay in sync off the
|
|
1578
1578
|
* same store.
|
|
1579
1579
|
*
|
|
@@ -1600,7 +1600,7 @@ declare function CartProvider({ children, initialItems, onChange }: CartProvider
|
|
|
1600
1600
|
declare function useCart(): CartContextValue;
|
|
1601
1601
|
|
|
1602
1602
|
interface CartButtonProps {
|
|
1603
|
-
/** Click handler
|
|
1603
|
+
/** Click handler, typically opens the cart drawer / navigates to checkout. */
|
|
1604
1604
|
onClick?: react__default.MouseEventHandler<HTMLButtonElement>;
|
|
1605
1605
|
/** Icon-button style. Default `'bordered'`. */
|
|
1606
1606
|
variant?: 'primary' | 'bordered';
|
|
@@ -1640,7 +1640,7 @@ interface EmptyCartProps {
|
|
|
1640
1640
|
style?: react__default.CSSProperties;
|
|
1641
1641
|
}
|
|
1642
1642
|
/**
|
|
1643
|
-
* The empty state for a shopping cart
|
|
1643
|
+
* The empty state for a shopping cart, a configurable illustration with a
|
|
1644
1644
|
* title, optional description, and an optional call-to-action.
|
|
1645
1645
|
*
|
|
1646
1646
|
* Pass a custom `illustration` to match your brand, or override `title` /
|
|
@@ -1664,7 +1664,7 @@ declare function EmptyCart({ illustration, title, description, action, className
|
|
|
1664
1664
|
*
|
|
1665
1665
|
* Centralises the things every input must agree on:
|
|
1666
1666
|
* - the **size scale** (sm / md / lg) → control height + text size + padding
|
|
1667
|
-
* - the **refined focus treatment
|
|
1667
|
+
* - the **refined focus treatment**, a crisp 1px accent border plus a soft
|
|
1668
1668
|
* 3px low-opacity halo (NOT a heavy solid ring band)
|
|
1669
1669
|
* - the **resting / hover / error / disabled** border + background states
|
|
1670
1670
|
* - a **`<Field>` wrapper** handling label, error region, layout
|
|
@@ -1688,7 +1688,7 @@ interface FieldShellOptions {
|
|
|
1688
1688
|
sized?: boolean;
|
|
1689
1689
|
}
|
|
1690
1690
|
/**
|
|
1691
|
-
* Compose the className for an input's outer "shell"
|
|
1691
|
+
* Compose the className for an input's outer "shell", the bordered, rounded
|
|
1692
1692
|
* box that carries the focus ring. Apply to the `<input>` directly, or to a
|
|
1693
1693
|
* wrapper `<div>` that contains an input plus adornments (pass
|
|
1694
1694
|
* `focusWithin: true` in that case).
|
|
@@ -1724,7 +1724,7 @@ interface FieldLabelProps {
|
|
|
1724
1724
|
className?: string;
|
|
1725
1725
|
}
|
|
1726
1726
|
/**
|
|
1727
|
-
* The label row shared by every input
|
|
1727
|
+
* The label row shared by every input, label text + required asterisk +
|
|
1728
1728
|
* optional `helperText` info icon. Components that render their own label
|
|
1729
1729
|
* outside `<Field>` (Dropdown, DatePicker, Switch, SegmentedControl) use this
|
|
1730
1730
|
* so the affordance is pixel-identical everywhere.
|
|
@@ -1734,9 +1734,9 @@ interface FieldLabelProps {
|
|
|
1734
1734
|
declare function FieldLabel({ label, htmlFor, required, helperText, horizontal, align, style, width, className, }: FieldLabelProps): react_jsx_runtime.JSX.Element | null;
|
|
1735
1735
|
interface FieldProps {
|
|
1736
1736
|
label?: react__default.ReactNode;
|
|
1737
|
-
/** `id` of the control
|
|
1737
|
+
/** `id` of the control, links the `<label htmlFor>`. */
|
|
1738
1738
|
htmlFor?: string;
|
|
1739
|
-
/** `id` for the error region
|
|
1739
|
+
/** `id` for the error region, pair with `aria-describedby` on the control. */
|
|
1740
1740
|
errorId?: string;
|
|
1741
1741
|
errorMessage?: react__default.ReactNode;
|
|
1742
1742
|
/** Orientation of label vs control. Default `'vertical'`. */
|
|
@@ -1771,7 +1771,7 @@ interface FieldProps {
|
|
|
1771
1771
|
* The error message always sits under the **control only** (never spanning
|
|
1772
1772
|
* the label in horizontal layout). Label uses full-contrast foreground +
|
|
1773
1773
|
* medium weight so it reads as the anchor, while the input's placeholder is
|
|
1774
|
-
* muted
|
|
1774
|
+
* muted, establishing hierarchy without making the label tiny.
|
|
1775
1775
|
*/
|
|
1776
1776
|
declare function Field({ label, htmlFor, errorId, errorMessage, layout, required, helperText, labelAlign, labelStyle, labelWidth, className, children, }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
1777
1777
|
|
|
@@ -1820,7 +1820,7 @@ interface CreditCardFormProps {
|
|
|
1820
1820
|
/**
|
|
1821
1821
|
* Unified credit-card form built on the oxygen-ui {@link useForm} Form API.
|
|
1822
1822
|
*
|
|
1823
|
-
* One component owns all four fields and their cross-field rules
|
|
1823
|
+
* One component owns all four fields and their cross-field rules, card number
|
|
1824
1824
|
* (brand detection + grouping + Luhn), expiry (`MM/YY`, real month, not past),
|
|
1825
1825
|
* CVV (brand-aware length), and cardholder name. It is deliberately NOT shipped
|
|
1826
1826
|
* as separate inputs: a CVV or expiry field has no meaning outside a card form.
|
|
@@ -1858,7 +1858,7 @@ interface CheckoutProps {
|
|
|
1858
1858
|
* {@link useCart} store, so it must be rendered inside a `<CartProvider>`.
|
|
1859
1859
|
*
|
|
1860
1860
|
* The pay button is disabled whenever the cart is empty (via the form's
|
|
1861
|
-
* `submitDisabled`)
|
|
1861
|
+
* `submitDisabled`), the card fields stay editable, but payment can't be
|
|
1862
1862
|
* submitted with nothing to buy. Stacks to a single column below `lg`.
|
|
1863
1863
|
*
|
|
1864
1864
|
* @example
|
|
@@ -1916,7 +1916,7 @@ declare function useNotification(): {
|
|
|
1916
1916
|
type LoadingSpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
1917
1917
|
interface LoadingSpinnerProps {
|
|
1918
1918
|
/**
|
|
1919
|
-
* Text revealed letter-by-letter beneath the spinner. Optional
|
|
1919
|
+
* Text revealed letter-by-letter beneath the spinner. Optional, pass
|
|
1920
1920
|
* `undefined` for a pure spinner with no caption (e.g. inline mode).
|
|
1921
1921
|
*/
|
|
1922
1922
|
prompt?: string;
|
|
@@ -1939,7 +1939,7 @@ interface LoadingSpinnerProps {
|
|
|
1939
1939
|
*/
|
|
1940
1940
|
textColor?: string;
|
|
1941
1941
|
/**
|
|
1942
|
-
* Backdrop opacity (0 – 1) for the fullscreen overlay. Defaults to 0.8
|
|
1942
|
+
* Backdrop opacity (0 – 1) for the fullscreen overlay. Defaults to 0.8 -
|
|
1943
1943
|
* close enough to opaque to block UI underneath while still hinting at the
|
|
1944
1944
|
* previous state. Ignored when `inline` is true.
|
|
1945
1945
|
*/
|
|
@@ -1965,7 +1965,7 @@ interface LoadingSpinnerProps {
|
|
|
1965
1965
|
*
|
|
1966
1966
|
* **Accessibility**: `role="status"` + `aria-label`/`aria-live` make the
|
|
1967
1967
|
* indicator announce-able to screen readers. `prefers-reduced-motion`
|
|
1968
|
-
* collapses the letter stagger to instant reveal
|
|
1968
|
+
* collapses the letter stagger to instant reveal, the spinner rings keep
|
|
1969
1969
|
* rotating since a continuous spinner is informative, not decorative.
|
|
1970
1970
|
*
|
|
1971
1971
|
* @example Fullscreen overlay (page load)
|
|
@@ -2005,7 +2005,7 @@ interface FadingBaseProps {
|
|
|
2005
2005
|
* The component mounts on `isMounted=true` and unmounts after the 300ms
|
|
2006
2006
|
* fade-out completes on `isMounted=false`.
|
|
2007
2007
|
*
|
|
2008
|
-
* Uses CSS `dark:` class for the glass effect
|
|
2008
|
+
* Uses CSS `dark:` class for the glass effect, no ThemeContext dependency.
|
|
2009
2009
|
*
|
|
2010
2010
|
* @example
|
|
2011
2011
|
* <FadingBase isMounted={isPageVisible}>
|
|
@@ -2087,12 +2087,12 @@ declare function List({ items, onItemClick, activeKey, density, className, style
|
|
|
2087
2087
|
|
|
2088
2088
|
interface ScalableContainerProps {
|
|
2089
2089
|
/**
|
|
2090
|
-
* Resting width. Optional
|
|
2090
|
+
* Resting width. Optional, when omitted, the resting size is left to your
|
|
2091
2091
|
* own `className` / parent layout (so the container can sit in a fluid grid
|
|
2092
2092
|
* sized by `w-[…]` classes). Only set this if you want an inline width.
|
|
2093
2093
|
*/
|
|
2094
2094
|
width?: react__default.CSSProperties['width'];
|
|
2095
|
-
/** Resting height. Optional
|
|
2095
|
+
/** Resting height. Optional, see {@link ScalableContainerProps.width}. */
|
|
2096
2096
|
height?: react__default.CSSProperties['height'];
|
|
2097
2097
|
/**
|
|
2098
2098
|
* Width when expanded. Default `'100%'`. Use `'100%'` to span the full row
|
|
@@ -2121,38 +2121,38 @@ interface ScalableContainerProps {
|
|
|
2121
2121
|
collapseIcon?: react__default.ReactNode;
|
|
2122
2122
|
/**
|
|
2123
2123
|
* Position of the toggle button inside the container.
|
|
2124
|
-
* Default `'top-right'
|
|
2124
|
+
* Default `'top-right'`, matches the OS-window convention.
|
|
2125
2125
|
*/
|
|
2126
2126
|
togglePosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
2127
|
-
/** @deprecated No longer used
|
|
2127
|
+
/** @deprecated No longer used, set `targetWidth`/`targetHeight` instead. */
|
|
2128
2128
|
expandContainerRef?: react__default.RefObject<HTMLElement | null>;
|
|
2129
|
-
/** @deprecated No longer used
|
|
2129
|
+
/** @deprecated No longer used, set `targetWidth`/`targetHeight` instead. */
|
|
2130
2130
|
expandRatio?: number;
|
|
2131
2131
|
/** Extra classes merged onto the container root. */
|
|
2132
2132
|
className?: string;
|
|
2133
2133
|
}
|
|
2134
2134
|
/**
|
|
2135
2135
|
* Container that grows to a target size on click and collapses back. Reads like
|
|
2136
|
-
* an OS window resize
|
|
2136
|
+
* an OS window resize, subtle elevation lift, smooth size transition.
|
|
2137
2137
|
*
|
|
2138
2138
|
* **Resting size comes from your layout, not from props.** Leave `width`/`height`
|
|
2139
2139
|
* unset and size the container with your own `className` (e.g. a fluid grid:
|
|
2140
2140
|
* `w-full lg:w-[calc(50%-6px)]`). Only when expanded does the container write an
|
|
2141
2141
|
* inline `width`/`height` (= `targetWidth`/`targetHeight`) and go `flex: none`,
|
|
2142
|
-
* so it grows to that size and simply **pushes its neighbours along the flow**
|
|
2142
|
+
* so it grows to that size and simply **pushes its neighbours along the flow** -
|
|
2143
2143
|
* they keep their own dimensions and reflow (wrap / move down). On collapse the
|
|
2144
2144
|
* inline sizing is removed and your className layout takes back over. No sibling
|
|
2145
2145
|
* styles are ever touched.
|
|
2146
2146
|
*
|
|
2147
2147
|
* For neighbours to reflow *below* the expanded one, the parent must be able to
|
|
2148
|
-
* wrap
|
|
2148
|
+
* wrap, a `flex flex-wrap` row is the simplest; with `targetWidth="100%"` the
|
|
2149
2149
|
* expanded item takes a full row and everything after it moves down.
|
|
2150
2150
|
*
|
|
2151
2151
|
* @example
|
|
2152
2152
|
* ```tsx
|
|
2153
2153
|
* <div className="flex flex-wrap gap-3">
|
|
2154
2154
|
* <ScalableContainer
|
|
2155
|
-
* className="w-full lg:w-[calc(50%-6px)]" // resting size
|
|
2155
|
+
* className="w-full lg:w-[calc(50%-6px)]" // resting size, your grid
|
|
2156
2156
|
* height={300} // resting height
|
|
2157
2157
|
* targetWidth="100%" targetHeight={580} // expanded size
|
|
2158
2158
|
* >
|
|
@@ -2171,7 +2171,7 @@ interface GridCardItem {
|
|
|
2171
2171
|
/** Image URL or JSX element */
|
|
2172
2172
|
cover?: string | react__default.ReactNode;
|
|
2173
2173
|
enabled?: boolean;
|
|
2174
|
-
/** Arbitrary route or payload
|
|
2174
|
+
/** Arbitrary route or payload, passed back to onOpen */
|
|
2175
2175
|
to?: string;
|
|
2176
2176
|
[key: string]: any;
|
|
2177
2177
|
}
|
|
@@ -2188,7 +2188,7 @@ interface GridCardProps {
|
|
|
2188
2188
|
/**
|
|
2189
2189
|
* Application card tile (grid layout).
|
|
2190
2190
|
*
|
|
2191
|
-
* Decoupled from React Router
|
|
2191
|
+
* Decoupled from React Router, navigation is delegated to the `onOpen` prop.
|
|
2192
2192
|
*
|
|
2193
2193
|
* @example
|
|
2194
2194
|
* <GridCard
|
|
@@ -2239,7 +2239,7 @@ interface CatalogCarouselProps {
|
|
|
2239
2239
|
/**
|
|
2240
2240
|
* Three-card carousel (previous → active (scaled) → next).
|
|
2241
2241
|
*
|
|
2242
|
-
* Decoupled from ThemeContext
|
|
2242
|
+
* Decoupled from ThemeContext, uses CSS `dark:` classes.
|
|
2243
2243
|
*/
|
|
2244
2244
|
declare function CatalogCarousel({ items, buttonText, onOpen, className }: CatalogCarouselProps): react_jsx_runtime.JSX.Element;
|
|
2245
2245
|
|
|
@@ -2277,7 +2277,7 @@ interface ContextMenuActionItem {
|
|
|
2277
2277
|
onClick?: () => void;
|
|
2278
2278
|
/** Optional sub-menu items. */
|
|
2279
2279
|
children?: ContextMenuActionItem[];
|
|
2280
|
-
/** Render as disabled
|
|
2280
|
+
/** Render as disabled, still visible but not activatable. */
|
|
2281
2281
|
disabled?: boolean;
|
|
2282
2282
|
}
|
|
2283
2283
|
interface ContextMenuProps {
|
|
@@ -2286,7 +2286,7 @@ interface ContextMenuProps {
|
|
|
2286
2286
|
/**
|
|
2287
2287
|
* The element that should respond to right-click. The entire React
|
|
2288
2288
|
* subtree underneath becomes the trigger area. Wrap an existing
|
|
2289
|
-
* component / div / image
|
|
2289
|
+
* component / div / image, anything you can right-click on.
|
|
2290
2290
|
*/
|
|
2291
2291
|
children: react__default.ReactNode;
|
|
2292
2292
|
/** Extra classes merged onto the menu content panel. */
|
|
@@ -2300,7 +2300,7 @@ interface ContextMenuProps {
|
|
|
2300
2300
|
* navigation (↑↓ to move, → to open sub-menu, ← to close, Enter to activate,
|
|
2301
2301
|
* Esc to dismiss), focus management, and portal-based stacking.
|
|
2302
2302
|
*
|
|
2303
|
-
* @example Basic
|
|
2303
|
+
* @example Basic, flat menu
|
|
2304
2304
|
* ```tsx
|
|
2305
2305
|
* <ContextMenu
|
|
2306
2306
|
* items={[
|
|
@@ -2330,7 +2330,7 @@ interface ContextMenuProps {
|
|
|
2330
2330
|
* ```
|
|
2331
2331
|
*/
|
|
2332
2332
|
declare function ContextMenu({ items, children, className }: ContextMenuProps): react_jsx_runtime.JSX.Element;
|
|
2333
|
-
/** @deprecated The Radix rewrite positions the menu automatically
|
|
2333
|
+
/** @deprecated The Radix rewrite positions the menu automatically, no coordinates needed. */
|
|
2334
2334
|
interface ContextMenuPosition {
|
|
2335
2335
|
x: number;
|
|
2336
2336
|
y: number;
|
|
@@ -2343,17 +2343,17 @@ interface WizardStep {
|
|
|
2343
2343
|
description: react__default.ReactNode;
|
|
2344
2344
|
/**
|
|
2345
2345
|
* Tooltip placement relative to the highlighted element.
|
|
2346
|
-
* - `'right'` (default)
|
|
2347
|
-
* - `'left'`
|
|
2348
|
-
* - `'top'`
|
|
2349
|
-
* - `'bottom'`
|
|
2346
|
+
* - `'right'` (default), to the right of the highlight
|
|
2347
|
+
* - `'left'` , to the left of the highlight
|
|
2348
|
+
* - `'top'` , above the highlight
|
|
2349
|
+
* - `'bottom'` , below the highlight
|
|
2350
2350
|
*/
|
|
2351
2351
|
placement?: 'right' | 'left' | 'top' | 'bottom';
|
|
2352
2352
|
/** Optional heading for the step's tooltip. */
|
|
2353
2353
|
title?: react__default.ReactNode;
|
|
2354
2354
|
}
|
|
2355
2355
|
interface WizardProps {
|
|
2356
|
-
/** The wrapped subtree
|
|
2356
|
+
/** The wrapped subtree, refs in `steps` point into this tree. */
|
|
2357
2357
|
children: react__default.ReactNode;
|
|
2358
2358
|
/** Ordered list of steps to walk the user through. */
|
|
2359
2359
|
steps: WizardStep[];
|
|
@@ -2391,7 +2391,7 @@ interface WizardProps {
|
|
|
2391
2391
|
* portaled outline rectangle that tracks the target's bbox via
|
|
2392
2392
|
* `ResizeObserver` + scroll/resize listeners. The consumer's DOM is never
|
|
2393
2393
|
* mutated, so unmounting Wizard mid-tour leaves no orphan classes.
|
|
2394
|
-
* - Focus trap inside the tooltip
|
|
2394
|
+
* - Focus trap inside the tooltip, Tab and Shift+Tab cycle through the
|
|
2395
2395
|
* tooltip's buttons. Esc dismisses (when `dismissible`).
|
|
2396
2396
|
* - Backdrop blocks click-through on the rest of the page so the user can't
|
|
2397
2397
|
* stumble into unrelated UI mid-tour. The highlighted target itself stays
|
|
@@ -2399,7 +2399,7 @@ interface WizardProps {
|
|
|
2399
2399
|
* - Position recalculates on scroll / resize / target size changes via
|
|
2400
2400
|
* `ResizeObserver`.
|
|
2401
2401
|
* - All `dark-cornflower-blue` / `prussian-blue` / `bg-white` swapped for
|
|
2402
|
-
* semantic tokens
|
|
2402
|
+
* semantic tokens, both light and dark modes work out of the box.
|
|
2403
2403
|
*
|
|
2404
2404
|
* @example
|
|
2405
2405
|
* ```tsx
|
|
@@ -2423,11 +2423,11 @@ declare function Wizard({ children, steps, storageKey, dismissible, onComplete,
|
|
|
2423
2423
|
/**
|
|
2424
2424
|
* Column descriptor for the Table.
|
|
2425
2425
|
*
|
|
2426
|
-
* The generic `T` is the shape of a row
|
|
2426
|
+
* The generic `T` is the shape of a row, `keyBind` must be one of T's
|
|
2427
2427
|
* string-keyed properties, and `component(cellValue, row)` receives the
|
|
2428
2428
|
* matching value with full type inference. When used without a generic
|
|
2429
2429
|
* (`TableColumn[]`), `T` falls back to `Record<string, any>` for backwards
|
|
2430
|
-
* compatibility
|
|
2430
|
+
* compatibility, narrower typing is preferred whenever possible:
|
|
2431
2431
|
*
|
|
2432
2432
|
* ```ts
|
|
2433
2433
|
* type Vessel = { id: number; name: string; status: 'At Sea' | 'In Port' }
|
|
@@ -2444,7 +2444,7 @@ interface TableColumn<T extends Record<string, any> = Record<string, any>> {
|
|
|
2444
2444
|
keyBind: keyof T & string;
|
|
2445
2445
|
/** Custom cell renderer. Receives the cell value and the full row. */
|
|
2446
2446
|
component?: (cellValue: T[keyof T], row: T) => react__default.ReactNode;
|
|
2447
|
-
/** Explicit column width (CSS length or px number). Optional
|
|
2447
|
+
/** Explicit column width (CSS length or px number). Optional, defaults to auto. */
|
|
2448
2448
|
width?: string | number;
|
|
2449
2449
|
/** Text alignment for both header and cells. Defaults to `'center'`. */
|
|
2450
2450
|
align?: 'left' | 'center' | 'right';
|
|
@@ -2484,11 +2484,11 @@ interface SearchOptions<T extends Record<string, any> = Record<string, any>> {
|
|
|
2484
2484
|
matchMode?: 'contains' | 'startsWith' | 'equals';
|
|
2485
2485
|
/** Case-sensitive matching. Default `false`. */
|
|
2486
2486
|
caseSensitive?: boolean;
|
|
2487
|
-
/** Debounce the filter (ms)
|
|
2487
|
+
/** Debounce the filter (ms), useful for large lists. Default `0`. */
|
|
2488
2488
|
debounceMs?: number;
|
|
2489
2489
|
/** Input placeholder. */
|
|
2490
2490
|
placeholder?: string;
|
|
2491
|
-
/** Full custom matcher
|
|
2491
|
+
/** Full custom matcher, overrides keys / matchMode / caseSensitive. */
|
|
2492
2492
|
predicate?: (row: T, term: string) => boolean;
|
|
2493
2493
|
}
|
|
2494
2494
|
interface PaginationOptions {
|
|
@@ -2526,7 +2526,7 @@ interface TableProps<T extends Record<string, any> = Record<string, any>> {
|
|
|
2526
2526
|
/**
|
|
2527
2527
|
* Returns a stable key for each row, used for React reconciliation AND
|
|
2528
2528
|
* for tracking expanded state when `expandRow.enabled` is true.
|
|
2529
|
-
* Defaults to the row index
|
|
2529
|
+
* Defaults to the row index, fine for static lists, but pass an
|
|
2530
2530
|
* explicit getter (e.g. `(row) => row.id`) if rows can be reordered or
|
|
2531
2531
|
* filtered while expand state should persist.
|
|
2532
2532
|
*/
|
|
@@ -2603,13 +2603,13 @@ interface TableProps<T extends Record<string, any> = Record<string, any>> {
|
|
|
2603
2603
|
declare function Table<T extends Record<string, any> = Record<string, any>>({ columns, rows, getRowKey, pagination, expandRow, hasSearch, search, defaultSort, onSortChange, onCellEdit, footer, header, loading, loadingRowCount, className, style, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2604
2604
|
|
|
2605
2605
|
interface VirtualListProps<T> {
|
|
2606
|
-
/** The full dataset
|
|
2606
|
+
/** The full dataset, only the visible window is mounted. */
|
|
2607
2607
|
items: T[];
|
|
2608
2608
|
/** Fixed row height in px. (Variable heights aren't supported in this lean build.) */
|
|
2609
2609
|
rowHeight: number;
|
|
2610
2610
|
/** Render one item. Wrapped in a row of exactly `rowHeight`. */
|
|
2611
2611
|
renderItem: (item: T, index: number) => react__default.ReactNode;
|
|
2612
|
-
/** Viewport height
|
|
2612
|
+
/** Viewport height, number (px) or any CSS length. Default `400`. */
|
|
2613
2613
|
height?: number | string;
|
|
2614
2614
|
/** Stable key per item. Defaults to the index. */
|
|
2615
2615
|
getKey?: (item: T, index: number) => react__default.Key;
|
|
@@ -2619,7 +2619,7 @@ interface VirtualListProps<T> {
|
|
|
2619
2619
|
searchable?: boolean;
|
|
2620
2620
|
/** Object keys to search (default: searches `String(item)`). */
|
|
2621
2621
|
searchKeys?: (keyof T)[];
|
|
2622
|
-
/** Custom matcher
|
|
2622
|
+
/** Custom matcher, overrides `searchKeys`. */
|
|
2623
2623
|
filter?: (item: T, term: string) => boolean;
|
|
2624
2624
|
searchPlaceholder?: string;
|
|
2625
2625
|
/** Shown when there are no items (or none match the search). */
|
|
@@ -2631,7 +2631,7 @@ interface VirtualListProps<T> {
|
|
|
2631
2631
|
/**
|
|
2632
2632
|
* A windowed (virtualized) list: renders only the rows in view (plus overscan),
|
|
2633
2633
|
* so 100k items scroll as cheaply as 20. Fixed `rowHeight`, no dependencies.
|
|
2634
|
-
* Set `searchable` for a built-in filter
|
|
2634
|
+
* Set `searchable` for a built-in filter, the canonical "virtualized search".
|
|
2635
2635
|
*
|
|
2636
2636
|
* @example
|
|
2637
2637
|
* <VirtualList
|
|
@@ -2649,10 +2649,10 @@ declare function VirtualList<T>({ items, rowHeight, renderItem, height, getKey,
|
|
|
2649
2649
|
/**
|
|
2650
2650
|
* Shared file-source contract for content components (PdfViewer, Spreadsheet).
|
|
2651
2651
|
*
|
|
2652
|
-
* Three independent, equal ways to supply content
|
|
2653
|
-
* 1. PROGRAMMATIC
|
|
2654
|
-
* 2. BACKEND
|
|
2655
|
-
* 3. LOCAL
|
|
2652
|
+
* Three independent, equal ways to supply content, no preference baked in:
|
|
2653
|
+
* 1. PROGRAMMATIC , `ArrayBuffer | Uint8Array` built in-browser (no network)
|
|
2654
|
+
* 2. BACKEND , `string | URL` fetched/streamed from a server
|
|
2655
|
+
* 3. LOCAL , `File | Blob` from a file input / drag-drop (no network)
|
|
2656
2656
|
*/
|
|
2657
2657
|
type FileSource = string | URL | File | Blob | ArrayBuffer | Uint8Array;
|
|
2658
2658
|
interface RemoteSourceOptions {
|
|
@@ -2780,7 +2780,7 @@ interface DataGridProps {
|
|
|
2780
2780
|
* Virtualized (both axes) data grid primitive. Renders only the cells inside
|
|
2781
2781
|
* the viewport plus an overscan margin, so it stays smooth at tens of thousands
|
|
2782
2782
|
* of rows. The header and the row-number gutter are pinned by positioning them
|
|
2783
|
-
* at the live scroll offset (`top: scrollTop` / `left: scrollLeft`)
|
|
2783
|
+
* at the live scroll offset (`top: scrollTop` / `left: scrollLeft`), the same
|
|
2784
2784
|
* translate-window technique as {@link VirtualList}, extended to two axes.
|
|
2785
2785
|
*
|
|
2786
2786
|
* Stateless w.r.t. data: it renders the `rows` it's given and emits
|
|
@@ -2791,7 +2791,7 @@ declare function DataGrid({ columns, rows, rowHeight, headerHeight, height, widt
|
|
|
2791
2791
|
|
|
2792
2792
|
interface Cell {
|
|
2793
2793
|
value: CellValue;
|
|
2794
|
-
/** Reserved for a future formula engine
|
|
2794
|
+
/** Reserved for a future formula engine, parsed/stored but not evaluated. */
|
|
2795
2795
|
formula?: string;
|
|
2796
2796
|
}
|
|
2797
2797
|
interface SheetData {
|
|
@@ -2803,7 +2803,7 @@ type GridSource = SheetData[] | File | Blob | string | URL;
|
|
|
2803
2803
|
interface SpreadsheetProps {
|
|
2804
2804
|
source: GridSource;
|
|
2805
2805
|
remote?: RemoteSourceOptions;
|
|
2806
|
-
/** Value editing only
|
|
2806
|
+
/** Value editing only, no formulas. Default false. */
|
|
2807
2807
|
editable?: boolean;
|
|
2808
2808
|
onCellEdit?: (e: {
|
|
2809
2809
|
sheet: string;
|
|
@@ -2834,7 +2834,7 @@ interface SpreadsheetProps {
|
|
|
2834
2834
|
}
|
|
2835
2835
|
/**
|
|
2836
2836
|
* Multi-sheet spreadsheet built on {@link DataGrid}. Accepts data three ways
|
|
2837
|
-
|
|
2837
|
+
*, in-memory `SheetData[]` (no network), a `File`/`Blob` (no network), or a
|
|
2838
2838
|
* URL (the only mode that fetches). `.xlsx` is parsed with SheetJS, loaded
|
|
2839
2839
|
* lazily on first use. Value editing emits `onCellEdit` + `onChange`; there is
|
|
2840
2840
|
* no formula engine (the `Cell.formula` slot is reserved, not evaluated).
|
|
@@ -2859,7 +2859,7 @@ interface ThemeSwitchProps {
|
|
|
2859
2859
|
* Theme (dark-mode) toggle switch powered by Radix Switch.
|
|
2860
2860
|
*
|
|
2861
2861
|
* The thumb color indicates mode: green = light, slate = dark.
|
|
2862
|
-
* Layout (position, margin) is the parent's responsibility
|
|
2862
|
+
* Layout (position, margin) is the parent's responsibility, this component
|
|
2863
2863
|
* renders inline with no external margins.
|
|
2864
2864
|
*
|
|
2865
2865
|
* @example
|
|
@@ -2868,15 +2868,15 @@ interface ThemeSwitchProps {
|
|
|
2868
2868
|
declare function ThemeSwitch({ checked, onChange, label, className }: ThemeSwitchProps): react_jsx_runtime.JSX.Element;
|
|
2869
2869
|
|
|
2870
2870
|
interface TopBarProps {
|
|
2871
|
-
/** Brand area
|
|
2871
|
+
/** Brand area, logo, wordmark, or app name. Rendered on the leading edge. */
|
|
2872
2872
|
brand?: react__default.ReactNode;
|
|
2873
2873
|
/**
|
|
2874
|
-
* Centre content
|
|
2874
|
+
* Centre content, primary navigation links, breadcrumb, or page title.
|
|
2875
2875
|
* On mobile (< md breakpoint) this moves below the brand row.
|
|
2876
2876
|
*/
|
|
2877
2877
|
center?: react__default.ReactNode;
|
|
2878
2878
|
/**
|
|
2879
|
-
* Trailing actions
|
|
2879
|
+
* Trailing actions, theme toggle, user avatar, notification bell, etc.
|
|
2880
2880
|
* Rendered on the trailing edge.
|
|
2881
2881
|
*/
|
|
2882
2882
|
actions?: react__default.ReactNode;
|
|
@@ -2892,7 +2892,7 @@ interface TopBarProps {
|
|
|
2892
2892
|
* App-shell top navigation bar.
|
|
2893
2893
|
*
|
|
2894
2894
|
* Three named slots: brand (leading), center, actions (trailing).
|
|
2895
|
-
* All slots are optional
|
|
2895
|
+
* All slots are optional, omit what you don't need.
|
|
2896
2896
|
*
|
|
2897
2897
|
* The component is sticky by default (`sticky top-0`) with `z-[100]`.
|
|
2898
2898
|
* Height is exposed as `--topbar-height` CSS variable on the element so
|
|
@@ -2934,7 +2934,7 @@ interface SidebarItem {
|
|
|
2934
2934
|
}
|
|
2935
2935
|
interface SidebarSection {
|
|
2936
2936
|
key: string;
|
|
2937
|
-
/** Section title
|
|
2937
|
+
/** Section title, visible only when expanded */
|
|
2938
2938
|
title?: string;
|
|
2939
2939
|
items: SidebarItem[];
|
|
2940
2940
|
}
|
|
@@ -3127,7 +3127,7 @@ interface SecureLayoutProps {
|
|
|
3127
3127
|
* role / permission / `canAccess` gates apply.
|
|
3128
3128
|
*/
|
|
3129
3129
|
isAuthenticated?: boolean;
|
|
3130
|
-
/** A JWT. Used only to check expiry (`exp`) client-side
|
|
3130
|
+
/** A JWT. Used only to check expiry (`exp`) client-side, never trust this
|
|
3131
3131
|
* for real authorization; the server must verify the signature. */
|
|
3132
3132
|
token?: string;
|
|
3133
3133
|
/** The user's roles (RBAC). */
|
|
@@ -3159,21 +3159,21 @@ interface SecureLayoutProps {
|
|
|
3159
3159
|
/** Shown when access is denied. Defaults to a simple "Access denied" panel;
|
|
3160
3160
|
* pass `null` to render nothing (e.g. when `onDeny` redirects away). */
|
|
3161
3161
|
fallback?: react__default.ReactNode;
|
|
3162
|
-
/** Fired once when access is granted
|
|
3162
|
+
/** Fired once when access is granted, e.g. to hydrate app state or redirect
|
|
3163
3163
|
* to a landing route after a successful token check. */
|
|
3164
3164
|
onGranted?: () => void;
|
|
3165
|
-
/** Fired once when access is denied
|
|
3165
|
+
/** Fired once when access is denied, e.g. to redirect to login / logout. */
|
|
3166
3166
|
onDeny?: () => void;
|
|
3167
3167
|
className?: string;
|
|
3168
3168
|
}
|
|
3169
3169
|
/**
|
|
3170
|
-
* A layout wrapper that gates its children behind an access check
|
|
3170
|
+
* A layout wrapper that gates its children behind an access check -
|
|
3171
3171
|
* authentication, RBAC (roles), PBAC (permissions), JWT expiry, and/or a
|
|
3172
3172
|
* custom (optionally async) predicate. While the check runs it shows a
|
|
3173
3173
|
* loading fallback; on success it fades the content in; on failure it renders
|
|
3174
3174
|
* a fallback and calls `onDeny`.
|
|
3175
3175
|
*
|
|
3176
|
-
* This is a UI guard, not a security boundary
|
|
3176
|
+
* This is a UI guard, not a security boundary, it controls what renders.
|
|
3177
3177
|
* Real authorization must be enforced by your API/server.
|
|
3178
3178
|
*
|
|
3179
3179
|
* @example Full RBAC + PBAC gate
|
|
@@ -3192,7 +3192,7 @@ interface SecureLayoutProps {
|
|
|
3192
3192
|
* }}
|
|
3193
3193
|
* onGranted={() => navigate('/dashboard')}
|
|
3194
3194
|
* onDeny={() => navigate('/logout')}
|
|
3195
|
-
* fallback={null} // redirecting
|
|
3195
|
+
* fallback={null} // redirecting, don't flash a panel
|
|
3196
3196
|
* >
|
|
3197
3197
|
* <AppRoutes />
|
|
3198
3198
|
* </SecureLayout>
|
|
@@ -3280,7 +3280,7 @@ interface ThemeMotion {
|
|
|
3280
3280
|
}
|
|
3281
3281
|
/**
|
|
3282
3282
|
* Partial theme override configuration.
|
|
3283
|
-
* Every field is optional
|
|
3283
|
+
* Every field is optional, only the keys you provide are overridden.
|
|
3284
3284
|
*/
|
|
3285
3285
|
interface ThemeConfig {
|
|
3286
3286
|
colors?: ThemeColors;
|
|
@@ -3299,15 +3299,15 @@ interface ThemeProviderProps {
|
|
|
3299
3299
|
/**
|
|
3300
3300
|
* Additional token overrides applied only when the wrapper element carries
|
|
3301
3301
|
* the `.dark` class (i.e. when `colorScheme="dark"` or when a parent sets `.dark`).
|
|
3302
|
-
* Injected via a scoped `<style>` tag
|
|
3302
|
+
* Injected via a scoped `<style>` tag, no inline-style limitations.
|
|
3303
3303
|
*/
|
|
3304
3304
|
darkTheme?: ThemeConfig;
|
|
3305
3305
|
/**
|
|
3306
3306
|
* Managed color scheme.
|
|
3307
|
-
* - `'light'`
|
|
3308
|
-
* - `'dark'`
|
|
3309
|
-
* - `'system'
|
|
3310
|
-
* - `'auto'`
|
|
3307
|
+
* - `'light'` , removes `.dark` class from the wrapper
|
|
3308
|
+
* - `'dark'` , adds `.dark` class to the wrapper
|
|
3309
|
+
* - `'system'`, follows `prefers-color-scheme` media query
|
|
3310
|
+
* - `'auto'` , do nothing; inherit from an ancestor (default)
|
|
3311
3311
|
*/
|
|
3312
3312
|
colorScheme?: 'light' | 'dark' | 'system' | 'auto';
|
|
3313
3313
|
children: react__default.ReactNode;
|
|
@@ -3393,7 +3393,7 @@ interface SkeletonCircleProps extends SkeletonBaseProps {
|
|
|
3393
3393
|
size?: number;
|
|
3394
3394
|
}
|
|
3395
3395
|
/**
|
|
3396
|
-
* Circular loading placeholder
|
|
3396
|
+
* Circular loading placeholder, avatars, icons, status indicators.
|
|
3397
3397
|
*
|
|
3398
3398
|
* @example
|
|
3399
3399
|
* <SkeletonCircle size={48} />
|
|
@@ -3407,7 +3407,7 @@ interface SkeletonCardProps extends SkeletonBaseProps {
|
|
|
3407
3407
|
lines?: number;
|
|
3408
3408
|
}
|
|
3409
3409
|
/**
|
|
3410
|
-
* Composite card skeleton
|
|
3410
|
+
* Composite card skeleton, avatar + heading + body text + action strip.
|
|
3411
3411
|
* Use as a drop-in while real card data loads.
|
|
3412
3412
|
*
|
|
3413
3413
|
* @example
|
|
@@ -3420,7 +3420,7 @@ declare function SkeletonCard({ hasAvatar, lines, className, style }: SkeletonCa
|
|
|
3420
3420
|
interface TextInputProps {
|
|
3421
3421
|
/** Controlled string value. */
|
|
3422
3422
|
value?: string;
|
|
3423
|
-
/** Native change handler
|
|
3423
|
+
/** Native change handler, read `e.target.value`. */
|
|
3424
3424
|
onChange?: react__default.ChangeEventHandler<HTMLInputElement>;
|
|
3425
3425
|
/** Disable interaction and dim the field. */
|
|
3426
3426
|
disabled?: boolean;
|
|
@@ -3440,11 +3440,11 @@ interface TextInputProps {
|
|
|
3440
3440
|
style?: react__default.CSSProperties;
|
|
3441
3441
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
3442
3442
|
layout?: 'horizontal' | 'vertical';
|
|
3443
|
-
/** Size preset
|
|
3443
|
+
/** Size preset, controls height, padding, and font. Default `'md'`. */
|
|
3444
3444
|
size?: FieldSize;
|
|
3445
3445
|
/** Native blur handler. */
|
|
3446
3446
|
onBlur?: react__default.FocusEventHandler<HTMLInputElement>;
|
|
3447
|
-
/** Validation message
|
|
3447
|
+
/** Validation message, shown under the input; also flags it red + `aria-invalid`. */
|
|
3448
3448
|
errorMessage?: react__default.ReactNode;
|
|
3449
3449
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
3450
3450
|
helperText?: react__default.ReactNode;
|
|
@@ -3460,7 +3460,7 @@ interface TextInputProps {
|
|
|
3460
3460
|
id?: string;
|
|
3461
3461
|
}
|
|
3462
3462
|
/**
|
|
3463
|
-
* Single-line text input. Full-width by default (responsive)
|
|
3463
|
+
* Single-line text input. Full-width by default (responsive), constrain it
|
|
3464
3464
|
* with the parent layout or `style={{ maxWidth }}`. Supports an optional
|
|
3465
3465
|
* leading `prefix` and trailing `suffix` adornment (icon, unit, etc.).
|
|
3466
3466
|
*
|
|
@@ -3507,7 +3507,7 @@ interface NumberInputProps {
|
|
|
3507
3507
|
layout?: 'horizontal' | 'vertical';
|
|
3508
3508
|
/** Size preset. Default `'md'`. */
|
|
3509
3509
|
size?: FieldSize;
|
|
3510
|
-
/** Validation message
|
|
3510
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
3511
3511
|
errorMessage?: react__default.ReactNode;
|
|
3512
3512
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
3513
3513
|
helperText?: react__default.ReactNode;
|
|
@@ -3527,7 +3527,7 @@ interface NumberInputProps {
|
|
|
3527
3527
|
min?: number;
|
|
3528
3528
|
/** Maximum allowed value. */
|
|
3529
3529
|
max?: number;
|
|
3530
|
-
/** Render read-only
|
|
3530
|
+
/** Render read-only, visible but not editable. */
|
|
3531
3531
|
readOnly?: boolean;
|
|
3532
3532
|
/** Optional precision for floating-point steps (number of decimal places to round to). */
|
|
3533
3533
|
precision?: number;
|
|
@@ -3541,7 +3541,7 @@ interface NumberInputProps {
|
|
|
3541
3541
|
* `<span onClick>` which keyboard-only users could not reach.
|
|
3542
3542
|
* - Floating-point drift on decimal steps (`0.1 + 0.2 = 0.30000000000000004`)
|
|
3543
3543
|
* is rounded out via a `precision` prop or auto-inferred from the step.
|
|
3544
|
-
* - Empty input resolves to `undefined` instead of `NaN
|
|
3544
|
+
* - Empty input resolves to `undefined` instead of `NaN`, works with form
|
|
3545
3545
|
* libraries (RHF, Formik) that treat empty as "no value".
|
|
3546
3546
|
* - The decrement chevron actually points down (the previous SVG was the up
|
|
3547
3547
|
* chevron rotated, with the up chevron itself wrongly using the same path).
|
|
@@ -3587,11 +3587,11 @@ interface PasswordProps {
|
|
|
3587
3587
|
style?: react__default.CSSProperties;
|
|
3588
3588
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
3589
3589
|
layout?: 'horizontal' | 'vertical';
|
|
3590
|
-
/** Size preset
|
|
3590
|
+
/** Size preset, controls height, padding, and font. Default `'md'`. */
|
|
3591
3591
|
size?: FieldSize;
|
|
3592
|
-
/** Blur handler
|
|
3592
|
+
/** Blur handler, useful for touched/validation timing. */
|
|
3593
3593
|
onBlur?: react__default.FocusEventHandler<HTMLInputElement>;
|
|
3594
|
-
/** Validation message
|
|
3594
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
3595
3595
|
errorMessage?: react__default.ReactNode;
|
|
3596
3596
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
3597
3597
|
helperText?: react__default.ReactNode;
|
|
@@ -3626,7 +3626,7 @@ interface PasswordStrengthResult {
|
|
|
3626
3626
|
/** Human label for the score (`''` when empty). */
|
|
3627
3627
|
label: string;
|
|
3628
3628
|
}
|
|
3629
|
-
/** The default requirement set
|
|
3629
|
+
/** The default requirement set, also drives the optional checklist. */
|
|
3630
3630
|
declare const defaultPasswordRules: PasswordRule[];
|
|
3631
3631
|
/**
|
|
3632
3632
|
* Lightweight, dependency-free password scorer (0–4). Rewards length and
|
|
@@ -3655,7 +3655,7 @@ interface PasswordStrengthProps {
|
|
|
3655
3655
|
}
|
|
3656
3656
|
/**
|
|
3657
3657
|
* Password strength meter + (optional) requirement checklist + (optional)
|
|
3658
|
-
* confirm-password matcher. Controlled
|
|
3658
|
+
* confirm-password matcher. Controlled, feed it the current password `value`
|
|
3659
3659
|
* (and `confirmValue` for the matcher). Scoring is a dependency-free heuristic;
|
|
3660
3660
|
* override with `scorer`.
|
|
3661
3661
|
*
|
|
@@ -3693,7 +3693,7 @@ interface RadioTileProps {
|
|
|
3693
3693
|
label?: react__default.ReactNode;
|
|
3694
3694
|
/** Widest-breakpoint column count. Default `2`. */
|
|
3695
3695
|
columns?: 1 | 2 | 3;
|
|
3696
|
-
/** Size preset
|
|
3696
|
+
/** Size preset, controls padding + text. Default `'md'`. */
|
|
3697
3697
|
size?: FieldSize;
|
|
3698
3698
|
/** Disable the whole group. */
|
|
3699
3699
|
disabled?: boolean;
|
|
@@ -3701,12 +3701,12 @@ interface RadioTileProps {
|
|
|
3701
3701
|
required?: boolean;
|
|
3702
3702
|
/** Contextual help revealed via an info icon beside the label. */
|
|
3703
3703
|
helperText?: react__default.ReactNode;
|
|
3704
|
-
/** Validation message
|
|
3704
|
+
/** Validation message, shown under the group; flags it red + `aria-invalid`. */
|
|
3705
3705
|
errorMessage?: react__default.ReactNode;
|
|
3706
3706
|
className?: string;
|
|
3707
3707
|
}
|
|
3708
3708
|
/**
|
|
3709
|
-
* A single-select group of rich, card-style options
|
|
3709
|
+
* A single-select group of rich, card-style options, icon, title, description,
|
|
3710
3710
|
* and an optional corner badge. Built on `@radix-ui/react-radio-group`, so it
|
|
3711
3711
|
* keeps real radio semantics (roving arrow-key focus, `role="radiogroup"`,
|
|
3712
3712
|
* native form serialisation via `name`). The selected tile gets an accent
|
|
@@ -3788,7 +3788,7 @@ interface CheckboxProps {
|
|
|
3788
3788
|
name?: string;
|
|
3789
3789
|
/** `id` for the control and the `<label htmlFor>` link. */
|
|
3790
3790
|
htmlFor?: string;
|
|
3791
|
-
/** Validation message
|
|
3791
|
+
/** Validation message, shown under the control; also flags the box red + `aria-invalid`. */
|
|
3792
3792
|
errorMessage?: react__default.ReactNode;
|
|
3793
3793
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
3794
3794
|
helperText?: react__default.ReactNode;
|
|
@@ -3819,7 +3819,7 @@ interface CheckboxProps {
|
|
|
3819
3819
|
* Radix handles keyboard activation, focus ring, and `role="checkbox"` ARIA;
|
|
3820
3820
|
* the check mark pops in with a spring on first check. Supports a secondary
|
|
3821
3821
|
* `description`, `helperText` tooltip, left/right label placement, and the
|
|
3822
|
-
* shared error treatment
|
|
3822
|
+
* shared error treatment, so it lines up with every other input in a form.
|
|
3823
3823
|
*
|
|
3824
3824
|
* Emits `{ target: { checked, id, name } }` for drop-in use with existing
|
|
3825
3825
|
* change handlers.
|
|
@@ -3870,7 +3870,7 @@ interface RadioGroupProps {
|
|
|
3870
3870
|
* `'right'` (default) → dot then label; `'left'` → label then dot.
|
|
3871
3871
|
*/
|
|
3872
3872
|
labelPosition?: 'left' | 'right';
|
|
3873
|
-
/** Size preset
|
|
3873
|
+
/** Size preset, controls the dot + text size. Default `'md'`. */
|
|
3874
3874
|
size?: FieldSize;
|
|
3875
3875
|
/** Disable interaction and dim the control. */
|
|
3876
3876
|
disabled?: boolean;
|
|
@@ -3880,7 +3880,7 @@ interface RadioGroupProps {
|
|
|
3880
3880
|
helperText?: react__default.ReactNode;
|
|
3881
3881
|
/** Extra classes merged onto the field root element. */
|
|
3882
3882
|
className?: string;
|
|
3883
|
-
/** Validation message
|
|
3883
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
3884
3884
|
errorMessage?: react__default.ReactNode;
|
|
3885
3885
|
}
|
|
3886
3886
|
/**
|
|
@@ -3926,7 +3926,7 @@ interface SwitchInputProps {
|
|
|
3926
3926
|
uncheckedIcon?: react__default.ReactNode;
|
|
3927
3927
|
/**
|
|
3928
3928
|
* Central field label, positioned per `layout` (above in vertical, beside
|
|
3929
|
-
* in horizontal)
|
|
3929
|
+
* in horizontal), the same affordance every other input uses.
|
|
3930
3930
|
*/
|
|
3931
3931
|
label?: react__default.ReactNode;
|
|
3932
3932
|
/** Label/control orientation. Default `'horizontal'`. */
|
|
@@ -3945,7 +3945,7 @@ interface SwitchInputProps {
|
|
|
3945
3945
|
required?: boolean;
|
|
3946
3946
|
/** Disable interaction and dim the control. */
|
|
3947
3947
|
disabled?: boolean;
|
|
3948
|
-
/** Validation message
|
|
3948
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
3949
3949
|
errorMessage?: react__default.ReactNode;
|
|
3950
3950
|
}
|
|
3951
3951
|
/**
|
|
@@ -3973,7 +3973,7 @@ interface DropdownItem {
|
|
|
3973
3973
|
icon?: react__default.ReactNode;
|
|
3974
3974
|
}
|
|
3975
3975
|
/**
|
|
3976
|
-
* Item key type
|
|
3976
|
+
* Item key type, DOM-friendly subset of `React.Key` (no bigint, since UI
|
|
3977
3977
|
* keys are always strings or numbers in practice).
|
|
3978
3978
|
*/
|
|
3979
3979
|
type DropdownKey = string | number;
|
|
@@ -4001,7 +4001,7 @@ interface DropdownProps {
|
|
|
4001
4001
|
name?: string;
|
|
4002
4002
|
};
|
|
4003
4003
|
}) => void;
|
|
4004
|
-
/** Blur handler
|
|
4004
|
+
/** Blur handler, useful for touched/validation timing. */
|
|
4005
4005
|
onBlur?: react__default.FocusEventHandler;
|
|
4006
4006
|
/** Disable interaction and dim the control. */
|
|
4007
4007
|
disabled?: boolean;
|
|
@@ -4011,7 +4011,7 @@ interface DropdownProps {
|
|
|
4011
4011
|
helperText?: react__default.ReactNode;
|
|
4012
4012
|
/** Show a required asterisk after the label. */
|
|
4013
4013
|
required?: boolean;
|
|
4014
|
-
/** Validation message
|
|
4014
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4015
4015
|
errorMessage?: react__default.ReactNode;
|
|
4016
4016
|
/** Inline style applied to the control shell. */
|
|
4017
4017
|
style?: react__default.CSSProperties;
|
|
@@ -4073,12 +4073,12 @@ interface AutoCompleteProps {
|
|
|
4073
4073
|
/** Label/input orientation. Defaults to `'vertical'`. */
|
|
4074
4074
|
layout?: 'horizontal' | 'vertical';
|
|
4075
4075
|
/**
|
|
4076
|
-
* Static list
|
|
4076
|
+
* Static list, when provided, the component does its own substring
|
|
4077
4077
|
* filtering on `label` and `key`. Mutually exclusive with `onSearch`.
|
|
4078
4078
|
*/
|
|
4079
4079
|
items?: AutoCompleteItem[];
|
|
4080
4080
|
/**
|
|
4081
|
-
* Async resolver
|
|
4081
|
+
* Async resolver, when provided, `items` is ignored and `onSearch(term)`
|
|
4082
4082
|
* is called (debounced) every time the user pauses typing. Its returned
|
|
4083
4083
|
* promise drives the option list. The component manages an internal
|
|
4084
4084
|
* `loading` state and shows an `xs` LoadingSpinner where the search icon
|
|
@@ -4094,13 +4094,13 @@ interface AutoCompleteProps {
|
|
|
4094
4094
|
onItemClick?: (value: string) => void;
|
|
4095
4095
|
/** Custom "empty" message */
|
|
4096
4096
|
emptyText?: string;
|
|
4097
|
-
/** Custom "loading" message
|
|
4097
|
+
/** Custom "loading" message, shown in async mode while a query is in flight. */
|
|
4098
4098
|
loadingText?: string;
|
|
4099
4099
|
/** Size preset. Default `'md'`. */
|
|
4100
4100
|
size?: FieldSize;
|
|
4101
4101
|
/** Override the leading search icon (hidden while loading). */
|
|
4102
4102
|
icon?: react__default.ReactNode;
|
|
4103
|
-
/** Validation message
|
|
4103
|
+
/** Validation message, turns the field red and links via aria-describedby. */
|
|
4104
4104
|
errorMessage?: react__default.ReactNode;
|
|
4105
4105
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4106
4106
|
helperText?: react__default.ReactNode;
|
|
@@ -4115,9 +4115,9 @@ interface AutoCompleteProps {
|
|
|
4115
4115
|
* Search-as-you-type autocomplete powered by Radix Popover. Supports two
|
|
4116
4116
|
* modes:
|
|
4117
4117
|
*
|
|
4118
|
-
* - **Static**: pass `items
|
|
4118
|
+
* - **Static**: pass `items`, the component substring-filters locally.
|
|
4119
4119
|
* Best for small fixed lists (≤ 200 entries).
|
|
4120
|
-
* - **Async**: pass `onSearch(term) => Promise<Item[]
|
|
4120
|
+
* - **Async**: pass `onSearch(term) => Promise<Item[]>`, the component
|
|
4121
4121
|
* debounces input and drives the option list from the resolver. Shows
|
|
4122
4122
|
* an `xs` LoadingSpinner while the query is in flight.
|
|
4123
4123
|
*
|
|
@@ -4155,7 +4155,7 @@ interface TreeSelectNode {
|
|
|
4155
4155
|
icon?: react__default.ReactNode;
|
|
4156
4156
|
/** Nested children. If present, this node is treated as a parent (branch). */
|
|
4157
4157
|
children?: TreeSelectNode[];
|
|
4158
|
-
/** Render the node disabled
|
|
4158
|
+
/** Render the node disabled, visible but not selectable. */
|
|
4159
4159
|
disabled?: boolean;
|
|
4160
4160
|
}
|
|
4161
4161
|
interface TreeSelectProps {
|
|
@@ -4189,7 +4189,7 @@ interface TreeSelectProps {
|
|
|
4189
4189
|
required?: boolean;
|
|
4190
4190
|
/** Disable interaction and dim the control. */
|
|
4191
4191
|
disabled?: boolean;
|
|
4192
|
-
/** Validation message
|
|
4192
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4193
4193
|
errorMessage?: react__default.ReactNode;
|
|
4194
4194
|
/** Inline style applied to the control shell. */
|
|
4195
4195
|
style?: react__default.CSSProperties;
|
|
@@ -4211,12 +4211,12 @@ interface TreeSelectProps {
|
|
|
4211
4211
|
* parent.
|
|
4212
4212
|
*
|
|
4213
4213
|
* **Keyboard model** (focus is on the trigger or any item):
|
|
4214
|
-
* - `Enter` / `Space` / `↓` / `↑` on the trigger
|
|
4215
|
-
* - `↓` /
|
|
4216
|
-
* -
|
|
4217
|
-
* -
|
|
4218
|
-
* - `Enter` / `Space
|
|
4219
|
-
* - `Esc
|
|
4214
|
+
* - `Enter` / `Space` / `↓` / `↑` on the trigger, open the popover
|
|
4215
|
+
* - `↓` / `↑`, move active item through the visible (un-collapsed) list
|
|
4216
|
+
* - `→`, expand a branch (or move into it if already expanded)
|
|
4217
|
+
* - `←`, collapse a branch (or move to its parent if already collapsed)
|
|
4218
|
+
* - `Enter` / `Space`, select the active item (if selectable)
|
|
4219
|
+
* - `Esc`, close the popover, return focus to the trigger
|
|
4220
4220
|
*
|
|
4221
4221
|
* @example
|
|
4222
4222
|
* ```tsx
|
|
@@ -4264,11 +4264,11 @@ interface FileInputProps {
|
|
|
4264
4264
|
accept?: string;
|
|
4265
4265
|
/** Primary call-to-action copy. Default `'Click to upload or drag and drop'`. */
|
|
4266
4266
|
prompt?: react__default.ReactNode;
|
|
4267
|
-
/** Secondary hint under the prompt
|
|
4267
|
+
/** Secondary hint under the prompt, typically the accepted types / max size. */
|
|
4268
4268
|
hint?: react__default.ReactNode;
|
|
4269
4269
|
/** Maximum file size in bytes. Files above this are rejected with an error. */
|
|
4270
4270
|
maxSize?: number;
|
|
4271
|
-
/** Validation message
|
|
4271
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4272
4272
|
errorMessage?: react__default.ReactNode;
|
|
4273
4273
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4274
4274
|
helperText?: react__default.ReactNode;
|
|
@@ -4324,7 +4324,7 @@ interface DatePickerProps {
|
|
|
4324
4324
|
required?: boolean;
|
|
4325
4325
|
/** Disable interaction and dim the control. */
|
|
4326
4326
|
disabled?: boolean;
|
|
4327
|
-
/** Validation message
|
|
4327
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4328
4328
|
errorMessage?: react__default.ReactNode;
|
|
4329
4329
|
/** Earliest selectable date. Dates before this render disabled. */
|
|
4330
4330
|
min?: Date;
|
|
@@ -4355,12 +4355,12 @@ type TemporalPickerProps = DatePickerProps;
|
|
|
4355
4355
|
* proper row/column context.
|
|
4356
4356
|
*
|
|
4357
4357
|
* **Keyboard model** (focus is anywhere inside the grid):
|
|
4358
|
-
* - `←`
|
|
4359
|
-
* - `↑`
|
|
4360
|
-
* - `PageUp` / `PageDown
|
|
4361
|
-
* - `Home` / `End
|
|
4362
|
-
* - `Enter` / `Space
|
|
4363
|
-
* - `Esc
|
|
4358
|
+
* - `←` `→`, previous / next day
|
|
4359
|
+
* - `↑` `↓`, previous / next week
|
|
4360
|
+
* - `PageUp` / `PageDown`, previous / next month
|
|
4361
|
+
* - `Home` / `End`, first / last day of the current week
|
|
4362
|
+
* - `Enter` / `Space`, select the focused day
|
|
4363
|
+
* - `Esc`, close the popover
|
|
4364
4364
|
*
|
|
4365
4365
|
* @example Required date
|
|
4366
4366
|
* ```tsx
|
|
@@ -4389,7 +4389,7 @@ interface TextAreaProps {
|
|
|
4389
4389
|
value?: string;
|
|
4390
4390
|
/** Fires when the value changes. */
|
|
4391
4391
|
onChange?: react__default.ChangeEventHandler<HTMLTextAreaElement>;
|
|
4392
|
-
/** Blur handler
|
|
4392
|
+
/** Blur handler, useful for touched/validation timing. */
|
|
4393
4393
|
onBlur?: react__default.FocusEventHandler<HTMLTextAreaElement>;
|
|
4394
4394
|
/** Disable interaction and dim the control. */
|
|
4395
4395
|
disabled?: boolean;
|
|
@@ -4403,7 +4403,7 @@ interface TextAreaProps {
|
|
|
4403
4403
|
name?: string;
|
|
4404
4404
|
/** Label/control orientation. Default `'vertical'`. */
|
|
4405
4405
|
layout?: 'horizontal' | 'vertical';
|
|
4406
|
-
/** Size preset
|
|
4406
|
+
/** Size preset, controls text size + padding. Default `'md'`. */
|
|
4407
4407
|
size?: FieldSize;
|
|
4408
4408
|
/** Visible rows when not auto-growing. Default `4`. */
|
|
4409
4409
|
rows?: number;
|
|
@@ -4420,7 +4420,7 @@ interface TextAreaProps {
|
|
|
4420
4420
|
showCount?: boolean;
|
|
4421
4421
|
/** CSS `resize` behaviour. Default `'vertical'` (or `'none'` when autoGrow). */
|
|
4422
4422
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
4423
|
-
/** Validation message
|
|
4423
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4424
4424
|
errorMessage?: react__default.ReactNode;
|
|
4425
4425
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4426
4426
|
helperText?: react__default.ReactNode;
|
|
@@ -4484,7 +4484,7 @@ interface SegmentedControlProps {
|
|
|
4484
4484
|
name?: string;
|
|
4485
4485
|
/** Show a required asterisk after the label. */
|
|
4486
4486
|
required?: boolean;
|
|
4487
|
-
/** Validation message
|
|
4487
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4488
4488
|
errorMessage?: react__default.ReactNode;
|
|
4489
4489
|
/** Accessible label for the control. */
|
|
4490
4490
|
'aria-label'?: string;
|
|
@@ -4552,11 +4552,11 @@ interface SliderProps {
|
|
|
4552
4552
|
marks?: SliderMark[];
|
|
4553
4553
|
/** Show a value tooltip above the thumb while dragging. */
|
|
4554
4554
|
tooltip?: boolean;
|
|
4555
|
-
/** Size preset
|
|
4555
|
+
/** Size preset, controls height, padding, and font. Default 'md'. */
|
|
4556
4556
|
size?: FieldSize;
|
|
4557
4557
|
/** Disable interaction and dim the control. */
|
|
4558
4558
|
disabled?: boolean;
|
|
4559
|
-
/** Validation message
|
|
4559
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4560
4560
|
errorMessage?: react__default.ReactNode;
|
|
4561
4561
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4562
4562
|
helperText?: react__default.ReactNode;
|
|
@@ -4609,11 +4609,11 @@ interface TagsInputProps {
|
|
|
4609
4609
|
placeholder?: string;
|
|
4610
4610
|
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
4611
4611
|
layout?: 'horizontal' | 'vertical';
|
|
4612
|
-
/** Size preset
|
|
4612
|
+
/** Size preset, controls height, padding, and font. Default 'md'. */
|
|
4613
4613
|
size?: FieldSize;
|
|
4614
4614
|
/** Disable interaction and dim the control. */
|
|
4615
4615
|
disabled?: boolean;
|
|
4616
|
-
/** Validation message
|
|
4616
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4617
4617
|
errorMessage?: react__default.ReactNode;
|
|
4618
4618
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4619
4619
|
helperText?: react__default.ReactNode;
|
|
@@ -4666,11 +4666,11 @@ interface OtpInputProps {
|
|
|
4666
4666
|
mode?: 'numeric' | 'alphanumeric';
|
|
4667
4667
|
/** Render boxes as masked dots (for PIN entry). */
|
|
4668
4668
|
masked?: boolean;
|
|
4669
|
-
/** Size preset
|
|
4669
|
+
/** Size preset, controls height, padding, and font. Default 'md'. */
|
|
4670
4670
|
size?: FieldSize;
|
|
4671
4671
|
/** Disable interaction and dim the control. */
|
|
4672
4672
|
disabled?: boolean;
|
|
4673
|
-
/** Validation message
|
|
4673
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4674
4674
|
errorMessage?: react__default.ReactNode;
|
|
4675
4675
|
/** Show a required asterisk after the label. */
|
|
4676
4676
|
required?: boolean;
|
|
@@ -4712,13 +4712,13 @@ interface RatingProps {
|
|
|
4712
4712
|
clearable?: boolean;
|
|
4713
4713
|
/** Field label, placed above (vertical) or beside (horizontal) the control. */
|
|
4714
4714
|
label?: react__default.ReactNode;
|
|
4715
|
-
/** Size preset
|
|
4715
|
+
/** Size preset, controls height, padding, and font. Default 'md'. */
|
|
4716
4716
|
size?: FieldSize;
|
|
4717
4717
|
/** Disable interaction and dim the control. */
|
|
4718
4718
|
disabled?: boolean;
|
|
4719
4719
|
/** Override the icon. Receives a `filled` flag. Default is a star. */
|
|
4720
4720
|
icon?: (filled: boolean) => react__default.ReactNode;
|
|
4721
|
-
/** Validation message
|
|
4721
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4722
4722
|
errorMessage?: react__default.ReactNode;
|
|
4723
4723
|
/** Native form field name (used for FormData serialisation). */
|
|
4724
4724
|
name?: string;
|
|
@@ -4763,7 +4763,7 @@ interface TimePickerProps {
|
|
|
4763
4763
|
placeholder?: string;
|
|
4764
4764
|
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
4765
4765
|
layout?: 'horizontal' | 'vertical';
|
|
4766
|
-
/** Size preset
|
|
4766
|
+
/** Size preset, controls height, padding, and font. Default 'md'. */
|
|
4767
4767
|
size?: FieldSize;
|
|
4768
4768
|
/** Display in 12-hour format with AM/PM (value stays 24h `"HH:mm"`). */
|
|
4769
4769
|
use12Hours?: boolean;
|
|
@@ -4773,7 +4773,7 @@ interface TimePickerProps {
|
|
|
4773
4773
|
minuteStep?: number;
|
|
4774
4774
|
/** Disable interaction and dim the control. */
|
|
4775
4775
|
disabled?: boolean;
|
|
4776
|
-
/** Validation message
|
|
4776
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4777
4777
|
errorMessage?: react__default.ReactNode;
|
|
4778
4778
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4779
4779
|
helperText?: react__default.ReactNode;
|
|
@@ -4818,7 +4818,7 @@ interface DateRangePickerProps {
|
|
|
4818
4818
|
placeholder?: string;
|
|
4819
4819
|
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
4820
4820
|
layout?: 'horizontal' | 'vertical';
|
|
4821
|
-
/** Size preset
|
|
4821
|
+
/** Size preset, controls height, padding, and font. Default 'md'. */
|
|
4822
4822
|
size?: FieldSize;
|
|
4823
4823
|
/** Earliest selectable date. */
|
|
4824
4824
|
min?: Date;
|
|
@@ -4832,7 +4832,7 @@ interface DateRangePickerProps {
|
|
|
4832
4832
|
format?: (d: Date) => string;
|
|
4833
4833
|
/** Disable interaction and dim the control. */
|
|
4834
4834
|
disabled?: boolean;
|
|
4835
|
-
/** Validation message
|
|
4835
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4836
4836
|
errorMessage?: react__default.ReactNode;
|
|
4837
4837
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4838
4838
|
helperText?: react__default.ReactNode;
|
|
@@ -4875,7 +4875,7 @@ interface ColorPickerProps {
|
|
|
4875
4875
|
name?: string;
|
|
4876
4876
|
/** Label/control orientation: 'horizontal' or 'vertical'. */
|
|
4877
4877
|
layout?: 'horizontal' | 'vertical';
|
|
4878
|
-
/** Size preset
|
|
4878
|
+
/** Size preset, controls height, padding, and font. Default 'md'. */
|
|
4879
4879
|
size?: FieldSize;
|
|
4880
4880
|
/** Preset swatches shown in the popover. Defaults to a balanced 12-color set. */
|
|
4881
4881
|
swatches?: string[];
|
|
@@ -4883,7 +4883,7 @@ interface ColorPickerProps {
|
|
|
4883
4883
|
allowCustom?: boolean;
|
|
4884
4884
|
/** Disable interaction and dim the control. */
|
|
4885
4885
|
disabled?: boolean;
|
|
4886
|
-
/** Validation message
|
|
4886
|
+
/** Validation message, shown under the control; also flags it red and sets aria-invalid. */
|
|
4887
4887
|
errorMessage?: react__default.ReactNode;
|
|
4888
4888
|
/** Contextual help revealed via an info icon + tooltip beside the label. */
|
|
4889
4889
|
helperText?: react__default.ReactNode;
|
|
@@ -4910,7 +4910,7 @@ declare function ColorPicker({ value, onChange, label, htmlFor, name, layout, si
|
|
|
4910
4910
|
* Native, dependency-free validation. A field carries one rule or an array of
|
|
4911
4911
|
* rules; rules run in order and the first failure wins. Rules are plain data
|
|
4912
4912
|
* (required / pattern / min / max / length) plus an escape hatch `validate`
|
|
4913
|
-
* for anything custom
|
|
4913
|
+
* for anything custom, including async checks (uniqueness, server lookups) and
|
|
4914
4914
|
* third-party schemas: `validate: (v) => zodSchema.safeParse(v).success ? undefined : 'msg'`.
|
|
4915
4915
|
*/
|
|
4916
4916
|
type FormValues = Record<string, unknown>;
|
|
@@ -4971,7 +4971,7 @@ interface FormStoreOptions {
|
|
|
4971
4971
|
rules?: RulesMap;
|
|
4972
4972
|
/**
|
|
4973
4973
|
* When a field revalidates. `'onSubmit'` is always implied. Default
|
|
4974
|
-
* `['onChange', 'onBlur', 'onSubmit']
|
|
4974
|
+
* `['onChange', 'onBlur', 'onSubmit']`, error appears once a field is
|
|
4975
4975
|
* touched and updates live as the user types.
|
|
4976
4976
|
*/
|
|
4977
4977
|
validateOn?: ValidateTrigger[];
|
|
@@ -4981,7 +4981,7 @@ type ErrorMap = Record<string, string | undefined>;
|
|
|
4981
4981
|
interface FieldSnapshot {
|
|
4982
4982
|
value: unknown;
|
|
4983
4983
|
error: string | undefined;
|
|
4984
|
-
/** touched OR the form was submitted
|
|
4984
|
+
/** touched OR the form was submitted, i.e. "should the error be shown". */
|
|
4985
4985
|
showError: boolean;
|
|
4986
4986
|
}
|
|
4987
4987
|
/**
|
|
@@ -5040,18 +5040,18 @@ declare class FormStore {
|
|
|
5040
5040
|
arrayAppend: (name: string, item?: unknown) => void;
|
|
5041
5041
|
arrayRemove: (name: string, index: number) => void;
|
|
5042
5042
|
arrayMove: (name: string, from: number, to: number) => void;
|
|
5043
|
-
/** Drop any errors/touched flags under `name
|
|
5043
|
+
/** Drop any errors/touched flags under `name.`, used when an array shifts. */
|
|
5044
5044
|
private clearBranch;
|
|
5045
5045
|
}
|
|
5046
5046
|
|
|
5047
5047
|
/**
|
|
5048
5048
|
* How a control reports changes, so one binder can drive any of our inputs:
|
|
5049
|
-
* - `value`
|
|
5049
|
+
* - `value` , `onChange(value)` directly (RadioGroup, Slider, Rating,
|
|
5050
5050
|
* SegmentedControl, TagsInput, OtpInput, DatePicker, ColorPicker…)
|
|
5051
|
-
* - `native`
|
|
5051
|
+
* - `native` , `onChange(e)` reading `e.target.value` (TextInput, Password,
|
|
5052
5052
|
* TextArea, NumberInput, SearchInput)
|
|
5053
|
-
* - `checked
|
|
5054
|
-
* - `target`
|
|
5053
|
+
* - `checked`, `onChange({target:{checked}})` (Switch, Checkbox)
|
|
5054
|
+
* - `target` , `onChange({target:{value}})` (Dropdown, TreeSelect)
|
|
5055
5055
|
*/
|
|
5056
5056
|
type FieldKind = 'value' | 'native' | 'checked' | 'target';
|
|
5057
5057
|
interface FieldBindings {
|
|
@@ -5067,7 +5067,7 @@ interface FieldBindings {
|
|
|
5067
5067
|
}
|
|
5068
5068
|
|
|
5069
5069
|
interface UseFormReturn {
|
|
5070
|
-
/** The underlying store
|
|
5070
|
+
/** The underlying store, pass to `<Form form={...}>` and for imperative use. */
|
|
5071
5071
|
store: FormStore;
|
|
5072
5072
|
values: FormValues;
|
|
5073
5073
|
errors: ErrorMap;
|
|
@@ -5106,7 +5106,7 @@ interface UseFormReturn {
|
|
|
5106
5106
|
* `useFormField` / `<FormField>` instead of reading everything here.
|
|
5107
5107
|
*
|
|
5108
5108
|
* Validation lives at the form level (rules map or per-field `rules` arg), and
|
|
5109
|
-
* the inputs only *receive* their error
|
|
5109
|
+
* the inputs only *receive* their error, they never validate themselves.
|
|
5110
5110
|
*
|
|
5111
5111
|
* @example
|
|
5112
5112
|
* ```tsx
|
|
@@ -5123,7 +5123,7 @@ interface FormProps extends Omit<react__default.FormHTMLAttributes<HTMLFormEleme
|
|
|
5123
5123
|
/** The instance from `useForm()`. */
|
|
5124
5124
|
form: UseFormReturn;
|
|
5125
5125
|
/**
|
|
5126
|
-
* SPA submit handler
|
|
5126
|
+
* SPA submit handler, called with the validated values once all rules
|
|
5127
5127
|
* pass. Receiving this puts the form in client mode (`preventDefault`).
|
|
5128
5128
|
*/
|
|
5129
5129
|
onFinish?: (values: FormValues) => void | Promise<void>;
|
|
@@ -5140,7 +5140,7 @@ interface FormProps extends Omit<react__default.FormHTMLAttributes<HTMLFormEleme
|
|
|
5140
5140
|
}
|
|
5141
5141
|
/**
|
|
5142
5142
|
* Form wrapper. Owns submission: on submit it marks the form submitted, runs
|
|
5143
|
-
* every field's rules, and only then dispatches
|
|
5143
|
+
* every field's rules, and only then dispatches, to `onFinish(values)` in SPA
|
|
5144
5144
|
* mode or to `action` (function or native URL) for SSR. Renders a real
|
|
5145
5145
|
* `<form noValidate>` so our inputs' `name`s serialise into `FormData` while we
|
|
5146
5146
|
* still show our own validation messages.
|
|
@@ -5155,13 +5155,13 @@ declare function Form({ form, onFinish, onFinishFailed, action, children, ...res
|
|
|
5155
5155
|
interface UseFormFieldOptions {
|
|
5156
5156
|
/** How the control reports changes. Default `'value'`. */
|
|
5157
5157
|
kind?: FieldKind;
|
|
5158
|
-
/** Rules for this field
|
|
5158
|
+
/** Rules for this field, registered on the form (and cleaned up on unmount). */
|
|
5159
5159
|
rules?: FieldRules;
|
|
5160
5160
|
}
|
|
5161
5161
|
/**
|
|
5162
5162
|
* Subscribe a single field to the enclosing `<Form>`. Unlike reading bindings
|
|
5163
5163
|
* off `useForm()`, this isolates re-renders to just this field via a memoized
|
|
5164
|
-
* per-field snapshot
|
|
5164
|
+
* per-field snapshot, the right choice for large or dynamic forms. Registering
|
|
5165
5165
|
* `rules` here also unregisters them on unmount, which is what makes field
|
|
5166
5166
|
* arrays validate correctly as rows come and go.
|
|
5167
5167
|
*
|
|
@@ -5188,7 +5188,7 @@ interface FormFieldProps extends UseFormFieldOptions {
|
|
|
5188
5188
|
declare function FormField({ name, kind, rules, children }: FormFieldProps): react_jsx_runtime.JSX.Element;
|
|
5189
5189
|
|
|
5190
5190
|
interface FieldArrayItem {
|
|
5191
|
-
/** Stable React key
|
|
5191
|
+
/** Stable React key, survives reorders and removals. */
|
|
5192
5192
|
key: number;
|
|
5193
5193
|
/** Dotted base path for this row, e.g. `"contacts.2"`. */
|
|
5194
5194
|
name: string;
|
|
@@ -5234,7 +5234,7 @@ type SetValue<T> = (value: T | ((prev: T) => T)) => void;
|
|
|
5234
5234
|
* (the native `storage` event) and **across hook instances in the same tab**
|
|
5235
5235
|
* (a custom event), so two components on the same key stay consistent.
|
|
5236
5236
|
*
|
|
5237
|
-
* @returns `[value, setValue, remove]
|
|
5237
|
+
* @returns `[value, setValue, remove]`, `setValue` accepts a value or an
|
|
5238
5238
|
* updater, like `useState`; `remove` deletes the key and resets to initial.
|
|
5239
5239
|
*
|
|
5240
5240
|
* @example
|
|
@@ -5298,7 +5298,7 @@ interface JwtResult<T> {
|
|
|
5298
5298
|
* re-renders exactly when the token crosses its `exp`, so `isExpired` / `isValid`
|
|
5299
5299
|
* flip on their own without polling.
|
|
5300
5300
|
*
|
|
5301
|
-
* Decodes only
|
|
5301
|
+
* Decodes only, it never verifies the signature. Treat the result as a UI hint;
|
|
5302
5302
|
* real authorization belongs on the server. Pairs with `SecureLayout`.
|
|
5303
5303
|
*
|
|
5304
5304
|
* @example
|
|
@@ -5366,7 +5366,7 @@ interface JumbotronProps {
|
|
|
5366
5366
|
title: react__default.ReactNode;
|
|
5367
5367
|
/** Supporting paragraph under the title. */
|
|
5368
5368
|
description?: react__default.ReactNode;
|
|
5369
|
-
/** Call-to-action row
|
|
5369
|
+
/** Call-to-action row, typically one or two `Button`s. */
|
|
5370
5370
|
actions?: react__default.ReactNode;
|
|
5371
5371
|
/** Media (image / screenshot / illustration). Shown beside the copy in
|
|
5372
5372
|
* `split`, below it in `centered`. */
|
|
@@ -5380,7 +5380,7 @@ interface JumbotronProps {
|
|
|
5380
5380
|
}
|
|
5381
5381
|
/**
|
|
5382
5382
|
* A landing-page hero ("jumbotron"): an eyebrow, a large headline, a supporting
|
|
5383
|
-
* line, and call-to-action buttons
|
|
5383
|
+
* line, and call-to-action buttons, optionally paired with media. `centered`
|
|
5384
5384
|
* stacks everything centred; `split` puts the copy next to the media and stacks
|
|
5385
5385
|
* on small screens. Pair with FeatureGrid / PricingPlans / Testimonials to
|
|
5386
5386
|
* compose a full page.
|
|
@@ -5421,7 +5421,7 @@ interface FeatureGridProps {
|
|
|
5421
5421
|
style?: react__default.CSSProperties;
|
|
5422
5422
|
}
|
|
5423
5423
|
/**
|
|
5424
|
-
* A responsive grid of product features
|
|
5424
|
+
* A responsive grid of product features, icon, title, blurb, with an optional
|
|
5425
5425
|
* section header. Collapses to a single column on mobile.
|
|
5426
5426
|
*
|
|
5427
5427
|
* @example
|
|
@@ -5501,7 +5501,7 @@ interface TestimonialsProps {
|
|
|
5501
5501
|
style?: react__default.CSSProperties;
|
|
5502
5502
|
}
|
|
5503
5503
|
/**
|
|
5504
|
-
* A wall of customer testimonials
|
|
5504
|
+
* A wall of customer testimonials, quote, star rating, and author with avatar.
|
|
5505
5505
|
* Responsive grid (single column on mobile); use `columns={1}` for one centred
|
|
5506
5506
|
* featured quote.
|
|
5507
5507
|
*
|
|
@@ -5626,7 +5626,7 @@ interface BlogPost {
|
|
|
5626
5626
|
date?: react__default.ReactNode;
|
|
5627
5627
|
/** Read time, e.g. `'4 min read'`. */
|
|
5628
5628
|
readTime?: react__default.ReactNode;
|
|
5629
|
-
/** Link target
|
|
5629
|
+
/** Link target, renders the card as an anchor. */
|
|
5630
5630
|
href?: string;
|
|
5631
5631
|
onClick?: () => void;
|
|
5632
5632
|
}
|
|
@@ -5642,7 +5642,7 @@ interface BlogProps {
|
|
|
5642
5642
|
style?: react__default.CSSProperties;
|
|
5643
5643
|
}
|
|
5644
5644
|
/**
|
|
5645
|
-
* A grid of article cards
|
|
5645
|
+
* A grid of article cards, cover image, tag, title, excerpt, and a byline of
|
|
5646
5646
|
* author / date / read-time. Cards link out via `href` or fire `onClick`.
|
|
5647
5647
|
*
|
|
5648
5648
|
* @example
|
|
@@ -5654,7 +5654,7 @@ declare function Blog({ posts, eyebrow, title, description, columns, centeredHea
|
|
|
5654
5654
|
|
|
5655
5655
|
type SocialPlatform = 'x' | 'twitter' | 'github' | 'linkedin' | 'youtube' | 'instagram' | 'facebook' | 'mastodon' | 'email' | 'website';
|
|
5656
5656
|
interface SocialLink {
|
|
5657
|
-
/** Known platform
|
|
5657
|
+
/** Known platform, supplies the icon + default label. */
|
|
5658
5658
|
platform?: SocialPlatform;
|
|
5659
5659
|
href: string;
|
|
5660
5660
|
/** Accessible label / tooltip. Falls back to the platform name. */
|
|
@@ -5751,7 +5751,7 @@ interface LeadCaptureProps {
|
|
|
5751
5751
|
style?: react__default.CSSProperties;
|
|
5752
5752
|
}
|
|
5753
5753
|
/**
|
|
5754
|
-
* A footer call-to-action band with an inline email-capture form
|
|
5754
|
+
* A footer call-to-action band with an inline email-capture form, title,
|
|
5755
5755
|
* supporting copy, an email field, and a submit button. Shows a confirmation in
|
|
5756
5756
|
* place of the form once submitted.
|
|
5757
5757
|
*
|
|
@@ -5767,7 +5767,7 @@ declare function LeadCapture({ title, description, placeholder, inputLabel, butt
|
|
|
5767
5767
|
|
|
5768
5768
|
/**
|
|
5769
5769
|
* Zero-dependency credit-card helpers: brand detection, Luhn checksum, and
|
|
5770
|
-
* display formatting. Pure functions
|
|
5770
|
+
* display formatting. Pure functions, no React, no deps, so they're unit
|
|
5771
5771
|
* testable and reusable.
|
|
5772
5772
|
*/
|
|
5773
5773
|
interface CardBrand {
|
|
@@ -5794,7 +5794,7 @@ declare const CARD_BRANDS: CardBrand[];
|
|
|
5794
5794
|
declare const onlyDigits: (s: string) => string;
|
|
5795
5795
|
/** Detect the card brand from a (possibly partial) number. `null` if unknown. */
|
|
5796
5796
|
declare function detectBrand(value: string): CardBrand | null;
|
|
5797
|
-
/** Luhn (mod-10) checksum
|
|
5797
|
+
/** Luhn (mod-10) checksum, the standard card-number integrity check. */
|
|
5798
5798
|
declare function luhnValid(value: string): boolean;
|
|
5799
5799
|
/** Format a card number with brand-aware grouping (e.g. `4242 4242 4242 4242`). */
|
|
5800
5800
|
declare function formatCardNumber(value: string): string;
|