@destyler/combobox 0.0.2 → 0.0.3

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.
@@ -41,16 +41,14 @@ const DestylerComboboxAnchor = vue.defineComponent({
41
41
  render() {
42
42
  return vue.h(popper.DestylerPopperAnchor, {
43
43
  asChild: true
44
- }, {
45
- default: () => {
46
- return vue.h(primitive.DestylerPrimitive, vue.mergeProps(this.$attrs, {
47
- ref: (el) => this.forwardRef(el),
48
- as: this.$props.as,
49
- asChild: this.$props.asChild
50
- }), {
51
- default: () => this.$slots.default?.()
52
- });
53
- }
44
+ }, () => {
45
+ return vue.h(primitive.DestylerPrimitive, vue.mergeProps(this.$attrs, {
46
+ ref: (el) => this.forwardRef(el),
47
+ as: this.$props.as,
48
+ asChild: this.$props.asChild
49
+ }), {
50
+ default: () => this.$slots.default?.()
51
+ });
54
52
  });
55
53
  }
56
54
  });
@@ -525,11 +523,8 @@ const DestylerComboboxArrow = vue.defineComponent({
525
523
  };
526
524
  },
527
525
  render() {
528
- if (this.rootContext.open.value && this.contentContext.position.value === "popper") {
529
- return vue.h(popper.DestylerPopperArrow, this.$props, {
530
- default: () => this.$slots.default?.()
531
- });
532
- }
526
+ if (this.rootContext.open.value && this.contentContext.position.value === "popper")
527
+ return vue.h(popper.DestylerPopperArrow, this.$props, () => this.$slots.default?.());
533
528
  }
534
529
  });
535
530
 
@@ -567,9 +562,7 @@ const DestylerComboboxCancel = vue.defineComponent({
567
562
  onClick: () => {
568
563
  this.handleClick();
569
564
  }
570
- }), {
571
- default: () => this.$slots.default?.()
572
- });
565
+ }), () => this.$slots.default?.());
573
566
  }
574
567
  });
575
568
 
@@ -597,15 +590,9 @@ const DestylerComboboxContent = vue.defineComponent({
597
590
  render() {
598
591
  return vue.h(presence.DestylerPresence, {
599
592
  present: this.$props.forceMount || this.rootContext.open.value
600
- }, {
601
- default: () => {
602
- return vue.h(DestylerComboboxContentImpl, vue.mergeProps(this.$attrs, this.forwarded, {
603
- ref: (el) => this.forwardRef(el)
604
- }), {
605
- default: () => this.$slots.default?.()
606
- });
607
- }
608
- });
593
+ }, () => vue.h(DestylerComboboxContentImpl, vue.mergeProps(this.$attrs, this.forwarded, {
594
+ ref: (el) => this.forwardRef(el)
595
+ }), () => this.$slots.default?.()));
609
596
  }
610
597
  });
611
598
 
