@bagelink/vue 0.0.1060 → 0.0.1064

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Zoomer.vue.d.ts","sourceRoot":"","sources":["../../src/components/Zoomer.vue"],"names":[],"mappings":"AAiYA,UAAU,KAAK;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB;AAsED,iBAAS,KAAK,SAKb;AA2PD,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;yBATrB,GAAG;;;;;;EAc/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;6FASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Zoomer.vue.d.ts","sourceRoot":"","sources":["../../src/components/Zoomer.vue"],"names":[],"mappings":"AA+XA,UAAU,KAAK;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB;AAsED,iBAAS,KAAK,SAKb;AAyPD,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;yBATrB,GAAG;;;;;;EAc/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;6FASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { Component, Plugin } from 'vue';
2
+ export interface DialogOptions {
3
+ title?: string;
4
+ content?: string | Component;
5
+ dismissable?: boolean;
6
+ width?: string;
7
+ actions?: Array<{
8
+ label: string;
9
+ onClick: () => void;
10
+ variant?: 'primary' | 'secondary' | 'danger';
11
+ }>;
12
+ }
13
+ export interface DialogApi {
14
+ show: (options: DialogOptions) => void;
15
+ hide: () => void;
16
+ }
17
+ export declare function useDialog(): DialogApi;
18
+ export declare const DialogPlugin: Plugin;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,SAAS,EAAgB,MAAM,EAAY,MAAM,KAAK,CAAA;AAGzE,MAAM,WAAW,aAAa;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,KAAK,CAAC;QACf,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,IAAI,CAAA;QACnB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAA;KAC5C,CAAC,CAAA;CACF;AAED,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAA;IACtC,IAAI,EAAE,MAAM,IAAI,CAAA;CAChB;AAID,wBAAgB,SAAS,IAAI,SAAS,CAIrC;AAkDD,eAAO,MAAM,YAAY,EAAE,MAkC1B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BglField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglField.vue"],"names":[],"mappings":"AAAA,OA0IO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAML,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA2KxD,mBAAmB,CAAC;;;eAvKtB,KAAK,CAAC,CAAC,CAA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AAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/NumberInput.vue"],"names":[],"mappings":"AA2KA,OAAO,EAAQ,KAAK,aAAa,EAAO,MAAM,eAAe,CAAA;AAK7D,KAAK,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;AAEzD,UAAU,gBAAgB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB;;;;;;AAsRD,wBAQG"}
1
+ {"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/NumberInput.vue"],"names":[],"mappings":"AA2KA,OAAO,EAAQ,KAAK,aAAa,EAAO,MAAM,eAAe,CAAA;AAK7D,KAAK,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;AAEzD,UAAU,gBAAgB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC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AA;IACpB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;CACpC,CAAC;;;;;;;;;;;UAXM,MAAM;gBARA,MAAM,GAAG,MAAM;;AAqM9B,wBAUG"}
package/dist/index.cjs CHANGED
@@ -9976,7 +9976,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
9976
9976
  setup(__props, { emit: __emit }) {
9977
9977
  const props2 = __props;
9978
9978
  const emit2 = __emit;
9979
- const formState = vue.inject(FORM_STATE_KEY);
9979
+ const formState = vue.inject(FORM_STATE_KEY) ?? provideBagelFormState(props2.modelValue);
9980
9980
  const customAttrs = vue.ref({});
9981
9981
  const is4 = vue.computed(() => {
9982
9982
  if (props2.field.$el === "text") return TextInput;
@@ -10000,54 +10000,49 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10000
10000
  const fieldData = vue.computed({
10001
10001
  get: () => {
10002
10002
  if (!props2.fieldID) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
10003
- const value = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
10003
+ const value = formState.getFieldData(props2.fieldID);
10004
10004
  if (props2.field.$el === "form" && !value) return {};
10005
10005
  return value ?? "";
10006
10006
  },
10007
10007
  set: (val) => {
10008
10008
  if (!props2.fieldID) return;
10009
- const currentValue = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
10009
+ const currentValue = formState.getFieldData(props2.fieldID);
10010
10010
  if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
10011
10011
  emit2("update:modelValue", val);
10012
10012
  if (props2.field.onUpdate) {
10013
10013
  props2.field.onUpdate(val, currentValue);
10014
10014
  }
10015
- formState == null ? void 0 : formState.updateField(props2.fieldID, val);
10015
+ formState.updateField(props2.fieldID, val);
10016
10016
  }
10017
10017
  });
10018
10018
  const vIf = vue.computed(() => {
10019
10019
  if (props2.field["v-if"] === void 0 && props2.field.vIf === void 0) return true;
10020
10020
  if (typeof props2.field["v-if"] === "boolean" || typeof props2.field.vIf === "boolean") return props2.field["v-if"];
10021
10021
  if (typeof props2.field["v-if"] === "string" || typeof props2.field.vIf === "string") return true;
10022
- if (typeof props2.field["v-if"] === "function") return props2.field["v-if"](fieldData.value, formState == null ? void 0 : formState.data.value);
10023
- if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState == null ? void 0 : formState.data.value);
10022
+ if (typeof props2.field["v-if"] === "function") return props2.field["v-if"](fieldData.value, formState.data.value);
10023
+ if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState.data.value);
10024
10024
  return true;
10025
10025
  });
10026
10026
  vue.computed(
10027
10027
  () => {
10028
10028
  var _a2, _b;
10029
- return ((_b = (_a2 = props2.field).transform) == null ? void 0 : _b.call(_a2, fieldData.value, formState == null ? void 0 : formState.data.value)) ?? fieldData.value;
10029
+ return ((_b = (_a2 = props2.field).transform) == null ? void 0 : _b.call(_a2, fieldData.value, formState.data.value)) ?? fieldData.value;
10030
10030
  }
10031
10031
  );
10032
10032
  const computedOptions = vue.computed(
10033
- () => bindAttrs({ options: props2.field.options }, fieldData.value, formState == null ? void 0 : formState.data.value).options
10033
+ () => bindAttrs({ options: props2.field.options }, fieldData.value, formState.data.value).options
10034
10034
  );
10035
10035
  const computedAttrs = vue.computed(() => {
10036
10036
  const attrs = { ...customAttrs.value, ...props2.field.attrs };
10037
- delete attrs.schema;
10038
- const boundAttrs = bindAttrs(attrs, fieldData.value, formState == null ? void 0 : formState.data.value);
10039
- return Object.fromEntries(
10040
- Object.entries(boundAttrs).filter(([_2, value]) => value !== void 0)
10041
- );
10037
+ return bindAttrs(attrs, fieldData.value, formState.data.value);
10042
10038
  });
10043
10039
  const computedClass = vue.computed(
10044
10040
  () => {
10045
10041
  var _a2;
10046
- return classify(fieldData.value, formState == null ? void 0 : formState.data.value, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10042
+ return classify(fieldData.value, formState.data.value, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10047
10043
  }
10048
10044
  );
10049
10045
  return (_ctx, _cache) => {
10050
- var _a2;
10051
10046
  const _component_BglField = vue.resolveComponent("BglField", true);
10052
10047
  return vIf.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(is4.value), vue.mergeProps({ key: 0 }, computedAttrs.value, {
10053
10048
  modelValue: fieldData.value,
@@ -10060,8 +10055,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10060
10055
  defaultValue: _ctx.field.defaultValue,
10061
10056
  disabled: _ctx.field.disabled,
10062
10057
  options: computedOptions.value,
10063
- helptext: _ctx.field.helptext,
10064
- schema: ((_a2 = _ctx.field.attrs) == null ? void 0 : _a2.schema) ?? void 0
10058
+ helptext: _ctx.field.helptext
10065
10059
  }), {
10066
10060
  default: vue.withCtx(() => [
10067
10061
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.field.children, (child, ii) => {
@@ -10076,7 +10070,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10076
10070
  }), 128))
10077
10071
  ]),
10078
10072
  _: 1
10079
- }, 16, ["modelValue", "fieldID", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext", "schema"])) : vue.createCommentVNode("", true);
10073
+ }, 16, ["modelValue", "fieldID", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext"])) : vue.createCommentVNode("", true);
10080
10074
  };
10081
10075
  }
