@bridge-ui/vue 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/skills/bridge-ui-components/SKILL.md +2 -1
- package/dist/Adapters/Examples/date-moment.js +31 -31
- package/dist/Adapters/Examples/i18n-dictionary.js +14 -0
- package/dist/Adapters/Examples/icon-fontawesome.js +53 -40
- package/dist/Adapters/Examples/icon-heroicons.js +46 -33
- package/dist/Adapters/Examples/icon-lucide.js +47 -34
- package/dist/Adapters/Examples/icon-phosphor.js +48 -35
- package/dist/Adapters/Examples/icon-tabler.js +45 -32
- package/dist/Adapters/Examples/rich-text-tiptap.d.ts +5 -0
- package/dist/Adapters/Examples/rich-text-tiptap.js +138 -0
- package/dist/Adapters/RichText/index.d.ts +1 -0
- package/dist/Adapters/RichText/index.js +2 -0
- package/dist/Adapters/RichText/mockRichTextAdapter.d.ts +5 -0
- package/dist/Adapters/RichText/useRichTextAdapter.d.ts +12 -0
- package/dist/Adapters/RichText/useRichTextAdapter.js +13 -0
- package/dist/Adapters/index.d.ts +1 -0
- package/dist/Adapters/index.js +2 -1
- package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +6 -6
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +2 -2
- package/dist/Components/BaseField/composables/useBaseField.d.ts +3 -3
- package/dist/Components/BaseField/composables/useBaseField.js +7 -7
- package/dist/Components/Breadcrumb/Breadcrumb.vue.d.ts +17 -10
- package/dist/Components/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/Components/Breadcrumb/breadcrumb.types.d.ts +22 -4
- package/dist/Components/Breadcrumb/breadcrumbInjectionKey.d.ts +5 -1
- package/dist/Components/Breadcrumb/composables/useBreadcrumb.d.ts +6 -5
- package/dist/Components/Breadcrumb/composables/useBreadcrumb.js +2 -0
- package/dist/Components/BreadcrumbItem/BreadcrumbItem.vue.d.ts +17 -11
- package/dist/Components/BreadcrumbItem/BreadcrumbItem.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/Components/BreadcrumbItem/breadcrumbItem.types.d.ts +21 -3
- package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.d.ts +10 -6
- package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.js +65 -59
- package/dist/Components/Button/Button.vue.d.ts +17 -8
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/Components/Button/button.types.d.ts +22 -5
- package/dist/Components/Button/composables/useButton.d.ts +198 -8
- package/dist/Components/Button/composables/useButton.js +101 -86
- package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/Components/Carousel/Carousel.js +5 -0
- package/dist/Components/Carousel/Carousel.vue.d.ts +22 -0
- package/dist/Components/Carousel/Carousel.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/Components/Carousel/carousel.types.d.ts +236 -0
- package/dist/Components/Carousel/carouselInjectionKey.d.ts +48 -0
- package/dist/Components/Carousel/carouselInjectionKey.js +4 -0
- package/dist/Components/Carousel/composables/useCarousel.d.ts +91 -0
- package/dist/Components/Carousel/composables/useCarousel.js +331 -0
- package/dist/Components/Carousel/index.d.ts +4 -0
- package/dist/Components/Carousel/index.js +4 -0
- package/dist/Components/CarouselSlide/CarouselSlide.js +5 -0
- package/dist/Components/CarouselSlide/CarouselSlide.vue.d.ts +11 -0
- package/dist/Components/CarouselSlide/CarouselSlide.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/CarouselSlide/carouselSlide.types.d.ts +40 -0
- package/dist/Components/CarouselSlide/composables/useCarouselSlide.d.ts +205 -0
- package/dist/Components/CarouselSlide/composables/useCarouselSlide.js +79 -0
- package/dist/Components/CarouselSlide/index.d.ts +3 -0
- package/dist/Components/CarouselSlide/index.js +3 -0
- package/dist/Components/ColorPicker/composables/useColorPicker.js +1 -1
- package/dist/Components/DataTable/DataTable.vue.d.ts +1 -1
- package/dist/Components/DataTable/composables/useDataTable.d.ts +1 -1
- package/dist/Components/DataTable/composables/useDataTable.js +288 -282
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +2 -2
- package/dist/Components/FileUpload/FileUpload.js +5 -0
- package/dist/Components/FileUpload/FileUpload.vue.d.ts +26 -0
- package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +141 -0
- package/dist/Components/FileUpload/composables/useFileUpload.d.ts +120 -0
- package/dist/Components/FileUpload/composables/useFileUpload.js +235 -0
- package/dist/Components/FileUpload/fileUpload.types.d.ts +396 -0
- package/dist/Components/FileUpload/fileUploadInjectionKey.d.ts +61 -0
- package/dist/Components/FileUpload/fileUploadInjectionKey.js +4 -0
- package/dist/Components/FileUpload/index.d.ts +3 -0
- package/dist/Components/FileUpload/index.js +3 -0
- package/dist/Components/FileUploadItem/FileUploadItem.js +5 -0
- package/dist/Components/FileUploadItem/FileUploadItem.vue.d.ts +12 -0
- package/dist/Components/FileUploadItem/FileUploadItem.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/Components/FileUploadItem/composables/useFileUploadItem.d.ts +1153 -0
- package/dist/Components/FileUploadItem/composables/useFileUploadItem.js +94 -0
- package/dist/Components/FileUploadItem/fileUploadItem.types.d.ts +20 -0
- package/dist/Components/FileUploadItem/index.d.ts +3 -0
- package/dist/Components/FileUploadItem/index.js +3 -0
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
- package/dist/Components/Link/Link.vue.d.ts +17 -8
- package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +30 -25
- package/dist/Components/Link/composables/useLink.d.ts +8 -6
- package/dist/Components/Link/composables/useLink.js +52 -45
- package/dist/Components/Link/link.types.d.ts +21 -4
- package/dist/Components/ListItem/ListItem.vue.d.ts +17 -15
- package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/Components/ListItem/composables/useListItem.d.ts +7 -6
- package/dist/Components/ListItem/composables/useListItem.js +108 -105
- package/dist/Components/ListItem/listItem.types.d.ts +19 -3
- package/dist/Components/Listbox/composables/useListbox.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.js +6 -6
- package/dist/Components/Modal/composables/useModal.d.ts +1 -1
- package/dist/Components/Modal/composables/useModal.js +2 -2
- package/dist/Components/Pagination/composables/usePagination.d.ts +1 -1
- package/dist/Components/RichTextEditor/RichTextEditor.js +5 -0
- package/dist/Components/RichTextEditor/RichTextEditor.vue.d.ts +23 -0
- package/dist/Components/RichTextEditor/RichTextEditor.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.d.ts +488 -0
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +226 -0
- package/dist/Components/RichTextEditor/index.d.ts +3 -0
- package/dist/Components/RichTextEditor/index.js +3 -0
- package/dist/Components/RichTextEditor/richTextEditor.types.d.ts +103 -0
- package/dist/Components/Select/composables/useSelect.js +2 -2
- package/dist/Components/Sidebar/SidebarListItem.vue.d.ts +17 -9
- package/dist/Components/Sidebar/SidebarListItem.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/Components/Sidebar/composables/useSidebarListItem.js +1 -1
- package/dist/Components/Sidebar/composables/useSidebarTrigger.d.ts +1 -1
- package/dist/Components/Sidebar/sidebar.types.d.ts +2 -1
- package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
- package/dist/Components/Textarea/composables/useTextarea.js +1 -1
- package/dist/Components/Tooltip/composables/useTooltip.js +3 -3
- package/dist/Utils/linkAs.d.ts +29 -0
- package/dist/Utils/linkAs.js +18 -0
- package/dist/augments.d.ts +19 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +181 -170
- package/dist/theme.css +3 -0
- package/docs/README.md +4 -0
- package/docs/components/Breadcrumb.md +16 -0
- package/docs/components/BridgeUIProvider.md +18 -1
- package/docs/components/Button.md +31 -19
- package/docs/components/Carousel.md +113 -0
- package/docs/components/DataTable.md +1 -1
- package/docs/components/FileUpload.md +197 -0
- package/docs/components/Link.md +28 -12
- package/docs/components/List.md +21 -19
- package/docs/components/RichTextEditor.md +88 -0
- package/docs/components/Sidebar.md +1 -1
- package/package.json +54 -18
|
@@ -34,7 +34,7 @@ export declare function useDrawer(props: DrawerOwnProps, libDefaults: DrawerLibD
|
|
|
34
34
|
};
|
|
35
35
|
"aria-hidden": boolean | undefined;
|
|
36
36
|
class: string;
|
|
37
|
-
}, "class", import('vue').HTMLAttributes | undefined, Omit<DrawerProps, "size" | "classes" | "customProps" | "scroll" | "ariaLabel" | "ariaLabelledBy" | "autoFocus" | "blur" | "closeOnEscape" | "closeOnOverlay" | "disableEnforceFocus" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "persistent" | "placement" | "stackId" | "teleportTo"
|
|
37
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<DrawerProps, "size" | "classes" | "customProps" | "transition" | "scroll" | "ariaLabel" | "ariaLabelledBy" | "autoFocus" | "blur" | "closeOnEscape" | "closeOnOverlay" | "disableEnforceFocus" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "persistent" | "placement" | "stackId" | "teleportTo">>>;
|
|
38
38
|
panelBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
39
39
|
"data-drawer-part": string;
|
|
40
40
|
"data-state": "open" | "closed";
|
|
@@ -160,13 +160,13 @@ function m(m, h, g = {}) {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
function Z() {
|
|
163
|
-
P.value.closeOnOverlay
|
|
163
|
+
P.value.closeOnOverlay !== !1 && U.value && X();
|
|
164
164
|
}
|
|
165
165
|
function Q(e) {
|
|
166
166
|
f(e) && Z();
|
|
167
167
|
}
|
|
168
168
|
function Pe() {
|
|
169
|
-
|
|
169
|
+
j.value && P.value.closeOnEscape !== !1 && U.value && X();
|
|
170
170
|
}
|
|
171
171
|
o(j, (e) => {
|
|
172
172
|
if (e) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FileUploadModel, FileUploadValue } from '@bridge-ui/core/Domain';
|
|
2
|
+
import { FileUploadOwnProps, FileUploadSlots } from './fileUpload.types';
|
|
3
|
+
declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<(FileUploadOwnProps<Multiple> & {
|
|
5
|
+
modelValue?: Multiple extends true ? FileUploadValue[] : FileUploadValue | null;
|
|
6
|
+
}) & {
|
|
7
|
+
onRemove?: ((value: FileUploadValue, index: number) => any) | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((value: (Multiple extends true ? FileUploadValue[] : FileUploadValue | null) | undefined) => any) | undefined;
|
|
9
|
+
onRetry?: ((value: FileUploadValue, index: number) => any) | undefined;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: {}) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: FileUploadSlots;
|
|
16
|
+
emit: (((evt: "remove", value: FileUploadValue, index: number) => void) & ((evt: "update:modelValue", value: FileUploadModel) => void) & ((evt: "retry", value: FileUploadValue, index: number) => void)) & ((event: "update:modelValue", value: (Multiple extends true ? FileUploadValue[] : FileUploadValue | null) | undefined) => void);
|
|
17
|
+
}>) => import('vue').VNode & {
|
|
18
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} : {
|
|
25
|
+
[K in keyof T as K]: T[K];
|
|
26
|
+
}) & {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { hasNamedSlot as e, isPropPresent as t, presentSlotNames as n } from "../../Utils/slotOrProp.js";
|
|
2
|
+
import { useOptionalModel as r } from "../../Utils/useOptionalModel.js";
|
|
3
|
+
import i from "../Icon/Icon.js";
|
|
4
|
+
import a from "../Button/Button.js";
|
|
5
|
+
import { BASE_FIELD_CHROME_SLOT_NAMES as o } from "../BaseField/baseField.types.js";
|
|
6
|
+
import s from "../BaseField/BaseField.js";
|
|
7
|
+
import { useFileUpload as c } from "./composables/useFileUpload.js";
|
|
8
|
+
import { FILE_UPLOAD_KEY as l } from "./fileUploadInjectionKey.js";
|
|
9
|
+
import u from "../FileUploadItem/FileUploadItem.js";
|
|
10
|
+
import { Fragment as d, computed as ee, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as g, createTextVNode as _, createVNode as v, defineComponent as y, guardReactiveProps as b, mergeModels as x, mergeProps as S, normalizeProps as C, openBlock as w, provide as te, ref as ne, renderList as T, renderSlot as E, toDisplayString as D, unref as O, useModel as k, withCtx as A } from "vue";
|
|
11
|
+
import { getFileUploadItemKey as j } from "@bridge-ui/core/Domain";
|
|
12
|
+
//#region src/Components/FileUpload/FileUpload.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
+
var M = { class: "flex w-full flex-col" }, N = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "m-0 font-medium text-dark-900 dark:text-dark-100"
|
|
16
|
+
}, P = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "m-0 text-sm text-dark-500 dark:text-dark-400"
|
|
19
|
+
}, F = ["tabindex"], I = /*@__PURE__*/ y({
|
|
20
|
+
inheritAttrs: !1,
|
|
21
|
+
__name: "FileUpload",
|
|
22
|
+
props: /*@__PURE__*/ x({
|
|
23
|
+
accept: {},
|
|
24
|
+
buttonLabel: {},
|
|
25
|
+
classes: {},
|
|
26
|
+
color: {},
|
|
27
|
+
corner: {},
|
|
28
|
+
customProps: {},
|
|
29
|
+
defaultValue: {},
|
|
30
|
+
description: {},
|
|
31
|
+
disabled: { type: Boolean },
|
|
32
|
+
error: { type: Boolean },
|
|
33
|
+
errorMessage: {},
|
|
34
|
+
label: {},
|
|
35
|
+
maxFiles: {},
|
|
36
|
+
maxSize: {},
|
|
37
|
+
multiple: {},
|
|
38
|
+
orientation: {},
|
|
39
|
+
required: { type: Boolean },
|
|
40
|
+
rounded: {},
|
|
41
|
+
size: {},
|
|
42
|
+
title: {},
|
|
43
|
+
variant: {}
|
|
44
|
+
}, {
|
|
45
|
+
modelValue: {},
|
|
46
|
+
modelModifiers: {}
|
|
47
|
+
}),
|
|
48
|
+
emits: /*@__PURE__*/ x([
|
|
49
|
+
"remove",
|
|
50
|
+
"retry",
|
|
51
|
+
"update:modelValue"
|
|
52
|
+
], ["update:modelValue"]),
|
|
53
|
+
setup(y, { emit: x }) {
|
|
54
|
+
let I = x, L = k(y, "modelValue"), R = y, z = ne(R.defaultValue ?? null), B = r(L, z), { slots: V, merged: H, listBind: U, inputRef: W, baseField: G, inputBind: K, mediaBind: q, titleBind: J, fileItems: Y, isDropzone: X, showPicker: Z, stateItems: re, actionsBind: ie, contentBind: ae, triggerBind: oe, getItemBind: Q, buttonLabel: se, dropzoneBind: ce, openFileDialog: $, orientationItems: le, itemDescriptionBind: ue } = c(R, {
|
|
55
|
+
size: "md",
|
|
56
|
+
rounded: "md",
|
|
57
|
+
multiple: !1,
|
|
58
|
+
color: "primary",
|
|
59
|
+
variant: "button",
|
|
60
|
+
orientation: "horizontal"
|
|
61
|
+
}, B, I);
|
|
62
|
+
te(l, ee(() => ({
|
|
63
|
+
getItemBind: Q,
|
|
64
|
+
size: H.value.size,
|
|
65
|
+
color: H.value.color,
|
|
66
|
+
mediaBind: q.value,
|
|
67
|
+
titleBind: J.value,
|
|
68
|
+
stateItems: re.value,
|
|
69
|
+
rounded: H.value.rounded,
|
|
70
|
+
actionsBind: ie.value,
|
|
71
|
+
contentBind: ae.value,
|
|
72
|
+
disabled: H.value.disabled,
|
|
73
|
+
orientation: H.value.orientation,
|
|
74
|
+
orientationItems: le.value,
|
|
75
|
+
descriptionBind: ue.value
|
|
76
|
+
})));
|
|
77
|
+
function de(e) {
|
|
78
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), $());
|
|
79
|
+
}
|
|
80
|
+
return (r, c) => (w(), f(s, { field: O(G) }, g({
|
|
81
|
+
default: A(() => [h("div", M, [
|
|
82
|
+
h("input", S({
|
|
83
|
+
ref_key: "inputRef",
|
|
84
|
+
ref: W
|
|
85
|
+
}, O(K)), null, 16),
|
|
86
|
+
O(Z) ? (w(), m(d, { key: 0 }, [O(X) ? (w(), m("div", C(S({ key: 0 }, O(ce))), [O(e)(O(V), "dropzone") ? E(r.$slots, "dropzone", {}, void 0, void 0, 0) : (w(), m(d, { key: 1 }, [
|
|
87
|
+
v(O(i), {
|
|
88
|
+
icon: "inbox",
|
|
89
|
+
class: "mb-1 text-dark-400"
|
|
90
|
+
}),
|
|
91
|
+
O(t)(O(H).title) ? (w(), m("p", N, D(O(H).title), 1)) : p("", !0),
|
|
92
|
+
O(t)(O(H).description) ? (w(), m("p", P, D(O(H).description), 1)) : p("", !0)
|
|
93
|
+
], 64))], 16)) : (w(), m("div", C(S({ key: 1 }, O(oe))), [O(e)(O(V), "trigger") ? (w(), m("span", {
|
|
94
|
+
key: 0,
|
|
95
|
+
role: "button",
|
|
96
|
+
onClick: c[0] ||= (...e) => O($) && O($)(...e),
|
|
97
|
+
onKeydown: de,
|
|
98
|
+
tabindex: O(H).disabled ? -1 : 0
|
|
99
|
+
}, [E(r.$slots, "trigger")], 40, F)) : (w(), f(O(a), {
|
|
100
|
+
key: 1,
|
|
101
|
+
type: "button",
|
|
102
|
+
size: O(H).size,
|
|
103
|
+
color: O(H).color,
|
|
104
|
+
rounded: O(H).rounded,
|
|
105
|
+
disabled: O(H).disabled,
|
|
106
|
+
onClick: O($)
|
|
107
|
+
}, {
|
|
108
|
+
default: A(() => [_(D(O(se)), 1)]),
|
|
109
|
+
_: 1
|
|
110
|
+
}, 8, [
|
|
111
|
+
"size",
|
|
112
|
+
"color",
|
|
113
|
+
"rounded",
|
|
114
|
+
"disabled",
|
|
115
|
+
"onClick"
|
|
116
|
+
]))], 16))], 64)) : p("", !0),
|
|
117
|
+
O(e)(O(V), "list") ? E(r.$slots, "list", { items: O(Y) }, void 0, void 0, 1) : O(Y).length > 0 ? (w(), m("ul", C(S({ key: 2 }, O(U))), [(w(!0), m(d, null, T(O(Y), (t) => (w(), m(d, { key: O(j)(t.value, t.index) }, [O(e)(O(V), "item") ? (w(), m("li", S({
|
|
118
|
+
key: 0,
|
|
119
|
+
ref_for: !0
|
|
120
|
+
}, O(Q)(t.index)), [E(r.$slots, "item", S({ ref_for: !0 }, t))], 16)) : (w(), f(u, S({
|
|
121
|
+
key: 1,
|
|
122
|
+
ref_for: !0
|
|
123
|
+
}, t), g({ _: 2 }, [O(e)(O(V), "start") ? {
|
|
124
|
+
name: "start",
|
|
125
|
+
fn: A(() => [E(r.$slots, "start", S({ ref_for: !0 }, t))]),
|
|
126
|
+
key: "0"
|
|
127
|
+
} : void 0, O(e)(O(V), "end") ? {
|
|
128
|
+
name: "end",
|
|
129
|
+
fn: A(() => [E(r.$slots, "end", S({ ref_for: !0 }, t))]),
|
|
130
|
+
key: "1"
|
|
131
|
+
} : void 0]), 1040))], 64))), 128))], 16)) : p("", !0)
|
|
132
|
+
])]),
|
|
133
|
+
_: 2
|
|
134
|
+
}, [T(O(n)(O(o).filter((e) => e !== "start" && e !== "end"), r.$slots), (e) => ({
|
|
135
|
+
name: e,
|
|
136
|
+
fn: A((t) => [E(r.$slots, e, C(b(t || {})))])
|
|
137
|
+
}))]), 1032, ["field"]));
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
//#endregion
|
|
141
|
+
export { I as default };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Ref, WritableComputedRef } from 'vue';
|
|
2
|
+
import { FileUploadModel, FileUploadValue } from '@bridge-ui/core/Domain';
|
|
3
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
4
|
+
import { FileUploadOwnProps } from '../fileUpload.types';
|
|
5
|
+
type FileUploadLibDefaults = LibDefaultsShape<FileUploadOwnProps<boolean>, "size" | "color" | "rounded" | "variant" | "multiple" | "orientation">;
|
|
6
|
+
type FileUploadMerged = MergeLibDefaults<FileUploadOwnProps<boolean>, FileUploadLibDefaults>;
|
|
7
|
+
export declare function useFileUpload(props: FileUploadOwnProps<boolean>, libDefaults: FileUploadLibDefaults, model: WritableComputedRef<FileUploadModel>, emit: {
|
|
8
|
+
(event: "remove", value: FileUploadValue, index: number): void;
|
|
9
|
+
(event: "retry", value: FileUploadValue, index: number): void;
|
|
10
|
+
(event: "update:modelValue", value: FileUploadModel): void;
|
|
11
|
+
}): {
|
|
12
|
+
slots: Readonly<{
|
|
13
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
merged: import('vue').ComputedRef<FileUploadMerged>;
|
|
16
|
+
dragging: Ref<boolean, boolean>;
|
|
17
|
+
listBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
18
|
+
baseField: {
|
|
19
|
+
slots: Readonly<{
|
|
20
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
merged: import('vue').ComputedRef<Omit<Omit<import('../../BaseField/baseField.types').BaseFieldOwnProps, "field">, "error" | "size" | "hideErrorMessage"> & {
|
|
23
|
+
error: NonNullable<boolean | undefined>;
|
|
24
|
+
size: NonNullable<keyof import('@bridge-ui/core/Tokens').BaseFieldSize | undefined>;
|
|
25
|
+
hideErrorMessage: NonNullable<boolean | undefined>;
|
|
26
|
+
}>;
|
|
27
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
28
|
+
slots?: import('../../BaseField/baseField.types').BaseFieldSlots | undefined;
|
|
29
|
+
class: string;
|
|
30
|
+
}>>;
|
|
31
|
+
errorBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
32
|
+
groupBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
33
|
+
role: string;
|
|
34
|
+
id: string;
|
|
35
|
+
"aria-describedby": string | undefined;
|
|
36
|
+
"aria-disabled": true | undefined;
|
|
37
|
+
"aria-invalid": true | undefined;
|
|
38
|
+
}>>;
|
|
39
|
+
controlId: import('vue').ComputedRef<string>;
|
|
40
|
+
headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
41
|
+
isDisabled: import('vue').ComputedRef<boolean>;
|
|
42
|
+
isReadonly: import('vue').ComputedRef<boolean>;
|
|
43
|
+
sizeClasses: import('vue').ComputedRef<import('@bridge-ui/core/Tokens').BaseFieldSizeItem | undefined>;
|
|
44
|
+
endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
45
|
+
invalidated: import('vue').ComputedRef<boolean>;
|
|
46
|
+
startSlotBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
47
|
+
mergedClasses: import('vue').ComputedRef<Partial<import('../../BaseField/baseField.types').BaseFieldClasses>>;
|
|
48
|
+
ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
49
|
+
fieldLabelProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
50
|
+
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
51
|
+
fieldCornerProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
52
|
+
showErrorMessageRow: import('vue').ComputedRef<boolean>;
|
|
53
|
+
showDescriptionContent: import('vue').ComputedRef<boolean>;
|
|
54
|
+
showErrorMessageContent: import('vue').ComputedRef<boolean>;
|
|
55
|
+
};
|
|
56
|
+
inputBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
57
|
+
type: string;
|
|
58
|
+
tabIndex: number;
|
|
59
|
+
"aria-hidden": boolean;
|
|
60
|
+
accept: string | undefined;
|
|
61
|
+
onChange: (event: Event) => void;
|
|
62
|
+
multiple: NonNullable<boolean | undefined>;
|
|
63
|
+
id: string;
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
class: string;
|
|
66
|
+
}, "class", import('vue').InputHTMLAttributes | undefined, {}>>;
|
|
67
|
+
mediaBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
68
|
+
titleBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
69
|
+
fileItems: import('vue').ComputedRef<{
|
|
70
|
+
index: number;
|
|
71
|
+
value: FileUploadValue;
|
|
72
|
+
isImage: boolean;
|
|
73
|
+
metaLabel: string;
|
|
74
|
+
remove: () => void;
|
|
75
|
+
sizeLabel: string;
|
|
76
|
+
previewUrl: string | undefined;
|
|
77
|
+
retry: (() => void) | undefined;
|
|
78
|
+
}[]>;
|
|
79
|
+
showError: import('vue').ComputedRef<boolean>;
|
|
80
|
+
isDropzone: import('vue').ComputedRef<boolean>;
|
|
81
|
+
isDisabled: import('vue').ComputedRef<boolean>;
|
|
82
|
+
showPicker: import('vue').ComputedRef<boolean>;
|
|
83
|
+
canAddMore: import('vue').ComputedRef<boolean>;
|
|
84
|
+
stateItems: import('vue').ComputedRef<Partial<{
|
|
85
|
+
done: import('@bridge-ui/core/Tokens').FileUploadStateItem;
|
|
86
|
+
error: import('@bridge-ui/core/Tokens').FileUploadStateItem;
|
|
87
|
+
idle: import('@bridge-ui/core/Tokens').FileUploadStateItem;
|
|
88
|
+
processing: import('@bridge-ui/core/Tokens').FileUploadStateItem;
|
|
89
|
+
uploading: import('@bridge-ui/core/Tokens').FileUploadStateItem;
|
|
90
|
+
}>>;
|
|
91
|
+
actionsBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
92
|
+
contentBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
93
|
+
triggerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
94
|
+
getItemBind: (index: number) => import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
95
|
+
"data-state"?: import('@bridge-ui/core/Domain').FileUploadItemState | undefined;
|
|
96
|
+
"data-orientation": NonNullable<keyof import('@bridge-ui/core/Tokens').FileUploadOrientation | undefined>;
|
|
97
|
+
}>;
|
|
98
|
+
buttonLabel: import('vue').ComputedRef<string>;
|
|
99
|
+
dropzoneBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
100
|
+
role: string;
|
|
101
|
+
onDrop: (event: DragEvent) => void;
|
|
102
|
+
onClick: () => void;
|
|
103
|
+
onDragover: (event: DragEvent) => void;
|
|
104
|
+
onDragenter: (event: DragEvent) => void;
|
|
105
|
+
onDragleave: (event: DragEvent) => void;
|
|
106
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
107
|
+
tabindex: number;
|
|
108
|
+
"aria-disabled": true | undefined;
|
|
109
|
+
}>>;
|
|
110
|
+
openFileDialog: () => void;
|
|
111
|
+
validationError: Ref<string | undefined, string | undefined>;
|
|
112
|
+
orientationItems: import('vue').ComputedRef<Partial<{
|
|
113
|
+
horizontal: import('@bridge-ui/core/Tokens').FileUploadOrientationItem;
|
|
114
|
+
vertical: import('@bridge-ui/core/Tokens').FileUploadOrientationItem;
|
|
115
|
+
}>>;
|
|
116
|
+
itemDescriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, {}>>;
|
|
117
|
+
resolvedErrorMessage: import('vue').ComputedRef<string | undefined>;
|
|
118
|
+
inputRef: Ref<null | HTMLInputElement>;
|
|
119
|
+
};
|
|
120
|
+
export {};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { useBaseField as r } from "../../BaseField/composables/useBaseField.js";
|
|
3
|
+
import { computed as i, getCurrentInstance as a, onUnmounted as o, ref as s, useAttrs as c, useSlots as l, watch as u } from "vue";
|
|
4
|
+
import { get as d, isNil as f } from "es-toolkit/compat";
|
|
5
|
+
import { fileUploadItemsFromModel as ee, fileUploadModelFromItems as p, filesFromFileList as m, formatFileSize as te, formatFileUploadStatusLabel as ne, getFileUploadBrowserFile as re, getFileUploadItemState as ie, getFileUploadPreviewUrl as ae, isFileUploadRemote as oe, isImageUploadValue as h, mergeFileUploadSelection as se, removeFileAtIndex as g } from "@bridge-ui/core/Domain";
|
|
6
|
+
import { fileUploadColorProps as _, fileUploadOrientationProps as v, fileUploadRoundedProps as y, fileUploadSizeProps as b, fileUploadStateProps as x, fileUploadVariantProps as S } from "@bridge-ui/core/Tokens";
|
|
7
|
+
import { cn as C, mergeBridgeUILayeredClasses as w, splitComponentProps as ce } from "@bridge-ui/core/Utils";
|
|
8
|
+
//#region src/Components/FileUpload/composables/useFileUpload.ts
|
|
9
|
+
var le = [
|
|
10
|
+
"size",
|
|
11
|
+
"color",
|
|
12
|
+
"error",
|
|
13
|
+
"label",
|
|
14
|
+
"title",
|
|
15
|
+
"accept",
|
|
16
|
+
"corner",
|
|
17
|
+
"classes",
|
|
18
|
+
"maxSize",
|
|
19
|
+
"rounded",
|
|
20
|
+
"variant",
|
|
21
|
+
"disabled",
|
|
22
|
+
"maxFiles",
|
|
23
|
+
"multiple",
|
|
24
|
+
"required",
|
|
25
|
+
"modelValue",
|
|
26
|
+
"buttonLabel",
|
|
27
|
+
"customProps",
|
|
28
|
+
"description",
|
|
29
|
+
"orientation",
|
|
30
|
+
"defaultValue",
|
|
31
|
+
"errorMessage"
|
|
32
|
+
];
|
|
33
|
+
function T(T, E, D, O) {
|
|
34
|
+
let ue = c(), de = l(), fe = a(), k = s(0), A = s(!1), j = s(), M = s(null), N = s([]), P = i(() => ce({
|
|
35
|
+
bridgeKeys: le,
|
|
36
|
+
props: {
|
|
37
|
+
...ue,
|
|
38
|
+
...T
|
|
39
|
+
}
|
|
40
|
+
})), { merged: F, entry: I } = t({
|
|
41
|
+
libDefaults: E,
|
|
42
|
+
componentName: "FileUpload",
|
|
43
|
+
props: () => P.value.componentProps
|
|
44
|
+
}), L = i(() => F.value.customProps), R = i(() => F.value.variant === "dropzone"), z = i(() => !!F.value.disabled), B = i(() => ee(D.value, !!F.value.multiple)), V = i(() => F.value.multiple ? F.value.maxFiles != null && F.value.maxFiles > 0 ? B.value.length < F.value.maxFiles : !0 : B.value.length === 0), pe = i(() => V.value), H = i(() => F.value.errorMessage ?? j.value), U = i(() => F.value.error === !0 || H.value != null && H.value !== ""), W = r(i(() => ({
|
|
45
|
+
error: U.value,
|
|
46
|
+
size: P.value.componentProps.size,
|
|
47
|
+
label: P.value.componentProps.label,
|
|
48
|
+
errorMessage: H.value,
|
|
49
|
+
corner: P.value.componentProps.corner,
|
|
50
|
+
disabled: P.value.componentProps.disabled,
|
|
51
|
+
required: P.value.componentProps.required,
|
|
52
|
+
description: R.value ? void 0 : P.value.componentProps.description,
|
|
53
|
+
customProps: {
|
|
54
|
+
root: L.value?.root,
|
|
55
|
+
description: L.value?.description,
|
|
56
|
+
errorMessage: L.value?.errorMessage,
|
|
57
|
+
label: L.value?.label
|
|
58
|
+
},
|
|
59
|
+
classes: {
|
|
60
|
+
root: P.value.componentProps.classes?.root,
|
|
61
|
+
label: P.value.componentProps.classes?.label,
|
|
62
|
+
description: P.value.componentProps.classes?.description,
|
|
63
|
+
errorMessage: P.value.componentProps.classes?.errorMessage
|
|
64
|
+
}
|
|
65
|
+
})), {
|
|
66
|
+
error: !1,
|
|
67
|
+
hideErrorMessage: !1,
|
|
68
|
+
size: E.size ?? "md"
|
|
69
|
+
}, {
|
|
70
|
+
componentName: "FileUpload",
|
|
71
|
+
labelHtmlFor: (e) => `${e}-input`
|
|
72
|
+
}), G = n({
|
|
73
|
+
entry: I,
|
|
74
|
+
props: () => P.value.componentProps
|
|
75
|
+
}), K = i(() => {
|
|
76
|
+
let e = w(b, I.value?.tokens?.size);
|
|
77
|
+
return d(e, F.value.size);
|
|
78
|
+
}), q = i(() => w(v, I.value?.tokens?.orientation)), J = i(() => d(q.value, F.value.orientation)), Y = i(() => w(x, I.value?.tokens?.state)), X = i(() => {
|
|
79
|
+
let e = w(y, I.value?.tokens?.rounded);
|
|
80
|
+
return d(e, F.value.rounded);
|
|
81
|
+
}), me = i(() => {
|
|
82
|
+
let e = w(S, I.value?.tokens?.variant);
|
|
83
|
+
return d(e, F.value.variant);
|
|
84
|
+
}), he = i(() => {
|
|
85
|
+
let e = w(_, I.value?.tokens?.color);
|
|
86
|
+
return d(e, F.value.color);
|
|
87
|
+
});
|
|
88
|
+
u(B, (e) => {
|
|
89
|
+
for (let e of N.value) e && URL.revokeObjectURL(e);
|
|
90
|
+
N.value = e.map((e) => {
|
|
91
|
+
let t = re(e);
|
|
92
|
+
if (t && h(e) && !(oe(e) && e.url)) return URL.createObjectURL(t);
|
|
93
|
+
});
|
|
94
|
+
}, { immediate: !0 }), o(() => {
|
|
95
|
+
for (let e of N.value) e && URL.revokeObjectURL(e);
|
|
96
|
+
});
|
|
97
|
+
function ge(e, t) {
|
|
98
|
+
D.value = p(e, !!F.value.multiple), t > 0 ? j.value = t === 1 ? "1 file could not be added." : `${t} files could not be added.` : j.value = void 0;
|
|
99
|
+
}
|
|
100
|
+
function Z(e) {
|
|
101
|
+
if (z.value || e.length === 0) return;
|
|
102
|
+
let t = se(B.value, e, {
|
|
103
|
+
accept: F.value.accept,
|
|
104
|
+
maxSize: F.value.maxSize,
|
|
105
|
+
maxFiles: F.value.maxFiles,
|
|
106
|
+
multiple: F.value.multiple
|
|
107
|
+
});
|
|
108
|
+
ge(t.accepted, t.rejected.length);
|
|
109
|
+
}
|
|
110
|
+
function Q() {
|
|
111
|
+
!z.value && V.value && M.value?.click();
|
|
112
|
+
}
|
|
113
|
+
function _e(e) {
|
|
114
|
+
if (z.value) return;
|
|
115
|
+
let t = B.value[e];
|
|
116
|
+
if (!t) return;
|
|
117
|
+
let n = g(B.value, e);
|
|
118
|
+
D.value = p(n, !!F.value.multiple), O("remove", t, e), j.value = void 0;
|
|
119
|
+
}
|
|
120
|
+
function ve(e) {
|
|
121
|
+
if (z.value) return;
|
|
122
|
+
let t = B.value[e];
|
|
123
|
+
t && O("retry", t, e);
|
|
124
|
+
}
|
|
125
|
+
function ye() {
|
|
126
|
+
let e = fe?.vnode.props;
|
|
127
|
+
return !!(e && "onRetry" in e);
|
|
128
|
+
}
|
|
129
|
+
function be(e) {
|
|
130
|
+
let t = e.target;
|
|
131
|
+
Z(m(t.files)), t.value = "";
|
|
132
|
+
}
|
|
133
|
+
function xe(e) {
|
|
134
|
+
e.preventDefault(), e.stopPropagation(), !z.value && R.value && V.value && (k.value += 1, A.value = !0);
|
|
135
|
+
}
|
|
136
|
+
function Se(e) {
|
|
137
|
+
e.preventDefault(), e.stopPropagation(), !z.value && R.value && (k.value = Math.max(0, k.value - 1), k.value === 0 && (A.value = !1));
|
|
138
|
+
}
|
|
139
|
+
function Ce(e) {
|
|
140
|
+
e.preventDefault(), e.stopPropagation(), !z.value && R.value && V.value && e.dataTransfer && (e.dataTransfer.dropEffect = "copy");
|
|
141
|
+
}
|
|
142
|
+
function we(e) {
|
|
143
|
+
e.preventDefault(), e.stopPropagation(), k.value = 0, A.value = !1, !z.value && R.value && V.value && Z(m(e.dataTransfer?.files));
|
|
144
|
+
}
|
|
145
|
+
function Te(e) {
|
|
146
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q());
|
|
147
|
+
}
|
|
148
|
+
let Ee = i(() => e(L.value?.input, {}, {
|
|
149
|
+
type: "file",
|
|
150
|
+
tabIndex: -1,
|
|
151
|
+
"aria-hidden": !0,
|
|
152
|
+
accept: F.value.accept,
|
|
153
|
+
onChange: be,
|
|
154
|
+
multiple: F.value.multiple,
|
|
155
|
+
id: `${W.controlId.value}-input`,
|
|
156
|
+
disabled: z.value || !V.value,
|
|
157
|
+
class: C({ "sr-only": !0 })
|
|
158
|
+
})), De = i(() => e(L.value?.trigger, {}, C({
|
|
159
|
+
[d(K.value, "trigger") ?? ""]: !0,
|
|
160
|
+
[d(G.value, "trigger") ?? ""]: !0
|
|
161
|
+
}))), Oe = i(() => e(L.value?.dropzone, {
|
|
162
|
+
role: "button",
|
|
163
|
+
onDrop: we,
|
|
164
|
+
onClick: Q,
|
|
165
|
+
onDragover: Ce,
|
|
166
|
+
onDragenter: xe,
|
|
167
|
+
onDragleave: Se,
|
|
168
|
+
onKeydown: Te,
|
|
169
|
+
tabindex: z.value || !V.value ? -1 : 0,
|
|
170
|
+
"aria-disabled": z.value || !V.value || void 0
|
|
171
|
+
}, C({
|
|
172
|
+
[d(K.value, "dropzone") ?? ""]: !0,
|
|
173
|
+
[X.value ?? ""]: !0,
|
|
174
|
+
[d(me.value, "surface") ?? ""]: !0,
|
|
175
|
+
[d(he.value, "dragging") ?? ""]: A.value,
|
|
176
|
+
"cursor-pointer": !z.value && V.value,
|
|
177
|
+
"pointer-events-none opacity-60": z.value || !V.value,
|
|
178
|
+
[d(G.value, "dropzone") ?? ""]: !0
|
|
179
|
+
}))), $ = i(() => e(L.value?.list, {}, C(d(K.value, "list"), d(J.value, "list"), d(G.value, "list"))));
|
|
180
|
+
function ke(t) {
|
|
181
|
+
let n = B.value[t], r = n ? ie(n) : void 0, i = r ? d(Y.value, r) : void 0;
|
|
182
|
+
return e(L.value?.item, {
|
|
183
|
+
"data-orientation": F.value.orientation,
|
|
184
|
+
...r ? { "data-state": r } : {}
|
|
185
|
+
}, C(d(K.value, "item"), X.value, d(J.value, "item"), i ? d(i, "item") : void 0, d(G.value, "item")));
|
|
186
|
+
}
|
|
187
|
+
let Ae = i(() => e(L.value?.media, {}, C(d(K.value, "media"), X.value, d(J.value, "media"), d(G.value, "media")))), je = i(() => e(L.value?.content, {}, C(d(K.value, "content"), d(J.value, "content"), d(G.value, "content")))), Me = i(() => e(L.value?.title, {}, C({
|
|
188
|
+
[d(K.value, "title") ?? ""]: !0,
|
|
189
|
+
[d(G.value, "title") ?? ""]: !0
|
|
190
|
+
}))), Ne = i(() => e({}, {}, C({ [d(K.value, "description") ?? ""]: !0 }))), Pe = i(() => e(L.value?.actions, {}, C(d(K.value, "actions"), d(J.value, "actions"), d(G.value, "actions")))), Fe = i(() => F.value.buttonLabel == null ? F.value.multiple ? "Choose files" : "Choose file" : F.value.buttonLabel);
|
|
191
|
+
return {
|
|
192
|
+
slots: de,
|
|
193
|
+
merged: F,
|
|
194
|
+
dragging: A,
|
|
195
|
+
listBind: $,
|
|
196
|
+
baseField: W,
|
|
197
|
+
inputBind: Ee,
|
|
198
|
+
mediaBind: Ae,
|
|
199
|
+
titleBind: Me,
|
|
200
|
+
fileItems: i(() => B.value.map((e, t) => ({
|
|
201
|
+
index: t,
|
|
202
|
+
value: e,
|
|
203
|
+
isImage: h(e),
|
|
204
|
+
metaLabel: ne(e),
|
|
205
|
+
remove: () => {
|
|
206
|
+
_e(t);
|
|
207
|
+
},
|
|
208
|
+
sizeLabel: f(e.size) ? "" : te(e.size),
|
|
209
|
+
previewUrl: ae(e, N.value[t]),
|
|
210
|
+
retry: ye() ? () => {
|
|
211
|
+
ve(t);
|
|
212
|
+
} : void 0
|
|
213
|
+
}))),
|
|
214
|
+
showError: U,
|
|
215
|
+
isDropzone: R,
|
|
216
|
+
isDisabled: z,
|
|
217
|
+
showPicker: pe,
|
|
218
|
+
canAddMore: V,
|
|
219
|
+
stateItems: Y,
|
|
220
|
+
actionsBind: Pe,
|
|
221
|
+
contentBind: je,
|
|
222
|
+
triggerBind: De,
|
|
223
|
+
getItemBind: ke,
|
|
224
|
+
buttonLabel: Fe,
|
|
225
|
+
dropzoneBind: Oe,
|
|
226
|
+
openFileDialog: Q,
|
|
227
|
+
validationError: j,
|
|
228
|
+
orientationItems: q,
|
|
229
|
+
itemDescriptionBind: Ne,
|
|
230
|
+
resolvedErrorMessage: H,
|
|
231
|
+
inputRef: M
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
//#endregion
|
|
235
|
+
export { T as useFileUpload };
|