hubbi-ui 1.1.10 → 1.2.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.
@@ -10,6 +10,7 @@ export * from './metriccard';
10
10
  export * from './modal';
11
11
  export * from './navbutton';
12
12
  export * from './navigation';
13
+ export * from './popover';
13
14
  export * from './radio';
14
15
  export * from './selector';
15
16
  export * from './sheets';
@@ -1,7 +1,8 @@
1
1
  import { StatusType } from '../../utils/status-utils';
2
2
  interface StatusLabelProps {
3
+ label?: string;
3
4
  statusKey: keyof typeof StatusType;
4
5
  noIcon?: boolean;
5
6
  }
6
- export declare function StatusLabel({ statusKey, noIcon }: StatusLabelProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function StatusLabel({ label, statusKey, noIcon, }: StatusLabelProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -0,0 +1 @@
1
+ export { Popover } from './popover';
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ export type AxisVertical = "top" | "bottom" | "center";
3
+ export type AxisHorizontal = "left" | "right" | "center";
4
+ export interface Placement {
5
+ trigger: {
6
+ vertical: AxisVertical;
7
+ horizontal: AxisHorizontal;
8
+ };
9
+ children: {
10
+ vertical: AxisVertical;
11
+ horizontal: AxisHorizontal;
12
+ };
13
+ }
14
+ export interface Position {
15
+ trigger: {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ children: {
20
+ x: number;
21
+ y: number;
22
+ };
23
+ }
24
+ export interface PopoverProps {
25
+ trigger: ReactNode;
26
+ children: ReactNode | ((toggleOpen: () => void) => ReactNode);
27
+ placement?: Placement;
28
+ position?: Position;
29
+ className?: string;
30
+ ignoreOutsideClick?: (target: Node) => boolean;
31
+ }
32
+ export declare const Popover: ({ trigger, children, placement, position, className, ignoreOutsideClick, }: PopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { AxisHorizontal, AxisVertical } from './popover';
3
+ interface PopoverStoryArgs {
4
+ placementTriggerVertical: AxisVertical;
5
+ placementTriggerHorizontal: AxisHorizontal;
6
+ placementChildrenVertical: AxisVertical;
7
+ placementChildrenHorizontal: AxisHorizontal;
8
+ positionTriggerX: number;
9
+ positionTriggerY: number;
10
+ positionChildrenX: number;
11
+ positionChildrenY: number;
12
+ className?: string;
13
+ }
14
+ declare const meta: Meta<PopoverStoryArgs>;
15
+ export default meta;
16
+ type Story = StoryObj<PopoverStoryArgs>;
17
+ export declare const Playground: Story;