@mirror-physics/fractal-ui 0.2.0-next.78 → 0.2.0-next.80

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/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ import { ClassValue } from 'clsx';
4
4
  export { ColumnEditor, ColumnEditorItem, ColumnEditorProps } from './column-editor.cjs';
5
5
 
6
6
  /** Shared density scale for single-line controls and their labels. */
7
- type ControlSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ type ControlSize = 'sm' | 'md' | 'lg' | 'xl';
8
8
 
9
9
  type ButtonType = 'primary' | 'secondary' | 'ghost' | 'danger';
10
10
  type ButtonSize = ControlSize;
@@ -16,7 +16,7 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
16
16
  controlSize?: ControlSize;
17
17
  /** Backward-compatible alias for controlSize. */
18
18
  buttonSize?: ButtonSize;
19
- /** Color theme — maps to the design system's color scales. */
19
+ /** Explicit primary color preset. Omit to inherit the application's primary tokens. */
20
20
  color?: ButtonColor;
21
21
  /** Icon element. */
22
22
  icon?: React.ReactNode;
@@ -107,6 +107,8 @@ declare const PromptGrid: React.ForwardRefExoticComponent<PromptGridProps & Reac
107
107
  interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
108
108
  /** Visual density; native `size` still controls the character-width hint. */
109
109
  controlSize?: ControlSize;
110
+ /** Persistent title that floats into the border on focus or when filled. Search uses it only as an accessible name. */
111
+ fieldLabel?: string;
110
112
  }
111
113
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
112
114
 
@@ -288,9 +290,18 @@ interface DropdownItem {
288
290
  }
289
291
  interface DropdownProps {
290
292
  items: DropdownItem[];
291
- selectedValue: string;
292
- onSelect: (value: string) => void;
293
+ selectedValue?: string;
294
+ onSelect?: (value: string) => void;
295
+ /** Checkbox-style options that remain open after selection. */
296
+ multiple?: boolean;
297
+ selectedValues?: string[];
298
+ onSelectionChange?: (values: string[]) => void;
299
+ searchable?: boolean;
300
+ searchPlaceholder?: string;
301
+ emptyMessage?: string;
293
302
  triggerLabel?: string;
303
+ /** Floating field title. Empty selectedValue is the unfilled state. */
304
+ fieldLabel?: string;
294
305
  direction?: 'up' | 'down' | 'left' | 'right';
295
306
  /** Preferred alignment; shifted as needed to stay inside visible bounds. */
296
307
  align?: 'left' | 'right';
@@ -318,7 +329,7 @@ interface DropdownProps {
318
329
  closeOnSelect?: boolean;
319
330
  disabled?: boolean;
320
331
  }
321
- declare function Dropdown({ items, selectedValue, onSelect, triggerLabel, direction, align, maxHeight, collisionPadding, triggerOrientation, triggerContent, label, iconOnly, noChevron, size: sizeAlias, controlSize, triggerId, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, disabled, }: DropdownProps): React.JSX.Element | null;
332
+ declare function Dropdown({ items, selectedValue, onSelect, multiple, selectedValues, onSelectionChange, searchable, searchPlaceholder, emptyMessage, triggerLabel, fieldLabel, direction, align, maxHeight, collisionPadding, triggerOrientation, triggerContent, label, iconOnly, noChevron, size: sizeAlias, controlSize, triggerId, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, disabled, }: DropdownProps): React.JSX.Element | null;
322
333
 
323
334
  type LinkTheme = 'default' | 'muted' | 'accent';
324
335
  type LinkSize = 'sm' | 'md' | 'lg';
@@ -634,6 +645,10 @@ interface SidePanelProps {
634
645
  declare function SidePanel({ open, onClose, title, description, children, footer, size, loading, loadingLabel, className }: SidePanelProps): React.ReactPortal | null;
635
646
 
636
647
  interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
648
+ /** Persistent title: starts on the first line, floats into the border on focus or when filled. */
649
+ fieldLabel?: string;
650
+ /** Prose uses the input font; source preserves the existing monospace treatment. */
651
+ textStyle?: 'prose' | 'source';
637
652
  }
638
653
  declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
639
654
 
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { ClassValue } from 'clsx';
4
4
  export { ColumnEditor, ColumnEditorItem, ColumnEditorProps } from './column-editor.js';
5
5
 
6
6
  /** Shared density scale for single-line controls and their labels. */
7
- type ControlSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ type ControlSize = 'sm' | 'md' | 'lg' | 'xl';
8
8
 
9
9
  type ButtonType = 'primary' | 'secondary' | 'ghost' | 'danger';
10
10
  type ButtonSize = ControlSize;
@@ -16,7 +16,7 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
16
16
  controlSize?: ControlSize;
17
17
  /** Backward-compatible alias for controlSize. */
18
18
  buttonSize?: ButtonSize;
19
- /** Color theme — maps to the design system's color scales. */
19
+ /** Explicit primary color preset. Omit to inherit the application's primary tokens. */
20
20
  color?: ButtonColor;
21
21
  /** Icon element. */
22
22
  icon?: React.ReactNode;
@@ -107,6 +107,8 @@ declare const PromptGrid: React.ForwardRefExoticComponent<PromptGridProps & Reac
107
107
  interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
108
108
  /** Visual density; native `size` still controls the character-width hint. */
109
109
  controlSize?: ControlSize;
110
+ /** Persistent title that floats into the border on focus or when filled. Search uses it only as an accessible name. */
111
+ fieldLabel?: string;
110
112
  }