@@ -1095,6 +1082,7 @@ const destylerComboboxViewportProps = {
1095
1082
  const DestylerComboboxViewport = vue.defineComponent({
1096
1083
  name: "DestylerComboboxViewport",
1097
1084
  props: destylerComboboxViewportProps,
1085
+ inheritAttrs: false,
1098
1086
  setup() {
1099
1087
  const { forwardRef } = composition.useForwardExpose();
1100
1088
  return {
@@ -1103,7 +1091,7 @@ const DestylerComboboxViewport = vue.defineComponent({
1103
1091
  },
1104
1092
  render() {
1105
1093
  return [
1106
- vue.h(primitive.DestylerPrimitive, {
1094
+ vue.h(primitive.DestylerPrimitive, vue.mergeProps(this.$attrs, {
1107
1095
  "ref": (el) => this.forwardRef(el),
1108
1096
  "data-destyler-combobox-viewport": "",
1109
1097
  "role": "presentation",
@@ -1112,24 +1100,20 @@ const DestylerComboboxViewport = vue.defineComponent({
1112
1100
  flex: 1,
1113
1101
  overflow: "auto"
1114
1102
  }
1115
- }, {
1116
- default: () => this.$slots.default?.()
1117
- }),
1103
+ }), () => this.$slots.default?.()),
1118
1104
  vue.h(primitive.DestylerPrimitive, {
1119
1105
  as: "style"
1120
- }, {
1121
- default: () => `
1122
- /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */
1123
- [data-destyler-combobox-viewport] {
1124
- scrollbar-width:none;
1125
- -ms-overflow-style: none;
1126
- -webkit-overflow-scrolling: touch;
1127
- }
1128
- [data-destyler-combobox-viewport]::-webkit-scrollbar {
1129
- display: none;
1130
- }
1131
- `
1132
- })
1106
+ }, () => `
1107
+ /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */
1108
+ [data-destyler-combobox-viewport] {
1109
+ scrollbar-width:none;
1110
+ -ms-overflow-style: none;
1111
+ -webkit-overflow-scrolling: touch;
1112
+ }
1113
+ [data-destyler-combobox-viewport]::-webkit-scrollbar {
1114
+ display: none;
1115
+ }
1116
+ `)
1133
1117
  ];
1134
1118
  }
1135
1119
  });
@@ -35,16 +35,14 @@ const DestylerComboboxAnchor = defineComponent({
35
35
  render() {
36
36
  return h(DestylerPopperAnchor, {
37
37
  asChild: true
38
- }, {
39
- default: () => {
40
- return h(DestylerPrimitive, mergeProps(this.$attrs, {
41
- ref: (el) => this.forwardRef(el),
42
- as: this.$props.as,
43
- asChild: this.$props.asChild
44
- }), {
45
- default: () => this.$slots.default?.()
46
- });
47
- }
38
+ }, () => {
39
+ return h(DestylerPrimitive, mergeProps(this.$attrs, {
40
+ ref: (el) => this.forwardRef(el),
41
+ as: this.$props.as,
42
+ asChild: this.$props.asChild
43
+ }), {
44
+ default: () => this.$slots.default?.()
45
+ });
48
46
  });
49
47
  }
50
48
  });
@@ -519,11 +517,8 @@ const DestylerComboboxArrow = defineComponent({
519
517
  };
520
518
  },
521
519
  render() {
522
- if (this.rootContext.open.value && this.contentContext.position.value === "popper") {
523
- return h(DestylerPopperArrow, this.$props, {
524
- default: () => this.$slots.default?.()
525
- });
526
- }
520
+ if (this.rootContext.open.value && this.contentContext.position.value === "popper")
521
+ return h(DestylerPopperArrow, this.$props, () => this.$slots.default?.());
527
522
  }
528
523
  });
529
524
 
@@ -561,9 +556,7 @@ const DestylerComboboxCancel = defineComponent({
561
556
  onClick: () => {
562
557
  this.handleClick();
563
558
  }
564
- }), {
565
- default: () => this.$slots.default?.()
566
- });
559
+ }), () => this.$slots.default?.());
567
560
  }
568
561
  });
569
562
 
@@ -591,15 +584,9 @@ const DestylerComboboxContent = defineComponent({
591
584
  render() {
592
585
  return h(DestylerPresence, {
593
586
  present: this.$props.forceMount || this.rootContext.open.value
594
- }, {
595
- default: () => {
596
- return h(DestylerComboboxContentImpl, mergeProps(this.$attrs, this.forwarded, {
597
- ref: (el) => this.forwardRef(el)
598
- }), {
599
- default: () => this.$slots.default?.()
600
- });
601
- }
602
- });
587
+ }, () => h(DestylerComboboxContentImpl, mergeProps(this.$attrs, this.forwarded, {
588
+ ref: (el) => this.forwardRef(el)
589
+ }), () => this.$slots.default?.()));
603
590
  }
