@uzum-tech/ui 1.12.10 → 1.12.12-beta.1

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.js CHANGED
@@ -23891,7 +23891,6 @@
23891
23891
  {
23892
23892
  key: "dismiss",
23893
23893
  class: `${clsPrefix}-base-clear__clear`,
23894
- onClick: this.onClear,
23895
23894
  onMousedown: this.handleMouseDown,
23896
23895
  "data-clear": true
23897
23896
  },
@@ -128609,7 +128608,34 @@
128609
128608
  watermarkProps: watermarkProps
128610
128609
  });
128611
128610
 
128612
- var version = "1.12.10";
128611
+ var version = "1.12.12-beta.1";
128612
+
128613
+ function useExposeProxy(targetRef) {
128614
+ return new Proxy({}, {
128615
+ get(_, prop) {
128616
+ const target = targetRef.value;
128617
+ if (!target) return void 0;
128618
+ const value = target[prop];
128619
+ return typeof value === "function" ? value.bind(target) : value;
128620
+ },
128621
+ has(_, prop) {
128622
+ return !!targetRef.value && prop in targetRef.value;
128623
+ },
128624
+ ownKeys() {
128625
+ return targetRef.value ? Reflect.ownKeys(targetRef.value) : [];
128626
+ },
128627
+ getOwnPropertyDescriptor(_, prop) {
128628
+ if (!targetRef.value || !(prop in targetRef.value)) {
128629
+ return void 0;
128630
+ }
128631
+ return {
128632
+ enumerable: true,
128633
+ configurable: true,
128634
+ value: targetRef.value[prop]
128635
+ };
128636
+ }
128637
+ });
128638
+ }
128613
128639
 
128614
128640
  function create({
128615
128641
  componentPrefix = "U",
@@ -128626,27 +128652,34 @@
128626
128652
  return null;
128627
128653
  }
128628
128654
  function wrap(component) {
128629
- const wrapped = {
128655
+ if (component._n_icon__) {
128656
+ return component;
128657
+ }
128658
+ const wrapped = vue.defineComponent({
128630
128659
  name: component.name,
128631
128660
  inheritAttrs: false,
128632
128661
  setup(props, ctx) {
128633
128662
  const instance = vue.getCurrentInstance();
128634
128663
  const config = instance ? findConfig(instance) : null;
128664
+ const componentRef = vue.ref(null);
128635
128665
  const mergedProps = vue.computed(() => {
128636
128666
  if (!config) return props;
128637
- const defaults = config.mergedComponentPropsRef?.value?.[component.name] || {};
128667
+ const defaults = config.mergedComponentPropsRef?.value?.[component.name] ?? {};
128638
128668
  return {
128639
128669
  ...defaults,
128640
128670
  ...props
128641
128671
  };
128642
128672
  });
128673
+ if (ctx.expose) {
128674
+ ctx.expose(useExposeProxy(componentRef));
128675
+ }
128643
128676
  return () => vue.h(component, {
128677
+ ref: componentRef,
128644
128678
  ...mergedProps.value,
128645
- ...ctx.attrs,
128646
- ...props
128679
+ ...ctx.attrs
128647
128680
  }, ctx.slots);
128648
128681
  }
128649
- };
128682
+ });
128650
128683
  return wrapped;
128651
128684
  }
128652
128685
  function registerComponent(app, name, component) {