@enonic/ui 1.5.0 → 1.7.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.
Files changed (73) hide show
  1. package/README.md +18 -6
  2. package/dist/enonic-ui.cjs +1 -1
  3. package/dist/enonic-ui.es.js +135 -131
  4. package/dist/style.cjs +1 -1
  5. package/dist/style.es.js +1 -1
  6. package/dist/styles/style.css +2 -2
  7. package/dist/types/components/avatar/avatar.d.ts +18 -13
  8. package/dist/types/components/button/button.d.ts +6 -3
  9. package/dist/types/components/checkbox/checkbox.d.ts +25 -3
  10. package/dist/types/components/combobox/combobox.d.ts +23 -14
  11. package/dist/types/components/context-menu/context-menu.d.ts +78 -37
  12. package/dist/types/components/date-picker/date-picker.d.ts +36 -23
  13. package/dist/types/components/dialog/dialog-actions.d.ts +16 -1
  14. package/dist/types/components/dialog/dialog.d.ts +81 -44
  15. package/dist/types/components/grid-list/grid-list.d.ts +102 -12
  16. package/dist/types/components/icon-button/icon-button.d.ts +6 -5
  17. package/dist/types/components/input/input.d.ts +28 -6
  18. package/dist/types/components/link/link.d.ts +7 -3
  19. package/dist/types/components/listbox/listbox.d.ts +5 -3
  20. package/dist/types/components/menu/menu.d.ts +52 -25
  21. package/dist/types/components/menubar/menubar.d.ts +94 -33
  22. package/dist/types/components/radio-group/radio-group.d.ts +30 -12
  23. package/dist/types/components/search-field/search-field.d.ts +5 -5
  24. package/dist/types/components/selectable-list-item/selectable-list-item.d.ts +1 -1
  25. package/dist/types/components/selector/selector.d.ts +72 -36
  26. package/dist/types/components/stepper/index.d.ts +1 -1
  27. package/dist/types/components/stepper/stepper.d.ts +66 -18
  28. package/dist/types/components/tab/tab.d.ts +97 -21
  29. package/dist/types/components/tab/tab.phrases.d.ts +4 -0
  30. package/dist/types/components/tag/tag.d.ts +29 -24
  31. package/dist/types/components/textarea/textarea.d.ts +34 -3
  32. package/dist/types/components/time-picker/time-picker.d.ts +26 -19
  33. package/dist/types/components/toast/toast.d.ts +29 -25
  34. package/dist/types/components/toggle/toggle.d.ts +5 -3
  35. package/dist/types/components/toggle-group/toggle-group.d.ts +6 -9
  36. package/dist/types/components/toolbar/toolbar-toggle-group.d.ts +10 -12
  37. package/dist/types/components/toolbar/toolbar.d.ts +29 -21
  38. package/dist/types/components/tooltip/tooltip.d.ts +13 -1
  39. package/dist/types/components/tree-list/tree-list.d.ts +255 -62
  40. package/dist/types/components/virtualized-tree-list/virtualized-tree-list.d.ts +90 -43
  41. package/dist/types/hooks/use-active-item-focus.d.ts +1 -1
  42. package/dist/types/hooks/use-active-on-open.d.ts +1 -1
  43. package/dist/types/hooks/use-click-outside.d.ts +2 -2
  44. package/dist/types/hooks/use-floating-position.d.ts +2 -2
  45. package/dist/types/hooks/use-focus-outside.d.ts +9 -0
  46. package/dist/types/hooks/use-pointer-position.d.ts +1 -1
  47. package/dist/types/hooks/use-portal-focus-container.d.ts +6 -2
  48. package/dist/types/hooks/use-radio-navigation.d.ts +1 -1
  49. package/dist/types/hooks/use-scroll-active-into-view.d.ts +1 -1
  50. package/dist/types/hooks/use-step-navigation.d.ts +1 -1
  51. package/dist/types/hooks/use-submenu-safe-area.d.ts +1 -1
  52. package/dist/types/hooks/use-sync-value.d.ts +1 -1
  53. package/dist/types/i18n/phrases.d.ts +3 -0
  54. package/dist/types/primitives/menu-primitive/menu-primitive.d.ts +41 -20
  55. package/dist/types/providers/combobox-provider.d.ts +5 -5
  56. package/dist/types/providers/context-menu-content-provider.d.ts +1 -0
  57. package/dist/types/providers/context-menu-provider.d.ts +4 -5
  58. package/dist/types/providers/context-menu-sub-provider.d.ts +3 -3
  59. package/dist/types/providers/date-picker-provider.d.ts +2 -2
  60. package/dist/types/providers/dialog-provider.d.ts +6 -5
  61. package/dist/types/providers/focus-container-provider.d.ts +4 -2
  62. package/dist/types/providers/menu-provider.d.ts +2 -1
  63. package/dist/types/providers/menubar-menu-provider.d.ts +4 -4
  64. package/dist/types/providers/menubar-provider.d.ts +1 -1
  65. package/dist/types/providers/search-field-provider.d.ts +1 -1
  66. package/dist/types/providers/selector-provider.d.ts +1 -1
  67. package/dist/types/providers/stepper-provider.d.ts +2 -0
  68. package/dist/types/providers/time-picker-provider.d.ts +3 -3
  69. package/dist/types/providers/toolbar-provider.d.ts +1 -1
  70. package/dist/types/types/lucide.d.ts +9 -5
  71. package/dist/types/utils/dom.d.ts +23 -1
  72. package/dist/types/utils/unwrap.d.ts +1 -1
  73. package/package.json +32 -37