10082
10076
  });
@@ -20116,14 +20110,14 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
20116
20110
  icon: "add",
20117
20111
  flat: "",
20118
20112
  thin: "",
20119
- class: "bgl-ctrl-num-btn",
20113
+ class: "bgl-ctrl-num-btn ctrl-add color-gray",
20120
20114
  onClick: increment
20121
20115
  }),
20122
20116
  vue.createVNode(vue.unref(Btn), {
20123
20117
  icon: "remove",
20124
20118
  flat: "",
20125
20119
  thin: "",
20126
- class: "bgl-ctrl-num-btn",
20120
+ class: "bgl-ctrl-num-btn ctrl-remove color-gray",
20127
20121
  onClick: decrement
20128
20122
  })
20129
20123
  ])) : vue.createCommentVNode("", true)
@@ -20133,7 +20127,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
20133
20127
  };
20134
20128
  }
20135
20129
  });
20136
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-46a64669"]]);
20130
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-abb5baff"]]);
20137
20131
  const _hoisted_1$v = ["value", "autofocus", "onKeydown", "onPaste"];
20138
20132
  const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
20139
20133
  __name: "OTP",
@@ -30192,6 +30186,9 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
30192
30186
  ...props2.parseArg,
30193
30187
  defaultCountry: activeCountryCode.value
30194
30188
  }));
30189
+ const debouncedEmit = useDebounceFn((maybeFormatted) => {
30190
+ emit2("debounce", maybeFormatted);
30191
+ }, props2.debounceDelay);
30195
30192
  const phone = vue.useModel(__props, "modelValue", {
30196
30193
  set: (value) => {
30197
30194
  let maybeFormatted = value;
@@ -30203,9 +30200,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
30203
30200
  }
30204
30201
  }
30205
30202
  emit2("update:modelValue", maybeFormatted);
30206
- debounce(() => {
30207
- emit2("debounce", maybeFormatted);
30208
- }, props2.debounceDelay);
30203
+ debouncedEmit(maybeFormatted);
30209
30204
  return maybeFormatted;
30210
30205
  },
30211
30206
  get: (value) => value
@@ -30421,7 +30416,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
30421
30416
  };
30422
30417
  }
30423
30418
  });
30424
- const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-627af458"]]);
30419
+ const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-cfcf054d"]]);
30425
30420
  const _hoisted_1$k = ["title"];
30426
30421
  const _hoisted_2$b = ["for"];
30427
30422
  const _hoisted_3$9 = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
@@ -30466,13 +30461,13 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
30466
30461
  if (props2.multiline || props2.code) return 4;
30467
30462
  return 1;
30468
30463
  });
30469
- function emitValue() {
30470
- emit2("update:modelValue", inputVal.value);
30471
- }
30464
+ const debouncedEmit = useDebounceFn(() => {
30465
+ emit2("debounce", inputVal.value);
30466
+ }, 700);
30472
30467
  function updateInputVal() {
30473
30468
  if (props2.disabled) return;
30474
- emitValue();
30475
- debounce(emitValue, 300);
30469
+ emit2("update:modelValue", inputVal.value);
30470
+ debouncedEmit();
30476
30471
  }
30477
30472
  vue.watch(
30478
30473
  () => props2.modelValue,
@@ -30567,7 +30562,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
30567
30562
  };
