@passui/react 0.1.19 → 0.1.21

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.
Files changed (84) hide show
  1. package/README.md +38 -0
  2. package/THIRD_PARTY_NOTICES.md +25 -0
  3. package/dist/types/src/components/accordion/accordion.d.ts +19 -0
  4. package/dist/types/src/components/aspect-ratio/aspect-ratio.d.ts +7 -0
  5. package/dist/types/src/components/breadcrumb/breadcrumb.d.ts +16 -0
  6. package/dist/types/src/components/button/button.d.ts +2 -0
  7. package/dist/types/src/components/code-block/code-block.d.ts +10 -0
  8. package/dist/types/src/components/combo-box/combo-box.d.ts +9 -0
  9. package/dist/types/src/components/command/command.d.ts +18 -0
  10. package/dist/types/src/components/content-unavailable-view/content-unavailable-view.d.ts +9 -0
  11. package/dist/types/src/components/context-menu/context-menu-store.d.ts +2 -2
  12. package/dist/types/src/components/context-menu/menu-reveal.d.ts +3 -8
  13. package/dist/types/src/components/dialog/dialog-store.d.ts +3 -1
  14. package/dist/types/src/components/disclosure-group/disclosure-group.d.ts +3 -1
  15. package/dist/types/src/components/keyboard-shortcut/keyboard-shortcut.d.ts +5 -0
  16. package/dist/types/src/components/menu/menu.d.ts +1 -1
  17. package/dist/types/src/components/one-time-code/one-time-code.d.ts +23 -0
  18. package/dist/types/src/components/picker/picker.d.ts +7 -1
  19. package/dist/types/src/components/popover/anchored-surface.d.ts +13 -0
  20. package/dist/types/src/components/popover/popover.d.ts +5 -1
  21. package/dist/types/src/components/progress-view/progress-view.d.ts +1 -1
  22. package/dist/types/src/components/progress-view/use-liquid-progress.d.ts +3 -0
  23. package/dist/types/src/components/radio-group/radio-group.d.ts +17 -0
  24. package/dist/types/src/components/search-field/expanding-search-field.d.ts +5 -0
  25. package/dist/types/src/components/search-field/search-field.d.ts +5 -1
  26. package/dist/types/src/components/sheet/sheet.d.ts +2 -0
  27. package/dist/types/src/components/sidebar/sidebar.d.ts +3 -2
  28. package/dist/types/src/components/skeleton/skeleton.d.ts +6 -0
  29. package/dist/types/src/components/slosh-slider/liquid-step.d.ts +6 -0
  30. package/dist/types/src/components/slosh-slider/slosh-slider.d.ts +18 -0
  31. package/dist/types/src/components/stepper/rolling-digit.d.ts +11 -0
  32. package/dist/types/src/components/text-field/text-field.d.ts +3 -1
  33. package/dist/types/src/components/wake-slider/wake-slider.d.ts +12 -0
  34. package/dist/types/src/hooks/use-anchored-disclosure.d.ts +9 -0
  35. package/dist/types/src/hooks/use-anchored-placement.d.ts +1 -1
  36. package/dist/types/src/index.d.ts +13 -0
  37. package/dist/types/src/lib/anchored-placement.d.ts +2 -2
  38. package/package.json +60 -4
  39. package/src/components/accordion/accordion.tsx +48 -0
  40. package/src/components/aspect-ratio/aspect-ratio.tsx +22 -0
  41. package/src/components/breadcrumb/breadcrumb.tsx +53 -0
  42. package/src/components/button/button.tsx +5 -1
  43. package/src/components/code-block/code-block.tsx +41 -0
  44. package/src/components/combo-box/combo-box.tsx +13 -0
  45. package/src/components/command/command.tsx +119 -0
  46. package/src/components/compact-date-picker/compact-date-picker.tsx +40 -84
  47. package/src/components/compact-time-picker/compact-time-picker.tsx +44 -81
  48. package/src/components/content-unavailable-view/content-unavailable-view.tsx +37 -0
  49. package/src/components/context-menu/context-menu-host.tsx +28 -24
  50. package/src/components/context-menu/context-menu-store.ts +3 -4
  51. package/src/components/context-menu/menu-reveal.ts +5 -2
  52. package/src/components/dialog/dialog-host.tsx +13 -7
  53. package/src/components/dialog/dialog-store.ts +15 -4
  54. package/src/components/disclosure-group/disclosure-group.tsx +19 -10
  55. package/src/components/keyboard-shortcut/keyboard-shortcut.tsx +17 -0
  56. package/src/components/menu/menu.tsx +1 -1
  57. package/src/components/one-time-code/one-time-code.tsx +198 -0
  58. package/src/components/picker/picker.tsx +121 -108
  59. package/src/components/popover/anchored-surface.tsx +223 -0
  60. package/src/components/popover/popover.tsx +149 -20
  61. package/src/components/progress-view/progress-view.tsx +6 -1
  62. package/src/components/progress-view/use-liquid-progress.ts +43 -0
  63. package/src/components/radio-group/radio-group.tsx +63 -0
  64. package/src/components/search-field/expanding-search-field.tsx +183 -0
  65. package/src/components/search-field/search-field.tsx +41 -25
  66. package/src/components/search-list/search-list.tsx +16 -7
  67. package/src/components/sheet/sheet.tsx +4 -1
  68. package/src/components/sidebar/sidebar.tsx +21 -12
  69. package/src/components/skeleton/skeleton.tsx +19 -0
  70. package/src/components/slosh-slider/liquid-step.ts +42 -0
  71. package/src/components/slosh-slider/slosh-slider.tsx +251 -0
  72. package/src/components/stepper/rolling-digit.tsx +77 -0
  73. package/src/components/stepper/stepper.tsx +50 -29
  74. package/src/components/text-field/text-field.tsx +45 -7
  75. package/src/components/toggle/toggle.tsx +147 -30
  76. package/src/components/wake-slider/wake-slider.tsx +237 -0
  77. package/src/hooks/use-anchored-disclosure.ts +23 -0
  78. package/src/hooks/use-anchored-placement.ts +7 -4
  79. package/src/icons/icons.tsx +150 -150
  80. package/src/index.ts +18 -0
  81. package/src/lib/anchored-placement.ts +7 -3
  82. package/src/styles/code-block.css +33 -0
  83. package/src/styles/motion-controls.css +189 -0
  84. package/src/styles/styles.css +3 -0
