@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.
- package/dist/component.cjs +28 -44
- package/dist/component.mjs +28 -44
- package/package.json +12 -11
package/dist/component.cjs
CHANGED
|
@@ -41,16 +41,14 @@ const DestylerComboboxAnchor = vue.defineComponent({
|
|
|
41
41
|
render() {
|
|
42
42
|
return vue.h(popper.DestylerPopperAnchor, {
|
|
43
43
|
asChild: true
|
|
44
|
-
}, {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
602
|
-
|
|
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
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
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
|
});
|
package/dist/component.mjs
CHANGED
|
@@ -35,16 +35,14 @@ const DestylerComboboxAnchor = defineComponent({
|
|
|
35
35
|
render() {
|
|
36
36
|
return h(DestylerPopperAnchor, {
|
|
37
37
|
asChild: true
|
|
38
|
-
}, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
596
|
-
|
|
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
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
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
|
-
"
|
|
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/
|
|
38
|
-
"@destyler/dismissable-layer": "0.0.
|
|
39
|
-
"@destyler/
|
|
40
|
-
"@destyler/
|
|
41
|
-
"@destyler/shared": "0.0.
|
|
42
|
-
"@destyler/
|
|
43
|
-
"@destyler/
|
|
44
|
-
"@destyler/
|
|
45
|
-
"@destyler/
|
|
46
|
-
"@destyler/
|
|
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",
|