30568
30563
  }
30569
30564
  });
30570
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-3c20ae39"]]);
30565
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-52ac6dc3"]]);
30571
30566
  const _hoisted_1$j = ["title"];
30572
30567
  const _hoisted_2$a = ["id", "required"];
30573
30568
  const _hoisted_3$8 = ["for"];
@@ -33297,12 +33292,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
33297
33292
  pointerPosX.value = newMousePosX;
33298
33293
  pointerPosY.value = newMousePosY;
33299
33294
  }
33300
- function onInteractionEnd() {
33301
- debounce(() => {
33302
- limit();
33303
- panLocked.value = scale.value === 1;
33304
- }, 100);
33305
- }
33295
+ const onInteractionEnd = useDebounceFn(() => {
33296
+ limit();
33297
+ panLocked.value = scale.value === 1;
33298
+ }, 100);
33306
33299
  function limit() {
33307
33300
  if (scale.value < __props.minScale) {
33308
33301
  scale.value = __props.minScale;
@@ -33492,7 +33485,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
33492
33485
  };
33493
33486
  }
33494
33487
  });
33495
- const Zoomer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b6993655"]]);
33488
+ const Zoomer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6035bdcf"]]);
33496
33489
  function useBglSchema({ schema, showFields, data: data2 } = {}) {
33497
33490
  let _schema = schema;
33498
33491
  if (typeof _schema === "function") {
package/dist/index.mjs CHANGED
@@ -9974,7 +9974,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9974
9974
  setup(__props, { emit: __emit }) {
9975
9975
  const props2 = __props;
9976
9976
  const emit2 = __emit;
9977
- const formState = inject(FORM_STATE_KEY);
9977
+ const formState = inject(FORM_STATE_KEY) ?? provideBagelFormState(props2.modelValue);
9978
9978
  const customAttrs = ref({});
9979
9979
  const is4 = computed(() => {
9980
9980
  if (props2.field.$el === "text") return TextInput;
@@ -9998,54 +9998,49 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9998
9998
  const fieldData = computed({
9999
9999
  get: () => {
10000
10000
  if (!props2.fieldID) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
10001
- const value = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
10001
+ const value = formState.getFieldData(props2.fieldID);
10002
10002
  if (props2.field.$el === "form" && !value) return {};
10003
10003
  return value ?? "";
10004
10004
  },
10005
10005
  set: (val) => {
10006
10006
  if (!props2.fieldID) return;
10007
- const currentValue = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
10007
+ const currentValue = formState.getFieldData(props2.fieldID);
10008
10008
  if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
10009
10009
  emit2("update:modelValue", val);
10010
10010
  if (props2.field.onUpdate) {
10011
10011
  props2.field.onUpdate(val, currentValue);
10012
10012
  }
10013
- formState == null ? void 0 : formState.updateField(props2.fieldID, val);
10013
+ formState.updateField(props2.fieldID, val);
10014
10014
  }
10015
10015
  });
10016
10016
  const vIf = computed(() => {
10017
10017
  if (props2.field["v-if"] === void 0 && props2.field.vIf === void 0) return true;
10018
10018
  if (typeof props2.field["v-if"] === "boolean" || typeof props2.field.vIf === "boolean") return props2.field["v-if"];
10019
10019
  if (typeof props2.field["v-if"] === "string" || typeof props2.field.vIf === "string") return true;
10020
- if (typeof props2.field["v-if"] === "function") return props2.field["v-if"](fieldData.value, formState == null ? void 0 : formState.data.value);
10021
- if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState == null ? void 0 : formState.data.value);
10020
+ if (typeof props2.field["v-if"] === "function") return props2.field["v-if"](fieldData.value, formState.data.value);
10021
+ if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState.data.value);
10022
10022
  return true;
10023
10023
  });
10024
10024
  computed(
10025
10025
  () => {
10026
10026
  var _a2, _b;
10027
- return ((_b = (_a2 = props2.field).transform) == null ? void 0 : _b.call(_a2, fieldData.value, formState == null ? void 0 : formState.data.value)) ?? fieldData.value;
10027
+ return ((_b = (_a2 = props2.field).transform) == null ? void 0 : _b.call(_a2, fieldData.value, formState.data.value)) ?? fieldData.value;
10028
10028
  }
10029
10029
  );
10030
10030
  const computedOptions = computed(
10031
- () => bindAttrs({ options: props2.field.options }, fieldData.value, formState == null ? void 0 : formState.data.value).options
10031
+ () => bindAttrs({ options: props2.field.options }, fieldData.value, formState.data.value).options
10032
10032
  );
10033
10033
  const computedAttrs = computed(() => {
10034
10034
  const attrs = { ...customAttrs.value, ...props2.field.attrs };
10035
- delete attrs.schema;
10036
- const boundAttrs = bindAttrs(attrs, fieldData.value, formState == null ? void 0 : formState.data.value);
10037
- return Object.fromEntries(
10038
- Object.entries(boundAttrs).filter(([_2, value]) => value !== void 0)
10039
- );
10035
+ return bindAttrs(attrs, fieldData.value, formState.data.value);
10040
10036
  });
10041
10037
  const computedClass = computed(
10042
10038
  () => {
10043
10039
  var _a2;
10044
- return classify(fieldData.value, formState == null ? void 0 : formState.data.value, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10040
+ return classify(fieldData.value, formState.data.value, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10045
10041
  }
10046
10042
  );
10047
10043
  return (_ctx, _cache) => {
10048
- var _a2;
10049
10044
  const _component_BglField = resolveComponent("BglField", true);
10050
10045
  return vIf.value ? (openBlock(), createBlock(resolveDynamicComponent(is4.value), mergeProps({ key: 0 }, computedAttrs.value, {
10051
10046
  modelValue: fieldData.value,
@@ -10058,8 +10053,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10058
10053
  defaultValue: _ctx.field.defaultValue,
10059
10054
  disabled: _ctx.field.disabled,
10060
10055
  options: computedOptions.value,
10061
- helptext: _ctx.field.helptext,
10062
- schema: ((_a2 = _ctx.field.attrs) == null ? void 0 : _a2.schema) ?? void 0
10056
+ helptext: _ctx.field.helptext
10063
10057
  }), {
10064
10058
  default: withCtx(() => [
10065
10059
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.field.children, (child, ii) => {
@@ -10074,7 +10068,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10074
10068
  }), 128))
10075
10069
  ]),
10076
10070
  _: 1
10077
- }, 16, ["modelValue", "fieldID", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext", "schema"])) : createCommentVNode("", true);
10071
+ }, 16, ["modelValue", "fieldID", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext"])) : createCommentVNode("", true);
10078
10072
  };
10079
10073
  }
10080
10074
  });
@@ -20114,14 +20108,14 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20114
20108
  icon: "add",
20115
20109
  flat: "",
20116
20110
  thin: "",
20117
- class: "bgl-ctrl-num-btn",
20111
+ class: "bgl-ctrl-num-btn ctrl-add color-gray",
20118
20112
  onClick: increment
20119
20113
  }),
