@pittorica/popover-react 0.25.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,29 +1,23 @@
1
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 type PopoverProps = {
4
+ export type PopoverRootProps = {
5
5
  children: ReactNode;
6
6
  /** @default 'bottom' */
7
7
  placement?: Placement;
8
+ appearance?: 'light' | 'dark' | 'inherit';
8
9
  };
9
- export declare const Popover: {
10
- ({ children, placement }: PopoverProps): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- };
13
- /**
14
- * Fix TS2314: Use 'type' and generic E for polymorphic BoxProps.
15
- */
10
+ export declare const PopoverRoot: ({ children, placement, appearance, }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
16
11
  export type PopoverTriggerProps<E extends ElementType = 'span'> = BoxProps<E>;
17
- export declare const PopoverTrigger: {
18
- <E extends ElementType = "span">({ children, as, ref: externalRef, ...props }: PopoverTriggerProps<E>): import("react/jsx-runtime").JSX.Element;
19
- displayName: string;
20
- };
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;
21
15
  /**
22
- * Fix TS2314: Use 'type' and generic E for polymorphic BoxProps.
16
+ * Compound component object.
23
17
  */
24
- export type PopoverContentProps<E extends ElementType = 'div'> = BoxProps<E>;
25
- export declare const PopoverContent: {
26
- <E extends ElementType = "div">({ children, className, as, ref: externalRef, ...props }: PopoverContentProps<E>): import("react/jsx-runtime").JSX.Element | null;
27
- displayName: string;
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;
28
22
  };
29
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,WAAW,EAChB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAIf,OAAO,EAML,KAAK,SAAS,EAOf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA4B1D,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,wBAAwB;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,OAAO;8BAAwC,YAAY;;CAkCvE,CAAC;AAIF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE9E,eAAO,MAAM,cAAc;KAAI,CAAC,SAAS,WAAW,yDAKjD,mBAAmB,CAAC,CAAC,CAAC;;CA0BxB,CAAC;AAIF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE7E,eAAO,MAAM,cAAc;KAAI,CAAC,SAAS,WAAW,mEAMjD,mBAAmB,CAAC,CAAC,CAAC;;CAg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ps, 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"}