@pittorica/popover-react 0.24.0 → 0.26.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.
package/dist/Popover.d.ts CHANGED
@@ -1,28 +1,23 @@
1
- import { type ReactNode, type Ref } from 'react';
1
+ import { type ElementType, type ReactNode } from 'react';
2
2
  import { type Placement } from '@floating-ui/react';
3
3
  import { type BoxProps } from '@pittorica/box-react';
4
- export interface PopoverProps {
4
+ export type PopoverRootProps = {
5
5
  children: ReactNode;
6
6
  /** @default 'bottom' */
7
7
  placement?: Placement;
8
- }
9
- export declare const Popover: {
10
- ({ children, placement }: PopoverProps): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
8
+ appearance?: 'light' | 'dark' | 'inherit';
12
9
  };
13
- export interface PopoverTriggerProps {
14
- children: ReactNode;
15
- ref?: Ref<HTMLElement>;
16
- }
17
- export declare const PopoverTrigger: {
18
- ({ children, ref: externalRef, }: PopoverTriggerProps): import("react/jsx-runtime").JSX.Element;
19
- displayName: string;
20
- };
21
- export interface PopoverContentProps extends BoxProps {
22
- ref?: Ref<HTMLElement>;
23
- }
24
- export declare const PopoverContent: {
25
- ({ children, className, ref: externalRef, ...props }: PopoverContentProps): import("react/jsx-runtime").JSX.Element | null;
26
- displayName: string;
10
+ export declare const PopoverRoot: ({ children, placement, appearance, }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
11
+ export type PopoverTriggerProps<E extends ElementType = 'span'> = BoxProps<E>;
12
+ export declare const PopoverTrigger: <E extends ElementType = "span">({ children, as, ref: externalRef, ...props }: PopoverTriggerProps<E>) => import("react/jsx-runtime").JSX.Element;
13
+ export type PopoverContentProps<E extends ElementType = 'div'> = BoxProps<E>;
14
+ export declare const PopoverContent: <E extends ElementType = "div">({ children, className, as, ref: externalRef, style, ...props }: PopoverContentProps<E>) => import("react/jsx-runtime").JSX.Element | null;
15
+ /**
16
+ * Compound component object.
17
+ */
18
+ export declare const Popover: (({ children, placement, appearance, }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element) & {
19
+ Root: ({ children, placement, appearance, }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
20
+ Trigger: <E extends ElementType = "span">({ children, as, ref: externalRef, ...props }: PopoverTriggerProps<E>) => import("react/jsx-runtime").JSX.Element;
21
+ Content: <E extends ElementType = "div">({ children, className, as, ref: externalRef, style, ...props }: PopoverContentProps<E>) => import("react/jsx-runtime").JSX.Element | null;
27
22
  };
28
23
  //# sourceMappingURL=Popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../src/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,GAAG,EAKT,MAAM,OAAO,CAAC;AAIf,OAAO,EAML,KAAK,SAAS,EAOf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAwB1D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,wBAAwB;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,OAAO;8BAAwC,YAAY;;CAkCvE,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;sCAGxB,mBAAmB;;CAuBrB,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACnD,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;0DAKxB,mBAAmB;;CA6BrB,CAAC"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../src/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,OAAO,EAML,KAAK,SAAS,EAOf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA8B1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,wBAAwB;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,sCAIzB,gBAAgB,4CA0ClB,CAAC;AAIF,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE9E,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,GAAG,MAAM,EAAE,8CAK5D,mBAAmB,CAAC,CAAC,CAAC,4CA0BxB,CAAC;AAIF,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE7E,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,gEAO3D,mBAAmB,CAAC,CAAC,CAAC,mDA2DxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,0CA5JjB,gBAAgB;iDAAhB,gBAAgB;cAgDY,CAAC,SAAS,WAAW,yDAKjD,mBAAmB,CAAC,CAAC,CAAC;cAgCM,CAAC,SAAS,WAAW,0EAOjD,mBAAmB,CAAC,CAAC,CAAC;CAoEvB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export type { PopoverContentProps, PopoverProps, PopoverTriggerProps, } from './Popover.js';
2
- export { Popover, PopoverContent, PopoverTrigger } from './Popover.js';
1
+ export * from './Popover.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}