package/README.md CHANGED
@@ -183,3 +183,41 @@ your user npm configuration.
183
183
  ## License
184
184
 
185
185
  [MIT](./LICENSE)
186
+
187
+ ### Documentation and loading primitives
188
+
189
+ Import `Accordion`, `ComboBox`, `RadioGroup`, `Breadcrumb`, `Skeleton`,
190
+ `ContentUnavailableView`, `CodeBlock` and `KeyboardShortcut` from their kebab case
191
+ subpaths, such as `@passui/react/combo-box`. Each has a named props type and
192
+ interactive documentation. CodeBlock accepts plain source and optionally a
193
+ highlighter element, keeping syntax engines out of the library dependency graph.
194
+ Shared component styles come from the stylesheet import above.
195
+
196
+ Stepper places the spoken and rolling value beside its two action segments.
197
+ Its digit columns preserve carries and stop animating under Reduce Motion.
198
+ Compact desktop rows retain larger targets for coarse pointers. Import only
199
+ needed controls and icons through public entries; CSS is preserved while unused
200
+ JavaScript exports can be removed by the bundler.
201
+
202
+ ### Search, selection and motion
203
+
204
+ `ComboBox` is a searchable `Picker` with optional `onCreate` and a localized
205
+ `createLabel`. `Command` composes grouped search actions; `CommandDialog` adds
206
+ modal focus handling. Shortcut hints are display only; your application owns the
207
+ actual keyboard bindings. Picker, compact calendar and time panels share one
208
+ glass surface that expands from its trigger and restores it after dismissal.
209
+
210
+ `TextField` and `SecureField` accept `labelPlacement="floating"`. SearchField
211
+ supports `collapsible` for a single pill that expands around its search icon.
212
+ `OneTimeCode` draws cells around one native input, preserving paste and code
213
+ autofill. Your application owns verification and supplies status feedback.
214
+
215
+ `SloshSlider` and `WakeSlider` take `label`, optional `value` or `defaultValue`,
216
+ and `onChange`. Values run from 0 to 100. Their React-only motion stops at rest
217
+ and respects Reduce Motion. Slosh has `viscosity`, `momentum` and `tilt`; Wake
218
+ has `bars` and `wake`. Their source attribution and MIT notice are included in
219
+ [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). ProgressView remains read only
220
+ and shares the liquid fill without acquiring slider behavior.
221
+
222
+ `AspectRatio` clips images and videos to `ratio` without distorting them. The
223
+ documentation demonstrates equal-area crops in a stable stage.
@@ -0,0 +1,25 @@
1
+ # Bencho interaction sources
2
+
3
+ SloshSlider and WakeSlider adapt sources supplied from [Bencho](https://bencho.dev/),
4
+ provided under the [MIT licence](https://bencho.dev/licence). Motion comments and
5
+ attribution are retained; Passui adds its own tokens, component API and accessibility.
6
+
7
+ ## MIT License — Bencho
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from "react";
2
+ export interface AccordionItem {
3
+ /** Stable value used to identify the expanded item. */
4
+ value: string;
5
+ title: string;
6
+ content: ReactNode;
7
+ description?: string;
8
+ disabled?: boolean;
9
+ }
10
+ export interface AccordionProps {
11
+ items: readonly AccordionItem[];
12
+ /** The expanded item, or `null` when all items are closed. */
13
+ value: string | null;
14
+ /** Selecting the open item reports `null`, so every item can collapse. */
15
+ onValueChange: (value: string | null) => void;
16
+ className?: string;
17
+ }
18
+ /** A single-open, collapsible accordion with labelled animated content regions. */
19
+ export declare function Accordion({ items, value, onValueChange, className }: AccordionProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface AspectRatioProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Width divided by height. @default 1.3333333333333333 */
4
+ ratio?: number;
5
+ }
6
+ /** A crop frame: size its geometry, while images cover without distortion. */
7
+ export declare function AspectRatio({ ratio, className, style, ...props }: AspectRatioProps): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from "react";
2
+ export interface BreadcrumbItem {
3
+ label: string;
4
+ href?: string;
5
+ }
6
+ export interface BreadcrumbProps {
7
+ label: string;
8
+ items: readonly BreadcrumbItem[];
9
+ className?: string;
10
+ /** Integrate a client router without nesting interactive elements. */
11
+ renderLink?: (item: BreadcrumbItem & {
12
+ href: string;
13
+ }) => ReactNode;
14
+ }
15
+ /** Ancestors stay links; the final item identifies the current page. */
16
+ export declare function Breadcrumb({ label, items, className, renderLink }: BreadcrumbProps): import("react").JSX.Element;
@@ -23,6 +23,8 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
23
23
  * @default false
24
24
  */
25
25
  isPending?: boolean;
26
+ /** Layout classes for the content wrapper, such as a full-width disclosure row. */
27
+ contentClassName?: string;
26
28
  }
27
29
  /** Shares native button appearance with semantic links without nesting a button. */
28
30
  export declare function buttonStyle({ variant, size, className, }?: Pick<ButtonProps, "variant" | "size" | "className">): string;
@@ -0,0 +1,10 @@
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ export interface CodeBlockProps extends Omit<ComponentProps<"div">, "children"> {
3
+ code: string;
4
+ /** Supply a highlighter's rendered pre/code element; source remains the fallback. */
5
+ children?: ReactNode;
6
+ /** Show a nonselectable line gutter. @default true */
7
+ lineNumbers?: boolean;
8
+ }
9
+ /** Code presentation without shipping a highlighter or formatter to consumers. */
10
+ export declare function CodeBlock({ code, children, lineNumbers, className, ...props }: CodeBlockProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type PickerOption, type PickerProps } from "../picker/picker";
2
+ export interface ComboBoxOption<T extends string> extends PickerOption<T> {
3
+ }
4
+ export interface ComboBoxProps<T extends string> extends Omit<PickerProps<T>, "searchable" | "options"> {
5
+ options: readonly ComboBoxOption<T>[];
6
+ emptyLabel: string;
7
+ }
8
+ /** A searchable Picker, with optional creation from the person's typed query. */
9
+ export declare function ComboBox<T extends string>(props: ComboBoxProps<T>): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type ComponentProps } from "react";
2
+ import { KeyboardShortcut } from "../keyboard-shortcut/keyboard-shortcut";
3
+ import { SearchList, SearchListField, SearchListResults, SearchListEmpty, SearchListGroup, SearchListItem } from "../search-list/search-list";
4
+ import { type SheetProps } from "../sheet/sheet";
5
+ export interface CommandProps extends ComponentProps<typeof SearchList> {
6
+ }
7
+ export interface CommandDialogProps extends Omit<SheetProps, "placement"> {
8
+ }
9
+ /** An inline command palette. SearchList owns filtering and keyboard selection. */
10
+ export declare function Command({ className, ...props }: CommandProps): import("react").JSX.Element;
11
+ /** A modal command palette with Sheet's focus isolation and restoration. */
12
+ export declare function CommandDialog({ children, className, ...props }: CommandDialogProps): import("react").JSX.Element;
13
+ export declare function CommandInput({ className, autoFocus, ref: forwardedRef, ...props }: ComponentProps<typeof SearchListField>): import("react").JSX.Element;
14
+ export declare function CommandList({ className, ...props }: ComponentProps<typeof SearchListResults>): import("react").JSX.Element;
15
+ export declare function CommandEmpty({ className, ...props }: ComponentProps<typeof SearchListEmpty>): import("react").JSX.Element;
16
+ export declare function CommandShortcut({ className, ...props }: ComponentProps<typeof KeyboardShortcut>): import("react").JSX.Element;
17
+ export declare function CommandGroup({ className, ...props }: ComponentProps<typeof SearchListGroup>): import("react").JSX.Element;
18
+ export declare function CommandItem({ className, ...props }: ComponentProps<typeof SearchListItem>): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode, ComponentProps } from "react";
2
+ export interface ContentUnavailableViewProps extends Omit<ComponentProps<"div">, "title"> {
3
+ title: string;
4
+ description?: string;
5
+ icon?: ReactNode;
6
+ actions?: ReactNode;
7
+ }
8
+ /** A focused empty or unavailable state with an optional next action. */
9
+ export declare function ContentUnavailableView({ title, description, icon, actions, className, ...props }: ContentUnavailableViewProps): import("react").JSX.Element;
@@ -41,8 +41,8 @@ export declare function openContextMenu(x: number, y: number, items: ContextMenu
41
41
  */
42
42
  export declare function openFollowUpMenu(items: ContextMenuItem[]): void;
43
43
  /**
44
- * Opens a menu from a control, the way a SwiftUI `Menu` does: under it (or
45
- * above it), lined up with its leading or trailing edge. Leading and
44
+ * Expands a control into a menu, lined up with its leading or trailing
45
+ * edge and growing down (or up) from the control's bounds. Leading and
46
46
  * trailing follow the text direction, so right-to-left languages mirror.
47
47
  * The menu's real size decides where it goes; nothing is guessed.
48
48
  */
@@ -5,14 +5,9 @@ export type MenuRect = {
5
5
  height: number;
6
6
  };
7
7
  /** Animate the material's bounds independently so menu text never stretches. */
8
- export declare function menuSurfaceReveal(source: MenuRect | undefined, target: MenuRect): {
9
- x: number;
10
- y: number;
11
- width: number;
12
- height: number;
13
- opacity: number;
14
- borderRadius: string;
15
- } | {
8
+ export declare function menuSurfaceReveal(source: MenuRect | undefined, target: MenuRect & {
9
+ radius?: number;
10
+ }): {
16
11
  x: number;
17
12
  y: number;
18
13
  width: number;
@@ -16,6 +16,8 @@ export interface PendingDialog extends ConfirmOptions {
16
16
  resolve: (confirmed: boolean) => void;
17
17
  }
18
18
  export declare function confirmDialog(options: ConfirmOptions): Promise<boolean>;
19
- export declare function settleDialog(confirmed: boolean): void;
19
+ export declare function settleDialog(confirmed: boolean, id?: number): void;
20
+ /** Advance queued confirmations only after the dismissed card has exited. */
21
+ export declare function advanceDialogQueue(): void;
20
22
  export declare function subscribeDialogs(listener: () => void): () => void;
21
23
  export declare function getDialog(): PendingDialog | null;
@@ -6,8 +6,10 @@ export interface DisclosureGroupProps {
6
6
  children: ReactNode;
7
7
  disabled?: boolean;
8
8
  className?: string;
9
+ /** Trigger layout when composed inside a shared surface such as Accordion. */
10
+ triggerClassName?: string;
9
11
  /** Supporting text beneath the title. */
10
12
  description?: string;
11
13
  }
12
14
  /** A controlled, accessible disclosure row with the shared inline reveal. */
13
- export declare function DisclosureGroup({ label, open, onOpenChange, children, disabled, className, description, }: DisclosureGroupProps): import("react").JSX.Element;
15
+ export declare function DisclosureGroup({ label, open, onOpenChange, children, disabled, className, triggerClassName, description, }: DisclosureGroupProps): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ComponentProps } from "react";
2
+ export interface KeyboardShortcutProps extends ComponentProps<"kbd"> {
3
+ }
4
+ /** A quiet keycap for a shortcut supplied and localized by the application. */
5
+ export declare function KeyboardShortcut({ className, ...props }: KeyboardShortcutProps): import("react").JSX.Element;
@@ -9,7 +9,7 @@ export interface MenuProps extends Omit<ButtonProps, "onClick" | "children"> {
9
9
  children: ReactNode;
10
10
  /** Logical edge used to align the menu, including RTL. @default "leading" */
11
11
  edge?: ContextMenuEdge;
12
- /** Open above the trigger instead of below it. @default false */
12
+ /** Expand upward from the trigger instead of downward. @default false */
13
13
  above?: boolean;
14
14
  }
15
15
  /** A declarative menu button using the same native host as context menus. */
@@ -0,0 +1,23 @@
1
+ import { type InputHTMLAttributes, type Ref } from "react";
2
+ export type OneTimeCodeStatus = "idle" | "verifying" | "success" | "error";
3
+ export type OneTimeCodeFormat = "numeric" | "alphanumeric";
4
+ export interface OneTimeCodeProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "type" | "maxLength" | "size"> {
5
+ label: string;
6
+ value: string;
7
+ onChange: (value: string) => void;
8
+ /** Called when a complete code is entered, including paste and autofill. */
9
+ onComplete?: (value: string) => void;
10
+ /** Number of characters, 3–8. @default 6 */
11
+ length?: number;
12
+ /** Accepted characters. Alphanumeric codes use uppercase ASCII letters and digits. @default "numeric" */
13
+ format?: OneTimeCodeFormat;
14
+ /** Ref to the single native input, for focus and selection. */
15
+ ref?: Ref<HTMLInputElement>;
16
+ status?: OneTimeCodeStatus;
17
+ /** Localized verification feedback announced without reading decorative cells. */
18
+ statusLabel?: string;
19
+ }
20
+ /** Normalize common numeric keyboards and optional ASCII letters in one native field. */
21
+ export declare function normalizeCode(value: string, length: number, format?: OneTimeCodeFormat): string;
22
+ /** Six cells, one field: paste, autofill, selection and Backspace stay native. */
23
+ export declare function OneTimeCode({ label, value, onChange, onComplete, length, format, ref, status, statusLabel, className, disabled, id: suppliedId, ...props }: OneTimeCodeProps): import("react").JSX.Element;
@@ -2,6 +2,8 @@ export interface PickerOption<T extends string> {
2
2
  value: T;
3
3
  label: string;
4
4
  /** A quieter second line or trailing note, such as "Free" or a region. */
5
+ disabled?: boolean;
6
+ keywords?: string[];
5
7
  detail?: string;
6
8
  /** The option's own language, so it is spoken and shaped right. */
7
9
  lang?: string;
@@ -24,6 +26,10 @@ export interface PickerProps<T extends string> {
24
26
  searchPlaceholder?: string;
25
27
  /** Shown when the filter matches nothing. @default "No matches" */
26
28
  emptyLabel?: string;
29
+ /** Offers a new value when no option has the same label or value. */
30
+ onCreate?: (query: string) => void;
31
+ /** Localized creation action; receives the trimmed query. */
32
+ createLabel?: (query: string) => string;
27
33
  className?: string;
28
34
  /** Prevents opening or choosing an option. @default false */
29
35
  disabled?: boolean;
@@ -34,4 +40,4 @@ export interface PickerProps<T extends string> {
34
40
  * lists. Replaces the browser's own select, which looks foreign on every
35
41
  * platform.
36
42
  */
37
- export declare function Picker<T extends string>({ value, options, onChange, label, placeholder, searchable, searchPlaceholder, emptyLabel, className, disabled, }: PickerProps<T>): import("react").JSX.Element;
43
+ export declare function Picker<T extends string>({ value, options, onChange, label, placeholder, searchable, searchPlaceholder, emptyLabel, className, onCreate, createLabel, disabled, }: PickerProps<T>): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { type HTMLAttributes } from "react";
2
+ interface AnchoredSurfaceProps extends HTMLAttributes<HTMLDivElement> {
3
+ open: boolean;
4
+ onExited: () => void;
5
+ anchor: HTMLElement;
6
+ width: number;
7
+ needed: number;
8
+ onClose: (restoreFocus: boolean) => void;
9
+ contentClassName?: string;
10
+ }
11
+ /** Shared material and lifetime for portaled pickers; their content owns selection. */
12
+ export declare const AnchoredSurface: import("react").ForwardRefExoticComponent<AnchoredSurfaceProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ export {};
@@ -1,9 +1,13 @@
1
1
  import { type HTMLMotionProps } from "motion/react";
2
+ import { type ReactNode, type RefObject } from "react";
2
3
  export type PopoverOrigin = "top-left" | "top-right";
3
- export interface PopoverProps extends HTMLMotionProps<"div"> {
4
+ export interface PopoverProps extends Omit<HTMLMotionProps<"div">, "children"> {
4
5
  open: boolean;
6
+ children?: ReactNode;
5
7
  /** Which corner the popover grows from. */
6
8
  origin?: PopoverOrigin;
9
+ /** Trigger whose shape the popover uses during its opening and closing motion. */
10
+ anchorRef?: RefObject<HTMLElement | null>;
7
11
  }
8
12
  /**
9
13
  * A glass surface that springs open from its anchor. Position it with
@@ -1,4 +1,4 @@
1
- import type { HTMLAttributes } from "react";
1
+ import { type HTMLAttributes } from "react";
2
2
  export type ProgressViewSize = "sm" | "md" | "lg";
3
3
  export interface ProgressViewProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
4
4
  label: string;
@@ -0,0 +1,3 @@
1
+ import { type RefObject } from "react";
2
+ /** Read-only progress shares the liquid fill without acquiring slider semantics. */
3
+ export declare function useLiquidProgress(ref: RefObject<HTMLDivElement | null>, target: number | undefined): void;
@@ -0,0 +1,17 @@
1
+ export interface RadioGroupOption<T extends string> {
2
+ value: T;
3
+ label: string;
4
+ description?: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface RadioGroupProps<T extends string> {
8
+ value: T;
9
+ onChange: (value: NoInfer<T>) => void;
10
+ label: string;
11
+ options: readonly RadioGroupOption<T>[];
12
+ disabled?: boolean;
13
+ name?: string;
14
+ className?: string;
15
+ }
16
+ /** A labelled choice group using the browser's native radio keyboard behavior. */
17
+ export declare function RadioGroup<T extends string>({ value, onChange, label, options, disabled, name, className, }: RadioGroupProps<T>): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { type InputHTMLAttributes, type Ref } from "react";
2
+ /** One object: the field stays inside the pill, and the lens never moves within it. */
3
+ export declare function ExpandingSearchField({ inputRef, className, placeholder, ...props }: InputHTMLAttributes<HTMLInputElement> & {
4
+ inputRef: Ref<HTMLInputElement>;
5
+ }): import("react").JSX.Element;
@@ -1,2 +1,6 @@
1
1
  import { type InputHTMLAttributes } from "react";
2
- export declare const SearchField: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
2
+ export interface SearchFieldProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ /** Expand a single pill from its search icon on focus. @default false */
4
+ collapsible?: boolean;
5
+ }
6
+ export declare const SearchField: import("react").ForwardRefExoticComponent<SearchFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -5,6 +5,8 @@ export interface SheetProps {
5
5
  open: boolean;
6
6
  /** Called on Escape or an outside press. */
7
7
  onClose: () => void;
8
+ /** Allow tapping the backdrop to close. Escape still calls onClose. @default true */
9
+ dismissOnOutsidePress?: boolean;
8
10
  /** Read out by screen readers as the sheet's name. */
9
11
  label: string;
10
12
  /** ID of a visible heading to use instead of label for the accessible name. */
@@ -5,7 +5,7 @@ export interface SidebarSectionProps {
5
5
  children: ReactNode;
6
6
  }
7
7
  export interface SidebarItemContentProps {
8
- icon: ReactNode;
8
+ icon?: ReactNode;
9
9
  /** Optional trailing count. */
10
10
  count?: number;
11
11
  /** Matches the router link's active state. */
@@ -14,5 +14,6 @@ export interface SidebarItemContentProps {
14
14
  }
15
15
  export declare function SidebarSection({ title, children }: SidebarSectionProps): import("react").JSX.Element;
16
16
  /** Classes for a sidebar row; apply to the app's router link. */
17
- export declare function sidebarItemClass(active?: boolean): string;
17
+ export type SidebarDensity = "regular" | "compact";
18
+ export declare function sidebarItemClass(active?: boolean, density?: SidebarDensity): string;
18
19
  export declare function SidebarItemContent({ icon, count, active, children }: SidebarItemContentProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { ComponentProps } from "react";
2
+ export interface SkeletonProps extends ComponentProps<"div"> {
3
+ label?: string;
4
+ }
5
+ /** A loading placeholder that becomes still when Reduce Motion is enabled. */
6
+ export declare function Skeleton({ label, className, ...props }: SkeletonProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface LiquidState {
2
+ fill: number;
3
+ velocity: number;
4
+ }
5
+ /** Bencho's frame-normalized liquid spring. See THIRD_PARTY_NOTICES.md. */
6
+ export declare function stepLiquid(state: LiquidState, target: number, viscosity: number, dt: number): LiquidState;
@@ -0,0 +1,18 @@
1
+ export interface SloshSliderProps {
2
+ label: string;
3
+ value?: number;
4
+ defaultValue?: number;
5
+ onChange?: (value: number) => void;
6
+ /** 0 is rigid; 100 is loose liquid. @default 15 */
7
+ viscosity?: number;
8
+ /** How far the handle coasts after release, 0–100. @default 55 */
9
+ momentum?: number;
10
+ /** Lean of the liquid's leading edge, 0–100. @default 45 */
11
+ tilt?: number;
12
+ /** Track corner, from square to a pill, 0–20. @default 20 */
13
+ corner?: number;
14
+ disabled?: boolean;
15
+ className?: string;
16
+ formatValue?: (value: number) => string;
17
+ }
18
+ export declare function SloshSlider({ label, value, defaultValue, onChange, viscosity, momentum, tilt, corner, disabled, className, formatValue, }: SloshSliderProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ /** Counts at a place retain carries: the tens column of 1284 targets 128. */
2
+ export declare function digitAt(count: number): number;
3
+ export declare function advanceDigit(position: number, velocity: number, target: number, frames: number): {
4
+ position: number;
5
+ velocity: number;
6
+ };
7
+ /** Three recycled cells keep the strip continuous through either side of zero. */
8
+ export declare function RollingDigit({ count, place }: {
9
+ count: number;
10
+ place: number;
11
+ }): import("react").JSX.Element;
@@ -14,5 +14,7 @@ export type TextFieldProps = ComponentProps<"input"> & {
14
14
  show: string;
15
15
  hide: string;
16
16
  };
17
+ /** Float the label into the outline on focus or when filled. @default "above" */
18
+ labelPlacement?: "above" | "floating";
17
19
  };
18
- export declare function TextField({ label, description, errors, icon, trailingIcon, action, revealLabels, type, id: suppliedId, className, ...props }: TextFieldProps): import("react").JSX.Element;
20
+ export declare function TextField({ label, description, errors, icon, trailingIcon, action, revealLabels, labelPlacement, placeholder, type, id: suppliedId, className, ...props }: TextFieldProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ export interface WakeSliderProps {
2
+ label: string;
3
+ value?: number;
4
+ defaultValue?: number;
5
+ onChange?: (value: number) => void;
6
+ bars?: number;
7
+ wake?: number;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ formatValue?: (value: number) => string;
11
+ }
12
+ export declare function WakeSlider({ label, value: controlledValue, defaultValue, onChange, disabled, className, formatValue, bars, wake, }: WakeSliderProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /** Keep the panel mounted until its material has returned to the trigger. */
2
+ export declare function useAnchoredDisclosure(disabled?: boolean): {
3
+ open: boolean;
4
+ mounted: boolean;
5
+ show: () => void;
6
+ toggle: () => void;
7
+ close: () => void;
8
+ onExited: () => void;
9
+ };
@@ -4,4 +4,4 @@ import { type AnchoredPlacement } from "../lib/anchored-placement";
4
4
  * keeps it there: re-places while the viewport resizes or anything
5
5
  * scrolls, so it never hangs off the screen.
6
6
  */
7
- export declare function useAnchoredPlacement(anchor: HTMLElement, width: number, needed: number): AnchoredPlacement;
7
+ export declare function useAnchoredPlacement(anchor: HTMLElement, width: number, needed: number, overlap?: boolean): AnchoredPlacement;
@@ -1,4 +1,5 @@
1
1
  export * from "./components/button/button";
2
+ export * from "./components/accordion/accordion";
2
3
  export * from "./components/text-field/text-field";
3
4
  export * from "./components/secure-field/secure-field";
4
5
  export * from "./components/text-editor/text-editor";
@@ -56,3 +57,15 @@ export type { StatTileTone } from "./components/stat-tile/stat-tile";
56
57
  export * from "./hooks/use-visual-viewport";
57
58
  export { registerFloatingLayer } from "./lib/floating-layers";
58
59
  export * from "./hooks/use-minimize-on-scroll";
60
+ export * from "./components/code-block/code-block";
61
+ export * from "./components/keyboard-shortcut/keyboard-shortcut";
62
+ export * from "./components/content-unavailable-view/content-unavailable-view";
63
+ export * from "./components/combo-box/combo-box";
64
+ export * from "./components/radio-group/radio-group";
65
+ export * from "./components/breadcrumb/breadcrumb";
66
+ export * from "./components/skeleton/skeleton";
67
+ export * from "./components/command/command";
68
+ export * from "./components/slosh-slider/slosh-slider";
69
+ export * from "./components/wake-slider/wake-slider";
70
+ export * from "./components/one-time-code/one-time-code";
71
+ export * from "./components/aspect-ratio/aspect-ratio";
@@ -34,6 +34,6 @@ export interface PlacementFrame {
34
34
  * less than `needed` height below and more room above, kept inside the
35
35
  * screen's safe edges.
36
36
  */
37
- export declare function placeInViewport({ anchor, viewport, edges }: PlacementFrame, width: number, needed: number, gap?: number): AnchoredPlacement;
37
+ export declare function placeInViewport({ anchor, viewport, edges }: PlacementFrame, width: number, needed: number, gap?: number, overlap?: boolean): AnchoredPlacement;
38
38
  /** `placeInViewport` from live DOM measurements. */
39
- export declare function placeAnchored(anchor: HTMLElement, width: number, needed: number, gap?: number): AnchoredPlacement;
39
+ export declare function placeAnchored(anchor: HTMLElement, width: number, needed: number, gap?: number, overlap?: boolean): AnchoredPlacement;