@destyler/dynamic 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/index.cjs +30 -52
- package/dist/index.mjs +30 -52
- package/package.json +9 -8
package/dist/index.cjs
CHANGED
|
@@ -192,31 +192,23 @@ const DestylerDynamicRoot = vue.defineComponent({
|
|
|
192
192
|
};
|
|
193
193
|
},
|
|
194
194
|
render() {
|
|
195
|
-
return vue.h(collection.DestylerCollectionSlot, {}, {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
required: this.required,
|
|
213
|
-
disabled: this.disabled
|
|
214
|
-
}) : null
|
|
215
|
-
];
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
});
|
|
195
|
+
return vue.h(collection.DestylerCollectionSlot, {}, () => vue.h(primitive.DestylerPrimitive, {
|
|
196
|
+
"ref": (el) => this.forwardRef(el),
|
|
197
|
+
"dir": this.dir,
|
|
198
|
+
"as": this.$props.as,
|
|
199
|
+
"asChild": this.$props.asChild,
|
|
200
|
+
"data-invalid": this.isInvalidInput ? "" : void 0,
|
|
201
|
+
"data-disabled": this.disabled ? "" : void 0,
|
|
202
|
+
"data-focused": this.focused ? "" : void 0
|
|
203
|
+
}, () => [
|
|
204
|
+
this.$slots.default?.({ modelValue: this.modelValue }),
|
|
205
|
+
this.isFormControl && this.$props.name ? vue.h(component.DestylerVisuallyhiddenInput, {
|
|
206
|
+
name: this.$props.name,
|
|
207
|
+
value: this.modelValue,
|
|
208
|
+
required: this.required,
|
|
209
|
+
disabled: this.disabled
|
|
210
|
+
}) : null
|
|
211
|
+
]));
|
|
220
212
|
}
|
|
221
213
|
});
|
|
222
214
|
|
|
@@ -255,9 +247,7 @@ const DestylerDynamicClear = vue.defineComponent({
|
|
|
255
247
|
"onClick": () => {
|
|
256
248
|
this.handleCancel();
|
|
257
249
|
}
|
|
258
|
-
}),
|
|
259
|
-
default: () => this.$slots.default?.()
|
|
260
|
-
});
|
|
250
|
+
}), () => this.$slots.default?.());
|
|
261
251
|
}
|
|
262
252
|
});
|
|
263
253
|
|
|
@@ -373,9 +363,7 @@ const DestylerDynamicInput = vue.defineComponent({
|
|
|
373
363
|
else
|
|
374
364
|
this.context.onInputKeydown(event);
|
|
375
365
|
}
|
|
376
|
-
},
|
|
377
|
-
default: () => this.$slots.default?.()
|
|
378
|
-
}), [
|
|
366
|
+
}, () => this.$slots.default?.()), [
|
|
379
367
|
[directives.BindOnceDirective, { id: this.context.id?.value }]
|
|
380
368
|
]);
|
|
381
369
|
}
|
|
@@ -426,21 +414,15 @@ const DestylerDynamicItem = vue.defineComponent({
|
|
|
426
414
|
};
|
|
427
415
|
},
|
|
428
416
|
render() {
|
|
429
|
-
return vue.h(collection.DestylerCollectionItem, {}, {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
"data-state": this.isSelected ? "active" : "inactive"
|
|
439
|
-
}, {
|
|
440
|
-
default: () => this.$slots.default?.()
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
});
|
|
417
|
+
return vue.h(collection.DestylerCollectionItem, {}, () => vue.h(primitive.DestylerPrimitive, {
|
|
418
|
+
"ref": (el) => this.forwardRef(el),
|
|
419
|
+
"as": this.$props.as,
|
|
420
|
+
"asChild": this.$props.asChild,
|
|
421
|
+
"aria-labelledby": this.textId,
|
|
422
|
+
"aria-current": this.isSelected,
|
|
423
|
+
"data-disabled": this.disabled ? "" : void 0,
|
|
424
|
+
"data-state": this.isSelected ? "active" : "inactive"
|
|
425
|
+
}, () => this.$slots.default?.()));
|
|
444
426
|
}
|
|
445
427
|
});
|
|
446
428
|
|
|
@@ -488,9 +470,7 @@ const DestylerDynamicItemDelete = vue.defineComponent({
|
|
|
488
470
|
"onClick": () => {
|
|
489
471
|
this.handleDelete();
|
|
490
472
|
}
|
|
491
|
-
}),
|
|
492
|
-
default: () => this.$slots.default?.()
|
|
493
|
-
});
|
|
473
|
+
}), () => this.$slots.default?.());
|
|
494
474
|
}
|
|
495
475
|
});
|
|
496
476
|
|
|
@@ -517,9 +497,7 @@ const DestylerDynamicItemText = vue.defineComponent({
|
|
|
517
497
|
};
|
|
518
498
|
},
|
|
519
499
|
render() {
|
|
520
|
-
return vue.withDirectives(vue.h(primitive.DestylerPrimitive, this.$props,
|
|
521
|
-
default: () => this.$slots.default ? this.$slots.default?.() : this.itemContext.value.value
|
|
522
|
-
}), [
|
|
500
|
+
return vue.withDirectives(vue.h(primitive.DestylerPrimitive, this.$props, () => this.$slots.default ? this.$slots.default?.() : this.itemContext.value.value), [
|
|
523
501
|
[directives.BindOnceDirective, { id: this.itemContext.textId }]
|
|
524
502
|
]);
|
|
525
503
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -190,31 +190,23 @@ const DestylerDynamicRoot = defineComponent({
|
|
|
190
190
|
};
|
|
191
191
|
},
|
|
192
192
|
render() {
|
|
193
|
-
return h(DestylerCollectionSlot, {}, {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
required: this.required,
|
|
211
|
-
disabled: this.disabled
|
|
212
|
-
}) : null
|
|
213
|
-
];
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
});
|
|
193
|
+
return h(DestylerCollectionSlot, {}, () => h(DestylerPrimitive, {
|
|
194
|
+
"ref": (el) => this.forwardRef(el),
|
|
195
|
+
"dir": this.dir,
|
|
196
|
+
"as": this.$props.as,
|
|
197
|
+
"asChild": this.$props.asChild,
|
|
198
|
+
"data-invalid": this.isInvalidInput ? "" : void 0,
|
|
199
|
+
"data-disabled": this.disabled ? "" : void 0,
|
|
200
|
+
"data-focused": this.focused ? "" : void 0
|
|
201
|
+
}, () => [
|
|
202
|
+
this.$slots.default?.({ modelValue: this.modelValue }),
|
|
203
|
+
this.isFormControl && this.$props.name ? h(DestylerVisuallyhiddenInput, {
|
|
204
|
+
name: this.$props.name,
|
|
205
|
+
value: this.modelValue,
|
|
206
|
+
required: this.required,
|
|
207
|
+
disabled: this.disabled
|
|
208
|
+
}) : null
|
|
209
|
+
]));
|
|
218
210
|
}
|
|
219
211
|
});
|
|
220
212
|
|
|
@@ -253,9 +245,7 @@ const DestylerDynamicClear = defineComponent({
|
|
|
253
245
|
"onClick": () => {
|
|
254
246
|
this.handleCancel();
|
|
255
247
|
}
|
|
256
|
-
}),
|
|
257
|
-
default: () => this.$slots.default?.()
|
|
258
|
-
});
|
|
248
|
+
}), () => this.$slots.default?.());
|
|
259
249
|
}
|
|
260
250
|
});
|
|
261
251
|
|
|
@@ -371,9 +361,7 @@ const DestylerDynamicInput = defineComponent({
|
|
|
371
361
|
else
|
|
372
362
|
this.context.onInputKeydown(event);
|
|
373
363
|
}
|
|
374
|
-
},
|
|
375
|
-
default: () => this.$slots.default?.()
|
|
376
|
-
}), [
|
|
364
|
+
}, () => this.$slots.default?.()), [
|
|
377
365
|
[BindOnceDirective, { id: this.context.id?.value }]
|
|
378
366
|
]);
|
|
379
367
|
}
|
|
@@ -424,21 +412,15 @@ const DestylerDynamicItem = defineComponent({
|
|
|
424
412
|
};
|
|
425
413
|
},
|
|
426
414
|
render() {
|
|
427
|
-
return h(DestylerCollectionItem, {}, {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
"data-state": this.isSelected ? "active" : "inactive"
|
|
437
|
-
}, {
|
|
438
|
-
default: () => this.$slots.default?.()
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
});
|
|
415
|
+
return h(DestylerCollectionItem, {}, () => h(DestylerPrimitive, {
|
|
416
|
+
"ref": (el) => this.forwardRef(el),
|
|
417
|
+
"as": this.$props.as,
|
|
418
|
+
"asChild": this.$props.asChild,
|
|
419
|
+
"aria-labelledby": this.textId,
|
|
420
|
+
"aria-current": this.isSelected,
|
|
421
|
+
"data-disabled": this.disabled ? "" : void 0,
|
|
422
|
+
"data-state": this.isSelected ? "active" : "inactive"
|
|
423
|
+
}, () => this.$slots.default?.()));
|
|
442
424
|
}
|
|
443
425
|
});
|
|
444
426
|
|
|
@@ -486,9 +468,7 @@ const DestylerDynamicItemDelete = defineComponent({
|
|
|
486
468
|
"onClick": () => {
|
|
487
469
|
this.handleDelete();
|
|
488
470
|
}
|
|
489
|
-
}),
|
|
490
|
-
default: () => this.$slots.default?.()
|
|
491
|
-
});
|
|
471
|
+
}), () => this.$slots.default?.());
|
|
492
472
|
}
|
|
493
473
|
});
|
|
494
474
|
|
|
@@ -515,9 +495,7 @@ const DestylerDynamicItemText = defineComponent({
|
|
|
515
495
|
};
|
|
516
496
|
},
|
|
517
497
|
render() {
|
|
518
|
-
return withDirectives(h(DestylerPrimitive, this.$props,
|
|
519
|
-
default: () => this.$slots.default ? this.$slots.default?.() : this.itemContext.value.value
|
|
520
|
-
}), [
|
|
498
|
+
return withDirectives(h(DestylerPrimitive, this.$props, () => this.$slots.default ? this.$slots.default?.() : this.itemContext.value.value), [
|
|
521
499
|
[BindOnceDirective, { id: this.itemContext.textId }]
|
|
522
500
|
]);
|
|
523
501
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@destyler/dynamic",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.3",
|
|
4
5
|
"description": "unstyled dynamic component for vue",
|
|
5
6
|
"author": "Elone Hoo <elonehoo@gmail.com>",
|
|
6
7
|
"license": "MIT",
|
|
@@ -33,13 +34,13 @@
|
|
|
33
34
|
"vue": ">=3.3.4"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@vueuse/core": "^10.
|
|
37
|
-
"@destyler/
|
|
38
|
-
"@destyler/
|
|
39
|
-
"@destyler/
|
|
40
|
-
"@destyler/
|
|
41
|
-
"@destyler/
|
|
42
|
-
"@destyler/
|
|
37
|
+
"@vueuse/core": "^10.9.0",
|
|
38
|
+
"@destyler/composition": "0.0.3",
|
|
39
|
+
"@destyler/directives": "0.0.3",
|
|
40
|
+
"@destyler/primitive": "0.0.3",
|
|
41
|
+
"@destyler/collection": "0.0.3",
|
|
42
|
+
"@destyler/shared": "0.0.3",
|
|
43
|
+
"@destyler/visually-hidden": "0.0.3"
|
|
43
44
|
},
|
|
44
45
|
"scripts": {
|
|
45
46
|
"clear": "rimraf ./dist",
|