@fluixi-ui/bottom-sheet 0.2.0-alpha.2 → 0.2.0-alpha.20

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.
@@ -1,4 +1,6 @@
1
- import type { JSX } from '@fluixi/jsx';
1
+ import { type FxProp } from '@fluixi-ui/fx';
2
+ import type { ComponentChild } from '@fluixi/dom';
3
+ import type { ButtonHTMLAttributes, HTMLAttributes } from '@fluixi/dom/attributes';
2
4
  export interface BottomSheetProps {
3
5
  open?: boolean;
4
6
  defaultOpen?: boolean;
@@ -10,7 +12,7 @@ export interface BottomSheetProps {
10
12
  maxHeight?: number;
11
13
  /** Releasing below this fraction of the viewport dismisses the sheet. Defaults to `0.25`. */
12
14
  closeThreshold?: number;
13
- children?: JSX.Element;
15
+ children?: ComponentChild;
14
16
  }
15
17
  /**
16
18
  * Root of a bottom sheet — a panel anchored to the bottom edge that a user can
@@ -40,52 +42,72 @@ export interface BottomSheetProps {
40
42
  * </BottomSheet>
41
43
  * ```
42
44
  */
43
- export declare function BottomSheet(props: BottomSheetProps): JSX.Element;
44
- export interface BottomSheetTriggerProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
45
+ export declare function BottomSheet(props: BottomSheetProps): ComponentChild;
46
+ export interface BottomSheetTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
47
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
48
+ fx?: FxProp;
45
49
  }
46
50
  /** The button that opens its {@link BottomSheet}. */
47
- export declare function BottomSheetTrigger(props: BottomSheetTriggerProps): JSX.Element;
51
+ export declare function BottomSheetTrigger(props: BottomSheetTriggerProps): ComponentChild;
48
52
  export interface BottomSheetPortalProps {
49
- children?: JSX.Element;
53
+ children?: ComponentChild;
50
54
  }
51
55
  /** Portals the sheet overlay and content to the document body while open. */
52
- export declare function BottomSheetPortal(props: BottomSheetPortalProps): JSX.Element;
53
- export interface BottomSheetOverlayProps extends JSX.HTMLAttributes<HTMLDivElement> {
56
+ export declare function BottomSheetPortal(props: BottomSheetPortalProps): ComponentChild;
57
+ export interface BottomSheetOverlayProps extends HTMLAttributes<HTMLDivElement> {
58
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
59
+ fx?: FxProp;
54
60
  }
55
61
  /** The backdrop rendered behind the sheet. */
56
- export declare function BottomSheetOverlay(props: BottomSheetOverlayProps): JSX.Element;
57
- export interface BottomSheetContentProps extends JSX.HTMLAttributes<HTMLDivElement> {
62
+ export declare function BottomSheetOverlay(props: BottomSheetOverlayProps): ComponentChild;
63
+ export interface BottomSheetContentProps extends HTMLAttributes<HTMLDivElement> {
58
64
  onEscapeKeyDown?: (event: KeyboardEvent) => void;
59
65
  onPointerDownOutside?: (event: PointerEvent) => void;
66
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
67
+ fx?: FxProp;
60
68
  }
61
69
  /** The focus-trapped sheet panel; its height tracks the drag / snap point. */
62
- export declare function BottomSheetContent(props: BottomSheetContentProps): JSX.Element;
63
- export interface BottomSheetHandleProps extends JSX.HTMLAttributes<HTMLDivElement> {
70
+ export declare function BottomSheetContent(props: BottomSheetContentProps): ComponentChild;
71
+ export interface BottomSheetHandleProps extends HTMLAttributes<HTMLDivElement> {
72
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
73
+ fx?: FxProp;
64
74
  }
65
75
  /** The drag affordance (grabber). Drag it up to grow the sheet, down to shrink or dismiss it. */
66
- export declare function BottomSheetHandle(props: BottomSheetHandleProps): JSX.Element;
67
- export interface BottomSheetHeaderProps extends JSX.HTMLAttributes<HTMLDivElement> {
76
+ export declare function BottomSheetHandle(props: BottomSheetHandleProps): ComponentChild;
77
+ export interface BottomSheetHeaderProps extends HTMLAttributes<HTMLDivElement> {
78
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
79
+ fx?: FxProp;
68
80
  }
69
81
  /** The sheet's header region. */
70
- export declare function BottomSheetHeader(props: BottomSheetHeaderProps): JSX.Element;
71
- export interface BottomSheetTitleProps extends JSX.HTMLAttributes<HTMLElement> {
82
+ export declare function BottomSheetHeader(props: BottomSheetHeaderProps): ComponentChild;
83
+ export interface BottomSheetTitleProps extends HTMLAttributes<HTMLElement> {
84
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
85
+ fx?: FxProp;
72
86
  }
73
87
  /** The accessible title; labels the sheet via `aria-labelledby`. */
74
- export declare function BottomSheetTitle(props: BottomSheetTitleProps): JSX.Element;
75
- export interface BottomSheetDescriptionProps extends JSX.HTMLAttributes<HTMLElement> {
88
+ export declare function BottomSheetTitle(props: BottomSheetTitleProps): ComponentChild;
89
+ export interface BottomSheetDescriptionProps extends HTMLAttributes<HTMLElement> {
90
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
91
+ fx?: FxProp;
76
92
  }
77
93
  /** Optional supporting text; describes the sheet via `aria-describedby`. */
78
- export declare function BottomSheetDescription(props: BottomSheetDescriptionProps): JSX.Element;
79
- export interface BottomSheetBodyProps extends JSX.HTMLAttributes<HTMLDivElement> {
94
+ export declare function BottomSheetDescription(props: BottomSheetDescriptionProps): ComponentChild;
95
+ export interface BottomSheetBodyProps extends HTMLAttributes<HTMLDivElement> {
96
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
97
+ fx?: FxProp;
80
98
  }
81
99
  /** The scrollable main content region of the sheet. */
82
- export declare function BottomSheetBody(props: BottomSheetBodyProps): JSX.Element;
83
- export interface BottomSheetFooterProps extends JSX.HTMLAttributes<HTMLDivElement> {
100
+ export declare function BottomSheetBody(props: BottomSheetBodyProps): ComponentChild;
101
+ export interface BottomSheetFooterProps extends HTMLAttributes<HTMLDivElement> {
102
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
103
+ fx?: FxProp;
84
104
  }
85
105
  /** The sheet's footer — typically actions. */
86
- export declare function BottomSheetFooter(props: BottomSheetFooterProps): JSX.Element;
87
- export interface BottomSheetCloseProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
106
+ export declare function BottomSheetFooter(props: BottomSheetFooterProps): ComponentChild;
107
+ export interface BottomSheetCloseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
108
+ /** Token-aware style object. See `@fluixi-ui/fx`. */
109
+ fx?: FxProp;
88
110
  }
89
111
  /** A button that closes its {@link BottomSheet}. */
90
- export declare function BottomSheetClose(props: BottomSheetCloseProps): JSX.Element;
112
+ export declare function BottomSheetClose(props: BottomSheetCloseProps): ComponentChild;
91
113
  //# sourceMappingURL=bottom-sheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-sheet.d.ts","sourceRoot":"","sources":["../src/bottom-sheet.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAqBvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAkGhE;AAED,MAAM,WAAW,uBAAwB,SAAQ,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAE/F,qDAAqD;AACrD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAsB9E;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACxB;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