@sprawlify/react 0.0.6 → 0.0.8
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/chunk-BYnRvbsk.cjs +53 -0
- package/dist/{collapsible-DYgHs1_i.mjs → collapsible-Nbt3Sequ.mjs} +7 -4
- package/dist/{collapsible-D_cXuaRy.cjs → collapsible-aFKYmVbP.cjs} +13 -9
- package/dist/collection-DGEUORi5.cjs +230 -0
- package/dist/collection-DQWWySNV.mjs +187 -0
- package/dist/components/accordion/index.cjs +21 -24
- package/dist/components/accordion/index.d.cts +11 -9
- package/dist/components/accordion/index.d.mts +11 -9
- package/dist/components/accordion/index.mjs +10 -14
- package/dist/components/angle-slider/index.cjs +14 -9
- package/dist/components/angle-slider/index.d.cts +13 -11
- package/dist/components/angle-slider/index.d.mts +13 -11
- package/dist/components/angle-slider/index.mjs +8 -4
- package/dist/components/avatar/index.cjs +14 -9
- package/dist/components/avatar/index.d.cts +8 -6
- package/dist/components/avatar/index.d.mts +8 -6
- package/dist/components/avatar/index.mjs +8 -4
- package/dist/components/bottom-sheet/index.cjs +216 -0
- package/dist/components/bottom-sheet/index.d.cts +80 -0
- package/dist/components/bottom-sheet/index.d.mts +81 -0
- package/dist/components/bottom-sheet/index.mjs +192 -0
- package/dist/components/carousel/index.cjs +265 -0
- package/dist/components/carousel/index.d.cts +95 -0
- package/dist/components/carousel/index.d.mts +95 -0
- package/dist/components/carousel/index.mjs +243 -0
- package/dist/components/checkbox/index.cjs +311 -0
- package/dist/components/checkbox/index.d.cts +115 -0
- package/dist/components/checkbox/index.d.mts +115 -0
- package/dist/components/checkbox/index.mjs +291 -0
- package/dist/components/client-only/index.cjs +14 -0
- package/dist/components/client-only/index.d.cts +8 -0
- package/dist/components/client-only/index.d.mts +8 -0
- package/dist/components/client-only/index.mjs +13 -0
- package/dist/components/clipboard/index.cjs +186 -0
- package/dist/components/clipboard/index.d.cts +71 -0
- package/dist/components/clipboard/index.d.mts +71 -0
- package/dist/components/clipboard/index.mjs +163 -0
- package/dist/components/collapsible/index.cjs +8 -3
- package/dist/components/collapsible/index.d.cts +10 -8
- package/dist/components/collapsible/index.d.mts +10 -8
- package/dist/components/collapsible/index.mjs +7 -3
- package/dist/components/collection/index.cjs +11 -0
- package/dist/components/collection/index.d.cts +2 -0
- package/dist/components/collection/index.d.mts +2 -0
- package/dist/components/collection/index.mjs +5 -0
- package/dist/components/color-picker/index.cjs +617 -0
- package/dist/components/color-picker/index.d.cts +181 -0
- package/dist/components/color-picker/index.d.mts +182 -0
- package/dist/components/color-picker/index.mjs +573 -0
- package/dist/components/combobox/index.cjs +420 -0
- package/dist/components/combobox/index.d.cts +132 -0
- package/dist/components/combobox/index.d.mts +133 -0
- package/dist/components/combobox/index.mjs +390 -0
- package/dist/components/date-picker/index.cjs +567 -0
- package/dist/components/date-picker/index.d.cts +164 -0
- package/dist/components/date-picker/index.d.mts +165 -0
- package/dist/components/date-picker/index.mjs +526 -0
- package/dist/components/dialog/index.cjs +211 -0
- package/dist/components/dialog/index.d.cts +80 -0
- package/dist/components/dialog/index.d.mts +81 -0
- package/dist/components/dialog/index.mjs +187 -0
- package/dist/components/download-trigger/index.cjs +43 -0
- package/dist/components/download-trigger/index.d.cts +16 -0
- package/dist/components/download-trigger/index.d.mts +16 -0
- package/dist/components/download-trigger/index.mjs +42 -0
- package/dist/components/editable/index.cjs +246 -0
- package/dist/components/editable/index.d.cts +79 -0
- package/dist/components/editable/index.d.mts +79 -0
- package/dist/components/editable/index.mjs +221 -0
- package/dist/components/field/index.cjs +29 -0
- package/dist/components/field/index.d.cts +116 -0
- package/dist/components/field/index.d.mts +116 -0
- package/dist/components/field/index.mjs +11 -0
- package/dist/components/fieldset/index.cjs +25 -0
- package/dist/components/fieldset/index.d.cts +73 -0
- package/dist/components/fieldset/index.d.mts +73 -0
- package/dist/components/fieldset/index.mjs +11 -0
- package/dist/components/file-upload/index.cjs +351 -0
- package/dist/components/file-upload/index.d.cts +102 -0
- package/dist/components/file-upload/index.d.mts +102 -0
- package/dist/components/file-upload/index.mjs +322 -0
- package/dist/components/floating-panel/index.cjs +287 -0
- package/dist/components/floating-panel/index.d.cts +100 -0
- package/dist/components/floating-panel/index.d.mts +101 -0
- package/dist/components/floating-panel/index.mjs +259 -0
- package/dist/components/focus-trap/index.cjs +36 -0
- package/dist/components/focus-trap/index.d.cts +14 -0
- package/dist/components/focus-trap/index.d.mts +14 -0
- package/dist/components/focus-trap/index.mjs +35 -0
- package/dist/components/format/index.cjs +57 -0
- package/dist/components/format/index.d.cts +36 -0
- package/dist/components/format/index.d.mts +36 -0
- package/dist/components/format/index.mjs +49 -0
- package/dist/components/frame/index.cjs +90 -0
- package/dist/components/frame/index.d.cts +13 -0
- package/dist/components/frame/index.d.mts +13 -0
- package/dist/components/frame/index.mjs +89 -0
- package/dist/components/highlight/index.cjs +32 -0
- package/dist/components/highlight/index.d.cts +14 -0
- package/dist/components/highlight/index.d.mts +14 -0
- package/dist/components/highlight/index.mjs +30 -0
- package/dist/components/portal/index.cjs +33 -0
- package/dist/components/portal/index.d.cts +11 -0
- package/dist/components/portal/index.d.mts +11 -0
- package/dist/components/portal/index.mjs +32 -0
- package/dist/components/presence/index.cjs +11 -0
- package/dist/components/presence/index.d.cts +2 -0
- package/dist/components/presence/index.d.mts +4 -0
- package/dist/components/presence/index.mjs +7 -0
- package/dist/components/select/index.cjs +423 -0
- package/dist/components/select/index.d.cts +132 -0
- package/dist/components/select/index.d.mts +133 -0
- package/dist/components/select/index.mjs +387 -0
- package/dist/compose-refs-BEptPEkE.mjs +16 -0
- package/dist/compose-refs-C5QNDywq.cjs +22 -0
- package/dist/{factory-DN0EdT7u.mjs → core-Ba4IEjhK.mjs} +4 -154
- package/dist/{factory-CfqPG186.cjs → core-DCWyxy9D.cjs} +2 -251
- package/dist/{create-context-DCEySQ7J.cjs → create-context-CQ4U0lLj.cjs} +1 -1
- package/dist/environment-CvilmfQt.cjs +58 -0
- package/dist/environment-Ded7DkGr.mjs +46 -0
- package/dist/factory-Bi8oEg8i.mjs +49 -0
- package/dist/factory-C-EBNsCW.d.mts +15 -0
- package/dist/factory-C166evrS.cjs +61 -0
- package/dist/factory-C4cfTHs7.d.cts +15 -0
- package/dist/field-B-6qoKdn.mjs +324 -0
- package/dist/field-C-57Gj2E.cjs +406 -0
- package/dist/fieldset-B-MkM2Ms.cjs +239 -0
- package/dist/fieldset-gaVneDYh.mjs +186 -0
- package/dist/index-BJvW7OpY.d.mts +25 -0
- package/dist/index-BhGgEHWc.d.cts +34 -0
- package/dist/index-ByIsf4E7.d.mts +74 -0
- package/dist/index-Cp1i1zbg.d.mts +34 -0
- package/dist/index-CumJbg8V.d.cts +74 -0
- package/dist/index.cjs +17 -12
- package/dist/index.d.cts +7 -5
- package/dist/index.d.mts +7 -5
- package/dist/index.mjs +7 -3
- package/dist/locale-BcnWD1Hf.cjs +78 -0
- package/dist/locale-Coin-d7R.mjs +54 -0
- package/dist/normalize-props-skGwa8Dk.d.cts +13 -0
- package/dist/presence-Bc6Bxe5i.mjs +72 -0
- package/dist/presence-CPov8wyU.cjs +103 -0
- package/dist/providers-BNAArubQ.cjs +0 -0
- package/dist/providers-Dm2P3F2_.mjs +1 -0
- package/dist/render-strategy-BywM_IvB.cjs +30 -0
- package/dist/render-strategy-FiPgAp1U.mjs +13 -0
- package/dist/types-B4tvWlDb.d.cts +6 -0
- package/dist/types-BmBABPZb.d.mts +6 -0
- package/dist/use-event-4J5QFFqK.mjs +19 -0
- package/dist/use-event-CLH8zHoJ.cjs +25 -0
- package/dist/use-fieldset-context-CCQLmNLL.cjs +23 -0
- package/dist/use-fieldset-context-LwveT1OS.mjs +12 -0
- package/dist/use-safe-layout-effect-C2GgvNT3.cjs +13 -0
- package/dist/use-safe-layout-effect-CLjnuJFb.mjs +7 -0
- package/dist/utils/index.cjs +3 -3
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +232 -2
- package/dist/factory-BZBSaT-0.d.cts +0 -29
- package/dist/factory-DaVMAttY.d.mts +0 -41
- /package/dist/{chunk-CYMnug_4.mjs → chunk-BXPHTOwk.mjs} +0 -0
- /package/dist/{create-context-DGYD_HQt.mjs → create-context-CCXzjEv8.mjs} +0 -0
- /package/dist/{create-split-props-BFscidWy.mjs → create-split-props-CBL0m-GX.mjs} +0 -0
- /package/dist/{create-split-props-CSaOnJRj.cjs → create-split-props-Dp4TWOyM.cjs} +0 -0
- /package/dist/{index-OOf7QNG5.d.mts → index-CureNJdc.d.mts} +0 -0
- /package/dist/{index-DiYk6N_L.d.cts → index-dbTyAXLy.d.cts} +0 -0
- /package/dist/{render-strategy--1FNKx5x.d.mts → render-strategy-C8IyLw0O.d.mts} +0 -0
- /package/dist/{render-strategy-RT-KvAqO.d.cts → render-strategy-rA4C5NUX.d.cts} +0 -0
- /package/dist/{utils-Cb5K29pi.cjs → utils-B_Ojepvp.cjs} +0 -0
- /package/dist/{utils-nfWHwVIS.mjs → utils-C-m3mZWI.mjs} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { t as PropTypes } from "../../normalize-props-skGwa8Dk.cjs";
|
|
2
|
+
import { r as Optional } from "../../types-B4tvWlDb.cjs";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-C4cfTHs7.cjs";
|
|
4
|
+
import { c as UsePresenceProps } from "../../index-BhGgEHWc.cjs";
|
|
5
|
+
import * as react70 from "react";
|
|
6
|
+
import { ReactNode } from "react";
|
|
7
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
+
import * as floatingPanel from "@sprawlify/primitives/machines/floating-panel";
|
|
9
|
+
import { OpenChangeDetails, OpenChangeDetails as FloatingPanelOpenChangeDetails, PositionChangeDetails, PositionChangeDetails as FloatingPanelPositionChangeDetails, ResizeTriggerProps, SizeChangeDetails, SizeChangeDetails as FloatingPanelSizeChangeDetails, StageChangeDetails, StageChangeDetails as FloatingPanelStageChangeDetails, StageTriggerProps, anatomy as floatingPanelAnatomy } from "@sprawlify/primitives/machines/floating-panel";
|
|
10
|
+
|
|
11
|
+
//#region src/components/floating-panel/floating-panel-body.d.ts
|
|
12
|
+
interface FloatingPanelBodyBaseProps extends PolymorphicProps {}
|
|
13
|
+
interface FloatingPanelBodyProps extends HTMLProps<"div">, FloatingPanelBodyBaseProps {}
|
|
14
|
+
declare const FloatingPanelBody: react70.ForwardRefExoticComponent<FloatingPanelBodyProps & react70.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/floating-panel/floating-panel-close-trigger.d.ts
|
|
17
|
+
interface FloatingPanelCloseTriggerBaseProps extends PolymorphicProps {}
|
|
18
|
+
interface FloatingPanelCloseTriggerProps extends HTMLProps<"button">, FloatingPanelCloseTriggerBaseProps {}
|
|
19
|
+
declare const FloatingPanelCloseTrigger: react70.ForwardRefExoticComponent<FloatingPanelCloseTriggerProps & react70.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/floating-panel/floating-panel-content.d.ts
|
|
22
|
+
interface FloatingPanelContentBaseProps extends PolymorphicProps {}
|
|
23
|
+
interface FloatingPanelContentProps extends HTMLProps<"div">, FloatingPanelContentBaseProps {}
|
|
24
|
+
declare const FloatingPanelContent: react70.ForwardRefExoticComponent<FloatingPanelContentProps & react70.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/floating-panel/use-floating-panel.d.ts
|
|
27
|
+
interface UseFloatingPanelProps extends Optional<Omit<floatingPanel.Props, "getRootNode">, "id"> {}
|
|
28
|
+
interface UseFloatingPanelReturn extends floatingPanel.Api<PropTypes> {}
|
|
29
|
+
declare const useFloatingPanel: (props?: UseFloatingPanelProps) => UseFloatingPanelReturn;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/floating-panel/use-floating-panel-context.d.ts
|
|
32
|
+
interface UseFloatingPanelContext extends UseFloatingPanelReturn {}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/floating-panel/floating-panel-context.d.ts
|
|
35
|
+
interface FloatingPanelContextProps {
|
|
36
|
+
children: (context: UseFloatingPanelContext) => ReactNode;
|
|
37
|
+
}
|
|
38
|
+
declare const FloatingPanelContext: (props: FloatingPanelContextProps) => ReactNode;
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/floating-panel/floating-panel-drag-trigger.d.ts
|
|
41
|
+
interface FloatingPanelDragTriggerBaseProps extends PolymorphicProps {}
|
|
42
|
+
interface FloatingPanelDragTriggerProps extends HTMLProps<"div">, FloatingPanelDragTriggerBaseProps {}
|
|
43
|
+
declare const FloatingPanelDragTrigger: react70.ForwardRefExoticComponent<FloatingPanelDragTriggerProps & react70.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/floating-panel/floating-panel-header.d.ts
|
|
46
|
+
interface FloatingPanelHeaderBaseProps extends PolymorphicProps {}
|
|
47
|
+
interface FloatingPanelHeaderProps extends HTMLProps<"div">, FloatingPanelHeaderBaseProps {}
|
|
48
|
+
declare const FloatingPanelHeader: react70.ForwardRefExoticComponent<FloatingPanelHeaderProps & react70.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/floating-panel/floating-panel-positioner.d.ts
|
|
51
|
+
interface FloatingPanelPositionerBaseProps extends PolymorphicProps {}
|
|
52
|
+
interface FloatingPanelPositionerProps extends HTMLProps<"div">, FloatingPanelPositionerBaseProps {}
|
|
53
|
+
declare const FloatingPanelPositioner: react70.ForwardRefExoticComponent<FloatingPanelPositionerProps & react70.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/floating-panel/floating-panel-resize-trigger.d.ts
|
|
56
|
+
interface FloatingPanelResizeTriggerBaseProps extends ResizeTriggerProps, PolymorphicProps {}
|
|
57
|
+
interface FloatingPanelResizeTriggerProps extends HTMLProps<"div">, FloatingPanelResizeTriggerBaseProps {}
|
|
58
|
+
declare const FloatingPanelResizeTrigger: react70.ForwardRefExoticComponent<FloatingPanelResizeTriggerProps & react70.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/floating-panel/floating-panel-stage-trigger.d.ts
|
|
61
|
+
interface FloatingPanelStageTriggerBaseProps extends PolymorphicProps, StageTriggerProps {}
|
|
62
|
+
interface FloatingPanelStageTriggerProps extends HTMLProps<"button">, FloatingPanelStageTriggerBaseProps {}
|
|
63
|
+
declare const FloatingPanelStageTrigger: react70.ForwardRefExoticComponent<FloatingPanelStageTriggerProps & react70.RefAttributes<HTMLButtonElement>>;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/components/floating-panel/floating-panel-root.d.ts
|
|
66
|
+
interface FloatingPanelRootBaseProps extends UseFloatingPanelProps, UsePresenceProps {}
|
|
67
|
+
interface FloatingPanelRootProps extends FloatingPanelRootBaseProps {
|
|
68
|
+
children?: ReactNode | undefined;
|
|
69
|
+
}
|
|
70
|
+
declare const FloatingPanelRoot: (props: FloatingPanelRootProps) => react_jsx_runtime0.JSX.Element;
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/components/floating-panel/floating-panel-root-provider.d.ts
|
|
73
|
+
interface RootProviderProps {
|
|
74
|
+
value: UseFloatingPanelReturn;
|
|
75
|
+
}
|
|
76
|
+
interface FloatingPanelRootProviderBaseProps extends RootProviderProps, Omit<UsePresenceProps, "present"> {}
|
|
77
|
+
interface FloatingPanelRootProviderProps extends FloatingPanelRootProviderBaseProps {
|
|
78
|
+
children?: ReactNode | undefined;
|
|
79
|
+
}
|
|
80
|
+
declare const FloatingPanelRootProvider: (props: FloatingPanelRootProviderProps) => react_jsx_runtime0.JSX.Element;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/components/floating-panel/floating-panel-title.d.ts
|
|
83
|
+
interface FloatingPanelTitleBaseProps extends PolymorphicProps {}
|
|
84
|
+
interface FloatingPanelTitleProps extends HTMLProps<"h2">, FloatingPanelTitleBaseProps {}
|
|
85
|
+
declare const FloatingPanelTitle: react70.ForwardRefExoticComponent<FloatingPanelTitleProps & react70.RefAttributes<HTMLDivElement>>;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/floating-panel/floating-panel-trigger.d.ts
|
|
88
|
+
interface FloatingPanelTriggerBaseProps extends PolymorphicProps {}
|
|
89
|
+
interface FloatingPanelTriggerProps extends HTMLProps<"button">, FloatingPanelTriggerBaseProps {}
|
|
90
|
+
declare const FloatingPanelTrigger: react70.ForwardRefExoticComponent<FloatingPanelTriggerProps & react70.RefAttributes<HTMLButtonElement>>;
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/components/floating-panel/floating-panel-control.d.ts
|
|
93
|
+
interface FloatingPanelControlBaseProps extends PolymorphicProps {}
|
|
94
|
+
interface FloatingPanelControlProps extends HTMLProps<"div">, FloatingPanelControlBaseProps {}
|
|
95
|
+
declare const FloatingPanelControl: react70.ForwardRefExoticComponent<FloatingPanelControlProps & react70.RefAttributes<HTMLDivElement>>;
|
|
96
|
+
declare namespace floating_panel_d_exports {
|
|
97
|
+
export { FloatingPanelBody as Body, FloatingPanelBodyBaseProps as BodyBaseProps, FloatingPanelBodyProps as BodyProps, FloatingPanelCloseTrigger as CloseTrigger, FloatingPanelCloseTriggerBaseProps as CloseTriggerBaseProps, FloatingPanelCloseTriggerProps as CloseTriggerProps, FloatingPanelContent as Content, FloatingPanelContentBaseProps as ContentBaseProps, FloatingPanelContentProps as ContentProps, FloatingPanelContext as Context, FloatingPanelContextProps as ContextProps, FloatingPanelControl as Control, FloatingPanelControlBaseProps as ControlBaseProps, FloatingPanelControlProps as ControlProps, FloatingPanelDragTrigger as DragTrigger, FloatingPanelDragTriggerBaseProps as DragTriggerBaseProps, FloatingPanelDragTriggerProps as DragTriggerProps, FloatingPanelHeader as Header, FloatingPanelHeaderBaseProps as HeaderBaseProps, FloatingPanelHeaderProps as HeaderProps, OpenChangeDetails, PositionChangeDetails, FloatingPanelPositioner as Positioner, FloatingPanelPositionerBaseProps as PositionerBaseProps, FloatingPanelPositionerProps as PositionerProps, FloatingPanelResizeTrigger as ResizeTrigger, FloatingPanelResizeTriggerBaseProps as ResizeTriggerBaseProps, FloatingPanelResizeTriggerProps as ResizeTriggerProps, FloatingPanelRoot as Root, FloatingPanelRootBaseProps as RootBaseProps, FloatingPanelRootProps as RootProps, FloatingPanelRootProvider as RootProvider, FloatingPanelRootProviderBaseProps as RootProviderBaseProps, FloatingPanelRootProviderProps as RootProviderProps, SizeChangeDetails, StageChangeDetails, FloatingPanelStageTrigger as StageTrigger, FloatingPanelStageTriggerBaseProps as StageTriggerBaseProps, FloatingPanelStageTriggerProps as StageTriggerProps, FloatingPanelTitle as Title, FloatingPanelTitleBaseProps as TitleBaseProps, FloatingPanelTitleProps as TitleProps, FloatingPanelTrigger as Trigger, FloatingPanelTriggerBaseProps as TriggerBaseProps, FloatingPanelTriggerProps as TriggerProps };
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
export { floating_panel_d_exports as FloatingPanel, FloatingPanelBody, type FloatingPanelBodyBaseProps, type FloatingPanelBodyProps, FloatingPanelCloseTrigger, type FloatingPanelCloseTriggerBaseProps, type FloatingPanelCloseTriggerProps, FloatingPanelContent, type FloatingPanelContentBaseProps, type FloatingPanelContentProps, FloatingPanelContext, type FloatingPanelContextProps, FloatingPanelControl, type FloatingPanelControlBaseProps, type FloatingPanelControlProps, FloatingPanelDragTrigger, type FloatingPanelDragTriggerBaseProps, type FloatingPanelDragTriggerProps, FloatingPanelHeader, type FloatingPanelHeaderBaseProps, type FloatingPanelHeaderProps, type FloatingPanelOpenChangeDetails, type FloatingPanelPositionChangeDetails, FloatingPanelPositioner, type FloatingPanelPositionerBaseProps, type FloatingPanelPositionerProps, FloatingPanelResizeTrigger, type FloatingPanelResizeTriggerBaseProps, type FloatingPanelResizeTriggerProps, FloatingPanelRoot, type FloatingPanelRootBaseProps, type FloatingPanelRootProps, FloatingPanelRootProvider, type FloatingPanelRootProviderBaseProps, type FloatingPanelRootProviderProps, type FloatingPanelSizeChangeDetails, type FloatingPanelStageChangeDetails, FloatingPanelStageTrigger, type FloatingPanelStageTriggerBaseProps, type FloatingPanelStageTriggerProps, FloatingPanelTitle, type FloatingPanelTitleBaseProps, type FloatingPanelTitleProps, FloatingPanelTrigger, type FloatingPanelTriggerBaseProps, type FloatingPanelTriggerProps, type UseFloatingPanelContext, type UseFloatingPanelProps, type UseFloatingPanelReturn, floatingPanelAnatomy, useFloatingPanel, useFloatingPanelContext };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { r as PropTypes } from "../../index-BJvW7OpY.mjs";
|
|
2
|
+
import { r as Optional } from "../../types-BmBABPZb.mjs";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-C-EBNsCW.mjs";
|
|
4
|
+
import "../../render-strategy-C8IyLw0O.mjs";
|
|
5
|
+
import { c as UsePresenceProps } from "../../index-Cp1i1zbg.mjs";
|
|
6
|
+
import * as react85 from "react";
|
|
7
|
+
import { ReactNode } from "react";
|
|
8
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
9
|
+
import * as floatingPanel from "@sprawlify/primitives/machines/floating-panel";
|
|
10
|
+
import { OpenChangeDetails, OpenChangeDetails as FloatingPanelOpenChangeDetails, PositionChangeDetails, PositionChangeDetails as FloatingPanelPositionChangeDetails, ResizeTriggerProps, SizeChangeDetails, SizeChangeDetails as FloatingPanelSizeChangeDetails, StageChangeDetails, StageChangeDetails as FloatingPanelStageChangeDetails, StageTriggerProps, anatomy as floatingPanelAnatomy } from "@sprawlify/primitives/machines/floating-panel";
|
|
11
|
+
|
|
12
|
+
//#region src/components/floating-panel/floating-panel-body.d.ts
|
|
13
|
+
interface FloatingPanelBodyBaseProps extends PolymorphicProps {}
|
|
14
|
+
interface FloatingPanelBodyProps extends HTMLProps<"div">, FloatingPanelBodyBaseProps {}
|
|
15
|
+
declare const FloatingPanelBody: react85.ForwardRefExoticComponent<FloatingPanelBodyProps & react85.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/floating-panel/floating-panel-close-trigger.d.ts
|
|
18
|
+
interface FloatingPanelCloseTriggerBaseProps extends PolymorphicProps {}
|
|
19
|
+
interface FloatingPanelCloseTriggerProps extends HTMLProps<"button">, FloatingPanelCloseTriggerBaseProps {}
|
|
20
|
+
declare const FloatingPanelCloseTrigger: react85.ForwardRefExoticComponent<FloatingPanelCloseTriggerProps & react85.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/floating-panel/floating-panel-content.d.ts
|
|
23
|
+
interface FloatingPanelContentBaseProps extends PolymorphicProps {}
|
|
24
|
+
interface FloatingPanelContentProps extends HTMLProps<"div">, FloatingPanelContentBaseProps {}
|
|
25
|
+
declare const FloatingPanelContent: react85.ForwardRefExoticComponent<FloatingPanelContentProps & react85.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/floating-panel/use-floating-panel.d.ts
|
|
28
|
+
interface UseFloatingPanelProps extends Optional<Omit<floatingPanel.Props, "getRootNode">, "id"> {}
|
|
29
|
+
interface UseFloatingPanelReturn extends floatingPanel.Api<PropTypes> {}
|
|
30
|
+
declare const useFloatingPanel: (props?: UseFloatingPanelProps) => UseFloatingPanelReturn;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/floating-panel/use-floating-panel-context.d.ts
|
|
33
|
+
interface UseFloatingPanelContext extends UseFloatingPanelReturn {}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/components/floating-panel/floating-panel-context.d.ts
|
|
36
|
+
interface FloatingPanelContextProps {
|
|
37
|
+
children: (context: UseFloatingPanelContext) => ReactNode;
|
|
38
|
+
}
|
|
39
|
+
declare const FloatingPanelContext: (props: FloatingPanelContextProps) => ReactNode;
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/floating-panel/floating-panel-drag-trigger.d.ts
|
|
42
|
+
interface FloatingPanelDragTriggerBaseProps extends PolymorphicProps {}
|
|
43
|
+
interface FloatingPanelDragTriggerProps extends HTMLProps<"div">, FloatingPanelDragTriggerBaseProps {}
|
|
44
|
+
declare const FloatingPanelDragTrigger: react85.ForwardRefExoticComponent<FloatingPanelDragTriggerProps & react85.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/floating-panel/floating-panel-header.d.ts
|
|
47
|
+
interface FloatingPanelHeaderBaseProps extends PolymorphicProps {}
|
|
48
|
+
interface FloatingPanelHeaderProps extends HTMLProps<"div">, FloatingPanelHeaderBaseProps {}
|
|
49
|
+
declare const FloatingPanelHeader: react85.ForwardRefExoticComponent<FloatingPanelHeaderProps & react85.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/floating-panel/floating-panel-positioner.d.ts
|
|
52
|
+
interface FloatingPanelPositionerBaseProps extends PolymorphicProps {}
|
|
53
|
+
interface FloatingPanelPositionerProps extends HTMLProps<"div">, FloatingPanelPositionerBaseProps {}
|
|
54
|
+
declare const FloatingPanelPositioner: react85.ForwardRefExoticComponent<FloatingPanelPositionerProps & react85.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/components/floating-panel/floating-panel-resize-trigger.d.ts
|
|
57
|
+
interface FloatingPanelResizeTriggerBaseProps extends ResizeTriggerProps, PolymorphicProps {}
|
|
58
|
+
interface FloatingPanelResizeTriggerProps extends HTMLProps<"div">, FloatingPanelResizeTriggerBaseProps {}
|
|
59
|
+
declare const FloatingPanelResizeTrigger: react85.ForwardRefExoticComponent<FloatingPanelResizeTriggerProps & react85.RefAttributes<HTMLDivElement>>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/floating-panel/floating-panel-stage-trigger.d.ts
|
|
62
|
+
interface FloatingPanelStageTriggerBaseProps extends PolymorphicProps, StageTriggerProps {}
|
|
63
|
+
interface FloatingPanelStageTriggerProps extends HTMLProps<"button">, FloatingPanelStageTriggerBaseProps {}
|
|
64
|
+
declare const FloatingPanelStageTrigger: react85.ForwardRefExoticComponent<FloatingPanelStageTriggerProps & react85.RefAttributes<HTMLButtonElement>>;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/floating-panel/floating-panel-root.d.ts
|
|
67
|
+
interface FloatingPanelRootBaseProps extends UseFloatingPanelProps, UsePresenceProps {}
|
|
68
|
+
interface FloatingPanelRootProps extends FloatingPanelRootBaseProps {
|
|
69
|
+
children?: ReactNode | undefined;
|
|
70
|
+
}
|
|
71
|
+
declare const FloatingPanelRoot: (props: FloatingPanelRootProps) => react_jsx_runtime7.JSX.Element;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/floating-panel/floating-panel-root-provider.d.ts
|
|
74
|
+
interface RootProviderProps {
|
|
75
|
+
value: UseFloatingPanelReturn;
|
|
76
|
+
}
|
|
77
|
+
interface FloatingPanelRootProviderBaseProps extends RootProviderProps, Omit<UsePresenceProps, "present"> {}
|
|
78
|
+
interface FloatingPanelRootProviderProps extends FloatingPanelRootProviderBaseProps {
|
|
79
|
+
children?: ReactNode | undefined;
|
|
80
|
+
}
|
|
81
|
+
declare const FloatingPanelRootProvider: (props: FloatingPanelRootProviderProps) => react_jsx_runtime7.JSX.Element;
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/components/floating-panel/floating-panel-title.d.ts
|
|
84
|
+
interface FloatingPanelTitleBaseProps extends PolymorphicProps {}
|
|
85
|
+
interface FloatingPanelTitleProps extends HTMLProps<"h2">, FloatingPanelTitleBaseProps {}
|
|
86
|
+
declare const FloatingPanelTitle: react85.ForwardRefExoticComponent<FloatingPanelTitleProps & react85.RefAttributes<HTMLDivElement>>;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/components/floating-panel/floating-panel-trigger.d.ts
|
|
89
|
+
interface FloatingPanelTriggerBaseProps extends PolymorphicProps {}
|
|
90
|
+
interface FloatingPanelTriggerProps extends HTMLProps<"button">, FloatingPanelTriggerBaseProps {}
|
|
91
|
+
declare const FloatingPanelTrigger: react85.ForwardRefExoticComponent<FloatingPanelTriggerProps & react85.RefAttributes<HTMLButtonElement>>;
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/components/floating-panel/floating-panel-control.d.ts
|
|
94
|
+
interface FloatingPanelControlBaseProps extends PolymorphicProps {}
|
|
95
|
+
interface FloatingPanelControlProps extends HTMLProps<"div">, FloatingPanelControlBaseProps {}
|
|
96
|
+
declare const FloatingPanelControl: react85.ForwardRefExoticComponent<FloatingPanelControlProps & react85.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
declare namespace floating_panel_d_exports {
|
|
98
|
+
export { FloatingPanelBody as Body, FloatingPanelBodyBaseProps as BodyBaseProps, FloatingPanelBodyProps as BodyProps, FloatingPanelCloseTrigger as CloseTrigger, FloatingPanelCloseTriggerBaseProps as CloseTriggerBaseProps, FloatingPanelCloseTriggerProps as CloseTriggerProps, FloatingPanelContent as Content, FloatingPanelContentBaseProps as ContentBaseProps, FloatingPanelContentProps as ContentProps, FloatingPanelContext as Context, FloatingPanelContextProps as ContextProps, FloatingPanelControl as Control, FloatingPanelControlBaseProps as ControlBaseProps, FloatingPanelControlProps as ControlProps, FloatingPanelDragTrigger as DragTrigger, FloatingPanelDragTriggerBaseProps as DragTriggerBaseProps, FloatingPanelDragTriggerProps as DragTriggerProps, FloatingPanelHeader as Header, FloatingPanelHeaderBaseProps as HeaderBaseProps, FloatingPanelHeaderProps as HeaderProps, OpenChangeDetails, PositionChangeDetails, FloatingPanelPositioner as Positioner, FloatingPanelPositionerBaseProps as PositionerBaseProps, FloatingPanelPositionerProps as PositionerProps, FloatingPanelResizeTrigger as ResizeTrigger, FloatingPanelResizeTriggerBaseProps as ResizeTriggerBaseProps, FloatingPanelResizeTriggerProps as ResizeTriggerProps, FloatingPanelRoot as Root, FloatingPanelRootBaseProps as RootBaseProps, FloatingPanelRootProps as RootProps, FloatingPanelRootProvider as RootProvider, FloatingPanelRootProviderBaseProps as RootProviderBaseProps, FloatingPanelRootProviderProps as RootProviderProps, SizeChangeDetails, StageChangeDetails, FloatingPanelStageTrigger as StageTrigger, FloatingPanelStageTriggerBaseProps as StageTriggerBaseProps, FloatingPanelStageTriggerProps as StageTriggerProps, FloatingPanelTitle as Title, FloatingPanelTitleBaseProps as TitleBaseProps, FloatingPanelTitleProps as TitleProps, FloatingPanelTrigger as Trigger, FloatingPanelTriggerBaseProps as TriggerBaseProps, FloatingPanelTriggerProps as TriggerProps };
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { floating_panel_d_exports as FloatingPanel, FloatingPanelBody, type FloatingPanelBodyBaseProps, type FloatingPanelBodyProps, FloatingPanelCloseTrigger, type FloatingPanelCloseTriggerBaseProps, type FloatingPanelCloseTriggerProps, FloatingPanelContent, type FloatingPanelContentBaseProps, type FloatingPanelContentProps, FloatingPanelContext, type FloatingPanelContextProps, FloatingPanelControl, type FloatingPanelControlBaseProps, type FloatingPanelControlProps, FloatingPanelDragTrigger, type FloatingPanelDragTriggerBaseProps, type FloatingPanelDragTriggerProps, FloatingPanelHeader, type FloatingPanelHeaderBaseProps, type FloatingPanelHeaderProps, type FloatingPanelOpenChangeDetails, type FloatingPanelPositionChangeDetails, FloatingPanelPositioner, type FloatingPanelPositionerBaseProps, type FloatingPanelPositionerProps, FloatingPanelResizeTrigger, type FloatingPanelResizeTriggerBaseProps, type FloatingPanelResizeTriggerProps, FloatingPanelRoot, type FloatingPanelRootBaseProps, type FloatingPanelRootProps, FloatingPanelRootProvider, type FloatingPanelRootProviderBaseProps, type FloatingPanelRootProviderProps, type FloatingPanelSizeChangeDetails, type FloatingPanelStageChangeDetails, FloatingPanelStageTrigger, type FloatingPanelStageTriggerBaseProps, type FloatingPanelStageTriggerProps, FloatingPanelTitle, type FloatingPanelTitleBaseProps, type FloatingPanelTitleProps, FloatingPanelTrigger, type FloatingPanelTriggerBaseProps, type FloatingPanelTriggerProps, type UseFloatingPanelContext, type UseFloatingPanelProps, type UseFloatingPanelReturn, floatingPanelAnatomy, useFloatingPanel, useFloatingPanelContext };
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-BXPHTOwk.mjs";
|
|
2
|
+
import { i as useMachine, r as normalizeProps, t as mergeProps } from "../../core-Ba4IEjhK.mjs";
|
|
3
|
+
import { t as createContext$1 } from "../../create-context-CCXzjEv8.mjs";
|
|
4
|
+
import { n as useEnvironmentContext } from "../../environment-Ded7DkGr.mjs";
|
|
5
|
+
import { i as useLocaleContext } from "../../locale-Coin-d7R.mjs";
|
|
6
|
+
import "../../providers-Dm2P3F2_.mjs";
|
|
7
|
+
import { t as composeRefs } from "../../compose-refs-BEptPEkE.mjs";
|
|
8
|
+
import { n as sprawlify } from "../../factory-Bi8oEg8i.mjs";
|
|
9
|
+
import { t as createSplitProps } from "../../create-split-props-CBL0m-GX.mjs";
|
|
10
|
+
import { a as splitPresenceProps, i as usePresence, n as usePresenceContext, t as PresenceProvider } from "../../presence-Bc6Bxe5i.mjs";
|
|
11
|
+
import "../../use-event-4J5QFFqK.mjs";
|
|
12
|
+
import { forwardRef, useId } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as floatingPanel from "@sprawlify/primitives/machines/floating-panel";
|
|
15
|
+
import { anatomy as floatingPanelAnatomy } from "@sprawlify/primitives/machines/floating-panel";
|
|
16
|
+
|
|
17
|
+
//#region src/components/floating-panel/use-floating-panel-context.ts
|
|
18
|
+
const [FloatingPanelProvider, useFloatingPanelContext] = createContext$1({
|
|
19
|
+
name: "FloatingPanelContext",
|
|
20
|
+
hookName: "useFloatingPanelContext",
|
|
21
|
+
providerName: "<FloatingPanelProvider />"
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/floating-panel/floating-panel-body.tsx
|
|
26
|
+
const FloatingPanelBody = forwardRef((props, ref) => {
|
|
27
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getBodyProps(), props);
|
|
28
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
29
|
+
...mergedProps,
|
|
30
|
+
ref
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
FloatingPanelBody.displayName = "FloatingPanelBody";
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/floating-panel/floating-panel-close-trigger.tsx
|
|
37
|
+
const FloatingPanelCloseTrigger = forwardRef((props, ref) => {
|
|
38
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getCloseTriggerProps(), props);
|
|
39
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
40
|
+
...mergedProps,
|
|
41
|
+
ref
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
FloatingPanelCloseTrigger.displayName = "FloatingPanelCloseTrigger";
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/floating-panel/floating-panel-content.tsx
|
|
48
|
+
const FloatingPanelContent = forwardRef((props, ref) => {
|
|
49
|
+
const floatingPanel$1 = useFloatingPanelContext();
|
|
50
|
+
const presence = usePresenceContext();
|
|
51
|
+
const mergedProps = mergeProps(floatingPanel$1.getContentProps(), presence.getPresenceProps(), props);
|
|
52
|
+
if (presence.unmounted) return null;
|
|
53
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
54
|
+
...mergedProps,
|
|
55
|
+
ref: composeRefs(presence.ref, ref)
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
FloatingPanelContent.displayName = "FloatingPanelContent";
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/floating-panel/floating-panel-context.tsx
|
|
62
|
+
const FloatingPanelContext = (props) => props.children(useFloatingPanelContext());
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/components/floating-panel/floating-panel-drag-trigger.tsx
|
|
66
|
+
const FloatingPanelDragTrigger = forwardRef((props, ref) => {
|
|
67
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getDragTriggerProps(), props);
|
|
68
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
69
|
+
...mergedProps,
|
|
70
|
+
ref
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
FloatingPanelDragTrigger.displayName = "FloatingPanelDragTrigger";
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/floating-panel/floating-panel-header.tsx
|
|
77
|
+
const FloatingPanelHeader = forwardRef((props, ref) => {
|
|
78
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getHeaderProps(), props);
|
|
79
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
80
|
+
...mergedProps,
|
|
81
|
+
ref
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
FloatingPanelHeader.displayName = "FloatingPanelHeader";
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/floating-panel/floating-panel-positioner.tsx
|
|
88
|
+
const FloatingPanelPositioner = forwardRef((props, ref) => {
|
|
89
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getPositionerProps(), props);
|
|
90
|
+
if (usePresenceContext().unmounted) return null;
|
|
91
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
92
|
+
...mergedProps,
|
|
93
|
+
ref
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
FloatingPanelPositioner.displayName = "FloatingPanelPositioner";
|
|
97
|
+
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/components/floating-panel/floating-panel-resize-trigger.tsx
|
|
100
|
+
const splitResizeTriggerProps = createSplitProps();
|
|
101
|
+
const FloatingPanelResizeTrigger = forwardRef((props, ref) => {
|
|
102
|
+
const [resizeProps, localProps] = splitResizeTriggerProps(props, ["axis"]);
|
|
103
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getResizeTriggerProps(resizeProps), localProps);
|
|
104
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
105
|
+
...mergedProps,
|
|
106
|
+
ref
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
FloatingPanelResizeTrigger.displayName = "FloatingPanelResizeTrigger";
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/components/floating-panel/floating-panel-stage-trigger.tsx
|
|
113
|
+
const splitStageTriggerProps = createSplitProps();
|
|
114
|
+
const FloatingPanelStageTrigger = forwardRef((props, ref) => {
|
|
115
|
+
const [stage, localProps] = splitStageTriggerProps(props, ["stage"]);
|
|
116
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getStageTriggerProps(stage), localProps);
|
|
117
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
118
|
+
...mergedProps,
|
|
119
|
+
ref
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
FloatingPanelStageTrigger.displayName = "FloatingPanelStageTrigger";
|
|
123
|
+
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/components/floating-panel/use-floating-panel.ts
|
|
126
|
+
const useFloatingPanel = (props = {}) => {
|
|
127
|
+
const { getRootNode } = useEnvironmentContext();
|
|
128
|
+
const { dir } = useLocaleContext();
|
|
129
|
+
const context = {
|
|
130
|
+
id: useId(),
|
|
131
|
+
dir,
|
|
132
|
+
getRootNode,
|
|
133
|
+
...props
|
|
134
|
+
};
|
|
135
|
+
const service = useMachine(floatingPanel.machine, context);
|
|
136
|
+
return floatingPanel.connect(service, normalizeProps);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/components/floating-panel/floating-panel-root.tsx
|
|
141
|
+
const splitRootProps = createSplitProps();
|
|
142
|
+
const FloatingPanelRoot = (props) => {
|
|
143
|
+
const [presenceProps, otherProps] = splitPresenceProps(props);
|
|
144
|
+
const [useFloatingPanelProps, localProps] = splitRootProps(otherProps, [
|
|
145
|
+
"allowOverflow",
|
|
146
|
+
"closeOnEscape",
|
|
147
|
+
"defaultOpen",
|
|
148
|
+
"defaultPosition",
|
|
149
|
+
"defaultSize",
|
|
150
|
+
"dir",
|
|
151
|
+
"disabled",
|
|
152
|
+
"draggable",
|
|
153
|
+
"getAnchorPosition",
|
|
154
|
+
"getBoundaryEl",
|
|
155
|
+
"gridSize",
|
|
156
|
+
"id",
|
|
157
|
+
"ids",
|
|
158
|
+
"lockAspectRatio",
|
|
159
|
+
"maxSize",
|
|
160
|
+
"minSize",
|
|
161
|
+
"onOpenChange",
|
|
162
|
+
"onPositionChange",
|
|
163
|
+
"onPositionChangeEnd",
|
|
164
|
+
"onSizeChange",
|
|
165
|
+
"onSizeChangeEnd",
|
|
166
|
+
"onStageChange",
|
|
167
|
+
"open",
|
|
168
|
+
"persistRect",
|
|
169
|
+
"position",
|
|
170
|
+
"resizable",
|
|
171
|
+
"size",
|
|
172
|
+
"strategy",
|
|
173
|
+
"translations"
|
|
174
|
+
]);
|
|
175
|
+
const floatingPanel$1 = useFloatingPanel(useFloatingPanelProps);
|
|
176
|
+
return /* @__PURE__ */ jsx(FloatingPanelProvider, {
|
|
177
|
+
value: floatingPanel$1,
|
|
178
|
+
children: /* @__PURE__ */ jsx(PresenceProvider, {
|
|
179
|
+
value: usePresence(mergeProps({ present: floatingPanel$1.open }, presenceProps)),
|
|
180
|
+
children: localProps.children
|
|
181
|
+
})
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/components/floating-panel/floating-panel-root-provider.tsx
|
|
187
|
+
const splitRootProviderProps = createSplitProps();
|
|
188
|
+
const FloatingPanelRootProvider = (props) => {
|
|
189
|
+
const [presenceProps, baseProps] = splitPresenceProps(props);
|
|
190
|
+
const [{ value: floatingPanel$1 }, localProps] = splitRootProviderProps(baseProps, ["value"]);
|
|
191
|
+
return /* @__PURE__ */ jsx(FloatingPanelProvider, {
|
|
192
|
+
value: floatingPanel$1,
|
|
193
|
+
children: /* @__PURE__ */ jsx(PresenceProvider, {
|
|
194
|
+
value: usePresence(mergeProps({ present: floatingPanel$1.open }, presenceProps)),
|
|
195
|
+
children: localProps.children
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/components/floating-panel/floating-panel-title.tsx
|
|
202
|
+
const FloatingPanelTitle = forwardRef((props, ref) => {
|
|
203
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getTitleProps(), props);
|
|
204
|
+
return /* @__PURE__ */ jsx(sprawlify.h2, {
|
|
205
|
+
...mergedProps,
|
|
206
|
+
ref
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
FloatingPanelTitle.displayName = "FloatingPanelTitle";
|
|
210
|
+
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/components/floating-panel/floating-panel-trigger.tsx
|
|
213
|
+
const FloatingPanelTrigger = forwardRef((props, ref) => {
|
|
214
|
+
const floatingPanel$1 = useFloatingPanelContext();
|
|
215
|
+
const presence = usePresenceContext();
|
|
216
|
+
const triggerProps = floatingPanel$1.getTriggerProps();
|
|
217
|
+
const mergedProps = mergeProps({
|
|
218
|
+
...triggerProps,
|
|
219
|
+
"aria-controls": presence.unmounted ? void 0 : triggerProps["aria-controls"]
|
|
220
|
+
}, props);
|
|
221
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
222
|
+
...mergedProps,
|
|
223
|
+
ref
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
FloatingPanelTrigger.displayName = "FloatingPanelTrigger";
|
|
227
|
+
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/components/floating-panel/floating-panel-control.tsx
|
|
230
|
+
const FloatingPanelControl = forwardRef((props, ref) => {
|
|
231
|
+
const mergedProps = mergeProps(useFloatingPanelContext().getControlProps(), props);
|
|
232
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
233
|
+
...mergedProps,
|
|
234
|
+
ref
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
FloatingPanelControl.displayName = "FloatingPanelControl";
|
|
238
|
+
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/components/floating-panel/floating-panel.ts
|
|
241
|
+
var floating_panel_exports = /* @__PURE__ */ __export({
|
|
242
|
+
Body: () => FloatingPanelBody,
|
|
243
|
+
CloseTrigger: () => FloatingPanelCloseTrigger,
|
|
244
|
+
Content: () => FloatingPanelContent,
|
|
245
|
+
Context: () => FloatingPanelContext,
|
|
246
|
+
Control: () => FloatingPanelControl,
|
|
247
|
+
DragTrigger: () => FloatingPanelDragTrigger,
|
|
248
|
+
Header: () => FloatingPanelHeader,
|
|
249
|
+
Positioner: () => FloatingPanelPositioner,
|
|
250
|
+
ResizeTrigger: () => FloatingPanelResizeTrigger,
|
|
251
|
+
Root: () => FloatingPanelRoot,
|
|
252
|
+
RootProvider: () => FloatingPanelRootProvider,
|
|
253
|
+
StageTrigger: () => FloatingPanelStageTrigger,
|
|
254
|
+
Title: () => FloatingPanelTitle,
|
|
255
|
+
Trigger: () => FloatingPanelTrigger
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
//#endregion
|
|
259
|
+
export { floating_panel_exports as FloatingPanel, FloatingPanelBody, FloatingPanelCloseTrigger, FloatingPanelContent, FloatingPanelContext, FloatingPanelControl, FloatingPanelDragTrigger, FloatingPanelHeader, FloatingPanelPositioner, FloatingPanelResizeTrigger, FloatingPanelRoot, FloatingPanelRootProvider, FloatingPanelStageTrigger, FloatingPanelTitle, FloatingPanelTrigger, floatingPanelAnatomy, useFloatingPanel, useFloatingPanelContext };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const require_chunk = require('../../chunk-BYnRvbsk.cjs');
|
|
2
|
+
const require_compose_refs = require('../../compose-refs-C5QNDywq.cjs');
|
|
3
|
+
const require_factory = require('../../factory-C166evrS.cjs');
|
|
4
|
+
const require_create_split_props = require('../../create-split-props-Dp4TWOyM.cjs');
|
|
5
|
+
const require_use_safe_layout_effect = require('../../use-safe-layout-effect-C2GgvNT3.cjs');
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let __sprawlify_primitives_focus_trap = require("@sprawlify/primitives/focus-trap");
|
|
9
|
+
|
|
10
|
+
//#region src/components/focus-trap/focus-trap.tsx
|
|
11
|
+
const splitTrapProps = require_create_split_props.createSplitProps();
|
|
12
|
+
const FocusTrap = (0, react.forwardRef)((props, ref) => {
|
|
13
|
+
const localRef = (0, react.useRef)(null);
|
|
14
|
+
const [trapProps, localProps] = splitTrapProps(props, [
|
|
15
|
+
"disabled",
|
|
16
|
+
"onActivate",
|
|
17
|
+
"onDeactivate",
|
|
18
|
+
"initialFocus",
|
|
19
|
+
"fallbackFocus",
|
|
20
|
+
"returnFocusOnDeactivate",
|
|
21
|
+
"setReturnFocus"
|
|
22
|
+
]);
|
|
23
|
+
require_use_safe_layout_effect.useSafeLayoutEffect(() => {
|
|
24
|
+
const node = localRef.current;
|
|
25
|
+
if (!node || trapProps.disabled) return;
|
|
26
|
+
return (0, __sprawlify_primitives_focus_trap.trapFocus)(node, trapProps);
|
|
27
|
+
}, [ref, trapProps]);
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
|
|
29
|
+
ref: require_compose_refs.composeRefs(localRef, ref),
|
|
30
|
+
...localProps
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
FocusTrap.displayName = "FocusTrap";
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.FocusTrap = FocusTrap;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { t as Assign } from "../../types-B4tvWlDb.cjs";
|
|
2
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-C4cfTHs7.cjs";
|
|
3
|
+
import * as react30 from "react";
|
|
4
|
+
import { FocusTrapOptions } from "@sprawlify/primitives/focus-trap";
|
|
5
|
+
|
|
6
|
+
//#region src/components/focus-trap/focus-trap.d.ts
|
|
7
|
+
interface TrapOptions extends Pick<FocusTrapOptions, "onActivate" | "onDeactivate" | "initialFocus" | "fallbackFocus" | "returnFocusOnDeactivate" | "setReturnFocus"> {
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
}
|
|
10
|
+
interface FocusTrapBaseProps extends PolymorphicProps, TrapOptions {}
|
|
11
|
+
interface FocusTrapProps extends Assign<HTMLProps<"div">, FocusTrapBaseProps> {}
|
|
12
|
+
declare const FocusTrap: react30.ForwardRefExoticComponent<FocusTrapProps & react30.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { FocusTrap, type FocusTrapBaseProps, type FocusTrapProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { t as Assign } from "../../types-BmBABPZb.mjs";
|
|
2
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-C-EBNsCW.mjs";
|
|
3
|
+
import * as react80 from "react";
|
|
4
|
+
import { FocusTrapOptions } from "@sprawlify/primitives/focus-trap";
|
|
5
|
+
|
|
6
|
+
//#region src/components/focus-trap/focus-trap.d.ts
|
|
7
|
+
interface TrapOptions extends Pick<FocusTrapOptions, "onActivate" | "onDeactivate" | "initialFocus" | "fallbackFocus" | "returnFocusOnDeactivate" | "setReturnFocus"> {
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
}
|
|
10
|
+
interface FocusTrapBaseProps extends PolymorphicProps, TrapOptions {}
|
|
11
|
+
interface FocusTrapProps extends Assign<HTMLProps<"div">, FocusTrapBaseProps> {}
|
|
12
|
+
declare const FocusTrap: react80.ForwardRefExoticComponent<FocusTrapProps & react80.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { FocusTrap, type FocusTrapBaseProps, type FocusTrapProps };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as composeRefs } from "../../compose-refs-BEptPEkE.mjs";
|
|
2
|
+
import { n as sprawlify } from "../../factory-Bi8oEg8i.mjs";
|
|
3
|
+
import { t as createSplitProps } from "../../create-split-props-CBL0m-GX.mjs";
|
|
4
|
+
import { t as useSafeLayoutEffect } from "../../use-safe-layout-effect-CLjnuJFb.mjs";
|
|
5
|
+
import { forwardRef, useRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { trapFocus } from "@sprawlify/primitives/focus-trap";
|
|
8
|
+
|
|
9
|
+
//#region src/components/focus-trap/focus-trap.tsx
|
|
10
|
+
const splitTrapProps = createSplitProps();
|
|
11
|
+
const FocusTrap = forwardRef((props, ref) => {
|
|
12
|
+
const localRef = useRef(null);
|
|
13
|
+
const [trapProps, localProps] = splitTrapProps(props, [
|
|
14
|
+
"disabled",
|
|
15
|
+
"onActivate",
|
|
16
|
+
"onDeactivate",
|
|
17
|
+
"initialFocus",
|
|
18
|
+
"fallbackFocus",
|
|
19
|
+
"returnFocusOnDeactivate",
|
|
20
|
+
"setReturnFocus"
|
|
21
|
+
]);
|
|
22
|
+
useSafeLayoutEffect(() => {
|
|
23
|
+
const node = localRef.current;
|
|
24
|
+
if (!node || trapProps.disabled) return;
|
|
25
|
+
return trapFocus(node, trapProps);
|
|
26
|
+
}, [ref, trapProps]);
|
|
27
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
28
|
+
ref: composeRefs(localRef, ref),
|
|
29
|
+
...localProps
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
FocusTrap.displayName = "FocusTrap";
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { FocusTrap };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const require_chunk = require('../../chunk-BYnRvbsk.cjs');
|
|
2
|
+
require('../../create-context-CQ4U0lLj.cjs');
|
|
3
|
+
const require_locale = require('../../locale-BcnWD1Hf.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let __sprawlify_primitives_i18n_utils = require("@sprawlify/primitives/i18n-utils");
|
|
7
|
+
|
|
8
|
+
//#region src/components/format/format-byte.tsx
|
|
9
|
+
const FormatByte = (props) => {
|
|
10
|
+
const { locale } = require_locale.useLocaleContext();
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: (0, react.useMemo)(() => {
|
|
12
|
+
const { value, ...intlOptions } = props;
|
|
13
|
+
return (0, __sprawlify_primitives_i18n_utils.formatBytes)(value, locale, intlOptions);
|
|
14
|
+
}, [props, locale]) });
|
|
15
|
+
};
|
|
16
|
+
FormatByte.displayName = "FormatByte";
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/format/format-number.tsx
|
|
20
|
+
const FormatNumber = (props) => {
|
|
21
|
+
const { locale } = require_locale.useLocaleContext();
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: (0, react.useMemo)(() => {
|
|
23
|
+
const { value, ...intlOptions } = props;
|
|
24
|
+
return (0, __sprawlify_primitives_i18n_utils.formatNumber)(value, locale, intlOptions);
|
|
25
|
+
}, [props, locale]) });
|
|
26
|
+
};
|
|
27
|
+
FormatNumber.displayName = "FormatNumber";
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/components/format/format-relative-time.tsx
|
|
31
|
+
const FormatRelativeTime = (props) => {
|
|
32
|
+
const { locale } = require_locale.useLocaleContext();
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: (0, react.useMemo)(() => {
|
|
34
|
+
const { value, ...intlOptions } = props;
|
|
35
|
+
return (0, __sprawlify_primitives_i18n_utils.formatRelativeTime)(value, locale, intlOptions);
|
|
36
|
+
}, [props, locale]) });
|
|
37
|
+
};
|
|
38
|
+
FormatRelativeTime.displayName = "FormatRelativeTime";
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/format/format.ts
|
|
42
|
+
var format_exports = /* @__PURE__ */ require_chunk.__export({
|
|
43
|
+
Byte: () => FormatByte,
|
|
44
|
+
Number: () => FormatNumber,
|
|
45
|
+
RelativeTime: () => FormatRelativeTime
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
Object.defineProperty(exports, 'Format', {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return format_exports;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
exports.FormatByte = FormatByte;
|
|
56
|
+
exports.FormatNumber = FormatNumber;
|
|
57
|
+
exports.FormatRelativeTime = FormatRelativeTime;
|