@destyler/radio 0.0.1 → 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 +6 -12
- package/dist/component.mjs +6 -12
- package/package.json +8 -7
package/dist/component.cjs
CHANGED
|
@@ -94,16 +94,14 @@ const DestylerRadioGroupRoot = vue.defineComponent({
|
|
|
94
94
|
orientation: this.orientation,
|
|
95
95
|
dir: this.dir,
|
|
96
96
|
loop: this.loop
|
|
97
|
-
}, vue.h(primitive.DestylerPrimitive, {
|
|
97
|
+
}, () => vue.h(primitive.DestylerPrimitive, {
|
|
98
98
|
"role": "radiogroup",
|
|
99
99
|
"data-disabled": this.disabled ? "" : void 0,
|
|
100
100
|
"asChild": this.$props.asChild,
|
|
101
101
|
"aria-required": this.required,
|
|
102
102
|
"dir": this.dir,
|
|
103
103
|
"name": this.name
|
|
104
|
-
},
|
|
105
|
-
default: () => this.$slots.default?.()
|
|
106
|
-
}));
|
|
104
|
+
}, () => this.$slots.default?.()));
|
|
107
105
|
}
|
|
108
106
|
});
|
|
109
107
|
|
|
@@ -189,7 +187,7 @@ const DestylerRadio = vue.defineComponent({
|
|
|
189
187
|
"onClick": vue.withModifiers((event) => {
|
|
190
188
|
this.handleClick(event);
|
|
191
189
|
}, ["stop"])
|
|
192
|
-
}), [
|
|
190
|
+
}), () => [
|
|
193
191
|
this.$slots.default?.(),
|
|
194
192
|
this.isFormControl ? vue.h("input", {
|
|
195
193
|
role: "radio",
|
|
@@ -287,7 +285,7 @@ const DestylerRadioGroupItem = vue.defineComponent({
|
|
|
287
285
|
disabled: this.disabled,
|
|
288
286
|
focusable: !this.disabled,
|
|
289
287
|
active: this.checked
|
|
290
|
-
}, vue.h(DestylerRadio, vue.mergeProps(this.$attrs, this.$props, {
|
|
288
|
+
}, () => vue.h(DestylerRadio, vue.mergeProps(this.$attrs, this.$props, {
|
|
291
289
|
"ref": (el) => this.forwardRef(el),
|
|
292
290
|
"checked": this.checked,
|
|
293
291
|
"required": this.required,
|
|
@@ -297,9 +295,7 @@ const DestylerRadioGroupItem = vue.defineComponent({
|
|
|
297
295
|
"onFocus": () => {
|
|
298
296
|
this.handleFocus();
|
|
299
297
|
}
|
|
300
|
-
}),
|
|
301
|
-
default: () => this.$slots.default?.()
|
|
302
|
-
}));
|
|
298
|
+
}), () => this.$slots.default?.()));
|
|
303
299
|
}
|
|
304
300
|
});
|
|
305
301
|
|
|
@@ -330,9 +326,7 @@ const DestylerRadioGroupIndicator = vue.defineComponent({
|
|
|
330
326
|
"data-disabled": this.itemContext.disabled.value ? "" : void 0,
|
|
331
327
|
"as": this.$props.as,
|
|
332
328
|
"asChild": this.$props.asChild
|
|
333
|
-
},
|
|
334
|
-
default: () => this.$slots.default?.()
|
|
335
|
-
}) : null;
|
|
329
|
+
}, () => this.$slots.default?.()) : null;
|
|
336
330
|
}
|
|
337
331
|
});
|
|
338
332
|
|
package/dist/component.mjs
CHANGED
|
@@ -92,16 +92,14 @@ const DestylerRadioGroupRoot = defineComponent({
|
|
|
92
92
|
orientation: this.orientation,
|
|
93
93
|
dir: this.dir,
|
|
94
94
|
loop: this.loop
|
|
95
|
-
}, h(DestylerPrimitive, {
|
|
95
|
+
}, () => h(DestylerPrimitive, {
|
|
96
96
|
"role": "radiogroup",
|
|
97
97
|
"data-disabled": this.disabled ? "" : void 0,
|
|
98
98
|
"asChild": this.$props.asChild,
|
|
99
99
|
"aria-required": this.required,
|
|
100
100
|
"dir": this.dir,
|
|
101
101
|
"name": this.name
|
|
102
|
-
},
|
|
103
|
-
default: () => this.$slots.default?.()
|
|
104
|
-
}));
|
|
102
|
+
}, () => this.$slots.default?.()));
|
|
105
103
|
}
|
|
106
104
|
});
|
|
107
105
|
|
|
@@ -187,7 +185,7 @@ const DestylerRadio = defineComponent({
|
|
|
187
185
|
"onClick": withModifiers((event) => {
|
|
188
186
|
this.handleClick(event);
|
|
189
187
|
}, ["stop"])
|
|
190
|
-
}), [
|
|
188
|
+
}), () => [
|
|
191
189
|
this.$slots.default?.(),
|
|
192
190
|
this.isFormControl ? h("input", {
|
|
193
191
|
role: "radio",
|
|
@@ -285,7 +283,7 @@ const DestylerRadioGroupItem = defineComponent({
|
|
|
285
283
|
disabled: this.disabled,
|
|
286
284
|
focusable: !this.disabled,
|
|
287
285
|
active: this.checked
|
|
288
|
-
}, h(DestylerRadio, mergeProps(this.$attrs, this.$props, {
|
|
286
|
+
}, () => h(DestylerRadio, mergeProps(this.$attrs, this.$props, {
|
|
289
287
|
"ref": (el) => this.forwardRef(el),
|
|
290
288
|
"checked": this.checked,
|
|
291
289
|
"required": this.required,
|
|
@@ -295,9 +293,7 @@ const DestylerRadioGroupItem = defineComponent({
|
|
|
295
293
|
"onFocus": () => {
|
|
296
294
|
this.handleFocus();
|
|
297
295
|
}
|
|
298
|
-
}),
|
|
299
|
-
default: () => this.$slots.default?.()
|
|
300
|
-
}));
|
|
296
|
+
}), () => this.$slots.default?.()));
|
|
301
297
|
}
|
|
302
298
|
});
|
|
303
299
|
|
|
@@ -328,9 +324,7 @@ const DestylerRadioGroupIndicator = defineComponent({
|
|
|
328
324
|
"data-disabled": this.itemContext.disabled.value ? "" : void 0,
|
|
329
325
|
"as": this.$props.as,
|
|
330
326
|
"asChild": this.$props.asChild
|
|
331
|
-
},
|
|
332
|
-
default: () => this.$slots.default?.()
|
|
333
|
-
}) : null;
|
|
327
|
+
}, () => this.$slots.default?.()) : null;
|
|
334
328
|
}
|
|
335
329
|
});
|
|
336
330
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@destyler/radio",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.3",
|
|
4
5
|
"description": "unstyled radio component for vue",
|
|
5
6
|
"author": "Elone Hoo <elonehoo@gmail.com>",
|
|
6
7
|
"license": "MIT",
|
|
@@ -33,12 +34,12 @@
|
|
|
33
34
|
"vue": ">=3.3.4"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@vueuse/core": "^10.
|
|
37
|
-
"@destyler/
|
|
38
|
-
"@destyler/
|
|
39
|
-
"@destyler/composition": "0.0.
|
|
40
|
-
"@destyler/
|
|
41
|
-
"@destyler/
|
|
37
|
+
"@vueuse/core": "^10.9.0",
|
|
38
|
+
"@destyler/primitive": "0.0.3",
|
|
39
|
+
"@destyler/roving-focus": "0.0.3",
|
|
40
|
+
"@destyler/composition": "0.0.3",
|
|
41
|
+
"@destyler/directives": "0.0.3",
|
|
42
|
+
"@destyler/shared": "0.0.3"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
45
|
"clear": "rimraf ./dist",
|