@sprawlify/react 0.0.4 → 0.0.6
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/{collapsible-uHsTDy9p.mjs → collapsible-DYgHs1_i.mjs} +5 -14
- package/dist/{collapsible-ztcYulwp.cjs → collapsible-D_cXuaRy.cjs} +3 -18
- package/dist/components/accordion/index.cjs +7 -6
- package/dist/components/accordion/index.d.cts +9 -9
- package/dist/components/accordion/index.d.mts +9 -9
- package/dist/components/accordion/index.mjs +5 -4
- package/dist/components/angle-slider/index.cjs +203 -0
- package/dist/components/angle-slider/index.d.cts +72 -0
- package/dist/components/angle-slider/index.d.mts +72 -0
- package/dist/components/angle-slider/index.mjs +180 -0
- package/dist/components/avatar/index.cjs +125 -0
- package/dist/components/avatar/index.d.cts +47 -0
- package/dist/components/avatar/index.d.mts +47 -0
- package/dist/components/avatar/index.mjs +107 -0
- package/dist/components/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.d.cts +8 -8
- package/dist/components/collapsible/index.d.mts +8 -8
- package/dist/components/collapsible/index.mjs +3 -3
- package/dist/create-split-props-BFscidWy.mjs +11 -0
- package/dist/create-split-props-CSaOnJRj.cjs +17 -0
- package/dist/{factory-BvslhNMh.mjs → factory-DN0EdT7u.mjs} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{render-strategy-CErLP5e-.d.cts → render-strategy-RT-KvAqO.d.cts} +1 -2
- 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 +22 -2
- /package/dist/{chunk-Be3lCSWa.mjs → chunk-CYMnug_4.mjs} +0 -0
- /package/dist/{create-context-C0L0yhLQ.mjs → create-context-DGYD_HQt.mjs} +0 -0
- /package/dist/{factory-B3Fr36su.d.cts → factory-BZBSaT-0.d.cts} +0 -0
- /package/dist/{factory-BV5hc6hz.d.mts → factory-DaVMAttY.d.mts} +0 -0
- /package/dist/{index-Bk-VrHD9.d.cts → index-DiYk6N_L.d.cts} +0 -0
- /package/dist/{index-lntzaDM3.d.mts → index-OOf7QNG5.d.mts} +0 -0
- /package/dist/{render-strategy-BfNJW1Xz.d.mts → render-strategy--1FNKx5x.d.mts} +0 -0
- /package/dist/{utils-Q0vUJnHt.mjs → utils-nfWHwVIS.mjs} +0 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-CYMnug_4.mjs";
|
|
2
|
+
import { c as useEnvironmentContext, d as normalizeProps, f as useMachine, l as mergeProps, n as sprawlify, o as useLocaleContext } from "../../factory-DN0EdT7u.mjs";
|
|
3
|
+
import { t as createContext$1 } from "../../create-context-DGYD_HQt.mjs";
|
|
4
|
+
import { t as createSplitProps } from "../../create-split-props-BFscidWy.mjs";
|
|
5
|
+
import { forwardRef, useId } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as angleSlider from "@sprawlify/primitives/machines/angle-slider";
|
|
8
|
+
import { anatomy as angleSliderAnatomy } from "@sprawlify/primitives/machines/angle-slider";
|
|
9
|
+
|
|
10
|
+
//#region src/components/angle-slider/use-angle-slider-context.ts
|
|
11
|
+
const [AngleSliderProvider, useAngleSliderContext] = createContext$1({
|
|
12
|
+
name: "AngleSliderContext",
|
|
13
|
+
hookName: "useAngleSliderContext",
|
|
14
|
+
providerName: "<AngleSliderProvider />"
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/angle-slider/angle-slider-context.tsx
|
|
19
|
+
const AngleSliderContext = (props) => props.children(useAngleSliderContext());
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/angle-slider/angle-slider-control.tsx
|
|
23
|
+
const AngleSliderControl = forwardRef((props, ref) => {
|
|
24
|
+
const mergedProps = mergeProps(useAngleSliderContext().getControlProps(), props);
|
|
25
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
26
|
+
...mergedProps,
|
|
27
|
+
ref
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
AngleSliderControl.displayName = "AngleSliderControl";
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/angle-slider/angle-slider-hidden-input.tsx
|
|
34
|
+
const AngleSliderHiddenInput = forwardRef((props, ref) => {
|
|
35
|
+
const mergedProps = mergeProps(useAngleSliderContext().getHiddenInputProps(), props);
|
|
36
|
+
return /* @__PURE__ */ jsx(sprawlify.input, {
|
|
37
|
+
...mergedProps,
|
|
38
|
+
ref
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
AngleSliderHiddenInput.displayName = "AngleSliderHiddenInput";
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/angle-slider/angle-slider-label.tsx
|
|
45
|
+
const AngleSliderLabel = forwardRef((props, ref) => {
|
|
46
|
+
const mergedProps = mergeProps(useAngleSliderContext().getLabelProps(), props);
|
|
47
|
+
return /* @__PURE__ */ jsx(sprawlify.label, {
|
|
48
|
+
...mergedProps,
|
|
49
|
+
ref
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
AngleSliderLabel.displayName = "AngleSliderLabel";
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/angle-slider/angle-slider-marker.tsx
|
|
56
|
+
const splitMarkerProps = createSplitProps();
|
|
57
|
+
const AngleSliderMarker = forwardRef((props, ref) => {
|
|
58
|
+
const [markerProps, localProps] = splitMarkerProps(props, ["value"]);
|
|
59
|
+
const mergedProps = mergeProps(useAngleSliderContext().getMarkerProps(markerProps), localProps);
|
|
60
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
61
|
+
...mergedProps,
|
|
62
|
+
ref
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
AngleSliderMarker.displayName = "AngleSliderMarker";
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/angle-slider/angle-slider-marker-group.tsx
|
|
69
|
+
const AngleSliderMarkerGroup = forwardRef((props, ref) => {
|
|
70
|
+
const mergedProps = mergeProps(useAngleSliderContext().getMarkerGroupProps(), props);
|
|
71
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
72
|
+
...mergedProps,
|
|
73
|
+
ref
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
AngleSliderMarkerGroup.displayName = "AngleSliderMarkerGroup";
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/components/angle-slider/use-angle-slider.ts
|
|
80
|
+
const useAngleSlider = (props) => {
|
|
81
|
+
const id = useId();
|
|
82
|
+
const { getRootNode } = useEnvironmentContext();
|
|
83
|
+
const { dir } = useLocaleContext();
|
|
84
|
+
const machineProps = {
|
|
85
|
+
id,
|
|
86
|
+
dir,
|
|
87
|
+
getRootNode,
|
|
88
|
+
...props
|
|
89
|
+
};
|
|
90
|
+
const service = useMachine(angleSlider.machine, machineProps);
|
|
91
|
+
return angleSlider.connect(service, normalizeProps);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/components/angle-slider/angle-slider-root.tsx
|
|
96
|
+
const splitRootProps = createSplitProps();
|
|
97
|
+
const AngleSliderRoot = forwardRef((props, ref) => {
|
|
98
|
+
const [useAngleSliderProps, localProps] = splitRootProps(props, [
|
|
99
|
+
"id",
|
|
100
|
+
"ids",
|
|
101
|
+
"name",
|
|
102
|
+
"invalid",
|
|
103
|
+
"readOnly",
|
|
104
|
+
"disabled",
|
|
105
|
+
"onValueChangeEnd",
|
|
106
|
+
"onValueChange",
|
|
107
|
+
"defaultValue",
|
|
108
|
+
"value",
|
|
109
|
+
"step",
|
|
110
|
+
"aria-label",
|
|
111
|
+
"aria-labelledby"
|
|
112
|
+
]);
|
|
113
|
+
const angleSlider$1 = useAngleSlider(useAngleSliderProps);
|
|
114
|
+
const mergedProps = mergeProps(angleSlider$1.getRootProps(), localProps);
|
|
115
|
+
return /* @__PURE__ */ jsx(AngleSliderProvider, {
|
|
116
|
+
value: angleSlider$1,
|
|
117
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
118
|
+
...mergedProps,
|
|
119
|
+
ref
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
AngleSliderRoot.displayName = "AngleSliderRoot";
|
|
124
|
+
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/components/angle-slider/angle-slider-root-provider.tsx
|
|
127
|
+
const splitRootProviderProps = createSplitProps();
|
|
128
|
+
const AngleSliderRootProvider = forwardRef((props, ref) => {
|
|
129
|
+
const [{ value: angleSlider$1 }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
130
|
+
const mergedProps = mergeProps(angleSlider$1.getRootProps(), localProps);
|
|
131
|
+
return /* @__PURE__ */ jsx(AngleSliderProvider, {
|
|
132
|
+
value: angleSlider$1,
|
|
133
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
134
|
+
...mergedProps,
|
|
135
|
+
ref
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
AngleSliderRootProvider.displayName = "AngleSliderRootProvider";
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/components/angle-slider/angle-slider-thumb.tsx
|
|
143
|
+
const AngleSliderThumb = forwardRef((props, ref) => {
|
|
144
|
+
const mergedProps = mergeProps(useAngleSliderContext().getThumbProps(), props);
|
|
145
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
146
|
+
...mergedProps,
|
|
147
|
+
ref
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
AngleSliderThumb.displayName = "AngleSliderThumb";
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/components/angle-slider/angle-slider-value-text.tsx
|
|
154
|
+
const AngleSliderValueText = forwardRef((props, ref) => {
|
|
155
|
+
const angleSlider$1 = useAngleSliderContext();
|
|
156
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
157
|
+
...props,
|
|
158
|
+
ref,
|
|
159
|
+
children: props.children || angleSlider$1.valueAsDegree
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
AngleSliderValueText.displayName = "AngleSliderValueText";
|
|
163
|
+
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/components/angle-slider/angle-slider.ts
|
|
166
|
+
var angle_slider_exports = /* @__PURE__ */ __export({
|
|
167
|
+
Context: () => AngleSliderContext,
|
|
168
|
+
Control: () => AngleSliderControl,
|
|
169
|
+
HiddenInput: () => AngleSliderHiddenInput,
|
|
170
|
+
Label: () => AngleSliderLabel,
|
|
171
|
+
Marker: () => AngleSliderMarker,
|
|
172
|
+
MarkerGroup: () => AngleSliderMarkerGroup,
|
|
173
|
+
Root: () => AngleSliderRoot,
|
|
174
|
+
RootProvider: () => AngleSliderRootProvider,
|
|
175
|
+
Thumb: () => AngleSliderThumb,
|
|
176
|
+
ValueText: () => AngleSliderValueText
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
//#endregion
|
|
180
|
+
export { angle_slider_exports as AngleSlider, AngleSliderContext, AngleSliderControl, AngleSliderHiddenInput, AngleSliderLabel, AngleSliderMarker, AngleSliderMarkerGroup, AngleSliderRoot, AngleSliderRootProvider, AngleSliderThumb, AngleSliderValueText, angleSliderAnatomy, useAngleSlider, useAngleSliderContext };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
const require_factory = require('../../factory-CfqPG186.cjs');
|
|
2
|
+
const require_create_context = require('../../create-context-DCEySQ7J.cjs');
|
|
3
|
+
const require_create_split_props = require('../../create-split-props-CSaOnJRj.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let __sprawlify_primitives_machines_avatar = require("@sprawlify/primitives/machines/avatar");
|
|
7
|
+
__sprawlify_primitives_machines_avatar = require_factory.__toESM(__sprawlify_primitives_machines_avatar);
|
|
8
|
+
let __sprawlify_primitives_core = require("@sprawlify/primitives/core");
|
|
9
|
+
|
|
10
|
+
//#region src/components/avatar/use-avatar-context.ts
|
|
11
|
+
const [AvatarProvider, useAvatarContext] = require_create_context.createContext({
|
|
12
|
+
name: "AvatarContext",
|
|
13
|
+
hookName: "useAvatarContext",
|
|
14
|
+
providerName: "<AvatarProvider />"
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/avatar/avatar-context.tsx
|
|
19
|
+
const AvatarContext = (props) => props.children(useAvatarContext());
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/avatar/avatar-fallback.tsx
|
|
23
|
+
const AvatarFallback = (0, react.forwardRef)((props, ref) => {
|
|
24
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(useAvatarContext().getFallbackProps(), props);
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.span, {
|
|
26
|
+
...mergedProps,
|
|
27
|
+
ref
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
AvatarFallback.displayName = "AvatarFallback";
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/avatar/avatar-image.tsx
|
|
34
|
+
const AvatarImage = (0, react.forwardRef)((props, ref) => {
|
|
35
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(useAvatarContext().getImageProps(), props);
|
|
36
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.img, {
|
|
37
|
+
...mergedProps,
|
|
38
|
+
ref
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
AvatarImage.displayName = "AvatarImage";
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/avatar/use-avatar.ts
|
|
45
|
+
const useAvatar = (props) => {
|
|
46
|
+
const id = (0, react.useId)();
|
|
47
|
+
const { getRootNode } = require_factory.useEnvironmentContext();
|
|
48
|
+
const { dir } = require_factory.useLocaleContext();
|
|
49
|
+
const context = {
|
|
50
|
+
id,
|
|
51
|
+
dir,
|
|
52
|
+
getRootNode,
|
|
53
|
+
...props
|
|
54
|
+
};
|
|
55
|
+
const service = require_factory.useMachine(__sprawlify_primitives_machines_avatar.machine, context);
|
|
56
|
+
return __sprawlify_primitives_machines_avatar.connect(service, require_factory.normalizeProps);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/avatar/avatar-root.tsx
|
|
61
|
+
const splitRootProps = require_create_split_props.createSplitProps();
|
|
62
|
+
const AvatarRoot = (0, react.forwardRef)((props, ref) => {
|
|
63
|
+
const [useAvatarProps, localProps] = splitRootProps(props, [
|
|
64
|
+
"id",
|
|
65
|
+
"ids",
|
|
66
|
+
"onStatusChange"
|
|
67
|
+
]);
|
|
68
|
+
const avatar = useAvatar(useAvatarProps);
|
|
69
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(avatar.getRootProps(), localProps);
|
|
70
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarProvider, {
|
|
71
|
+
value: avatar,
|
|
72
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
|
|
73
|
+
...mergedProps,
|
|
74
|
+
ref
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
AvatarRoot.displayName = "AvatarRoot";
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/components/avatar/avatar-root-provider.tsx
|
|
82
|
+
const splitRootProviderProps = require_create_split_props.createSplitProps();
|
|
83
|
+
const AvatarRootProvider = (0, react.forwardRef)((props, ref) => {
|
|
84
|
+
const [{ value: avatar }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
85
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(avatar.getRootProps(), localProps);
|
|
86
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarProvider, {
|
|
87
|
+
value: avatar,
|
|
88
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
|
|
89
|
+
...mergedProps,
|
|
90
|
+
ref
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
AvatarRootProvider.displayName = "AvatarRootProvider";
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/components/avatar/avatar.ts
|
|
98
|
+
var avatar_exports = /* @__PURE__ */ require_factory.__export({
|
|
99
|
+
Context: () => AvatarContext,
|
|
100
|
+
Fallback: () => AvatarFallback,
|
|
101
|
+
Image: () => AvatarImage,
|
|
102
|
+
Root: () => AvatarRoot,
|
|
103
|
+
RootProvider: () => AvatarRootProvider
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
Object.defineProperty(exports, 'Avatar', {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: function () {
|
|
110
|
+
return avatar_exports;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
exports.AvatarContext = AvatarContext;
|
|
114
|
+
exports.AvatarFallback = AvatarFallback;
|
|
115
|
+
exports.AvatarImage = AvatarImage;
|
|
116
|
+
exports.AvatarRoot = AvatarRoot;
|
|
117
|
+
exports.AvatarRootProvider = AvatarRootProvider;
|
|
118
|
+
Object.defineProperty(exports, 'avatarAnatomy', {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () {
|
|
121
|
+
return __sprawlify_primitives_machines_avatar.anatomy;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
exports.useAvatar = useAvatar;
|
|
125
|
+
exports.useAvatarContext = useAvatarContext;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { c as PropTypes, r as PolymorphicProps, s as Optional, t as HTMLProps } from "../../factory-BZBSaT-0.cjs";
|
|
2
|
+
import * as react0 from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import * as avatar from "@sprawlify/primitives/machines/avatar";
|
|
5
|
+
import { StatusChangeDetails, StatusChangeDetails as AvatarStatusChangeDetails, anatomy as avatarAnatomy } from "@sprawlify/primitives/machines/avatar";
|
|
6
|
+
|
|
7
|
+
//#region src/components/avatar/use-avatar.d.ts
|
|
8
|
+
interface UseAvatarProps extends Optional<Omit<avatar.Props, "dir" | "getRootNode">, "id"> {}
|
|
9
|
+
interface UseAvatarReturn extends avatar.Api<PropTypes> {}
|
|
10
|
+
declare const useAvatar: (props?: UseAvatarProps) => UseAvatarReturn;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/avatar/use-avatar-context.d.ts
|
|
13
|
+
interface UseAvatarContext extends UseAvatarReturn {}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/avatar/avatar-context.d.ts
|
|
16
|
+
interface AvatarContextProps {
|
|
17
|
+
children: (context: UseAvatarContext) => ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare const AvatarContext: (props: AvatarContextProps) => ReactNode;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/avatar/avatar-fallback.d.ts
|
|
22
|
+
interface AvatarFallbackBaseProps extends PolymorphicProps {}
|
|
23
|
+
interface AvatarFallbackProps extends HTMLProps<"span">, AvatarFallbackBaseProps {}
|
|
24
|
+
declare const AvatarFallback: react0.ForwardRefExoticComponent<AvatarFallbackProps & react0.RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/avatar/avatar-image.d.ts
|
|
27
|
+
interface AvatarImageBaseProps extends PolymorphicProps {}
|
|
28
|
+
interface AvatarImageProps extends HTMLProps<"img">, AvatarImageBaseProps {}
|
|
29
|
+
declare const AvatarImage: react0.ForwardRefExoticComponent<AvatarImageProps & react0.RefAttributes<HTMLImageElement>>;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/avatar/avatar-root.d.ts
|
|
32
|
+
interface AvatarRootBaseProps extends UseAvatarProps, PolymorphicProps {}
|
|
33
|
+
interface AvatarRootProps extends HTMLProps<"div">, AvatarRootBaseProps {}
|
|
34
|
+
declare const AvatarRoot: react0.ForwardRefExoticComponent<AvatarRootProps & react0.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/avatar/avatar-root-provider.d.ts
|
|
37
|
+
interface RootProviderProps {
|
|
38
|
+
value: UseAvatarReturn;
|
|
39
|
+
}
|
|
40
|
+
interface AvatarRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
41
|
+
interface AvatarRootProviderProps extends HTMLProps<"div">, AvatarRootProviderBaseProps {}
|
|
42
|
+
declare const AvatarRootProvider: react0.ForwardRefExoticComponent<AvatarRootProviderProps & react0.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
declare namespace avatar_d_exports {
|
|
44
|
+
export { AvatarContext as Context, AvatarContextProps as ContextProps, AvatarFallback as Fallback, AvatarFallbackBaseProps as FallbackBaseProps, AvatarFallbackProps as FallbackProps, AvatarImage as Image, AvatarImageBaseProps as ImageBaseProps, AvatarImageProps as ImageProps, AvatarRoot as Root, AvatarRootBaseProps as RootBaseProps, AvatarRootProps as RootProps, AvatarRootProvider as RootProvider, AvatarRootProviderBaseProps as RootProviderBaseProps, AvatarRootProviderProps as RootProviderProps, StatusChangeDetails };
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { avatar_d_exports as Avatar, AvatarContext, type AvatarContextProps, AvatarFallback, type AvatarFallbackBaseProps, type AvatarFallbackProps, AvatarImage, type AvatarImageBaseProps, type AvatarImageProps, AvatarRoot, type AvatarRootBaseProps, type AvatarRootProps, AvatarRootProvider, type AvatarRootProviderBaseProps, type AvatarRootProviderProps, type AvatarStatusChangeDetails, type UseAvatarContext, type UseAvatarProps, type UseAvatarReturn, avatarAnatomy, useAvatar, useAvatarContext };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { r as PolymorphicProps, s as Optional, t as HTMLProps, u as PropTypes } from "../../factory-DaVMAttY.mjs";
|
|
2
|
+
import * as react0 from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import * as avatar from "@sprawlify/primitives/machines/avatar";
|
|
5
|
+
import { StatusChangeDetails, StatusChangeDetails as AvatarStatusChangeDetails, anatomy as avatarAnatomy } from "@sprawlify/primitives/machines/avatar";
|
|
6
|
+
|
|
7
|
+
//#region src/components/avatar/use-avatar.d.ts
|
|
8
|
+
interface UseAvatarProps extends Optional<Omit<avatar.Props, "dir" | "getRootNode">, "id"> {}
|
|
9
|
+
interface UseAvatarReturn extends avatar.Api<PropTypes> {}
|
|
10
|
+
declare const useAvatar: (props?: UseAvatarProps) => UseAvatarReturn;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/avatar/use-avatar-context.d.ts
|
|
13
|
+
interface UseAvatarContext extends UseAvatarReturn {}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/avatar/avatar-context.d.ts
|
|
16
|
+
interface AvatarContextProps {
|
|
17
|
+
children: (context: UseAvatarContext) => ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare const AvatarContext: (props: AvatarContextProps) => ReactNode;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/avatar/avatar-fallback.d.ts
|
|
22
|
+
interface AvatarFallbackBaseProps extends PolymorphicProps {}
|
|
23
|
+
interface AvatarFallbackProps extends HTMLProps<"span">, AvatarFallbackBaseProps {}
|
|
24
|
+
declare const AvatarFallback: react0.ForwardRefExoticComponent<AvatarFallbackProps & react0.RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/avatar/avatar-image.d.ts
|
|
27
|
+
interface AvatarImageBaseProps extends PolymorphicProps {}
|
|
28
|
+
interface AvatarImageProps extends HTMLProps<"img">, AvatarImageBaseProps {}
|
|
29
|
+
declare const AvatarImage: react0.ForwardRefExoticComponent<AvatarImageProps & react0.RefAttributes<HTMLImageElement>>;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/avatar/avatar-root.d.ts
|
|
32
|
+
interface AvatarRootBaseProps extends UseAvatarProps, PolymorphicProps {}
|
|
33
|
+
interface AvatarRootProps extends HTMLProps<"div">, AvatarRootBaseProps {}
|
|
34
|
+
declare const AvatarRoot: react0.ForwardRefExoticComponent<AvatarRootProps & react0.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/avatar/avatar-root-provider.d.ts
|
|
37
|
+
interface RootProviderProps {
|
|
38
|
+
value: UseAvatarReturn;
|
|
39
|
+
}
|
|
40
|
+
interface AvatarRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
41
|
+
interface AvatarRootProviderProps extends HTMLProps<"div">, AvatarRootProviderBaseProps {}
|
|
42
|
+
declare const AvatarRootProvider: react0.ForwardRefExoticComponent<AvatarRootProviderProps & react0.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
declare namespace avatar_d_exports {
|
|
44
|
+
export { AvatarContext as Context, AvatarContextProps as ContextProps, AvatarFallback as Fallback, AvatarFallbackBaseProps as FallbackBaseProps, AvatarFallbackProps as FallbackProps, AvatarImage as Image, AvatarImageBaseProps as ImageBaseProps, AvatarImageProps as ImageProps, AvatarRoot as Root, AvatarRootBaseProps as RootBaseProps, AvatarRootProps as RootProps, AvatarRootProvider as RootProvider, AvatarRootProviderBaseProps as RootProviderBaseProps, AvatarRootProviderProps as RootProviderProps, StatusChangeDetails };
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { avatar_d_exports as Avatar, AvatarContext, type AvatarContextProps, AvatarFallback, type AvatarFallbackBaseProps, type AvatarFallbackProps, AvatarImage, type AvatarImageBaseProps, type AvatarImageProps, AvatarRoot, type AvatarRootBaseProps, type AvatarRootProps, AvatarRootProvider, type AvatarRootProviderBaseProps, type AvatarRootProviderProps, type AvatarStatusChangeDetails, type UseAvatarContext, type UseAvatarProps, type UseAvatarReturn, avatarAnatomy, useAvatar, useAvatarContext };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-CYMnug_4.mjs";
|
|
2
|
+
import { c as useEnvironmentContext, d as normalizeProps, f as useMachine, l as mergeProps, n as sprawlify, o as useLocaleContext } from "../../factory-DN0EdT7u.mjs";
|
|
3
|
+
import { t as createContext$1 } from "../../create-context-DGYD_HQt.mjs";
|
|
4
|
+
import { t as createSplitProps } from "../../create-split-props-BFscidWy.mjs";
|
|
5
|
+
import { forwardRef, useId } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as avatar from "@sprawlify/primitives/machines/avatar";
|
|
8
|
+
import { anatomy as avatarAnatomy } from "@sprawlify/primitives/machines/avatar";
|
|
9
|
+
|
|
10
|
+
//#region src/components/avatar/use-avatar-context.ts
|
|
11
|
+
const [AvatarProvider, useAvatarContext] = createContext$1({
|
|
12
|
+
name: "AvatarContext",
|
|
13
|
+
hookName: "useAvatarContext",
|
|
14
|
+
providerName: "<AvatarProvider />"
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/avatar/avatar-context.tsx
|
|
19
|
+
const AvatarContext = (props) => props.children(useAvatarContext());
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/avatar/avatar-fallback.tsx
|
|
23
|
+
const AvatarFallback = forwardRef((props, ref) => {
|
|
24
|
+
const mergedProps = mergeProps(useAvatarContext().getFallbackProps(), props);
|
|
25
|
+
return /* @__PURE__ */ jsx(sprawlify.span, {
|
|
26
|
+
...mergedProps,
|
|
27
|
+
ref
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
AvatarFallback.displayName = "AvatarFallback";
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/avatar/avatar-image.tsx
|
|
34
|
+
const AvatarImage = forwardRef((props, ref) => {
|
|
35
|
+
const mergedProps = mergeProps(useAvatarContext().getImageProps(), props);
|
|
36
|
+
return /* @__PURE__ */ jsx(sprawlify.img, {
|
|
37
|
+
...mergedProps,
|
|
38
|
+
ref
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
AvatarImage.displayName = "AvatarImage";
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/avatar/use-avatar.ts
|
|
45
|
+
const useAvatar = (props) => {
|
|
46
|
+
const id = useId();
|
|
47
|
+
const { getRootNode } = useEnvironmentContext();
|
|
48
|
+
const { dir } = useLocaleContext();
|
|
49
|
+
const context = {
|
|
50
|
+
id,
|
|
51
|
+
dir,
|
|
52
|
+
getRootNode,
|
|
53
|
+
...props
|
|
54
|
+
};
|
|
55
|
+
const service = useMachine(avatar.machine, context);
|
|
56
|
+
return avatar.connect(service, normalizeProps);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/avatar/avatar-root.tsx
|
|
61
|
+
const splitRootProps = createSplitProps();
|
|
62
|
+
const AvatarRoot = forwardRef((props, ref) => {
|
|
63
|
+
const [useAvatarProps, localProps] = splitRootProps(props, [
|
|
64
|
+
"id",
|
|
65
|
+
"ids",
|
|
66
|
+
"onStatusChange"
|
|
67
|
+
]);
|
|
68
|
+
const avatar$1 = useAvatar(useAvatarProps);
|
|
69
|
+
const mergedProps = mergeProps(avatar$1.getRootProps(), localProps);
|
|
70
|
+
return /* @__PURE__ */ jsx(AvatarProvider, {
|
|
71
|
+
value: avatar$1,
|
|
72
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
73
|
+
...mergedProps,
|
|
74
|
+
ref
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
AvatarRoot.displayName = "AvatarRoot";
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/components/avatar/avatar-root-provider.tsx
|
|
82
|
+
const splitRootProviderProps = createSplitProps();
|
|
83
|
+
const AvatarRootProvider = forwardRef((props, ref) => {
|
|
84
|
+
const [{ value: avatar$1 }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
85
|
+
const mergedProps = mergeProps(avatar$1.getRootProps(), localProps);
|
|
86
|
+
return /* @__PURE__ */ jsx(AvatarProvider, {
|
|
87
|
+
value: avatar$1,
|
|
88
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
89
|
+
...mergedProps,
|
|
90
|
+
ref
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
AvatarRootProvider.displayName = "AvatarRootProvider";
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/components/avatar/avatar.ts
|
|
98
|
+
var avatar_exports = /* @__PURE__ */ __export({
|
|
99
|
+
Context: () => AvatarContext,
|
|
100
|
+
Fallback: () => AvatarFallback,
|
|
101
|
+
Image: () => AvatarImage,
|
|
102
|
+
Root: () => AvatarRoot,
|
|
103
|
+
RootProvider: () => AvatarRootProvider
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
export { avatar_exports as Avatar, AvatarContext, AvatarFallback, AvatarImage, AvatarRoot, AvatarRootProvider, avatarAnatomy, useAvatar, useAvatarContext };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_factory = require('../../factory-CfqPG186.cjs');
|
|
2
2
|
require('../../create-context-DCEySQ7J.cjs');
|
|
3
|
-
const require_collapsible = require('../../collapsible-
|
|
3
|
+
const require_collapsible = require('../../collapsible-D_cXuaRy.cjs');
|
|
4
4
|
let __sprawlify_primitives_machines_collapsible = require("@sprawlify/primitives/machines/collapsible");
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, 'Collapsible', {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
1
|
+
import { c as PropTypes, r as PolymorphicProps, s as Optional, t as HTMLProps } from "../../factory-BZBSaT-0.cjs";
|
|
2
|
+
import { t as RenderStrategyProps } from "../../render-strategy-RT-KvAqO.cjs";
|
|
3
|
+
import * as react8 from "react";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import * as collapsible from "@sprawlify/primitives/machines/collapsible";
|
|
6
6
|
import { OpenChangeDetails, OpenChangeDetails as CollapsibleOpenChangeDetails, anatomy as collapsibleAnatomy } from "@sprawlify/primitives/machines/collapsible";
|
|
@@ -8,7 +8,7 @@ import { OpenChangeDetails, OpenChangeDetails as CollapsibleOpenChangeDetails, a
|
|
|
8
8
|
//#region src/components/collapsible/collapsible-content.d.ts
|
|
9
9
|
interface CollapsibleContentBaseProps extends PolymorphicProps {}
|
|
10
10
|
interface CollapsibleContentProps extends HTMLProps<"div">, CollapsibleContentBaseProps {}
|
|
11
|
-
declare const CollapsibleContent:
|
|
11
|
+
declare const CollapsibleContent: react8.ForwardRefExoticComponent<CollapsibleContentProps & react8.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/components/collapsible/use-collapsible.d.ts
|
|
14
14
|
interface UseCollapsibleProps extends Optional<Omit<collapsible.Props, "dir" | "getRootNode">, "id">, RenderStrategyProps {}
|
|
@@ -29,12 +29,12 @@ declare const CollapsibleContext: (props: CollapsibleContextProps) => ReactNode;
|
|
|
29
29
|
//#region src/components/collapsible/collapsible-indicator.d.ts
|
|
30
30
|
interface CollapsibleIndicatorBaseProps extends PolymorphicProps {}
|
|
31
31
|
interface CollapsibleIndicatorProps extends HTMLProps<"div">, CollapsibleIndicatorBaseProps {}
|
|
32
|
-
declare const CollapsibleIndicator:
|
|
32
|
+
declare const CollapsibleIndicator: react8.ForwardRefExoticComponent<CollapsibleIndicatorProps & react8.RefAttributes<HTMLDivElement>>;
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/components/collapsible/collapsible-root.d.ts
|
|
35
35
|
interface CollapsibleRootBaseProps extends UseCollapsibleProps, PolymorphicProps {}
|
|
36
36
|
interface CollapsibleRootProps extends HTMLProps<"div">, CollapsibleRootBaseProps {}
|
|
37
|
-
declare const CollapsibleRoot:
|
|
37
|
+
declare const CollapsibleRoot: react8.ForwardRefExoticComponent<CollapsibleRootProps & react8.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/components/collapsible/collapsible-root-provider.d.ts
|
|
40
40
|
interface RootProviderProps {
|
|
@@ -42,12 +42,12 @@ interface RootProviderProps {
|
|
|
42
42
|
}
|
|
43
43
|
interface CollapsibleRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
44
44
|
interface CollapsibleRootProviderProps extends HTMLProps<"div">, CollapsibleRootProviderBaseProps {}
|
|
45
|
-
declare const CollapsibleRootProvider:
|
|
45
|
+
declare const CollapsibleRootProvider: react8.ForwardRefExoticComponent<CollapsibleRootProviderProps & react8.RefAttributes<HTMLDivElement>>;
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/components/collapsible/collapsible-trigger.d.ts
|
|
48
48
|
interface CollapsibleTriggerBaseProps extends PolymorphicProps {}
|
|
49
49
|
interface CollapsibleTriggerProps extends HTMLProps<"button">, CollapsibleTriggerBaseProps {}
|
|
50
|
-
declare const CollapsibleTrigger:
|
|
50
|
+
declare const CollapsibleTrigger: react8.ForwardRefExoticComponent<CollapsibleTriggerProps & react8.RefAttributes<HTMLButtonElement>>;
|
|
51
51
|
declare namespace collapsible_d_exports {
|
|
52
52
|
export { CollapsibleContent as Content, CollapsibleContentBaseProps as ContentBaseProps, CollapsibleContentProps as ContentProps, CollapsibleContext as Context, CollapsibleContextProps as ContextProps, CollapsibleIndicator as Indicator, CollapsibleIndicatorBaseProps as IndicatorBaseProps, CollapsibleIndicatorProps as IndicatorProps, OpenChangeDetails, CollapsibleRoot as Root, CollapsibleRootBaseProps as RootBaseProps, CollapsibleRootProps as RootProps, CollapsibleRootProvider as RootProvider, CollapsibleRootProviderBaseProps as RootProviderBaseProps, CollapsibleRootProviderProps as RootProviderProps, CollapsibleTrigger as Trigger, CollapsibleTriggerBaseProps as TriggerBaseProps, CollapsibleTriggerProps as TriggerProps };
|
|
53
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as PolymorphicProps, s as Optional, t as HTMLProps, u as PropTypes } from "../../factory-
|
|
2
|
-
import { t as RenderStrategyProps } from "../../render-strategy
|
|
3
|
-
import * as
|
|
1
|
+
import { r as PolymorphicProps, s as Optional, t as HTMLProps, u as PropTypes } from "../../factory-DaVMAttY.mjs";
|
|
2
|
+
import { t as RenderStrategyProps } from "../../render-strategy--1FNKx5x.mjs";
|
|
3
|
+
import * as react49 from "react";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import * as collapsible from "@sprawlify/primitives/machines/collapsible";
|
|
6
6
|
import { OpenChangeDetails, OpenChangeDetails as CollapsibleOpenChangeDetails, anatomy as collapsibleAnatomy } from "@sprawlify/primitives/machines/collapsible";
|
|
@@ -8,7 +8,7 @@ import { OpenChangeDetails, OpenChangeDetails as CollapsibleOpenChangeDetails, a
|
|
|
8
8
|
//#region src/components/collapsible/collapsible-content.d.ts
|
|
9
9
|
interface CollapsibleContentBaseProps extends PolymorphicProps {}
|
|
10
10
|
interface CollapsibleContentProps extends HTMLProps<"div">, CollapsibleContentBaseProps {}
|
|
11
|
-
declare const CollapsibleContent:
|
|
11
|
+
declare const CollapsibleContent: react49.ForwardRefExoticComponent<CollapsibleContentProps & react49.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/components/collapsible/use-collapsible.d.ts
|
|
14
14
|
interface UseCollapsibleProps extends Optional<Omit<collapsible.Props, "dir" | "getRootNode">, "id">, RenderStrategyProps {}
|
|
@@ -29,12 +29,12 @@ declare const CollapsibleContext: (props: CollapsibleContextProps) => ReactNode;
|
|
|
29
29
|
//#region src/components/collapsible/collapsible-indicator.d.ts
|
|
30
30
|
interface CollapsibleIndicatorBaseProps extends PolymorphicProps {}
|
|
31
31
|
interface CollapsibleIndicatorProps extends HTMLProps<"div">, CollapsibleIndicatorBaseProps {}
|
|
32
|
-
declare const CollapsibleIndicator:
|
|
32
|
+
declare const CollapsibleIndicator: react49.ForwardRefExoticComponent<CollapsibleIndicatorProps & react49.RefAttributes<HTMLDivElement>>;
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/components/collapsible/collapsible-root.d.ts
|
|
35
35
|
interface CollapsibleRootBaseProps extends UseCollapsibleProps, PolymorphicProps {}
|
|
36
36
|
interface CollapsibleRootProps extends HTMLProps<"div">, CollapsibleRootBaseProps {}
|
|
37
|
-
declare const CollapsibleRoot:
|
|
37
|
+
declare const CollapsibleRoot: react49.ForwardRefExoticComponent<CollapsibleRootProps & react49.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/components/collapsible/collapsible-root-provider.d.ts
|
|
40
40
|
interface RootProviderProps {
|
|
@@ -42,12 +42,12 @@ interface RootProviderProps {
|
|
|
42
42
|
}
|
|
43
43
|
interface CollapsibleRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
44
44
|
interface CollapsibleRootProviderProps extends HTMLProps<"div">, CollapsibleRootProviderBaseProps {}
|
|
45
|
-
declare const CollapsibleRootProvider:
|
|
45
|
+
declare const CollapsibleRootProvider: react49.ForwardRefExoticComponent<CollapsibleRootProviderProps & react49.RefAttributes<HTMLDivElement>>;
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/components/collapsible/collapsible-trigger.d.ts
|
|
48
48
|
interface CollapsibleTriggerBaseProps extends PolymorphicProps {}
|
|
49
49
|
interface CollapsibleTriggerProps extends HTMLProps<"button">, CollapsibleTriggerBaseProps {}
|
|
50
|
-
declare const CollapsibleTrigger:
|
|
50
|
+
declare const CollapsibleTrigger: react49.ForwardRefExoticComponent<CollapsibleTriggerProps & react49.RefAttributes<HTMLButtonElement>>;
|
|
51
51
|
declare namespace collapsible_d_exports {
|
|
52
52
|
export { CollapsibleContent as Content, CollapsibleContentBaseProps as ContentBaseProps, CollapsibleContentProps as ContentProps, CollapsibleContext as Context, CollapsibleContextProps as ContextProps, CollapsibleIndicator as Indicator, CollapsibleIndicatorBaseProps as IndicatorBaseProps, CollapsibleIndicatorProps as IndicatorProps, OpenChangeDetails, CollapsibleRoot as Root, CollapsibleRootBaseProps as RootBaseProps, CollapsibleRootProps as RootProps, CollapsibleRootProvider as RootProvider, CollapsibleRootProviderBaseProps as RootProviderBaseProps, CollapsibleRootProviderProps as RootProviderProps, CollapsibleTrigger as Trigger, CollapsibleTriggerBaseProps as TriggerBaseProps, CollapsibleTriggerProps as TriggerProps };
|
|
53
53
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../factory-
|
|
2
|
-
import "../../create-context-
|
|
3
|
-
import { a as CollapsibleRoot, c as
|
|
1
|
+
import "../../factory-DN0EdT7u.mjs";
|
|
2
|
+
import "../../create-context-DGYD_HQt.mjs";
|
|
3
|
+
import { a as CollapsibleRoot, c as CollapsibleContext, i as CollapsibleRootProvider, l as CollapsibleContent, n as collapsibleAnatomy, o as useCollapsible, r as CollapsibleTrigger, s as CollapsibleIndicator, t as collapsible_exports, u as useCollapsibleContext } from "../../collapsible-DYgHs1_i.mjs";
|
|
4
4
|
|
|
5
5
|
export { collapsible_exports as Collapsible, CollapsibleContent, CollapsibleContext, CollapsibleIndicator, CollapsibleRoot, CollapsibleRootProvider, CollapsibleTrigger, collapsibleAnatomy, useCollapsible, useCollapsibleContext };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/utils/create-split-props.ts
|
|
2
|
+
const createSplitProps = () => (props, keys) => keys.reduce((previousValue, currentValue) => {
|
|
3
|
+
const [target, source] = previousValue;
|
|
4
|
+
const key = currentValue;
|
|
5
|
+
if (source[key] !== void 0) target[key] = source[key];
|
|
6
|
+
delete source[key];
|
|
7
|
+
return [target, source];
|
|
8
|
+
}, [{}, { ...props }]);
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { createSplitProps as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/create-split-props.ts
|
|
3
|
+
const createSplitProps = () => (props, keys) => keys.reduce((previousValue, currentValue) => {
|
|
4
|
+
const [target, source] = previousValue;
|
|
5
|
+
const key = currentValue;
|
|
6
|
+
if (source[key] !== void 0) target[key] = source[key];
|
|
7
|
+
delete source[key];
|
|
8
|
+
return [target, source];
|
|
9
|
+
}, [{}, { ...props }]);
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
Object.defineProperty(exports, 'createSplitProps', {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return createSplitProps;
|
|
16
|
+
}
|
|
17
|
+
});
|