111
113
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
112
114
 
@@ -288,9 +290,18 @@ interface DropdownItem {
288
290
  }
289
291
  interface DropdownProps {
290
292
  items: DropdownItem[];
291
- selectedValue: string;
292
- onSelect: (value: string) => void;
293
+ selectedValue?: string;
294
+ onSelect?: (value: string) => void;
295
+ /** Checkbox-style options that remain open after selection. */
296
+ multiple?: boolean;
297
+ selectedValues?: string[];
298
+ onSelectionChange?: (values: string[]) => void;
299
+ searchable?: boolean;
300
+ searchPlaceholder?: string;
301
+ emptyMessage?: string;
293
302
  triggerLabel?: string;
303
+ /** Floating field title. Empty selectedValue is the unfilled state. */
304
+ fieldLabel?: string;
294
305
  direction?: 'up' | 'down' | 'left' | 'right';
295
306
  /** Preferred alignment; shifted as needed to stay inside visible bounds. */
296
307
  align?: 'left' | 'right';
@@ -318,7 +329,7 @@ interface DropdownProps {
318
329
  closeOnSelect?: boolean;
319
330
  disabled?: boolean;
320
331
  }
321
- declare function Dropdown({ items, selectedValue, onSelect, triggerLabel, direction, align, maxHeight, collisionPadding, triggerOrientation, triggerContent, label, iconOnly, noChevron, size: sizeAlias, controlSize, triggerId, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, disabled, }: DropdownProps): React.JSX.Element | null;
332
+ declare function Dropdown({ items, selectedValue, onSelect, multiple, selectedValues, onSelectionChange, searchable, searchPlaceholder, emptyMessage, triggerLabel, fieldLabel, direction, align, maxHeight, collisionPadding, triggerOrientation, triggerContent, label, iconOnly, noChevron, size: sizeAlias, controlSize, triggerId, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, disabled, }: DropdownProps): React.JSX.Element | null;
322
333
 
323
334
  type LinkTheme = 'default' | 'muted' | 'accent';
324
335
  type LinkSize = 'sm' | 'md' | 'lg';
@@ -634,6 +645,10 @@ interface SidePanelProps {
634
645
  declare function SidePanel({ open, onClose, title, description, children, footer, size, loading, loadingLabel, className }: SidePanelProps): React.ReactPortal | null;
635
646
 
636
647
  interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
648
+ /** Persistent title: starts on the first line, floats into the border on focus or when filled. */
649
+ fieldLabel?: string;
650
+ /** Prose uses the input font; source preserves the existing monospace treatment. */
651
+ textStyle?: 'prose' | 'source';
637
652
  }
638
653
  declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
639
654