@bagelink/vue 0.0.1033 → 0.0.1035

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/index.mjs CHANGED
@@ -40,6 +40,9 @@ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
40
40
  },
41
41
  get txtField() {
42
42
  return txtField;
43
+ },
44
+ get uploadField() {
45
+ return uploadField;
43
46
  }
44
47
  }, Symbol.toStringTag, { value: "Module" }));
45
48
  const _sfc_main$15 = /* @__PURE__ */ defineComponent({
@@ -10383,11 +10386,13 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10383
10386
  customAttrs.value.multiline = true;
10384
10387
  return TextInput;
10385
10388
  }
10389
+ if (props2.field.$el === "number") return NumberInput;
10386
10390
  if (props2.field.$el === "array") return FieldArray;
10387
10391
  if (props2.field.$el === "select") return SelectInput;
10388
10392
  if (props2.field.$el === "toggle") return ToggleInput;
10389
10393
  if (props2.field.$el === "check") return CheckInput;
10390
10394
  if (props2.field.$el === "richtext") return RichText;
10395
+ if (props2.field.$el === "upload") return UploadInput;
10391
10396
  if (props2.field.$el === "file") return FileUpload;
10392
10397
  if (props2.field.$el === "date") return DateInput;
10393
10398
  if (props2.field.$el === "tabs") return TabsNav;
@@ -19985,7 +19990,8 @@ const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_ren
19985
19990
  const _sfc_main$I = /* @__PURE__ */ defineComponent({
19986
19991
  __name: "Image",
19987
19992
  props: {
19988
- src: { type: String, required: true },
19993
+ src: { type: String, required: false },
19994
+ pathKey: { type: String, required: false },
19989
19995
  alt: { type: String, required: false, default: "" },
19990
19996
  width: { type: [String, Number], required: false },
19991
19997
  height: { type: [String, Number], required: false },
@@ -19994,20 +20000,25 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
19994
20000
  setup(__props, { expose: __expose }) {
19995
20001
  __expose();
19996
20002
  let imageSrc = ref(null);
19997
- async function loadImage(src) {
20003
+ const bagel = useBagel();
20004
+ const fileBaseUrl = computed(() => (bagel.fileBaseUrl || "https://files.bagel.design").replace(/\/$/, ""));
20005
+ const pathToUrl = () => `${fileBaseUrl.value}/${__props.pathKey}`;
20006
+ async function loadImage() {
19998
20007
  var _a2;
19999
- if (!src) {
20008
+ const url = __props.src || pathToUrl();
20009
+ console.log(url);
20010
+ if (!url) {
20000
20011
  imageSrc.value = null;
20001
20012
  return;
20002
20013
  }
20003
- const ext = (_a2 = src.split(".").pop()) == null ? void 0 : _a2.toLowerCase().split("?").shift();
20014
+ const ext = (_a2 = url.split(".").pop()) == null ? void 0 : _a2.toLowerCase().split("?").shift();
20004
20015
  if (ext === "heic") {
20005
20016
  if (!("caches" in window)) {
20006
20017
  console.warn("Caching is not available. Proceeding without cache.");
20007
20018
  } else {
20008
20019
  try {
20009
20020
  const imgCache = await window.caches.open("img-cache");
20010
- const cachedResponse = await imgCache.match(src);
20021
+ const cachedResponse = await imgCache.match(url);
20011
20022
  if (cachedResponse) {
20012
20023
  imageSrc.value = URL.createObjectURL(await cachedResponse.blob());
20013
20024
  return;
@@ -20018,14 +20029,14 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
20018
20029
  }
20019
20030
  try {
20020
20031
  await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
20021
- const response = await fetch(src);
20032
+ const response = await fetch(url);
20022
20033
  const blob = await response.blob();
20023
20034
  const convertedBlob = await window.heic2any({ blob });
20024
20035
  imageSrc.value = URL.createObjectURL(convertedBlob);
20025
20036
  if ("caches" in window) {
20026
20037
  try {
20027
20038
  const imgCache = await window.caches.open("img-cache");
20028
- imgCache.put(src, new Response(convertedBlob));
20039
+ imgCache.put(url, new Response(convertedBlob));
20029
20040
  } catch (cacheError) {
20030
20041
  console.warn("Failed to cache the image:", cacheError);
20031
20042
  }
@@ -20034,15 +20045,15 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
20034
20045
  console.error("Error converting HEIC file:", error);
20035
20046
  }
20036
20047
  } else {
20037
- imageSrc.value = src;
20048
+ imageSrc.value = url;
20038
20049
  }
20039
20050
  }
20040
- watch(() => __props.src, loadImage, { immediate: true });
20051
+ watch(() => [__props.src, __props.pathKey], loadImage, { immediate: true });
20041
20052
  const __returned__ = { get imageSrc() {
20042
20053
  return imageSrc;
20043
20054
  }, set imageSrc(v) {
20044
20055
  imageSrc = v;
20045
- }, loadImage, get Skeleton() {
20056
+ }, bagel, fileBaseUrl, pathToUrl, loadImage, get Skeleton() {
20046
20057
  return Skeleton;
20047
20058
  }, get normalizeDimension() {
20048
20059
  return normalizeDimension;
@@ -20736,7 +20747,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20736
20747
  icon: { type: null, required: false },
20737
20748
  label: { type: String, required: false },
20738
20749
  placeholder: { type: String, required: false },
20739
- disabled: { type: Boolean, required: true },
20750
+ disabled: { type: Boolean, required: false },
20740
20751
  required: { type: Boolean, required: false },
20741
20752
  id: { type: String, required: false },
20742
20753
  helptext: { type: String, required: false },
@@ -20829,6 +20840,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
20829
20840
  [
20830
20841
  $props.layout && $setup.btnLayouts.includes($props.layout) ? (openBlock(), createBlock($setup["Btn"], {
20831
20842
  key: 0,
20843
+ flat: "",
20832
20844
  icon: "add",
20833
20845
  class: normalizeClass(["radius", [{ "bgl-big-ctrl-num-btn": $props.layout === "vertical" }]]),
20834
20846
  onClick: $setup.increment
@@ -20887,6 +20899,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
20887
20899
  }, null, 8, ["icon"])) : createCommentVNode("v-if", true),
20888
20900
  $props.layout && $setup.btnLayouts.includes($props.layout) ? (openBlock(), createBlock($setup["Btn"], {
20889
20901
  key: 4,
20902
+ flat: "",
20890
20903
  icon: "remove",
20891
20904
  class: normalizeClass(["radius", [{ "bgl-big-ctrl-num-btn": $props.layout === "vertical" }]]),
20892
20905
  onClick: $setup.decrement
@@ -31836,7 +31849,7 @@ const files = {
31836
31849
  }
31837
31850
  };
31838
31851
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
31839
- __name: "UploadFile",
31852
+ __name: "UploadInput",
31840
31853
  props: {
31841
31854
  label: { type: String, required: false },
31842
31855
  multiple: { type: Boolean, required: false },
@@ -31858,8 +31871,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31858
31871
  const props2 = __props;
31859
31872
  const emit2 = __emit;
31860
31873
  const bagel = useBagel();
31861
- const fileBaseUrl = computed(() => (props2.baseURL || bagel.fileBaseUrl || "https://files.bagel.design").replace(/\/$/, ""));
31862
31874
  files.setBaseUrl(bagel.host);
31875
+ const fileBaseUrl = computed(() => (props2.baseURL || bagel.fileBaseUrl || "https://files.bagel.design").replace(/\/$/, ""));
31876
+ const pathToUrl = (path_key) => `${fileBaseUrl.value}/${path_key}`;
31863
31877
  const fileQueue = ref([]);
31864
31878
  let storageFiles = ref([]);
31865
31879
  const pk = ref([props2.modelValue].flat().filter(Boolean));
@@ -31872,7 +31886,6 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31872
31886
  else emit2("update:modelValue", value[0] || void 0);
31873
31887
  }, { deep: true });
31874
31888
  const isImage = (str) => IMAGE_FORMATS_REGEXP.test(str);
31875
- const pathToUrl = (path_key) => `${fileBaseUrl.value}/${path_key}`;
31876
31889
  const fileToUrl = (file) => URL.createObjectURL(file);
31877
31890
  let isDragOver = ref(false);
31878
31891
  async function removeFile(path_key) {
@@ -31941,11 +31954,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31941
31954
  files.get(props2.dirPath).then((response) => storageFiles.value.push(...[response.data].flat())).catch(console.error);
31942
31955
  }
31943
31956
  });
31944
- const __returned__ = { props: props2, emit: emit2, bagel, fileBaseUrl, fileQueue, get storageFiles() {
31957
+ const __returned__ = { props: props2, emit: emit2, bagel, fileBaseUrl, pathToUrl, fileQueue, get storageFiles() {
31945
31958
  return storageFiles;
31946
31959
  }, set storageFiles(v) {
31947
31960
  storageFiles = v;
31948
- }, pk, pathKeys, isImage, pathToUrl, fileToUrl, get isDragOver() {
31961
+ }, pk, pathKeys, isImage, fileToUrl, get isDragOver() {
31949
31962
  return isDragOver;
31950
31963
  }, set isDragOver(v) {
31951
31964
  isDragOver = v;
@@ -31981,27 +31994,26 @@ const _hoisted_7$3 = {
31981
31994
  key: 0,
31982
31995
  class: "bgl-multi-preview"
31983
31996
  };
31984
- const _hoisted_8$3 = ["src"];
31985
- const _hoisted_9$2 = { class: "m-0" };
31986
- const _hoisted_10$2 = { class: "no-margin multi-preview-txt" };
31987
- const _hoisted_11$2 = {
31997
+ const _hoisted_8$3 = { class: "m-0" };
31998
+ const _hoisted_9$2 = { class: "no-margin multi-preview-txt" };
31999
+ const _hoisted_10$2 = {
31988
32000
  key: 0,
31989
32001
  class: "progress"
31990
32002
  };
31991
- const _hoisted_12$1 = {
32003
+ const _hoisted_11$2 = {
31992
32004
  key: 1,
31993
32005
  class: "bgl-single-preview"
31994
32006
  };
31995
- const _hoisted_13$1 = { class: "position-start m-05 flex opacity-7 z-99 gap-025" };
31996
- const _hoisted_14 = {
32007
+ const _hoisted_12$1 = { class: "position-start m-05 flex opacity-7 z-99 gap-025" };
32008
+ const _hoisted_13$1 = {
31997
32009
  key: 0,
31998
32010
  class: "h-100"
31999
32011
  };
32000
- const _hoisted_15 = {
32012
+ const _hoisted_14 = {
32001
32013
  key: 0,
32002
32014
  class: "progress"
32003
32015
  };
32004
- const _hoisted_16 = { class: "p-1 flex column hover fileUploadPlaceHolder justify-content-center mb-05" };
32016
+ const _hoisted_15 = { class: "p-1 flex column hover fileUploadPlaceHolder justify-content-center mb-05" };
32005
32017
  function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32006
32018
  const _directive_tooltip = resolveDirective("tooltip");
32007
32019
  const _directive_lightbox = resolveDirective("lightbox");
@@ -32044,29 +32056,35 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32044
32056
  class: "txt-gray txt-12 flex"
32045
32057
  }, [
32046
32058
  createElementVNode("div", _hoisted_4$4, [
32047
- (openBlock(true), createElementBlock(
32048
- Fragment,
32059
+ withDirectives(createVNode($setup["Btn"], {
32060
+ color: "gray",
32061
+ thin: "",
32062
+ icon: "delete",
32063
+ onClick: ($event) => $setup.removeFile(path_key)
32064
+ }, null, 8, ["onClick"]), [
32065
+ [_directive_tooltip, "Delete"]
32066
+ ]),
32067
+ withDirectives(createVNode(
32068
+ $setup["Btn"],
32069
+ {
32070
+ color: "gray",
32071
+ thin: "",
32072
+ icon: "autorenew",
32073
+ onClick: $setup.browse
32074
+ },
32049
32075
  null,
32050
- renderList([
32051
- { tooltip: "Delete", icon: "delete", onClick: () => $setup.removeFile(path_key) },
32052
- { tooltip: "Replace", icon: "autorenew", onClick: $setup.browse },
32053
- { tooltip: "Download", icon: "download", href: $setup.pathToUrl(path_key), download: path_key.split("/").pop() }
32054
- ], (action) => {
32055
- return withDirectives((openBlock(), createBlock($setup["Btn"], mergeProps({
32056
- key: action.tooltip,
32057
- color: "gray",
32058
- thin: "",
32059
- icon: action.icon,
32060
- ref_for: true
32061
- }, action.href ? { href: action.href, download: action.download, target: "_blank" } : {}, {
32062
- onClick: withModifiers(action.onClick, ["stop"])
32063
- }), null, 16, ["icon", "onClick"])), [
32064
- [_directive_tooltip, action.tooltip]
32065
- ]);
32066
- }),
32067
- 128
32068
- /* KEYED_FRAGMENT */
32069
- )),
32076
+ 512
32077
+ /* NEED_PATCH */
32078
+ ), [
32079
+ [_directive_tooltip, "Replace"]
32080
+ ]),
32081
+ createVNode($setup["Btn"], {
32082
+ icon: "download",
32083
+ flat: "",
32084
+ thin: "",
32085
+ href: $setup.pathToUrl(path_key),
32086
+ download: path_key.split("/").pop()
32087
+ }, null, 8, ["href", "download"]),
32070
32088
  withDirectives((openBlock(), createElementBlock("p", _hoisted_5$4, [
32071
32089
  createTextVNode(
32072
32090
  toDisplayString(path_key.split("/").pop()),
@@ -32118,19 +32136,18 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32118
32136
  class: normalizeClass(["multi-image-item-preview", { "bgl_fill-image": $props.fill }])
32119
32137
  },
32120
32138
  [
32121
- $setup.isImage(path_key) ? (openBlock(), createElementBlock("img", {
32139
+ $setup.isImage(path_key) ? (openBlock(), createBlock($setup["Image"], {
32122
32140
  key: 0,
32123
- class: "multi-preview",
32124
- src: $setup.pathToUrl(path_key),
32125
- alt: ""
32126
- }, null, 8, _hoisted_8$3)) : (openBlock(), createBlock($setup["Icon"], {
32141
+ pathKey: path_key,
32142
+ class: "multi-preview"
32143
+ }, null, 8, ["pathKey"])) : (openBlock(), createBlock($setup["Icon"], {
32127
32144
  key: 1,
32128
32145
  icon: "description",
32129
32146
  class: "multi-preview"
32130
32147
  })),
32131
32148
  createElementVNode(
32132
32149
  "p",
32133
- _hoisted_9$2,
32150
+ _hoisted_8$3,
32134
32151
  toDisplayString(path_key.split("/").pop()),
32135
32152
  1
32136
32153
  /* TEXT */
@@ -32140,7 +32157,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32140
32157
  flat: "",
32141
32158
  icon: "delete",
32142
32159
  color: "red",
32143
- onClick: withModifiers(($event) => $setup.removeFile(path_key), ["stop"])
32160
+ onClick: ($event) => $setup.removeFile(path_key)
32144
32161
  }, null, 8, ["onClick"])
32145
32162
  ],
32146
32163
  2
@@ -32175,7 +32192,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32175
32192
  })),
32176
32193
  createElementVNode(
32177
32194
  "p",
32178
- _hoisted_10$2,
32195
+ _hoisted_9$2,
32179
32196
  toDisplayString(file.name),
32180
32197
  1
32181
32198
  /* TEXT */
@@ -32189,7 +32206,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32189
32206
  [
32190
32207
  file.progress < 100 ? (openBlock(), createElementBlock(
32191
32208
  "span",
32192
- _hoisted_11$2,
32209
+ _hoisted_10$2,
32193
32210
  toDisplayString(file.progress.toFixed(0)),
32194
32211
  1
32195
32212
  /* TEXT */
@@ -32210,7 +32227,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32210
32227
  128
32211
32228
  /* KEYED_FRAGMENT */
32212
32229
  ))
32213
- ])) : $setup.pathKeys.length > 0 || $setup.fileQueue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
32230
+ ])) : $setup.pathKeys.length > 0 || $setup.fileQueue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_11$2, [
32214
32231
  (openBlock(true), createElementBlock(
32215
32232
  Fragment,
32216
32233
  null,
@@ -32222,7 +32239,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32222
32239
  class: normalizeClass(["single-image-item-preview", { "bgl_fill-image": $props.fill }])
32223
32240
  },
32224
32241
  [
32225
- createElementVNode("div", _hoisted_13$1, [
32242
+ createElementVNode("div", _hoisted_12$1, [
32226
32243
  withDirectives(createVNode($setup["Btn"], {
32227
32244
  color: "gray",
32228
32245
  thin: "",
@@ -32255,12 +32272,12 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32255
32272
  [_directive_tooltip, "Download"]
32256
32273
  ])
32257
32274
  ]),
32258
- $setup.isImage(path_key) ? (openBlock(), createElementBlock("div", _hoisted_14, [
32275
+ $setup.isImage(path_key) ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
32259
32276
  createVNode($setup["Image"], {
32260
32277
  class: "single-preview",
32261
- src: $setup.pathToUrl(path_key),
32278
+ pathKey: path_key,
32262
32279
  alt: ""
32263
- }, null, 8, ["src"])
32280
+ }, null, 8, ["pathKey"])
32264
32281
  ])) : withDirectives((openBlock(), createBlock(
32265
32282
  $setup["Icon"],
32266
32283
  {
@@ -32304,7 +32321,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32304
32321
  [
32305
32322
  file.progress < 100 ? (openBlock(), createElementBlock(
32306
32323
  "span",
32307
- _hoisted_15,
32324
+ _hoisted_14,
32308
32325
  toDisplayString(file.progress.toFixed(0)),
32309
32326
  1
32310
32327
  /* TEXT */
@@ -32339,7 +32356,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32339
32356
  fileQueue: $setup.fileQueue,
32340
32357
  browse: $setup.browse
32341
32358
  }, () => [
32342
- createElementVNode("p", _hoisted_16, [
32359
+ createElementVNode("p", _hoisted_15, [
32343
32360
  createVNode($setup["Icon"], { icon: "upload_2" }),
32344
32361
  _cache[4] || (_cache[4] = createTextVNode(" Drop files here or click to upload "))
32345
32362
  ])
@@ -32350,7 +32367,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32350
32367
  ))
32351
32368
  ]);
32352
32369
  }
32353
- const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-9254a525"], ["__file", "/Users/natanelyoung/Projects/bagelink/packages/vue/src/components/form/inputs/Upload/UploadFile.vue"]]);
32370
+ const UploadInput = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-bec8d254"], ["__file", "/Users/natanelyoung/Projects/bagelink/packages/vue/src/components/form/inputs/Upload/UploadInput.vue"]]);
32354
32371
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
32355
32372
  __name: "IframeVue",
32356
32373
  props: {
@@ -36325,7 +36342,7 @@ function dateField(id, label, options) {
36325
36342
  }
36326
36343
  function numField(id, label, options) {
36327
36344
  return {
36328
- $el: "text",
36345
+ $el: "number",
36329
36346
  class: options == null ? void 0 : options.class,
36330
36347
  required: options == null ? void 0 : options.required,
36331
36348
  defaultValue: options == null ? void 0 : options.defaultValue,
@@ -36335,12 +36352,9 @@ function numField(id, label, options) {
36335
36352
  placeholder: options == null ? void 0 : options.placeholder,
36336
36353
  helptext: options == null ? void 0 : options.helptext,
36337
36354
  attrs: {
36338
- type: "number",
36339
- nativeInputAttrs: {
36340
- step: options == null ? void 0 : options.step,
36341
- min: options == null ? void 0 : options.min,
36342
- max: options == null ? void 0 : options.max
36343
- }
36355
+ step: options == null ? void 0 : options.step,
36356
+ min: options == null ? void 0 : options.min,
36357
+ max: options == null ? void 0 : options.max
36344
36358
  }
36345
36359
  };
36346
36360
  }
@@ -36351,6 +36365,14 @@ function frmRow(...children2) {
36351
36365
  children: children2
36352
36366
  };
36353
36367
  }
36368
+ function uploadField(id, label, options) {
36369
+ return {
36370
+ $el: "upload",
36371
+ id,
36372
+ label,
36373
+ attrs: options
36374
+ };
36375
+ }
36354
36376
  function bglForm(idOrField, ...schema) {
36355
36377
  if (typeof idOrField === "string") {
36356
36378
  return {
@@ -37163,7 +37185,7 @@ export {
37163
37185
  ToggleInput,
37164
37186
  ToolBar,
37165
37187
  TopBar,
37166
- UploadFile as Upload,
37188
+ UploadInput,
37167
37189
  VIDEO_FORMATS,
37168
37190
  VIDEO_FORMATS_REGEXP,
37169
37191
  Zoomer,
package/dist/style.css CHANGED
@@ -1731,7 +1731,7 @@ line-height: 1.65;
1731
1731
  .bgl-toggle input:checked + label[data-v-905f82b8] {
1732
1732
  color: var(--bgl-primary) !important;
1733
1733
  }
1734
- .fileUploadWrap[data-v-9254a525] {
1734
+ .fileUploadWrap[data-v-bec8d254] {
1735
1735
  outline: 1px solid var(--border-color);
1736
1736
  border-radius: var(--input-border-radius);
1737
1737
  text-align: center;
@@ -1743,7 +1743,7 @@ line-height: 1.65;
1743
1743
  background: var(--input-bg);
1744
1744
  height: 215px;
1745
1745
  }
1746
- .bagel-input .fileUploadWrap.fileDropZone[data-v-9254a525] {
1746
+ .bagel-input .fileUploadWrap.fileDropZone[data-v-bec8d254] {
1747
1747
  background: var(--input-bg);
1748
1748
  display: flex;
1749
1749
  align-items: center;
@@ -1751,14 +1751,14 @@ line-height: 1.65;
1751
1751
  color: var(--bgl-gray);
1752
1752
  flex-direction: column;
1753
1753
  }
1754
- .fileUploadWrap.dragover[data-v-9254a525],
1755
- .fileUploadWrap[data-v-9254a525]:hover {
1754
+ .fileUploadWrap.dragover[data-v-bec8d254],
1755
+ .fileUploadWrap[data-v-bec8d254]:hover {
1756
1756
  box-shadow: inset 0 0 10px #00000012;
1757
1757
  }
1758
- .fileUploadWrap[style*='height: auto;'][data-v-9254a525] {
1758
+ .fileUploadWrap[style*='height: auto;'][data-v-bec8d254] {
1759
1759
  min-height: 215px;
1760
1760
  }
1761
- .multi-image-item-preview[data-v-9254a525] {
1761
+ .multi-image-item-preview[data-v-bec8d254] {
1762
1762
  border: 1px solid var(--border-color) !important;
1763
1763
  border-radius: var(--input-border-radius);
1764
1764
  margin: 0.5rem !important;
@@ -1772,12 +1772,12 @@ line-height: 1.65;
1772
1772
  gap: 1rem;
1773
1773
  align-items: center;
1774
1774
  }
1775
- .multi-image-item-preview p[data-v-9254a525] {
1775
+ .multi-image-item-preview p[data-v-bec8d254] {
1776
1776
  overflow: hidden;
1777
1777
  text-overflow: ellipsis;
1778
1778
  white-space: nowrap;
1779
1779
  }
1780
- .multi-preview[data-v-9254a525] {
1780
+ .multi-preview[data-v-bec8d254] {
1781
1781
  width: 40px;
1782
1782
  height: 40px;
1783
1783
  border-radius: var(--input-border-radius);
@@ -1788,17 +1788,17 @@ line-height: 1.65;
1788
1788
  align-items: center;
1789
1789
  display: flex;
1790
1790
  }
1791
- .bgl-single-preview[data-v-9254a525] {
1791
+ .bgl-single-preview[data-v-bec8d254] {
1792
1792
  height: 100%;
1793
1793
  position: relative;
1794
1794
  }
1795
- .bgl-single-preview + .fileUploadPlaceHolder[data-v-9254a525] {
1795
+ .bgl-single-preview + .fileUploadPlaceHolder[data-v-bec8d254] {
1796
1796
  position: absolute;
1797
1797
  inset: 0;
1798
1798
  margin: auto;
1799
1799
  top: calc(50% - 2rem);
1800
1800
  }
1801
- .single-image-item-preview[data-v-9254a525] {
1801
+ .single-image-item-preview[data-v-bec8d254] {
1802
1802
  height: 100%;
1803
1803
  min-height: 100%;
1804
1804
  position: relative;
@@ -1806,13 +1806,13 @@ line-height: 1.65;
1806
1806
  align-items: center;
1807
1807
  justify-content: center;
1808
1808
  }
1809
- .fileUploadWrap[style*='height: auto'] .single-image-item-preview[data-v-9254a525] {
1809
+ .fileUploadWrap[style*='height: auto'] .single-image-item-preview[data-v-bec8d254] {
1810
1810
  min-height: 215px;
1811
1811
  }
1812
- .fileUploadWrap[style*='height: auto'] .single-preview[data-v-9254a525] {
1812
+ .fileUploadWrap[style*='height: auto'] .single-preview[data-v-bec8d254] {
1813
1813
  margin: 0rem !important;
1814
1814
  }
1815
- .single-preview[data-v-9254a525] {
1815
+ .single-preview[data-v-bec8d254] {
1816
1816
  border-radius: var(--input-border-radius);
1817
1817
  margin: 1rem;
1818
1818
  padding: 0px;
@@ -1822,7 +1822,7 @@ line-height: 1.65;
1822
1822
  background: var(--bgl-gray-light);
1823
1823
  width: 90%;
1824
1824
  }
1825
- .single-image-item-preview[data-v-9254a525]:hover::after {
1825
+ .single-image-item-preview[data-v-bec8d254]:hover::after {
1826
1826
  content: 'zoom_in';
1827
1827
  font-size: 32px;
1828
1828
  font-family: 'Material Symbols Outlined', serif;
@@ -1832,20 +1832,20 @@ line-height: 1.65;
1832
1832
  z-index: 9;
1833
1833
  pointer-events: none;
1834
1834
  }
1835
- .single-image-item-preview:hover img[data-v-9254a525] {
1835
+ .single-image-item-preview:hover img[data-v-bec8d254] {
1836
1836
  filter: brightness(70%);
1837
1837
  }
1838
- .bgl_fill-image.single-image-item-preview[data-v-9254a525] {
1838
+ .bgl_fill-image.single-image-item-preview[data-v-bec8d254] {
1839
1839
  height: 100%;
1840
1840
  }
1841
- .bgl_fill-image.single-image-item-preview .single-preview[data-v-9254a525] {
1841
+ .bgl_fill-image.single-image-item-preview .single-preview[data-v-bec8d254] {
1842
1842
  border-radius: unset;
1843
1843
  object-fit: cover;
1844
1844
  box-shadow: unset;
1845
1845
  width: 100%;
1846
1846
  height: auto;
1847
1847
  }
1848
- .single-image-item-preview .pie[data-v-9254a525] {
1848
+ .single-image-item-preview .pie[data-v-bec8d254] {
1849
1849
  transform-origin: top;
1850
1850
  transform: scale(1.4);
1851
1851
  position: absolute;
@@ -1859,31 +1859,31 @@ line-height: 1.65;
1859
1859
  border: none !important;
1860
1860
  padding: 0 !important;
1861
1861
  }
1862
- .bgl_oval-upload[data-v-9254a525] {
1862
+ .bgl_oval-upload[data-v-bec8d254] {
1863
1863
  border-radius: 100% !important;
1864
1864
  overflow: hidden;
1865
1865
  }
1866
- .bgl_oval-upload p[data-v-9254a525] {
1866
+ .bgl_oval-upload p[data-v-bec8d254] {
1867
1867
  padding: 0.75rem !important;
1868
1868
  font-size: 12px;
1869
1869
  }
1870
- .bgl_oval-upload .fileUploadPlaceHolder[data-v-9254a525] {
1870
+ .bgl_oval-upload .fileUploadPlaceHolder[data-v-bec8d254] {
1871
1871
  top: 0;
1872
1872
  }
1873
- .bgl_oval-upload .pie[data-v-9254a525] {
1873
+ .bgl_oval-upload .pie[data-v-bec8d254] {
1874
1874
  transform: scale(1);
1875
1875
  }
1876
- .bgl_oval-upload span.bgl_icon-font.color-primary[data-v-9254a525] {
1876
+ .bgl_oval-upload span.bgl_icon-font.color-primary[data-v-bec8d254] {
1877
1877
  transform: scale(0.4) !important;
1878
1878
  }
1879
- .bgl_oval-upload .single-image-item-preview[data-v-9254a525] {
1879
+ .bgl_oval-upload .single-image-item-preview[data-v-bec8d254] {
1880
1880
  height: 100%;
1881
1881
  }
1882
- .bgl_oval-upload .single-preview[data-v-9254a525] {
1882
+ .bgl_oval-upload .single-preview[data-v-bec8d254] {
1883
1883
  margin: 0;
1884
1884
  height: 100% !important;
1885
1885
  }
1886
- .pie[data-v-9254a525] {
1886
+ .pie[data-v-bec8d254] {
1887
1887
  width: 30px;
1888
1888
  height: 30px;
1889
1889
  position: relative;
@@ -1891,7 +1891,7 @@ line-height: 1.65;
1891
1891
  align-items: center;
1892
1892
  justify-content: center;
1893
1893
  }
1894
- .pie[data-v-9254a525]:before {
1894
+ .pie[data-v-bec8d254]:before {
1895
1895
  content: '';
1896
1896
  position: absolute;
1897
1897
  border-radius: 50%;
@@ -1909,26 +1909,26 @@ line-height: 1.65;
1909
1909
  #000 calc(100% - var(--b))
1910
1910
  );
1911
1911
  }
1912
- .pie .success[data-v-9254a525] {
1912
+ .pie .success[data-v-bec8d254] {
1913
1913
  transform: scale(0);
1914
1914
  opacity: 0;
1915
1915
  transition: all 0.3s ease-in-out;
1916
1916
  }
1917
- .pie .progress[data-v-9254a525] {
1917
+ .pie .progress[data-v-bec8d254] {
1918
1918
  position: absolute;
1919
1919
  font-size: 10px;
1920
1920
  }
1921
- .pie.complete .progress[data-v-9254a525] {
1921
+ .pie.complete .progress[data-v-bec8d254] {
1922
1922
  display: none;
1923
1923
  }
1924
- .pie.complete .success[data-v-9254a525] {
1924
+ .pie.complete .success[data-v-bec8d254] {
1925
1925
  transform: scale(1.3);
1926
1926
  opacity: 1;
1927
1927
  }
1928
- .pie.complete[data-v-9254a525]:before {
1928
+ .pie.complete[data-v-bec8d254]:before {
1929
1929
  background: conic-gradient(var(--bgl-green) calc(var(--p) * 1%), #0000 0);
1930
1930
  }
1931
- .pie.complete[data-v-9254a525] {
1931
+ .pie.complete[data-v-bec8d254] {
1932
1932
  color: var(--bgl-green);
1933
1933
  }
1934
1934
 
@@ -45,6 +45,15 @@ export declare function frmRow(...children: Field[]): {
45
45
  class: string;
46
46
  children: Field[];
47
47
  };
48
+ interface UploadOptions extends InputOptions {
49
+ multiple?: boolean;
50
+ }
51
+ export declare function uploadField(id: string, label?: string, options?: UploadOptions): {
52
+ $el: string;
53
+ id: string;
54
+ label: string | undefined;
55
+ attrs: UploadOptions | undefined;
56
+ };
48
57
  export declare function bglForm(idOrField?: string | Field, ...schema: Field[]): {
49
58
  $el: import('vue').Raw<{
50
59
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"BagelFormUtils.d.ts","sourceRoot":"","sources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AAA;CACb;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,iBAAiB;;;;;gBAJ7F,OAAO;aACV,OAAO;mBA1NF,OAAO;sBACJ,MAAM;gBACZ,MAAM;uBACC,MAAM;mBACV,OAAO;mBACP,MAAM;;;EA+NjB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.1033",
4
+ "version": "0.0.1035",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",