@@ -51,9 +51,11 @@ export declare const Listbox: {
51
51
  ({ baseId, selection: controlledSelection, defaultSelection, onSelectionChange, active: controlledActive, defaultActive, setActive, selectionMode, focusMode, disabled, children, keyHandler, registerItem: externalRegisterItem, unregisterItem: externalUnregisterItem, getItems: externalGetItems, isItemDisabled: externalIsItemDisabled, autoActiveOnOpen, }: ListboxRootProps): ReactElement;
52
52
  displayName: string;
53
53
  };
54
- Content: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<ListboxContentProps> & {
55
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
56
- }>;
54
+ Content: import('react').ForwardRefExoticComponent<{
55
+ className?: string;
56
+ label?: string;
57
+ children?: ReactNode;
58
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
57
59
  Item: {
58
60
  ({ value, disabled, children, className, ...props }: ListboxItemProps): ReactElement;
59
61
  displayName: string;
@@ -20,7 +20,7 @@ export type MenuPortalProps = {
20
20
  export type MenuContentProps = {
21
21
  forceMount?: boolean;
22
22
  loop?: boolean;
23
- onEscapeKeyDown?: (event: KeyboardEvent) => void;
23
+ onEscapeKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
24
24
  onPointerDownOutside?: (event: PointerEvent) => void;
25
25
  onInteractOutside?: (event: Event) => void;
26
26
  className?: string;
@@ -66,32 +66,59 @@ export declare const Menu: {
66
66
  ({ open: controlledOpen, defaultOpen, onOpenChange, children, }: MenuRootProps): ReactElement;
67
67
  displayName: string;
68
68
  };
69
- Trigger: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuTriggerProps> & {
70
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
71
- }>;
69
+ Trigger: import('react').ForwardRefExoticComponent<{
70
+ asChild?: boolean;
71
+ className?: string;
72
+ children: ReactNode;
73
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
72
74
  Portal: {
73
75
  ({ container, forceMount, children }: MenuPortalProps): ReactElement | null;
74
76
  displayName: string;
75
77
  };
76
- Content: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuContentProps> & {
77
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
78
- }>;
79
- Item: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuItemOwnProps> & {
80
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
81
- }>;
82
- Label: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuPrimitiveLabelProps> & {
83
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
84
- }>;
85
- Separator: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuPrimitiveSeparatorProps> & {
86
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
87
- }>;
88
- RadioGroup: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuRadioGroupOwnProps> & {
89
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
90
- }>;
91
- RadioItem: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuRadioItemOwnProps> & {
92
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
93
- }>;
94
- ItemIndicator: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuPrimitiveItemIndicatorProps> & {
95
- ref?: import('preact').Ref<HTMLSpanElement> | undefined;
96
- }>;
78
+ Content: import('react').ForwardRefExoticComponent<{
79
+ forceMount?: boolean;
80
+ loop?: boolean;
81
+ onEscapeKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
82
+ onPointerDownOutside?: (event: PointerEvent) => void;
83
+ onInteractOutside?: (event: Event) => void;
84
+ className?: string;
85
+ children?: ReactNode;
86
+ } & FloatingProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
87
+ Item: import('react').ForwardRefExoticComponent<{
88
+ id?: string;
89
+ asChild?: boolean;
90
+ disabled?: boolean;
91
+ onSelect?: (event: Event) => void;
92
+ className?: string;
93
+ children: ReactNode;
94
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & import('react').RefAttributes<HTMLDivElement>>;
95
+ Label: import('react').ForwardRefExoticComponent<{
96
+ className?: string;
97
+ children: ReactNode;
98
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
99
+ Separator: import('react').ForwardRefExoticComponent<{
100
+ className?: string;
101
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
102
+ RadioGroup: import('react').ForwardRefExoticComponent<{
103
+ value?: string;
104
+ defaultValue?: string;
105
+ onValueChange?: (value: string) => void;
106
+ closeOnSelect?: boolean;
107
+ className?: string;
108
+ children?: ReactNode;
109
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
110
+ RadioItem: import('react').ForwardRefExoticComponent<{
111
+ id?: string;
112
+ value: string;
113
+ asChild?: boolean;
114
+ disabled?: boolean;
115
+ onSelect?: (event: Event) => void;
116
+ className?: string;
117
+ children: ReactNode;
118
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & import('react').RefAttributes<HTMLDivElement>>;
119
+ ItemIndicator: import('react').ForwardRefExoticComponent<{
120
+ forceMount?: boolean;
121
+ className?: string;
122
+ children?: ReactNode;
123
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
97
124
  };
@@ -81,7 +81,7 @@ export type MenubarButtonProps = {
81
81
  asChild?: boolean;
82
82
  className?: string;
83
83
  children: ReactNode;
84
- } & Omit<ComponentPropsWithoutRef<'button'>, 'id' | 'children'>;
84
+ } & Omit<ComponentPropsWithoutRef<'button'>, 'id' | 'children' | 'onSelect'>;
85
85
  /**
86
86
  * A visual separator component that adapts based on context.
87
87
  *
@@ -286,7 +286,7 @@ export type MenubarItemProps = {
286
286
  asChild?: boolean;
287
287
  className?: string;
288
288
  children: ReactNode;
289
- } & Omit<ComponentPropsWithoutRef<'div'>, 'id' | 'children'>;
289
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'id' | 'children' | 'onSelect'>;
290
290
  /**
291
291
  * A non-interactive label for grouping items within a menubar dropdown.
292
292
  *
@@ -385,7 +385,7 @@ export type MenubarRadioItemProps = {
385
385
  asChild?: boolean;
386
386
  className?: string;
387
387
  children: ReactNode;
388
- } & Omit<ComponentPropsWithoutRef<'div'>, 'id' | 'children'>;
388
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'id' | 'children' | 'onSelect'>;
389
389
  /**
390
390
  * Indicator component that conditionally renders when its parent radio item is checked.
391
391
  *
@@ -418,42 +418,103 @@ export declare const Menubar: {
418
418
  ({ defaultActive, onActiveChange, id, children }: MenubarRootProps): ReactElement;
419
419
  displayName: string;
420
420
  };
421
- Nav: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarNavProps> & {
422
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
423
- }>;
424
- Content: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarContentProps> & {
425
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
426
- }>;
427
- Button: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarButtonProps> & {
428
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
429
- }>;
430
- Separator: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarSeparatorProps> & {
431
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
432
- }>;
421
+ Nav: import('react').ForwardRefExoticComponent<{
422
+ /** Accessible label for the menubar (required for screen readers) */
423
+ 'aria-label': string;
424
+ /** Whether navigation should loop from last to first item */
425
+ loop?: boolean;
426
+ className?: string;
427
+ children?: ReactNode;
428
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
429
+ Content: import('react').ForwardRefExoticComponent<{
430
+ /** Whether navigation should loop from last to first item */
431
+ loop?: boolean;
432
+ /** Keep content mounted in DOM even when menu is closed */
433
+ forceMount?: boolean;
434
+ /** Callback when Escape key is pressed */
435
+ onEscapeKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
436
+ /** Callback when pointer clicks outside the menu */
437
+ onPointerDownOutside?: (event: PointerEvent) => void;
438
+ /** Callback when any outside interaction occurs */
439
+ onInteractOutside?: (event: Event) => void;
440
+ className?: string;
441
+ children?: ReactNode;
442
+ } & FloatingProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
443
+ Button: import('react').ForwardRefExoticComponent<{
444
+ /** Unique ID for this button (auto-generated if not provided) */
445
+ id?: string;
446
+ /** Whether the button is disabled */
447
+ disabled?: boolean;
448
+ /** Callback when the button is selected (clicked or activated via keyboard) */
449
+ onSelect?: (event: Event) => void;
450
+ /** Render as a child element using Radix UI Slot */
451
+ asChild?: boolean;
452
+ className?: string;
453
+ children: ReactNode;
454
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "onSelect" | "id"> & import('react').RefAttributes<HTMLButtonElement>>;
455
+ Separator: import('react').ForwardRefExoticComponent<{
456
+ className?: string;
457
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
433
458
  Menu: {
434
459
  ({ id: providedId, disabled, children }: MenubarMenuProps): ReactElement;
435
460
  displayName: string;
436
461
  };
437
- Trigger: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarTriggerProps> & {
438
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
439
- }>;
462
+ Trigger: import('react').ForwardRefExoticComponent<{
463
+ /** Render as a child element using Radix UI Slot */
464
+ asChild?: boolean;
465
+ className?: string;
466
+ children: ReactNode;
467
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & import('react').RefAttributes<HTMLButtonElement>>;
440
468
  Portal: {
441
469
  ({ container, forceMount, children }: MenubarPortalProps): ReactElement | null;
442
470
  displayName: string;
443
471
  };
444
- Item: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarItemProps> & {
445
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
446
- }>;
447
- Label: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenuPrimitiveLabelProps> & {
448
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
449
- }>;
450
- RadioGroup: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarRadioGroupProps> & {
451
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
452
- }>;
453
- RadioItem: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarRadioItemProps> & {
454
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
455
- }>;
456
- ItemIndicator: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MenubarItemIndicatorProps> & {
457
- ref?: import('preact').Ref<HTMLSpanElement> | undefined;
458
- }>;
472
+ Item: import('react').ForwardRefExoticComponent<{
473
+ /** Unique ID for this item (auto-generated if not provided) */
474
+ id?: string;
475
+ /** Whether the item is disabled */
476
+ disabled?: boolean;
477
+ /** Callback when the item is selected (clicked or activated via keyboard) */
478
+ onSelect?: (event: Event) => void;
479
+ /** Render as a child element using Radix UI Slot */
480
+ asChild?: boolean;
481
+ className?: string;
482
+ children: ReactNode;
483
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "onSelect" | "id"> & import('react').RefAttributes<HTMLDivElement>>;
484
+ Label: import('react').ForwardRefExoticComponent<{
485
+ className?: string;
486
+ children: ReactNode;
487
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
488
+ RadioGroup: import('react').ForwardRefExoticComponent<{
489
+ /** Controlled selected value */
490
+ value?: string;
491
+ /** Default selected value (uncontrolled) */
492
+ defaultValue?: string;
493
+ /** Callback when selection changes */
494
+ onValueChange?: (value: string) => void;
495
+ /** Whether to close the menu after a radio item is selected */
496
+ closeOnSelect?: boolean;
497
+ className?: string;
498
+ children?: ReactNode;
499
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
500
+ RadioItem: import('react').ForwardRefExoticComponent<{
501
+ /** Unique ID for this item (auto-generated if not provided) */
502
+ id?: string;
503
+ /** Value identifier for this radio option (required) */
504
+ value: string;
505
+ /** Whether the item is disabled */
506
+ disabled?: boolean;
507
+ /** Callback when the item is selected (optional) */
508
+ onSelect?: (event: Event) => void;
509
+ /** Render as a child element using Radix UI Slot */
510
+ asChild?: boolean;
511
+ className?: string;
512
+ children: ReactNode;
513
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "onSelect" | "id"> & import('react').RefAttributes<HTMLDivElement>>;
514
+ ItemIndicator: import('react').ForwardRefExoticComponent<{
515
+ /** Force mount the indicator even when unchecked (for animation purposes) */
516
+ forceMount?: boolean;
517
+ className?: string;
518
+ children?: ReactNode;
519
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
459
520
  };
@@ -18,16 +18,34 @@ export type RadioGroupItemProps = {
18
18
  disabled?: boolean;
19
19
  } & Omit<ComponentPropsWithoutRef<'button'>, 'id' | 'disabled' | 'onClick'>;
20
20
  export type RadioGroupIndicatorProps = LucideProps;
21
- export declare const RadioGroup: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<RadioGroupRootProps> & {
22
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
23
- }> & {
24
- Root: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<RadioGroupRootProps> & {
25
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
26
- }>;
27
- Item: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<RadioGroupItemProps> & {
28
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
29
- }>;
30
- Indicator: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<LucideProps> & {
31
- ref?: import('preact').Ref<SVGSVGElement> | undefined;
32
- }>;
21
+ export declare const RadioGroup: import('react').ForwardRefExoticComponent<{
22
+ name: string;
23
+ value?: string;
24
+ defaultValue?: string;
25
+ onValueChange?: (value: string) => void;
26
+ orientation?: "horizontal" | "vertical";
27
+ loop?: boolean;
28
+ required?: boolean;
29
+ error?: boolean;
30
+ errorMessage?: string;
31
+ children?: ReactNode;
32
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & import('react').RefAttributes<HTMLDivElement>> & {
33
+ Root: import('react').ForwardRefExoticComponent<{
34
+ name: string;
35
+ value?: string;
36
+ defaultValue?: string;
37
+ onValueChange?: (value: string) => void;
38
+ orientation?: "horizontal" | "vertical";
39
+ loop?: boolean;
40
+ required?: boolean;
41
+ error?: boolean;
42
+ errorMessage?: string;
43
+ children?: ReactNode;
44
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & import('react').RefAttributes<HTMLDivElement>>;
45
+ Item: import('react').ForwardRefExoticComponent<{
46
+ value: string;
47
+ children: ReactNode;
48
+ disabled?: boolean;
49
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "id" | "onClick" | "disabled"> & import('react').RefAttributes<HTMLButtonElement>>;
50
+ Indicator: import('react').ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
33
51
  };
@@ -16,7 +16,9 @@ export type SearchFieldIconProps = {
16
16
  className?: string;
17
17
  } & ComponentPropsWithoutRef<typeof Search>;
18
18
  export type SearchFieldInputProps = ComponentPropsWithoutRef<'input'>;
19
- export type SearchFieldClearProps = Omit<ComponentPropsWithoutRef<typeof IconButton>, 'icon' | 'onClick'>;
19
+ export type SearchFieldClearProps = {
20
+ 'aria-label'?: string;
21
+ } & Omit<ComponentPropsWithoutRef<typeof IconButton>, 'icon' | 'onClick' | 'aria-label'>;
20
22
  export declare const SearchField: {
21
23
  ({ id, value, defaultValue, onChange, placeholder, clearLabel, disabled, readOnly, children, className, ...props }: SearchFieldRootProps): ReactElement;
22
24
  displayName: string;
@@ -29,11 +31,9 @@ export declare const SearchField: {
29
31
  ({ className, ...props }: SearchFieldIconProps): ReactElement;
30
32
  displayName: string;
31
33
  };
32
- Input: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SearchFieldInputProps> & {
33
- ref?: import('preact').Ref<HTMLInputElement> | undefined;
34
- }>;
34
+ Input: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
35
35
  Clear: {
36
- ({ className, ...props }: SearchFieldClearProps): ReactElement | null;
36
+ ({ "aria-label": ariaLabel, className, ...props }: SearchFieldClearProps): ReactElement | null;
37
37
  displayName: string;
38
38
  };
39
39
  };
@@ -4,7 +4,7 @@ import { ReactElement, ReactNode } from 'react';
4
4
  export type SelectableListItemProps = {
5
5
  children?: ReactNode;
6
6
  readOnly?: boolean;
7
- } & Pick<ListItemDefaultContentProps, 'label' | 'description' | 'metadata' | 'icon'> & Pick<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange'> & Omit<ListItemProps, 'children'>;
7
+ } & Pick<ListItemDefaultContentProps, 'label' | 'description' | 'metadata' | 'icon'> & Pick<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange'> & Omit<ListItemProps, 'children' | 'defaultChecked'>;
8
8
  export declare const SelectableListItem: {
9
9
  ({ className, selected, children, label, description, metadata, icon, readOnly, checked, defaultChecked, onCheckedChange, ...props }: SelectableListItemProps): ReactElement;
10
10
  displayName: string;
@@ -94,40 +94,76 @@ export declare const Selector: {
94
94
  ({ children, value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, disabled, error, required, name, form, }: SelectorRootProps): ReactElement;
95
95
  displayName: string;
96
96
  };
97
- Trigger: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorTriggerProps> & {
98
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
99
- }>;
100
- Value: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorValueProps> & {
101
- ref?: import('preact').Ref<HTMLSpanElement> | undefined;
102
- }>;
103
- Icon: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorIconProps> & {
104
- ref?: import('preact').Ref<HTMLSpanElement> | undefined;
105
- }>;
106
- Content: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorContentProps> & {
107
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
108
- }>;
109
- Viewport: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorViewportProps> & {
110
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
111
- }>;
112
- Item: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorItemProps> & {
113
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
114
- }>;
115
- ItemText: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorItemTextProps> & {
116
- ref?: import('preact').Ref<HTMLSpanElement> | undefined;
117
- }>;
118
- ItemIndicator: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorItemIndicatorProps> & {
119
- ref?: import('preact').Ref<HTMLSpanElement> | undefined;
120
- }>;
121
- Group: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorGroupProps> & {
122
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
123
- }>;
124
- Label: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorLabelProps> & {
125
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
126
- }>;
127
- Separator: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorSeparatorProps> & {
128
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
129
- }>;
130
- HiddenSelect: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectorHiddenSelectProps> & {
131
- ref?: import('preact').Ref<HTMLSelectElement> | undefined;
132
- }>;
97
+ Trigger: import('react').ForwardRefExoticComponent<{
98
+ className?: string;
99
+ children?: ReactNode;
100
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & import('react').RefAttributes<HTMLButtonElement>>;
101
+ Value: import('react').ForwardRefExoticComponent<{
102
+ className?: string;
103
+ placeholder?: string;
104
+ /**
105
+ * Content to display for the selected value.
106
+ * Can be a render function `(value: string) => ReactNode` for dynamic display text,
107
+ * or a static ReactNode. If not provided, falls back to raw value.
108
+ *
109
+ * **Recommended**: Use a render function to display proper labels instead of raw values.
110
+ * This ensures the correct text is shown even before the dropdown is opened.
111
+ *
112
+ * @example
113
+ * ```tsx
114
+ * // Render function (recommended)
115
+ * <Selector.Value placeholder="Select...">
116
+ * {(value) => items.find(i => i.value === value)?.label}
117
+ * </Selector.Value>
118
+ *
119
+ * // Falls back to raw value when no children provided
120
+ * <Selector.Value placeholder="Select..." />
121
+ * ```
122
+ */
123
+ children?: ReactNode | ((value: string) => ReactNode);
124
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "children"> & import('react').RefAttributes<HTMLSpanElement>>;
125
+ Icon: import('react').ForwardRefExoticComponent<{
126
+ className?: string;
127
+ children?: ReactNode;
128
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
129
+ Content: import('react').ForwardRefExoticComponent<{
130
+ className?: string;
131
+ children?: ReactNode;
132
+ /** Whether to render in a portal. Defaults to true. Set to false when used inside another portaled component (e.g., DatePicker/TimePicker inside Dialog). */
133
+ portal?: boolean;
134
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
135
+ onPointerDownOutside?: (event: PointerEvent) => void;
136
+ onInteractOutside?: (event: Event) => void;
137
+ } & FloatingProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
138
+ Viewport: import('react').ForwardRefExoticComponent<{
139
+ className?: string;
140
+ children?: ReactNode;
141
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
142
+ Item: import('react').ForwardRefExoticComponent<{
143
+ value: string;
144
+ disabled?: boolean;
145
+ textValue?: string;
146
+ className?: string;
147
+ children: ReactNode;
148
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & import('react').RefAttributes<HTMLDivElement>>;
149
+ ItemText: import('react').ForwardRefExoticComponent<{
150
+ className?: string;
151
+ children?: ReactNode;
152
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
153
+ ItemIndicator: import('react').ForwardRefExoticComponent<{
154
+ className?: string;
155
+ children?: ReactNode;
156
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
157
+ Group: import('react').ForwardRefExoticComponent<{
158
+ className?: string;
159
+ children?: ReactNode;
160
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
161
+ Label: import('react').ForwardRefExoticComponent<{
162
+ className?: string;
163
+ children?: ReactNode;
164
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
165
+ Separator: import('react').ForwardRefExoticComponent<{
166
+ className?: string;
167
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
168
+ HiddenSelect: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref"> & import('react').RefAttributes<HTMLSelectElement>>;
133
169
  };
@@ -1,2 +1,2 @@
1
1
  export type { StepperDotsProps, StepperNextProps, StepperPanelProps, StepperPreviousProps, StepperRootProps, } from './stepper';
2
- export { Stepper } from './stepper';
2
+ export { getStepperPanelId, Stepper } from './stepper';
@@ -1,4 +1,6 @@
1
1
  import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
2
+ /** DOM id of a `Stepper.Panel`, so a wrapper can find the active panel through its context. */
3
+ export declare const getStepperPanelId: (baseId: string, itemId: string) => string;
2
4
  export type StepperRootProps = {
3
5
  /** Render without wrapper div (for composition with other components) */
4
6
  asFragment?: boolean;
@@ -15,6 +17,16 @@ export type StepperRootProps = {
15
17
  /** Callback when value changes */
16
18
  onValueChange?: (value: string) => void;
17
19
  } & Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue'>;
20
+ /**
21
+ * Focus after `Stepper.Next` / `Stepper.Previous` lands on the first `[data-autofocus]` element in
22
+ * the new panel — the consumer marks the target, the stepper owns the timing. Without a marker,
23
+ * focus stays on the button, except when that button is about to disable (first / last step):
24
+ * there the first focusable element in the panel takes it, so focus is not lost.
25
+ *
26
+ * Not triggered by `Stepper.Dots` (focus stays on the dot so arrow keys keep working) nor by a
27
+ * controlled `value` change made outside Next / Previous. The marker is read once, right after
28
+ * navigation: a step whose fields render after an async load focuses from its own load effect.
29
+ */
18
30
  export type StepperPanelProps = {
19
31
  /** Value that identifies this panel */
20
32
  value: string;
@@ -37,22 +49,58 @@ export type StepperNextProps = {
37
49
  asChild?: boolean;
38
50
  children: ReactNode;
39
51
  } & ComponentPropsWithoutRef<'button'>;
40
- export declare const Stepper: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<StepperRootProps> & {
41
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
42
- }> & {
43
- Root: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<StepperRootProps> & {
44
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
45
- }>;
46
- Panel: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<StepperPanelProps> & {
47
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
48
- }>;
49
- Dots: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<StepperDotsProps> & {
50
- ref?: import('preact').Ref<HTMLDivElement> | undefined;
51
- }>;
52
- Previous: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<StepperPreviousProps> & {
53
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
54
- }>;
55
- Next: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<StepperNextProps> & {
56
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
57
- }>;
52
+ export declare const Stepper: import('react').ForwardRefExoticComponent<{
53
+ /** Render without wrapper div (for composition with other components) */
54
+ asFragment?: boolean;
55
+ /** Controlled value */
56
+ value?: string;
57
+ /** Default value for uncontrolled mode */
58
+ defaultValue?: string;
59
+ /** The maximum number of dots to show */
60
+ maxVisible?: number;
61
+ /** If the dots on edges are smaller than the other dots */
62
+ smallOnEdges?: boolean;
63
+ /** Content */
64
+ children?: ReactNode;
65
+ /** Callback when value changes */
66
+ onValueChange?: (value: string) => void;
67
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & import('react').RefAttributes<HTMLDivElement>> & {
68
+ Root: import('react').ForwardRefExoticComponent<{
69
+ /** Render without wrapper div (for composition with other components) */
70
+ asFragment?: boolean;
71
+ /** Controlled value */
72
+ value?: string;
73
+ /** Default value for uncontrolled mode */
74
+ defaultValue?: string;
75
+ /** The maximum number of dots to show */
76
+ maxVisible?: number;
77
+ /** If the dots on edges are smaller than the other dots */
78
+ smallOnEdges?: boolean;
79
+ /** Content */
80
+ children?: ReactNode;
81
+ /** Callback when value changes */
82
+ onValueChange?: (value: string) => void;
83
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & import('react').RefAttributes<HTMLDivElement>>;
84
+ Panel: import('react').ForwardRefExoticComponent<{
85
+ /** Value that identifies this panel */
86
+ value: string;
87
+ /** Whether the panel is locked. If locked, navigation via dots or buttons will not be possible. */
88
+ locked?: boolean;
89
+ /** Content */
90
+ children?: ReactNode;
91
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
92
+ Dots: import('react').ForwardRefExoticComponent<{
93
+ /** Disable all dots navigation */
94
+ disabled?: boolean;
95
+ /** Custom render wrapper for each dot. Receives the dot element and the step ID. */
96
+ renderDot?: (dot: ReactElement, step: string) => ReactNode;
97
+ } & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
98
+ Previous: import('react').ForwardRefExoticComponent<{
99
+ asChild?: boolean;
100
+ children: ReactNode;
101
+ } & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
102
+ Next: import('react').ForwardRefExoticComponent<{
103
+ asChild?: boolean;
104
+ children: ReactNode;
105
+ } & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
58
106
  };