20120
20114
  createVNode(unref(Btn), {
20121
20115
  icon: "remove",
20122
20116
  flat: "",
20123
20117
  thin: "",
20124
- class: "bgl-ctrl-num-btn",
20118
+ class: "bgl-ctrl-num-btn ctrl-remove color-gray",
20125
20119
  onClick: decrement
20126
20120
  })
20127
20121
  ])) : createCommentVNode("", true)
@@ -20131,7 +20125,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20131
20125
  };
20132
20126
  }
20133
20127
  });
20134
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-46a64669"]]);
20128
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-abb5baff"]]);
20135
20129
  const _hoisted_1$v = ["value", "autofocus", "onKeydown", "onPaste"];
20136
20130
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
20137
20131
  __name: "OTP",
@@ -30190,6 +30184,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30190
30184
  ...props2.parseArg,
30191
30185
  defaultCountry: activeCountryCode.value
30192
30186
  }));
30187
+ const debouncedEmit = useDebounceFn((maybeFormatted) => {
30188
+ emit2("debounce", maybeFormatted);
30189
+ }, props2.debounceDelay);
30193
30190
  const phone = useModel(__props, "modelValue", {
30194
30191
  set: (value) => {
30195
30192
  let maybeFormatted = value;
@@ -30201,9 +30198,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30201
30198
  }
30202
30199
  }
30203
30200
  emit2("update:modelValue", maybeFormatted);
30204
- debounce(() => {
30205
- emit2("debounce", maybeFormatted);
30206
- }, props2.debounceDelay);
30201
+ debouncedEmit(maybeFormatted);
30207
30202
  return maybeFormatted;
30208
30203
  },
30209
30204
  get: (value) => value
@@ -30419,7 +30414,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30419
30414
  };
30420
30415
  }
30421
30416
  });
30422
- const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-627af458"]]);
30417
+ const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-cfcf054d"]]);
30423
30418
  const _hoisted_1$k = ["title"];
30424
30419
  const _hoisted_2$b = ["for"];
30425
30420
  const _hoisted_3$9 = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
@@ -30464,13 +30459,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30464
30459
  if (props2.multiline || props2.code) return 4;
30465
30460
  return 1;
30466
30461
  });
30467
- function emitValue() {
30468
- emit2("update:modelValue", inputVal.value);
30469
- }
30462
+ const debouncedEmit = useDebounceFn(() => {
30463
+ emit2("debounce", inputVal.value);
30464
+ }, 700);
30470
30465
  function updateInputVal() {
30471
30466
  if (props2.disabled) return;
30472
- emitValue();
30473
- debounce(emitValue, 300);
30467
+ emit2("update:modelValue", inputVal.value);
30468
+ debouncedEmit();
30474
30469
  }
30475
30470
  watch(
30476
30471
  () => props2.modelValue,
@@ -30565,7 +30560,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30565
30560
  };
30566
30561
  }
30567
30562
  });
30568
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-3c20ae39"]]);
30563
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-52ac6dc3"]]);
30569
30564
  const _hoisted_1$j = ["title"];
30570
30565
  const _hoisted_2$a = ["id", "required"];
30571
30566
  const _hoisted_3$8 = ["for"];
@@ -33295,12 +33290,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
33295
33290
  pointerPosX.value = newMousePosX;
33296
33291
  pointerPosY.value = newMousePosY;
33297
33292
  }
33298
- function onInteractionEnd() {
33299
- debounce(() => {
33300
- limit();
33301
- panLocked.value = scale.value === 1;
33302
- }, 100);
33303
- }
33293
+ const onInteractionEnd = useDebounceFn(() => {
33294
+ limit();
33295
+ panLocked.value = scale.value === 1;
33296
+ }, 100);
33304
33297
  function limit() {
33305
33298
  if (scale.value < __props.minScale) {
33306
33299
  scale.value = __props.minScale;
@@ -33490,7 +33483,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
33490
33483
  };
33491
33484
  }
33492
33485
  });
