@sprawlify/vue 0.0.65 → 0.0.66
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/clean-props-ChPEW0vT.js +9 -0
- package/dist/collapsible-BBV8R9Wm.js +259 -0
- package/dist/collection-DR2kMzrX.js +218 -0
- package/dist/components/accordion/index.d.ts +195 -0
- package/dist/components/accordion/index.js +361 -0
- package/dist/components/angle-slider/index.d.ts +230 -0
- package/dist/components/angle-slider/index.js +371 -0
- package/dist/components/avatar/index.d.ts +116 -0
- package/dist/components/avatar/index.js +177 -0
- package/dist/components/bottom-sheet/index.d.ts +241 -0
- package/dist/components/bottom-sheet/index.js +429 -0
- package/dist/components/carousel/index.d.ts +306 -0
- package/dist/components/carousel/index.js +500 -0
- package/dist/components/checkbox/index.d.ts +273 -0
- package/dist/components/checkbox/index.js +500 -0
- package/dist/components/client-only/index.d.ts +20 -0
- package/dist/components/client-only/index.js +22 -0
- package/dist/components/clipboard/index.d.ts +204 -0
- package/dist/components/clipboard/index.js +297 -0
- package/dist/components/collapsible/index.d.ts +18 -26
- package/dist/components/collapsible/index.js +5 -325
- package/dist/components/collection/index.d.ts +2 -0
- package/dist/components/collection/index.js +4 -0
- package/dist/components/field/index.d.ts +326 -0
- package/dist/components/field/index.js +7 -0
- package/dist/components/fieldset/index.d.ts +161 -0
- package/dist/components/fieldset/index.js +7 -0
- package/dist/components/presence/index.d.ts +3 -0
- package/dist/components/presence/index.js +6 -0
- package/dist/components/select/index.d.ts +429 -0
- package/dist/components/select/index.js +769 -0
- package/dist/{use-forward-expose-BIk4OI3R.js → core-DNndr38p.js} +2 -170
- package/dist/create-split-props-YZ3qgXe_.js +11 -0
- package/dist/factory-BH3WrWd2.js +68 -0
- package/dist/factory-D_ge_w76.d.ts +8 -0
- package/dist/field-DnHnX3Tf.js +501 -0
- package/dist/fieldset-DzhN7Zrg.js +278 -0
- package/dist/{types-BQfkZGpL.d.ts → index-B66Om_3U.d.ts} +1 -9
- package/dist/index-DqRk-Yea.d.ts +199 -0
- package/dist/index-rHf4D8np.d.ts +57 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -50
- package/dist/presence-CvUnYMZQ.js +105 -0
- package/dist/presence-types-Bv1E60Cw.d.ts +13 -0
- package/dist/providers-B2CNPFg1.js +108 -0
- package/dist/types-Bj-dS2Hc.d.ts +9 -0
- package/dist/use-forward-expose-4p5AGAI3.js +67 -0
- package/dist/use-render-strategy-BkxoN6ll.js +7 -0
- package/dist/use-render-strategy-CHj_pCfT.d.ts +9 -0
- package/dist/utils-B4FuOOE-.js +51 -0
- package/package.json +54 -2
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { t as PolymorphicProps } from "../../factory-D_ge_w76.js";
|
|
2
|
+
import { a as Optional, r as EmitFn$1 } from "../../types-Bj-dS2Hc.js";
|
|
3
|
+
import { r as PropTypes } from "../../index-B66Om_3U.js";
|
|
4
|
+
import * as vue75 from "vue";
|
|
5
|
+
import { ButtonHTMLAttributes, ComputedRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, MaybeRef, SlotsType, UnwrapRef } from "vue";
|
|
6
|
+
import * as clipboard from "@sprawlify/primitives/machines/clipboard";
|
|
7
|
+
import { CopyStatusDetails, CopyStatusDetails as ClipboardCopyStatusDetails, anatomy as clipboardAnatomy } from "@sprawlify/primitives/machines/clipboard";
|
|
8
|
+
|
|
9
|
+
//#region src/components/clipboard/clipboard-types.d.ts
|
|
10
|
+
interface RootProps {
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
ids?: Partial<{
|
|
14
|
+
root: string;
|
|
15
|
+
input: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}>;
|
|
18
|
+
modelValue?: string;
|
|
19
|
+
timeout?: number;
|
|
20
|
+
}
|
|
21
|
+
type RootEmits = {
|
|
22
|
+
statusChange: [details: clipboard.CopyStatusDetails];
|
|
23
|
+
valueChange: [details: clipboard.ValueChangeDetails];
|
|
24
|
+
'update:modelValue': [value: string];
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/clipboard/use-clipboard.d.ts
|
|
28
|
+
interface UseClipboardProps extends Optional<Omit<clipboard.Props, 'dir' | 'getRootNode'>, 'id'> {
|
|
29
|
+
modelValue?: clipboard.Props['value'];
|
|
30
|
+
}
|
|
31
|
+
interface UseClipboardReturn extends ComputedRef<clipboard.Api<PropTypes>> {}
|
|
32
|
+
declare const useClipboard: (props?: MaybeRef<UseClipboardProps>, emit?: EmitFn$1<RootEmits>) => UseClipboardReturn;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/clipboard/use-clipboard-context.d.ts
|
|
35
|
+
interface UseClipboardContext extends UseClipboardReturn {}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/clipboard/clipboard-context.vue.d.ts
|
|
38
|
+
interface ClipboardContextProps extends SlotsType<{
|
|
39
|
+
default: UnwrapRef<UseClipboardContext>;
|
|
40
|
+
}> {}
|
|
41
|
+
declare const _default: typeof __VLS_export$8;
|
|
42
|
+
declare const __VLS_export$8: __VLS_WithSlots$8<vue75.DefineComponent<{}, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, true, {}, any>, {
|
|
43
|
+
default(clipboard: UnwrapRef<UseClipboardContext>): unknown;
|
|
44
|
+
}>;
|
|
45
|
+
type __VLS_WithSlots$8<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/clipboard/clipboard-control.vue.d.ts
|
|
52
|
+
interface ClipboardControlBaseProps extends PolymorphicProps {}
|
|
53
|
+
interface ClipboardControlProps extends ClipboardControlBaseProps,
|
|
54
|
+
/**
|
|
55
|
+
* @vue-ignore
|
|
56
|
+
*/
|
|
57
|
+
HTMLAttributes {}
|
|
58
|
+
declare const _default$1: typeof __VLS_export$7;
|
|
59
|
+
declare const __VLS_export$7: __VLS_WithSlots$7<vue75.DefineComponent<ClipboardControlProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<ClipboardControlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
60
|
+
default?: (props: {}) => any;
|
|
61
|
+
}>;
|
|
62
|
+
type __VLS_WithSlots$7<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/clipboard/clipboard-indicator.vue.d.ts
|
|
69
|
+
interface ClipboardIndicatorBaseProps extends PolymorphicProps {}
|
|
70
|
+
interface ClipboardIndicatorProps extends ClipboardIndicatorBaseProps,
|
|
71
|
+
/**
|
|
72
|
+
* @vue-ignore
|
|
73
|
+
*/
|
|
74
|
+
HTMLAttributes {}
|
|
75
|
+
declare const _default$2: typeof __VLS_export$6;
|
|
76
|
+
declare const __VLS_export$6: __VLS_WithSlots$6<vue75.DefineComponent<ClipboardIndicatorProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<ClipboardIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
77
|
+
copied?: (props: {}) => any;
|
|
78
|
+
} & {
|
|
79
|
+
default?: (props: {}) => any;
|
|
80
|
+
}>;
|
|
81
|
+
type __VLS_WithSlots$6<T, S> = T & {
|
|
82
|
+
new (): {
|
|
83
|
+
$slots: S;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/clipboard/clipboard-input.vue.d.ts
|
|
88
|
+
interface ClipboardInputBaseProps extends PolymorphicProps {}
|
|
89
|
+
interface ClipboardInputProps extends ClipboardInputBaseProps,
|
|
90
|
+
/**
|
|
91
|
+
* @vue-ignore
|
|
92
|
+
*/
|
|
93
|
+
InputHTMLAttributes {}
|
|
94
|
+
declare const _default$3: typeof __VLS_export$5;
|
|
95
|
+
declare const __VLS_export$5: __VLS_WithSlots$5<vue75.DefineComponent<ClipboardInputProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<ClipboardInputProps> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
96
|
+
default?: (props: {}) => any;
|
|
97
|
+
}>;
|
|
98
|
+
type __VLS_WithSlots$5<T, S> = T & {
|
|
99
|
+
new (): {
|
|
100
|
+
$slots: S;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/components/clipboard/clipboard-label.vue.d.ts
|
|
105
|
+
interface ClipboardLabelBaseProps extends PolymorphicProps {}
|
|
106
|
+
interface ClipboardLabelProps extends ClipboardLabelBaseProps,
|
|
107
|
+
/**
|
|
108
|
+
* @vue-ignore
|
|
109
|
+
*/
|
|
110
|
+
LabelHTMLAttributes {}
|
|
111
|
+
declare const _default$4: typeof __VLS_export$4;
|
|
112
|
+
declare const __VLS_export$4: __VLS_WithSlots$4<vue75.DefineComponent<ClipboardLabelProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<ClipboardLabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
113
|
+
default?: (props: {}) => any;
|
|
114
|
+
}>;
|
|
115
|
+
type __VLS_WithSlots$4<T, S> = T & {
|
|
116
|
+
new (): {
|
|
117
|
+
$slots: S;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/components/clipboard/clipboard-root-provider.vue.d.ts
|
|
122
|
+
interface RootProviderProps {
|
|
123
|
+
value: UnwrapRef<UseClipboardReturn>;
|
|
124
|
+
}
|
|
125
|
+
interface ClipboardRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
126
|
+
interface ClipboardRootProviderProps extends ClipboardRootProviderBaseProps,
|
|
127
|
+
/**
|
|
128
|
+
* @vue-ignore
|
|
129
|
+
*/
|
|
130
|
+
HTMLAttributes {}
|
|
131
|
+
declare const _default$6: typeof __VLS_export$3;
|
|
132
|
+
declare const __VLS_export$3: __VLS_WithSlots$3<vue75.DefineComponent<ClipboardRootProviderProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<ClipboardRootProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
133
|
+
default?: (props: {}) => any;
|
|
134
|
+
}>;
|
|
135
|
+
type __VLS_WithSlots$3<T, S> = T & {
|
|
136
|
+
new (): {
|
|
137
|
+
$slots: S;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/components/clipboard/clipboard-root.vue.d.ts
|
|
142
|
+
interface ClipboardRootBaseProps extends RootProps, PolymorphicProps {}
|
|
143
|
+
interface ClipboardRootProps extends ClipboardRootBaseProps,
|
|
144
|
+
/**
|
|
145
|
+
* @vue-ignore
|
|
146
|
+
*/
|
|
147
|
+
HTMLAttributes {}
|
|
148
|
+
interface ClipboardRootEmits extends RootEmits {}
|
|
149
|
+
declare const _default$5: typeof __VLS_export$2;
|
|
150
|
+
declare const __VLS_export$2: __VLS_WithSlots$2<vue75.DefineComponent<ClipboardRootProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {
|
|
151
|
+
valueChange: (details: clipboard.ValueChangeDetails) => any;
|
|
152
|
+
"update:modelValue": (value: string) => any;
|
|
153
|
+
statusChange: (details: clipboard.CopyStatusDetails) => any;
|
|
154
|
+
}, string, vue75.PublicProps, Readonly<ClipboardRootProps> & Readonly<{
|
|
155
|
+
onValueChange?: ((details: clipboard.ValueChangeDetails) => any) | undefined;
|
|
156
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
157
|
+
onStatusChange?: ((details: clipboard.CopyStatusDetails) => any) | undefined;
|
|
158
|
+
}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
159
|
+
default?: (props: {}) => any;
|
|
160
|
+
}>;
|
|
161
|
+
type __VLS_WithSlots$2<T, S> = T & {
|
|
162
|
+
new (): {
|
|
163
|
+
$slots: S;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/components/clipboard/clipboard-trigger.vue.d.ts
|
|
168
|
+
interface ClipboardTriggerBaseProps extends PolymorphicProps {}
|
|
169
|
+
interface ClipboardTriggerProps extends ClipboardTriggerBaseProps,
|
|
170
|
+
/**
|
|
171
|
+
* @vue-ignore
|
|
172
|
+
*/
|
|
173
|
+
ButtonHTMLAttributes {}
|
|
174
|
+
declare const _default$7: typeof __VLS_export$1;
|
|
175
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<vue75.DefineComponent<ClipboardTriggerProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<ClipboardTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
176
|
+
default?: (props: {}) => any;
|
|
177
|
+
}>;
|
|
178
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
179
|
+
new (): {
|
|
180
|
+
$slots: S;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/components/clipboard/clipboard-value-text.vue.d.ts
|
|
185
|
+
interface ClipboardValueTextBaseProps extends PolymorphicProps {}
|
|
186
|
+
interface ClipboardValueTextProps extends ClipboardValueTextBaseProps,
|
|
187
|
+
/**
|
|
188
|
+
* @vue-ignore
|
|
189
|
+
*/
|
|
190
|
+
HTMLAttributes {}
|
|
191
|
+
declare const _default$8: typeof __VLS_export;
|
|
192
|
+
declare const __VLS_export: __VLS_WithSlots<vue75.DefineComponent<ClipboardValueTextProps, {}, {}, {}, {}, vue75.ComponentOptionsMixin, vue75.ComponentOptionsMixin, {}, string, vue75.PublicProps, Readonly<ClipboardValueTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue75.ComponentProvideOptions, false, {}, any>, {
|
|
193
|
+
default?: (props: {}) => any;
|
|
194
|
+
}>;
|
|
195
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
196
|
+
new (): {
|
|
197
|
+
$slots: S;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
declare namespace clipboard_d_exports {
|
|
201
|
+
export { _default as Context, ClipboardContextProps as ContextProps, _default$1 as Control, ClipboardControlBaseProps as ControlBaseProps, ClipboardControlProps as ControlProps, CopyStatusDetails, _default$2 as Indicator, ClipboardIndicatorBaseProps as IndicatorBaseProps, ClipboardIndicatorProps as IndicatorProps, _default$3 as Input, ClipboardInputBaseProps as InputBaseProps, ClipboardInputProps as InputProps, _default$4 as Label, ClipboardLabelBaseProps as LabelBaseProps, ClipboardLabelProps as LabelProps, _default$5 as Root, ClipboardRootBaseProps as RootBaseProps, ClipboardRootEmits as RootEmits, ClipboardRootProps as RootProps, _default$6 as RootProvider, ClipboardRootProviderBaseProps as RootProviderBaseProps, ClipboardRootProviderProps as RootProviderProps, _default$7 as Trigger, ClipboardTriggerBaseProps as TriggerBaseProps, ClipboardTriggerProps as TriggerProps, _default$8 as ValueText, ClipboardValueTextBaseProps as ValueTextBaseProps, ClipboardValueTextProps as ValueTextProps };
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
export { clipboard_d_exports as Clipboard, _default as ClipboardContext, type ClipboardContextProps, _default$1 as ClipboardControl, type ClipboardControlBaseProps, type ClipboardControlProps, type ClipboardCopyStatusDetails, _default$2 as ClipboardIndicator, type ClipboardIndicatorBaseProps, type ClipboardIndicatorProps, _default$3 as ClipboardInput, type ClipboardInputBaseProps, type ClipboardInputProps, _default$4 as ClipboardLabel, type ClipboardLabelBaseProps, type ClipboardLabelProps, _default$5 as ClipboardRoot, type ClipboardRootBaseProps, type ClipboardRootEmits, type ClipboardRootProps, _default$6 as ClipboardRootProvider, type ClipboardRootProviderBaseProps, type ClipboardRootProviderProps, _default$7 as ClipboardTrigger, type ClipboardTriggerBaseProps, type ClipboardTriggerProps, _default$8 as ClipboardValueText, type ClipboardValueTextBaseProps, type ClipboardValueTextProps, type UseClipboardContext, type UseClipboardProps, type UseClipboardReturn, clipboardAnatomy, useClipboard, useClipboardContext };
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../chunk-BN_g-Awi.js";
|
|
2
|
+
import { n as useMachine, r as normalizeProps$1 } from "../../core-DNndr38p.js";
|
|
3
|
+
import { c as useEnvironmentContext, s as DEFAULT_ENVIRONMENT } from "../../providers-B2CNPFg1.js";
|
|
4
|
+
import { r as createContext, t as useForwardExpose } from "../../use-forward-expose-4p5AGAI3.js";
|
|
5
|
+
import { t as sprawlify } from "../../factory-BH3WrWd2.js";
|
|
6
|
+
import { t as cleanProps } from "../../clean-props-ChPEW0vT.js";
|
|
7
|
+
import { computed, createBlock, createCommentVNode, createTextVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, toDisplayString, toValue, unref, useId, withCtx } from "vue";
|
|
8
|
+
import * as clipboard from "@sprawlify/primitives/machines/clipboard";
|
|
9
|
+
import { anatomy as clipboardAnatomy } from "@sprawlify/primitives/machines/clipboard";
|
|
10
|
+
|
|
11
|
+
//#region src/components/clipboard/use-clipboard-context.ts
|
|
12
|
+
const [ClipboardProvider, useClipboardContext] = createContext("ClipboardContext");
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/clipboard/clipboard-context.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
+
var clipboard_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
17
|
+
__name: "clipboard-context",
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const clipboard = useClipboardContext();
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(clipboard))));
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/clipboard/clipboard-context.vue
|
|
28
|
+
var clipboard_context_default = clipboard_context_vue_vue_type_script_setup_true_lang_default;
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/clipboard/clipboard-control.vue?vue&type=script&setup=true&lang.ts
|
|
32
|
+
var clipboard_control_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
33
|
+
__name: "clipboard-control",
|
|
34
|
+
props: { asChild: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: false
|
|
37
|
+
} },
|
|
38
|
+
setup(__props) {
|
|
39
|
+
const clipboard = useClipboardContext();
|
|
40
|
+
useForwardExpose();
|
|
41
|
+
return (_ctx, _cache) => {
|
|
42
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(clipboard).getControlProps(), { "as-child": __props.asChild }), {
|
|
43
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
44
|
+
_: 3
|
|
45
|
+
}, 16, ["as-child"]);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/clipboard/clipboard-control.vue
|
|
52
|
+
var clipboard_control_default = clipboard_control_vue_vue_type_script_setup_true_lang_default;
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/clipboard/clipboard-indicator.vue?vue&type=script&setup=true&lang.ts
|
|
56
|
+
var clipboard_indicator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
57
|
+
__name: "clipboard-indicator",
|
|
58
|
+
props: { asChild: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: false
|
|
61
|
+
} },
|
|
62
|
+
setup(__props) {
|
|
63
|
+
const clipboard = useClipboardContext();
|
|
64
|
+
useForwardExpose();
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(clipboard).getIndicatorProps({ copied: unref(clipboard).copied }), { "as-child": __props.asChild }), {
|
|
67
|
+
default: withCtx(() => [unref(clipboard).copied ? renderSlot(_ctx.$slots, "copied", { key: 0 }) : renderSlot(_ctx.$slots, "default", { key: 1 })]),
|
|
68
|
+
_: 3
|
|
69
|
+
}, 16, ["as-child"]);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/components/clipboard/clipboard-indicator.vue
|
|
76
|
+
var clipboard_indicator_default = clipboard_indicator_vue_vue_type_script_setup_true_lang_default;
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/components/clipboard/clipboard-input.vue?vue&type=script&setup=true&lang.ts
|
|
80
|
+
var clipboard_input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
81
|
+
__name: "clipboard-input",
|
|
82
|
+
props: { asChild: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
required: false
|
|
85
|
+
} },
|
|
86
|
+
setup(__props) {
|
|
87
|
+
const clipboard = useClipboardContext();
|
|
88
|
+
useForwardExpose();
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
return openBlock(), createBlock(unref(sprawlify).input, mergeProps(unref(clipboard).getInputProps(), { "as-child": __props.asChild }), {
|
|
91
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
92
|
+
_: 3
|
|
93
|
+
}, 16, ["as-child"]);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/components/clipboard/clipboard-input.vue
|
|
100
|
+
var clipboard_input_default = clipboard_input_vue_vue_type_script_setup_true_lang_default;
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/clipboard/clipboard-label.vue?vue&type=script&setup=true&lang.ts
|
|
104
|
+
var clipboard_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
105
|
+
__name: "clipboard-label",
|
|
106
|
+
props: { asChild: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
required: false
|
|
109
|
+
} },
|
|
110
|
+
setup(__props) {
|
|
111
|
+
const clipboard = useClipboardContext();
|
|
112
|
+
useForwardExpose();
|
|
113
|
+
return (_ctx, _cache) => {
|
|
114
|
+
return openBlock(), createBlock(unref(sprawlify).label, mergeProps(unref(clipboard).getLabelProps(), { "as-child": __props.asChild }), {
|
|
115
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
116
|
+
_: 3
|
|
117
|
+
}, 16, ["as-child"]);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/components/clipboard/clipboard-label.vue
|
|
124
|
+
var clipboard_label_default = clipboard_label_vue_vue_type_script_setup_true_lang_default;
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/components/clipboard/clipboard-root-provider.vue?vue&type=script&setup=true&lang.ts
|
|
128
|
+
var clipboard_root_provider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
129
|
+
__name: "clipboard-root-provider",
|
|
130
|
+
props: {
|
|
131
|
+
value: {
|
|
132
|
+
type: null,
|
|
133
|
+
required: true
|
|
134
|
+
},
|
|
135
|
+
asChild: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
setup(__props) {
|
|
141
|
+
const props = __props;
|
|
142
|
+
const clipboard = computed(() => props.value);
|
|
143
|
+
ClipboardProvider(clipboard);
|
|
144
|
+
useForwardExpose();
|
|
145
|
+
return (_ctx, _cache) => {
|
|
146
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(clipboard.value.getRootProps(), { "as-child": __props.asChild }), {
|
|
147
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
148
|
+
_: 3
|
|
149
|
+
}, 16, ["as-child"]);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/components/clipboard/clipboard-root-provider.vue
|
|
156
|
+
var clipboard_root_provider_default = clipboard_root_provider_vue_vue_type_script_setup_true_lang_default;
|
|
157
|
+
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/components/clipboard/use-clipboard.ts
|
|
160
|
+
const useClipboard = (props = {}, emit) => {
|
|
161
|
+
const id = useId();
|
|
162
|
+
const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
|
|
163
|
+
const context = computed(() => {
|
|
164
|
+
const localeProps = toValue(props);
|
|
165
|
+
return {
|
|
166
|
+
id,
|
|
167
|
+
getRootNode: env?.value.getRootNode,
|
|
168
|
+
value: localeProps.modelValue,
|
|
169
|
+
onStatusChange: (details) => emit?.("statusChange", details),
|
|
170
|
+
...cleanProps(localeProps),
|
|
171
|
+
onValueChange(details) {
|
|
172
|
+
emit?.("valueChange", details);
|
|
173
|
+
emit?.("update:modelValue", details.value);
|
|
174
|
+
localeProps.onValueChange?.(details);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
});
|
|
178
|
+
const service = useMachine(clipboard.machine, context);
|
|
179
|
+
return computed(() => clipboard.connect(service, normalizeProps$1));
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/components/clipboard/clipboard-root.vue?vue&type=script&setup=true&lang.ts
|
|
184
|
+
var clipboard_root_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
185
|
+
__name: "clipboard-root",
|
|
186
|
+
props: {
|
|
187
|
+
defaultValue: {
|
|
188
|
+
type: String,
|
|
189
|
+
required: false
|
|
190
|
+
},
|
|
191
|
+
id: {
|
|
192
|
+
type: String,
|
|
193
|
+
required: false
|
|
194
|
+
},
|
|
195
|
+
ids: {
|
|
196
|
+
type: Object,
|
|
197
|
+
required: false
|
|
198
|
+
},
|
|
199
|
+
modelValue: {
|
|
200
|
+
type: String,
|
|
201
|
+
required: false
|
|
202
|
+
},
|
|
203
|
+
timeout: {
|
|
204
|
+
type: Number,
|
|
205
|
+
required: false
|
|
206
|
+
},
|
|
207
|
+
asChild: {
|
|
208
|
+
type: Boolean,
|
|
209
|
+
required: false
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
emits: [
|
|
213
|
+
"statusChange",
|
|
214
|
+
"valueChange",
|
|
215
|
+
"update:modelValue"
|
|
216
|
+
],
|
|
217
|
+
setup(__props, { emit: __emit }) {
|
|
218
|
+
const clipboard = useClipboard(__props, __emit);
|
|
219
|
+
ClipboardProvider(clipboard);
|
|
220
|
+
useForwardExpose();
|
|
221
|
+
return (_ctx, _cache) => {
|
|
222
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(clipboard).getRootProps(), { "as-child": __props.asChild }), {
|
|
223
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
224
|
+
_: 3
|
|
225
|
+
}, 16, ["as-child"]);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/components/clipboard/clipboard-root.vue
|
|
232
|
+
var clipboard_root_default = clipboard_root_vue_vue_type_script_setup_true_lang_default;
|
|
233
|
+
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/components/clipboard/clipboard-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
236
|
+
var clipboard_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
237
|
+
__name: "clipboard-trigger",
|
|
238
|
+
props: { asChild: {
|
|
239
|
+
type: Boolean,
|
|
240
|
+
required: false
|
|
241
|
+
} },
|
|
242
|
+
setup(__props) {
|
|
243
|
+
const clipboard = useClipboardContext();
|
|
244
|
+
useForwardExpose();
|
|
245
|
+
return (_ctx, _cache) => {
|
|
246
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(clipboard).getTriggerProps(), { "as-child": __props.asChild }), {
|
|
247
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
248
|
+
_: 3
|
|
249
|
+
}, 16, ["as-child"]);
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/components/clipboard/clipboard-trigger.vue
|
|
256
|
+
var clipboard_trigger_default = clipboard_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
257
|
+
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/components/clipboard/clipboard-value-text.vue?vue&type=script&setup=true&lang.ts
|
|
260
|
+
var clipboard_value_text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
261
|
+
__name: "clipboard-value-text",
|
|
262
|
+
props: { asChild: {
|
|
263
|
+
type: Boolean,
|
|
264
|
+
required: false
|
|
265
|
+
} },
|
|
266
|
+
setup(__props) {
|
|
267
|
+
const clipboard = useClipboardContext();
|
|
268
|
+
useForwardExpose();
|
|
269
|
+
return (_ctx, _cache) => {
|
|
270
|
+
return openBlock(), createBlock(unref(sprawlify).span, { "as-child": __props.asChild }, {
|
|
271
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(clipboard).value), 1)])]),
|
|
272
|
+
_: 3
|
|
273
|
+
}, 8, ["as-child"]);
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region src/components/clipboard/clipboard-value-text.vue
|
|
280
|
+
var clipboard_value_text_default = clipboard_value_text_vue_vue_type_script_setup_true_lang_default;
|
|
281
|
+
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/components/clipboard/clipboard.ts
|
|
284
|
+
var clipboard_exports = /* @__PURE__ */ __exportAll({
|
|
285
|
+
Context: () => clipboard_context_default,
|
|
286
|
+
Control: () => clipboard_control_default,
|
|
287
|
+
Indicator: () => clipboard_indicator_default,
|
|
288
|
+
Input: () => clipboard_input_default,
|
|
289
|
+
Label: () => clipboard_label_default,
|
|
290
|
+
Root: () => clipboard_root_default,
|
|
291
|
+
RootProvider: () => clipboard_root_provider_default,
|
|
292
|
+
Trigger: () => clipboard_trigger_default,
|
|
293
|
+
ValueText: () => clipboard_value_text_default
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
//#endregion
|
|
297
|
+
export { clipboard_exports as Clipboard, clipboard_context_default as ClipboardContext, clipboard_control_default as ClipboardControl, clipboard_indicator_default as ClipboardIndicator, clipboard_input_default as ClipboardInput, clipboard_label_default as ClipboardLabel, clipboard_root_default as ClipboardRoot, clipboard_root_provider_default as ClipboardRootProvider, clipboard_trigger_default as ClipboardTrigger, clipboard_value_text_default as ClipboardValueText, clipboardAnatomy, useClipboard, useClipboardContext };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { t as PolymorphicProps } from "../../factory-D_ge_w76.js";
|
|
2
|
+
import { a as Optional, r as EmitFn$1 } from "../../types-Bj-dS2Hc.js";
|
|
3
|
+
import { r as PropTypes } from "../../index-B66Om_3U.js";
|
|
4
|
+
import { t as RenderStrategyProps } from "../../use-render-strategy-CHj_pCfT.js";
|
|
5
|
+
import * as vue182 from "vue";
|
|
6
|
+
import { ButtonHTMLAttributes, ComputedRef, HTMLAttributes, MaybeRef, SlotsType, UnwrapRef } from "vue";
|
|
4
7
|
import * as collapsible from "@sprawlify/primitives/machines/collapsible";
|
|
5
8
|
import { OpenChangeDetails, OpenChangeDetails as CollapsibleOpenChangeDetails, anatomy as collapsibleAnatomy } from "@sprawlify/primitives/machines/collapsible";
|
|
6
9
|
|
|
7
|
-
//#region src/components/factory.d.ts
|
|
8
|
-
interface PolymorphicProps {
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
10
|
//#region src/components/collapsible/collapsible-content.vue.d.ts
|
|
13
11
|
interface CollapsibleContentBaseProps extends PolymorphicProps {}
|
|
14
12
|
interface CollapsibleContentProps extends CollapsibleContentBaseProps,
|
|
@@ -17,7 +15,7 @@ interface CollapsibleContentProps extends CollapsibleContentBaseProps,
|
|
|
17
15
|
*/
|
|
18
16
|
HTMLAttributes {}
|
|
19
17
|
declare const _default: typeof __VLS_export$5;
|
|
20
|
-
declare const __VLS_export$5: __VLS_WithSlots$5<
|
|
18
|
+
declare const __VLS_export$5: __VLS_WithSlots$5<vue182.DefineComponent<CollapsibleContentProps, {}, {}, {}, {}, vue182.ComponentOptionsMixin, vue182.ComponentOptionsMixin, {}, string, vue182.PublicProps, Readonly<CollapsibleContentProps> & Readonly<{}>, {}, {}, {}, {}, string, vue182.ComponentProvideOptions, false, {}, any>, {
|
|
21
19
|
default?: (props: {}) => any;
|
|
22
20
|
}>;
|
|
23
21
|
type __VLS_WithSlots$5<T, S> = T & {
|
|
@@ -26,12 +24,6 @@ type __VLS_WithSlots$5<T, S> = T & {
|
|
|
26
24
|
};
|
|
27
25
|
};
|
|
28
26
|
//#endregion
|
|
29
|
-
//#region src/utils/use-render-strategy.d.ts
|
|
30
|
-
interface RenderStrategyProps {
|
|
31
|
-
lazyMount?: boolean;
|
|
32
|
-
unmountOnExit?: boolean;
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
27
|
//#region src/components/collapsible/collapsible-types.d.ts
|
|
36
28
|
interface RootProps {
|
|
37
29
|
collapsedHeight?: number | string;
|
|
@@ -60,7 +52,7 @@ interface Collapsible extends collapsible.Api<PropTypes> {
|
|
|
60
52
|
unmounted?: boolean;
|
|
61
53
|
}
|
|
62
54
|
interface UseCollapsibleReturn extends ComputedRef<Collapsible> {}
|
|
63
|
-
declare const useCollapsible: (props?: MaybeRef<UseCollapsibleProps>, emits?: EmitFn<RootEmits>) => UseCollapsibleReturn;
|
|
55
|
+
declare const useCollapsible: (props?: MaybeRef<UseCollapsibleProps>, emits?: EmitFn$1<RootEmits>) => UseCollapsibleReturn;
|
|
64
56
|
//#endregion
|
|
65
57
|
//#region src/components/collapsible/use-collapsible-context.d.ts
|
|
66
58
|
interface UseCollapsibleContext extends UseCollapsibleReturn {}
|
|
@@ -70,7 +62,7 @@ interface CollapsibleContextProps extends SlotsType<{
|
|
|
70
62
|
default: UnwrapRef<UseCollapsibleContext>;
|
|
71
63
|
}> {}
|
|
72
64
|
declare const _default$1: typeof __VLS_export$4;
|
|
73
|
-
declare const __VLS_export$4: __VLS_WithSlots$4<
|
|
65
|
+
declare const __VLS_export$4: __VLS_WithSlots$4<vue182.DefineComponent<{}, {}, {}, {}, {}, vue182.ComponentOptionsMixin, vue182.ComponentOptionsMixin, {}, string, vue182.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue182.ComponentProvideOptions, true, {}, any>, {
|
|
74
66
|
default(collapsible: UnwrapRef<UseCollapsibleContext>): unknown;
|
|
75
67
|
}>;
|
|
76
68
|
type __VLS_WithSlots$4<T, S> = T & {
|
|
@@ -90,7 +82,7 @@ interface CollapsibleRootProviderProps extends CollapsibleRootProviderBaseProps,
|
|
|
90
82
|
*/
|
|
91
83
|
HTMLAttributes {}
|
|
92
84
|
declare const _default$4: typeof __VLS_export$3;
|
|
93
|
-
declare const __VLS_export$3: __VLS_WithSlots$3<
|
|
85
|
+
declare const __VLS_export$3: __VLS_WithSlots$3<vue182.DefineComponent<CollapsibleRootProviderProps, {}, {}, {}, {}, vue182.ComponentOptionsMixin, vue182.ComponentOptionsMixin, {}, string, vue182.PublicProps, Readonly<CollapsibleRootProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue182.ComponentProvideOptions, false, {}, any>, {
|
|
94
86
|
default?: (props: {}) => any;
|
|
95
87
|
}>;
|
|
96
88
|
type __VLS_WithSlots$3<T, S> = T & {
|
|
@@ -108,21 +100,21 @@ interface CollapsibleRootProps extends CollapsibleRootBaseProps,
|
|
|
108
100
|
HTMLAttributes {}
|
|
109
101
|
interface CollapsibleRootEmits extends RootEmits {}
|
|
110
102
|
declare const _default$3: typeof __VLS_export$2;
|
|
111
|
-
declare const __VLS_export$2: __VLS_WithSlots$2<
|
|
103
|
+
declare const __VLS_export$2: __VLS_WithSlots$2<vue182.DefineComponent<CollapsibleRootProps, {}, {}, {}, {}, vue182.ComponentOptionsMixin, vue182.ComponentOptionsMixin, {
|
|
112
104
|
exitComplete: () => any;
|
|
113
105
|
openChange: (details: collapsible.OpenChangeDetails) => any;
|
|
114
106
|
"update:open": (open: boolean) => any;
|
|
115
|
-
}, string,
|
|
107
|
+
}, string, vue182.PublicProps, Readonly<CollapsibleRootProps> & Readonly<{
|
|
116
108
|
onExitComplete?: (() => any) | undefined;
|
|
117
109
|
onOpenChange?: ((details: collapsible.OpenChangeDetails) => any) | undefined;
|
|
118
110
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
119
111
|
}>, {
|
|
120
|
-
defaultOpen: boolean;
|
|
121
|
-
disabled: boolean;
|
|
122
112
|
lazyMount: boolean;
|
|
123
|
-
open: boolean;
|
|
124
113
|
unmountOnExit: boolean;
|
|
125
|
-
|
|
114
|
+
open: boolean;
|
|
115
|
+
disabled: boolean;
|
|
116
|
+
defaultOpen: boolean;
|
|
117
|
+
}, {}, {}, {}, string, vue182.ComponentProvideOptions, false, {}, any>, {
|
|
126
118
|
default?: (props: {}) => any;
|
|
127
119
|
}>;
|
|
128
120
|
type __VLS_WithSlots$2<T, S> = T & {
|
|
@@ -139,7 +131,7 @@ interface CollapsibleTriggerProps extends CollapsibleTriggerBaseProps,
|
|
|
139
131
|
*/
|
|
140
132
|
ButtonHTMLAttributes {}
|
|
141
133
|
declare const _default$5: typeof __VLS_export$1;
|
|
142
|
-
declare const __VLS_export$1: __VLS_WithSlots$1<
|
|
134
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<vue182.DefineComponent<CollapsibleTriggerProps, {}, {}, {}, {}, vue182.ComponentOptionsMixin, vue182.ComponentOptionsMixin, {}, string, vue182.PublicProps, Readonly<CollapsibleTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, vue182.ComponentProvideOptions, false, {}, any>, {
|
|
143
135
|
default?: (props: {}) => any;
|
|
144
136
|
}>;
|
|
145
137
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
@@ -156,7 +148,7 @@ interface CollapsibleIndicatorProps extends CollapsibleIndicatorBaseProps,
|
|
|
156
148
|
*/
|
|
157
149
|
HTMLAttributes {}
|
|
158
150
|
declare const _default$2: typeof __VLS_export;
|
|
159
|
-
declare const __VLS_export: __VLS_WithSlots<
|
|
151
|
+
declare const __VLS_export: __VLS_WithSlots<vue182.DefineComponent<CollapsibleIndicatorProps, {}, {}, {}, {}, vue182.ComponentOptionsMixin, vue182.ComponentOptionsMixin, {}, string, vue182.PublicProps, Readonly<CollapsibleIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue182.ComponentProvideOptions, false, {}, any>, {
|
|
160
152
|
default?: (props: {}) => any;
|
|
161
153
|
}>;
|
|
162
154
|
type __VLS_WithSlots<T, S> = T & {
|