@destyler/dynamic 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/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
- default: () => {
197
- return vue.h(primitive.DestylerPrimitive, {
198
- "ref": (el) => this.forwardRef(el),
199
- "dir": this.dir,
200
- "as": this.$props.as,
201
- "asChild": this.$props.asChild,
202
- "data-invalid": this.isInvalidInput ? "" : void 0,
203
- "data-disabled": this.disabled ? "" : void 0,
204
- "data-focused": this.focused ? "" : void 0
205
- }, {
206
- default: () => {
207
- return [
208
- this.$slots.default?.({ modelValue: this.modelValue }),
209
- this.isFormControl && this.$props.name ? vue.h(component.DestylerVisuallyhiddenInput, {
210
- name: this.$props.name,
211
- value: this.modelValue,
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
- default: () => {
431
- return vue.h(primitive.DestylerPrimitive, {
432
- "ref": (el) => this.forwardRef(el),
433
- "as": this.$props.as,
434
- "asChild": this.$props.asChild,
435
- "aria-labelledby": this.textId,
436
- "aria-current": this.isSelected,
437
- "data-disabled": this.disabled ? "" : void 0,
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
- default: () => {
195
- return h(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
- default: () => {
205
- return [
206
- this.$slots.default?.({ modelValue: this.modelValue }),
207
- this.isFormControl && this.$props.name ? h(DestylerVisuallyhiddenInput, {
208
- name: this.$props.name,
209
- value: this.modelValue,
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
- default: () => {
429
- return h(DestylerPrimitive, {
430
- "ref": (el) => this.forwardRef(el),
431
- "as": this.$props.as,
432
- "asChild": this.$props.asChild,
433
- "aria-labelledby": this.textId,
434
- "aria-current": this.isSelected,
435
- "data-disabled": this.disabled ? "" : void 0,
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
- "version": "0.0.2",
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.7.2",
37
- "@destyler/collection": "0.0.2",
38
- "@destyler/composition": "0.0.2",
39
- "@destyler/primitive": "0.0.2",
40
- "@destyler/visually-hidden": "0.0.2",
41
- "@destyler/directives": "0.0.2",
42
- "@destyler/shared": "0.0.2"
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",