33493
- const Zoomer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b6993655"]]);
33486
+ const Zoomer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6035bdcf"]]);
33494
33487
  function useBglSchema({ schema, showFields, data: data2 } = {}) {
33495
33488
  let _schema = schema;
33496
33489
  if (typeof _schema === "function") {
package/dist/style.css CHANGED
@@ -1074,27 +1074,27 @@ pre code.hljs{
1074
1074
  direction: ltr;
1075
1075
  }
1076
1076
 
1077
- .txtInputIconStart .iconStart[data-v-46a64669] {
1077
+ .txtInputIconStart .iconStart[data-v-abb5baff] {
1078
1078
  color: var(--input-color);
1079
1079
  position: absolute;
1080
1080
  inset-inline-start:calc(var(--input-height) / 3 - 0.25rem);
1081
1081
  margin-top: calc(var(--input-height) / 2 );
1082
1082
  line-height: 0;
1083
1083
  }
1084
- .textInputSpinnerWrap .spinner[data-v-46a64669] {
1084
+ .textInputSpinnerWrap .spinner[data-v-abb5baff] {
1085
1085
  color: var(--input-color);
1086
1086
  position: absolute;
1087
1087
  inset-inline-end: 0;
1088
1088
  margin-top: calc(var(--input-height) / -1);
1089
1089
  line-height: 0;
1090
1090
  }
1091
- .bgl-ctrl-num-btn[data-v-46a64669]{
1091
+ .bgl-ctrl-num-btn[data-v-abb5baff]{
1092
1092
  height: calc(var(--input-height) / 2) !important;
1093
1093
  }
1094
- .bgl-big-ctrl-num-btn[data-v-46a64669]{
1094
+ .bgl-big-ctrl-num-btn[data-v-abb5baff]{
1095
1095
  width: 100% !important;
1096
1096
  }
1097
- .bgl-number-input[data-v-46a64669]{
1097
+ .bgl-number-input[data-v-abb5baff]{
1098
1098
  padding-inline-end: 1.75rem !important;
1099
1099
  }
1100
1100
 
@@ -1567,7 +1567,7 @@ line-height: 1.65;
1567
1567
  box-shadow: 0 0 10px 0 rgb(0 0 0 /20%);
1568
1568
  }
1569
1569
 
1570
- .tel-input[data-v-627af458] {
1570
+ .tel-input[data-v-cfcf054d] {
1571
1571
  direction: ltr;
1572
1572
  text-align: left;
1573
1573
  background: var(--input-bg);
@@ -1578,21 +1578,21 @@ line-height: 1.65;
1578
1578
  min-width: calc(var(--input-height) * 3);
1579
1579
  width: 100%;
1580
1580
  }
1581
- .tel-input[data-v-627af458]:focus-within {
1581
+ .tel-input[data-v-cfcf054d]:focus-within {
1582
1582
  outline: none;
1583
1583
  box-shadow: inset 0 0 10px #00000012;
1584
1584
  }
1585
- .tel-input input[data-v-627af458] {
1585
+ .tel-input input[data-v-cfcf054d] {
1586
1586
  background: transparent;
1587
1587
  }
1588
- .tel-input input[data-v-627af458]:focus-visible {
1588
+ .tel-input input[data-v-cfcf054d]:focus-visible {
1589
1589
  box-shadow: none;
1590
1590
  }
1591
- .input_country-code[data-v-627af458] {
1591
+ .input_country-code[data-v-cfcf054d] {
1592
1592
  font-size: var(--input-font-size);
1593
1593
  color: var(--input-color);
1594
1594
  }
1595
- .tel-country[data-v-627af458] {
1595
+ .tel-country[data-v-cfcf054d] {
1596
1596
  font-size: var(--input-font-size);
1597
1597
  max-width: 200px;
1598
1598
  white-space: nowrap;
@@ -1601,7 +1601,7 @@ line-height: 1.65;
1601
1601
  margin-top: 0;
1602
1602
  margin-bottom: 0;
1603
1603
  }
1604
- .tel-countryp-dropdown[data-v-627af458] {
1604
+ .tel-countryp-dropdown[data-v-cfcf054d] {
1605
1605
  direction: ltr;
1606
1606
  text-align: left;
1607
1607
  }
@@ -1615,58 +1615,58 @@ line-height: 1.65;
1615
1615
  font-size: var(--label-font-size);
1616
1616
  }
1617
1617
 
1618
- .bagel-input textarea[data-v-3c20ae39] {
1618
+ .bagel-input textarea[data-v-52ac6dc3] {
1619
1619
  min-height: unset;
1620
1620
  font-size: var(--input-font-size);
1621
1621
  }
1622
- .bagel-input.text-input textarea[data-v-3c20ae39] {
1622
+ .bagel-input.text-input textarea[data-v-52ac6dc3] {
1623
1623
  resize: none;
1624
1624
  }
1625
- .code textarea[data-v-3c20ae39] {
1625
+ .code textarea[data-v-52ac6dc3] {
1626
1626
  font-family: 'Inconsolata', monospace;
1627
1627
  background: var(--bgl-code-bg) !important;
1628
1628
  color: var(--bgl-light-text) !important;
1629
1629
  }
1630
- .code textarea[data-v-3c20ae39]::placeholder {
1630
+ .code textarea[data-v-52ac6dc3]::placeholder {
1631
1631
  color: var(--bgl-light-text) !important;
1632
1632
  opacity: 0.3;
1633
1633
  }
1634
- .bagel-input.small[data-v-3c20ae39] {
1634
+ .bagel-input.small[data-v-52ac6dc3] {
1635
1635
  margin-bottom: 0;
1636
1636
  height: 30px;
1637
1637
  }
1638
- .bagel-input.dense label[data-v-3c20ae39] {
1638
+ .bagel-input.dense label[data-v-52ac6dc3] {
1639
1639
  display: flex;
1640
1640
  align-items: center;
1641
1641
  gap: 0.5rem;
1642
1642
  }
1643
- .bagel-input input[data-v-3c20ae39]:disabled {
1643
+ .bagel-input input[data-v-52ac6dc3]:disabled {
1644
1644
  background: #f5f5f5;
1645
1645
  }
1646
- .bagel-input label[data-v-3c20ae39] {
1646
+ .bagel-input label[data-v-52ac6dc3] {
1647
1647
  font-size: var(--label-font-size);
1648
1648
  }
1649
- .textInputIconWrap .bgl_icon-font[data-v-3c20ae39] {
1649
+ .textInputIconWrap .bgl_icon-font[data-v-52ac6dc3] {
1650
1650
  color: var(--input-color);
1651
1651
  position: absolute;
1652
1652
  inset-inline-end:calc(var(--input-height) / 3 - 0.25rem);
1653
1653
  margin-top: calc(var(--input-height) / 2 + 0.1rem);
1654
1654
  line-height: 0;
1655
1655
  }
1656
- .textInputIconWrap input[data-v-3c20ae39]{
1656
+ .textInputIconWrap input[data-v-52ac6dc3]{
1657
1657
  padding-inline-end: calc(var(--input-height) / 3 + 1.5rem);
1658
1658
  }
1659
- .txtInputIconStart .iconStart[data-v-3c20ae39] {
1659
+ .txtInputIconStart .iconStart[data-v-52ac6dc3] {
1660
1660
  color: var(--input-color);
1661
1661
  position: absolute;
1662
1662
  inset-inline-start:calc(var(--input-height) / 3 - 0.25rem);
1663
1663
  margin-top: calc(var(--input-height) / 2 );
1664
1664
  line-height: 0;
1665
1665
  }
1666
- .txtInputIconStart input[data-v-3c20ae39], .txtInputIconStart textarea[data-v-3c20ae39]{
1666
+ .txtInputIconStart input[data-v-52ac6dc3], .txtInputIconStart textarea[data-v-52ac6dc3]{
1667
1667
  padding-inline-start: calc(var(--input-height) / 3 + 1.5rem);
1668
1668
  }
1669
- .bagel-input.small textarea[data-v-3c20ae39] {
1669
+ .bagel-input.small textarea[data-v-52ac6dc3] {
1670
1670
  height: 30px;
1671
1671
  }
1672
1672
 
@@ -3709,15 +3709,15 @@ tbody tr[data-v-4c462da5]:hover {
3709
3709
  background: var(--bgl-gray-light);
3710
3710
  }
3711
3711
 
3712
- .vue-zoomer[data-v-b6993655] {
3712
+ .vue-zoomer[data-v-6035bdcf] {
3713
3713
  overflow: hidden;
3714
3714
  }
3715
- .zoomer[data-v-b6993655] {
3715
+ .zoomer[data-v-6035bdcf] {
3716
3716
  transform-origin: 50% 50%;
3717
3717
  width: 100%;
3718
3718
  height: 100%;
3719
3719
  }
3720
- .zoomer > img[data-v-b6993655] {
3720
+ .zoomer > img[data-v-6035bdcf] {
3721
3721
  vertical-align: top;
3722
3722
  user-select: none;
3723
3723
  -moz-user-drag: none;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.1060",
4
+ "version": "0.0.1064",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { debounce } from '@bagelink/vue'
2
+ import { useDebounceFn } from '@bagelink/vue'
3
3
  import { onMounted, onUnmounted, watch } from 'vue'
4
4
  import TapDetector from '../utils/tapDetector'
5
5
 
@@ -141,12 +141,10 @@ function onPointerMove(newMousePosX: number, newMousePosY: number) {
141
141
  pointerPosY = newMousePosY
142
142
  }
143
143
 
144
- function onInteractionEnd() {
145
- debounce(() => {
146
- limit()
147
- panLocked = scale === 1
148
- }, 100)
149
- }
144
+ const onInteractionEnd = useDebounceFn(() => {
145
+ limit()
146
+ panLocked = scale === 1
147
+ }, 100)
150
148
 
151
149
  function limit() {
152
150
  if (scale < minScale!) {
@@ -0,0 +1,192 @@
1
+ import type { App, Component, InjectionKey, Plugin, PropType } from 'vue'
2
+ import { createApp, defineComponent, h, inject } from 'vue'
3
+
4
+ export interface DialogOptions {
5
+ title?: string
6
+ content?: string | Component
7
+ dismissable?: boolean
8
+ width?: string
9
+ actions?: Array<{
10
+ label: string
11
+ onClick: () => void
12
+ variant?: 'primary' | 'secondary' | 'danger'
13
+ }>
14
+ }
15
+
16
+ export interface DialogApi {
17
+ show: (options: DialogOptions) => void
18
+ hide: () => void
19
+ }
20
+
21
+ const DialogSymbol: InjectionKey<DialogApi> = Symbol('dialog')
22
+
23
+ export function useDialog(): DialogApi {
24
+ const api = inject(DialogSymbol)
25
+ if (!api) throw new Error('Dialog plugin not installed')
26
+ return api
27
+ }
28
+
29
+ const Dialog = defineComponent({
30
+ props: {
31
+ options: {
32
+ type: Object as () => DialogOptions,
33
+ required: true
34
+ },
35
+ onClose: {
36
+ type: Function as PropType<(event?: MouseEvent) => void>,
37
+ required: true
38
+ }
39
+ },
40
+ setup(props) {
41
+ return () => h('div', {
42
+ class: 'dialog-overlay',
43
+ onClick: (e: MouseEvent) => {
44
+ if (props.options.dismissable && e.target === e.currentTarget) {
45
+ props.onClose()
46
+ }
47
+ }
48
+ }, [
49
+ h('div', {
50
+ class: ['dialog', props.options.width ? `w-${props.options.width}` : 'w-96']
51
+ }, [
52
+ h('div', { class: 'dialog-header' }, [
53
+ h('h3', { class: 'dialog-title' }, props.options.title),
54
+ props.options.dismissable && h('button', {
55
+ class: 'dialog-close',
56
+ onClick: props.onClose
57
+ }, '×')
58
+ ]),
59
+ h('div', { class: 'dialog-content' }, [
60
+ typeof props.options.content === 'string'
61
+ ? props.options.content
62
+ : h(props.options.content as any)
63
+ ]),
64
+ props.options.actions && h('div', { class: 'dialog-actions' }, props.options.actions.map(action => h('button', {
65
+ class: ['dialog-btn', action.variant],
66
+ onClick: () => {
67
+ action.onClick()
68
+ props.onClose()
69
+ }
70
+ }, action.label)
71
+ ))
72
+ ])
73
+ ])
74
+ }
75
+ })
76
+
77
+ export const DialogPlugin: Plugin = {
78
+ install: (app: App) => {
79
+ // Create a div to mount our dialog
80
+ const dialogContainer = document.createElement('div')
81
+ document.body.appendChild(dialogContainer)
82
+
83
+ let currentDialog: any = null
84
+
85
+ const api: DialogApi = {
86
+ show: (options: DialogOptions) => {
87
+ // Remove existing dialog if any
88
+ if (currentDialog) {
89
+ currentDialog.unmount()
90
+ }
91
+
92
+ // Create new dialog instance
93
+ const dialogApp = createApp(Dialog, {
94
+ options,
95
+ onClose: () => { api.hide() }
96
+ })
97
+
98
+ // Mount it
99
+ currentDialog = dialogApp.mount(dialogContainer)
100
+ },
101
+ hide: () => {
102
+ if (currentDialog) {
103
+ currentDialog.unmount()
104
+ currentDialog = null
105
+ }
106
+ }
107
+ }
108
+
109
+ app.provide(DialogSymbol, api)
110
+ }
111
+ }
112
+
113
+ // Add some basic styles
114
+ const style = document.createElement('style')
115
+ style.textContent = `
116
+ .dialog-overlay {
117
+ position: fixed;
118
+ top: 0;
119
+ left: 0;
120
+ right: 0;
121
+ bottom: 0;
122
+ background: rgba(0, 0, 0, 0.5);
123
+ display: flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ z-index: 1000;
127
+ }
128
+
129
+ .dialog {
130
+ background: white;
131
+ border-radius: 0.5rem;
132
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
133
+ max-width: 90vw;
134
+ max-height: 90vh;
135
+ overflow: auto;
136
+ }
137
+
138
+ .dialog-header {
139
+ padding: 1rem;
140
+ border-bottom: 1px solid #e5e7eb;
141
+ display: flex;
142
+ justify-content: space-between;
143
+ align-items: center;
144
+ }
145
+
146
+ .dialog-title {
147
+ margin: 0;
148
+ font-size: 1.25rem;
149
+ font-weight: 600;
150
+ }
151
+
152
+ .dialog-close {
153
+ background: none;
154
+ border: none;
155
+ font-size: 1.5rem;
156
+ cursor: pointer;
157
+ padding: 0.25rem;
158
+ }
159
+
160
+ .dialog-content {
161
+ padding: 1rem;
162
+ }
163
+
164
+ .dialog-actions {
165
+ padding: 1rem;
166
+ border-top: 1px solid #e5e7eb;
167
+ display: flex;
168
+ justify-content: flex-end;
169
+ gap: 0.5rem;
170
+ }
171
+
172
+ .dialog-btn {
173
+ padding: 0.5rem 1rem;
174
+ border-radius: 0.375rem;
175
+ border: 1px solid #e5e7eb;
176
+ background: white;
177
+ cursor: pointer;
178
+ }
179
+
180
+ .dialog-btn.primary {
181
+ background: #3b82f6;
182
+ color: white;
183
+ border-color: #3b82f6;
184
+ }
185
+
186
+ .dialog-btn.danger {
187
+ background: #ef4444;
188
+ color: white;
189
+ border-color: #ef4444;
190
+ }
191
+ `
192
+ document.head.appendChild(style)
@@ -16,9 +16,9 @@ import {
16
16
  type BagelFormState,
17
17
  BglForm
18
18
  } from '@bagelink/vue'
19
- import { inject } from 'vue'
19
+ import { inject, ref } from 'vue'
20
20
  import TabsNav from '../layout/TabsNav.vue'
21
- import { FORM_STATE_KEY } from './useBagelFormState'
21
+ import { FORM_STATE_KEY, provideBagelFormState } from './useBagelFormState'
22
22
 
23
23
  const props = defineProps<{
24
24
  field: Field<T>
@@ -31,7 +31,7 @@ const emit = defineEmits<{
31
31
  'update:modelValue': [value: any]
32
32
  }>()
33
33
 
34
- const formState = inject<BagelFormState<T>>(FORM_STATE_KEY)
34
+ const formState = inject<BagelFormState<T>>(FORM_STATE_KEY) ?? provideBagelFormState(props.modelValue)
35
35
 
36
36
  const customAttrs = $ref<{ [key: string]: any }>({})
37
37
 
@@ -58,20 +58,20 @@ const is = $computed(() => {
58
58
  const fieldData = $computed({
59
59
  get: () => {
60
60
  if (!props.fieldID) return props.field.defaultValue ?? (props.field.$el === 'form' ? {} : '')
61
- const value = formState?.getFieldData(props.fieldID)
61
+ const value = formState.getFieldData(props.fieldID)
62
62
  if (props.field.$el === 'form' && !value) return {}
63
63
  return value ?? ''
64
64
  },
65
65
  set: (val: any) => {
66
66
  if (!props.fieldID) return
67
- const currentValue = formState?.getFieldData(props.fieldID)
67
+ const currentValue = formState.getFieldData(props.fieldID)
68
68
  if (JSON.stringify(val) === JSON.stringify(currentValue)) return
69
69
 
70
70
  emit('update:modelValue', val)
71
71
  if (props.field.onUpdate) {
72
72
  props.field.onUpdate(val, currentValue)
73
73
  }
74
- formState?.updateField(props.fieldID, val)
74
+ formState.updateField(props.fieldID, val)
75
75
  }
76
76
  })
77
77
 
@@ -79,30 +79,26 @@ const vIf = $computed(() => {
79
79
  if (props.field['v-if'] === undefined && props.field.vIf === undefined) return true
80
80
  if (typeof props.field['v-if'] === 'boolean' || typeof props.field.vIf === 'boolean') return props.field['v-if']
81
81
  if (typeof props.field['v-if'] === 'string' || typeof props.field.vIf === 'string') return true
82
- if (typeof props.field['v-if'] === 'function') return props.field['v-if'](fieldData, formState?.data.value as T)
83
- if (typeof props.field.vIf === 'function') return props.field.vIf(fieldData, formState?.data.value as T)
82
+ if (typeof props.field['v-if'] === 'function') return props.field['v-if'](fieldData, formState.data.value as T)
83
+ if (typeof props.field.vIf === 'function') return props.field.vIf(fieldData, formState.data.value as T)
84
84
  return true
85
85
  })
86
86
 
87
87
  const computedFieldData = $computed(
88
- () => props.field.transform?.(fieldData, formState?.data.value as T) ?? fieldData
88
+ () => props.field.transform?.(fieldData, formState.data.value as T) ?? fieldData
89
89
  )
90
90
 
91
91
  const computedOptions = $computed(
92
- () => bindAttrs({ options: props.field.options }, fieldData, formState?.data.value).options
92
+ () => bindAttrs({ options: props.field.options }, fieldData, formState.data.value).options
93
93
  )
94
94
 
95
95
  const computedAttrs = $computed(() => {
96
96
  const attrs = { ...customAttrs, ...props.field.attrs }
97
- delete attrs.schema
98
- const boundAttrs = bindAttrs(attrs, fieldData, formState?.data.value)
99
- return Object.fromEntries(
100
- Object.entries(boundAttrs).filter(([_, value]) => value !== undefined)
101
- )
97
+ return bindAttrs(attrs, fieldData, formState.data.value)
102
98
  })
103
99
 
104
100
  const computedClass = $computed(
105
- () => classify(fieldData, formState?.data.value, props.field.class, props.field.attrs?.class)
101
+ () => classify(fieldData, formState.data.value, props.field.class, props.field.attrs?.class)
106
102
  )
107
103
  </script>
108
104
 
@@ -121,7 +117,6 @@ const computedClass = $computed(
121
117
  :disabled="field.disabled"
122
118
  :options="computedOptions"
123
119
  :helptext="field.helptext"
124
- :schema="field.attrs?.schema ?? undefined"
125
120
  >
126
121
  <template v-for="(child, ii) in field.children" :key="ii">
127
122
  <BglField
@@ -133,8 +133,8 @@ watch(() => modelValue, (newVal) => {
133
133
  <Btn v-if="layout && btnLayouts.includes(layout)" flat icon="remove" class="radius" :class="[{ 'bgl-big-ctrl-num-btn': layout === 'vertical' }]" @click="decrement" />
134
134
 
135
135
  <div v-if="spinner && (!layout || !btnLayouts.includes(layout))" class="flex column spinner">
136
- <Btn icon="add" flat thin class="bgl-ctrl-num-btn" @click="increment" />
137
- <Btn icon="remove" flat thin class="bgl-ctrl-num-btn" @click="decrement" />
136
+ <Btn icon="add" flat thin class="bgl-ctrl-num-btn ctrl-add color-gray" @click="increment" />
137
+ <Btn icon="remove" flat thin class="bgl-ctrl-num-btn ctrl-remove color-gray" @click="decrement" />
138
138
  </div>
139
139
  </div>
140
140
  </label>
@@ -6,7 +6,7 @@ import {
6
6
  Icon,
7
7
  TextInput,
8
8
  allCountries,
9
- debounce,
9
+ useDebounceFn,
10
10
  } from '@bagelink/vue'
11
11
  import axios from 'axios'
12
12
  import {
@@ -168,6 +168,10 @@ const parseArgs = $computed(() => ({
168
168
  defaultCountry: activeCountryCode,
169
169
  }))
170
170
 
171
+ const debouncedEmit = useDebounceFn((maybeFormatted: string) => {
172
+ emit('debounce', maybeFormatted)
173
+ }, props.debounceDelay)
174
+
171
175
  const phone = defineModel<string>('modelValue', {
172
176
  default: '',
173
177
  set: (value) => {
@@ -179,7 +183,7 @@ const phone = defineModel<string>('modelValue', {
179
183
  }
180
184
 
181
185
  emit('update:modelValue', maybeFormatted)
182
- debounce(() => { emit('debounce', maybeFormatted) }, props.debounceDelay)
186
+ debouncedEmit(maybeFormatted)
183
187
  return maybeFormatted
184
188
  },
185
189
  get: value => value,
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import {
3
- debounce,
4
3
  MaterialIcon,
4
+ useDebounceFn,
5
5
  type MaterialIcons,
6
6
  } from '@bagelink/vue'
7
7
  import { onMounted, watch } from 'vue'
@@ -49,14 +49,12 @@ const rows = $computed(() => {
49
49
  return 1
50
50
  })
51
51
 
52
- function emitValue() {
53
- emit('update:modelValue', inputVal as string)
54
- }
52
+ const debouncedEmit = useDebounceFn(() => { emit('debounce', inputVal as string) }, 700)
55
53
 
56
54
  function updateInputVal() {
57
55
  if (props.disabled) return
58
- emitValue()
59
- debounce(emitValue, 300)
56
+ emit('update:modelValue', inputVal as string)
57
+ debouncedEmit()
60
58
  }
61
59
 
62
60
  watch(