@enonic/ui 1.0.0 → 1.0.2

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.
@@ -116,10 +116,9 @@ export declare const Combobox: {
116
116
  ({ className, ...props }: ComboboxToggleProps): ReactElement;
117
117
  displayName: string;
118
118
  };
119
- Apply: {
120
- ({ className, label, ...props }: ComboboxApplyProps): ReactElement | null;
121
- displayName: string;
122
- };
119
+ Apply: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<ComboboxApplyProps> & {
120
+ ref?: import('preact').Ref<HTMLButtonElement> | undefined;
121
+ }>;
123
122
  Portal: {
124
123
  ({ container, forceMount, children }: ComboboxPortalProps): ReactElement | null;
125
124
  displayName: string;
@@ -1 +1 @@
1
- export { Tooltip, type TooltipProps, type TooltipSide } from './tooltip';
1
+ export { Tooltip, type TooltipProps, type TooltipSide, type TooltipTrigger } from './tooltip';
@@ -1,5 +1,6 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
2
  export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
3
+ export type TooltipTrigger = 'hover' | 'focus' | 'hover-focus';
3
4
  export type TooltipProps = {
4
5
  children: ReactNode;
5
6
  value?: ReactNode;
@@ -7,5 +8,6 @@ export type TooltipProps = {
7
8
  className?: string;
8
9
  asChild?: boolean;
9
10
  delay?: number;
11
+ trigger?: TooltipTrigger;
10
12
  };
11
- export declare function Tooltip({ className, children, value, side, asChild, delay, }: TooltipProps): ReactElement<TooltipProps>;
13
+ export declare function Tooltip({ className, children, value, side, asChild, delay, trigger, }: TooltipProps): ReactElement<TooltipProps>;
@@ -1,10 +1,18 @@
1
1
  import { ReactElement, ReactNode, RefObject } from 'react';
2
2
  export type ContentType = 'listbox' | 'tree' | 'auto';
3
+ export type ComboboxOpenOptions = {
4
+ restoreFocus?: boolean;
5
+ };
3
6
  export type ComboboxContextValue = {
4
7
  baseId: string;
8
+ contentRef: RefObject<HTMLDivElement>;
5
9
  controlRef: RefObject<HTMLDivElement> | null;
10
+ applyRef: RefObject<HTMLButtonElement>;
11
+ popupRef: RefObject<HTMLDivElement>;
12
+ restoreFocusOnCloseRef: RefObject<boolean>;
13
+ ignoreFocusExitCloseRef: RefObject<boolean>;
6
14
  open: boolean;
7
- setOpen: (next: boolean) => void;
15
+ setOpen: (next: boolean, options?: ComboboxOpenOptions) => void;
8
16
  closeOnBlur: boolean;
9
17
  inputValue: string;
10
18
  setInputValue: (value: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic/ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Enonic UI Component Library",
5
5
  "author": "Enonic",
6
6
  "license": "Apache-2.0",