604
591
  });
605
592
 
@@ -1089,6 +1076,7 @@ const destylerComboboxViewportProps = {
1089
1076
  const DestylerComboboxViewport = defineComponent({
1090
1077
  name: "DestylerComboboxViewport",
1091
1078
  props: destylerComboboxViewportProps,
1079
+ inheritAttrs: false,
1092
1080
  setup() {
1093
1081
  const { forwardRef } = useForwardExpose();
1094
1082
  return {
@@ -1097,7 +1085,7 @@ const DestylerComboboxViewport = defineComponent({
1097
1085
  },
1098
1086
  render() {
1099
1087
  return [
1100
- h(DestylerPrimitive, {
1088
+ h(DestylerPrimitive, mergeProps(this.$attrs, {
1101
1089
  "ref": (el) => this.forwardRef(el),
1102
1090
  "data-destyler-combobox-viewport": "",
1103
1091
  "role": "presentation",
@@ -1106,24 +1094,20 @@ const DestylerComboboxViewport = defineComponent({
1106
1094
  flex: 1,
1107
1095
  overflow: "auto"
1108
1096
  }
1109
- }, {
1110
- default: () => this.$slots.default?.()
1111
- }),
1097
+ }), () => this.$slots.default?.()),
1112
1098
  h(DestylerPrimitive, {
1113
1099
  as: "style"
1114
- }, {
1115
- default: () => `
1116
- /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */
1117
- [data-destyler-combobox-viewport] {
1118
- scrollbar-width:none;
1119
- -ms-overflow-style: none;
1120
- -webkit-overflow-scrolling: touch;
1121
- }
1122
- [data-destyler-combobox-viewport]::-webkit-scrollbar {
1123
- display: none;
1124
- }
1125
- `
1126
- })
1100
+ }, () => `
1101
+ /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */
1102
+ [data-destyler-combobox-viewport] {
1103
+ scrollbar-width:none;
1104
+ -ms-overflow-style: none;
1105
+ -webkit-overflow-scrolling: touch;
1106
+ }
1107
+ [data-destyler-combobox-viewport]::-webkit-scrollbar {
1108
+ display: none;
1109
+ }
1110
+ `)
1127
1111
  ];
1128
1112
  }
1129
1113
  });
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@destyler/combobox",
3
- "version": "0.0.2",
3
+ "type": "module",
4
+ "version": "0.0.3",
4
5
  "description": "unstyled combobox component for vue",
5
6
  "author": "Elone Hoo <elonehoo@gmail.com>",
6
7
  "license": "MIT",
@@ -34,16 +35,16 @@
34
35
  },
35
36
  "dependencies": {
36
37
  "fast-deep-equal": "^3.1.3",
37
- "@destyler/composition": "0.0.2",
38
- "@destyler/dismissable-layer": "0.0.2",
39
- "@destyler/popper": "0.0.2",
40
- "@destyler/presence": "0.0.2",
41
- "@destyler/shared": "0.0.2",
42
- "@destyler/teleport": "0.0.2",
43
- "@destyler/visually-hidden": "0.0.2",
44
- "@destyler/directives": "0.0.2",
45
- "@destyler/primitive": "0.0.2",
46
- "@destyler/collection": "0.0.2"
38
+ "@destyler/collection": "0.0.3",
39
+ "@destyler/dismissable-layer": "0.0.3",
40
+ "@destyler/composition": "0.0.3",
41
+ "@destyler/primitive": "0.0.3",
42
+ "@destyler/shared": "0.0.3",
43
+ "@destyler/visually-hidden": "0.0.3",
44
+ "@destyler/directives": "0.0.3",
45
+ "@destyler/popper": "0.0.3",
46
+ "@destyler/presence": "0.0.3",
47
+ "@destyler/teleport": "0.0.3"
47
48
  },
48
49
  "scripts": {
49
50
  "clear": "rimraf ./dist",