tiddy 2.0.0 → 2.0.2

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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import * as vue35 from "vue";
2
- import { AllowedComponentProps, CSSProperties, Component, ComputedRef, ExtractPublicPropTypes, PropType, Raw, Slot } from "vue";
1
+ import * as vue30 from "vue";
2
+ import { AllowedComponentProps, CSSProperties, Component, ComputedRef, DefineComponent, ExtractPublicPropTypes, PropType, Raw, Slot } from "vue";
3
3
  import * as element_plus0 from "element-plus";
4
- import { DialogInstance, FormInstance, FormItemProps, FormItemRule, FormProps, TableColumnInstance, TableInstance, dialogProps } from "element-plus";
4
+ import { DialogInstance, DialogProps, FormInstance, FormItemProps, FormItemRule, FormProps, TableColumnInstance, TableInstance } from "element-plus";
5
5
 
6
6
  //#region src/types.d.ts
7
7
  type OrArray<T> = T | T[];
@@ -124,6 +124,9 @@ declare const widgetFieldPropsDef: {
124
124
  default: undefined;
125
125
  };
126
126
  };
127
+ type PropsOf<C> = C extends DefineComponent<infer P, any, any, any, any> ? P : C extends (new (...args: any) => any) ? InstanceType<C> extends {
128
+ $props: infer P;
129
+ } ? P : Record<string, any> : Record<string, any>;
127
130
  type TdWidgetFieldProps = ExtractPublicPropTypes<typeof widgetFieldPropsDef> & AllowedComponentProps & Record<PropertyKey, any>;
128
131
  declare const arrayFieldPropsDef: {
129
132
  prop: {
@@ -237,12 +240,19 @@ declare const tdformItemProps: {
237
240
  };
238
241
  };
239
242
  type TdFormItemProps = ExtractPublicPropTypes<typeof tdformItemProps> & Partial<FormItemProps>;
243
+ declare function widget<T>(p: {
244
+ component: T;
245
+ widget?: PropsOf<T>;
246
+ }): {
247
+ component: T;
248
+ widget?: PropsOf<T>;
249
+ };
240
250
  //#endregion
241
251
  //#region src/form/form.vue.d.ts
242
252
  declare function reValidateErrorFields(): void;
243
253
  declare const expose$1: {
244
254
  reValidateErrorFields: typeof reValidateErrorFields;
245
- model: vue35.ComputedRef<unknown>;
255
+ model: vue30.ComputedRef<unknown>;
246
256
  };
247
257
  type __TdFormExpose = typeof expose$1 & FormInstance;
248
258
  declare var __VLS_11$1: {}, __VLS_13$1: {}, __VLS_19$1: {};
@@ -253,25 +263,25 @@ type __VLS_Slots$3 = {} & {
253
263
  } & {
254
264
  suffix?: (props: typeof __VLS_19$1) => any;
255
265
  };
256
- declare const __VLS_base$3: vue35.DefineComponent<vue35.ExtractPropTypes<{
266
+ declare const __VLS_base$3: vue30.DefineComponent<vue30.ExtractPropTypes<{
257
267
  fields: {
258
- type: vue35.PropType<TdFormFieldProps[]>;
268
+ type: vue30.PropType<TdFormFieldProps[]>;
259
269
  default: () => never[];
260
270
  };
261
271
  item: {
262
- type: vue35.PropType<element_plus0.FormItemProps>;
272
+ type: vue30.PropType<element_plus0.FormItemProps>;
263
273
  default: () => {};
264
274
  };
265
- }>, __TdFormExpose, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {
275
+ }>, __TdFormExpose, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {
266
276
  validate: () => any;
267
277
  submit: (data: any) => any;
268
- }, string, vue35.PublicProps, Readonly<vue35.ExtractPropTypes<{
278
+ }, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
269
279
  fields: {
270
- type: vue35.PropType<TdFormFieldProps[]>;
280
+ type: vue30.PropType<TdFormFieldProps[]>;
271
281
  default: () => never[];
272
282
  };
273
283
  item: {
274
- type: vue35.PropType<element_plus0.FormItemProps>;
284
+ type: vue30.PropType<element_plus0.FormItemProps>;
275
285
  default: () => {};
276
286
  };
277
287
  }>> & Readonly<{
@@ -280,7 +290,7 @@ declare const __VLS_base$3: vue35.DefineComponent<vue35.ExtractPropTypes<{
280
290
  }>, {
281
291
  fields: TdFormFieldProps[];
282
292
  item: element_plus0.FormItemProps;
283
- }, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any>;
293
+ }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
284
294
  declare const __VLS_export$5: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
285
295
  declare const _default$1: typeof __VLS_export$5;
286
296
  type __VLS_WithSlots$3<T, S> = T & {
@@ -292,37 +302,37 @@ type __VLS_WithSlots$3<T, S> = T & {
292
302
  //#region src/form/form-item.vue.d.ts
293
303
  declare var __VLS_10: string | number, __VLS_11: any;
294
304
  type __VLS_Slots$2 = {} & { [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any };
295
- declare const __VLS_base$2: vue35.DefineComponent<vue35.ExtractPropTypes<{
305
+ declare const __VLS_base$2: vue30.DefineComponent<vue30.ExtractPropTypes<{
296
306
  messageLabel: {
297
- type: vue35.PropType<string | vue35.ComputedRef<string>>;
307
+ type: vue30.PropType<string | vue30.ComputedRef<string>>;
298
308
  default: string;
299
309
  };
300
310
  formatMessage: {
301
- type: vue35.PropType<AnyFunction>;
311
+ type: vue30.PropType<AnyFunction>;
302
312
  default: null;
303
313
  };
304
314
  hideRequiredAsterisk: {
305
- type: vue35.PropType<boolean>;
315
+ type: vue30.PropType<boolean>;
306
316
  default: boolean;
307
317
  };
308
- }>, {}, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<vue35.ExtractPropTypes<{
318
+ }>, {}, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
309
319
  messageLabel: {
310
- type: vue35.PropType<string | vue35.ComputedRef<string>>;
320
+ type: vue30.PropType<string | vue30.ComputedRef<string>>;
311
321
  default: string;
312
322
  };
313
323
  formatMessage: {
314
- type: vue35.PropType<AnyFunction>;
324
+ type: vue30.PropType<AnyFunction>;
315
325
  default: null;
316
326
  };
317
327
  hideRequiredAsterisk: {
318
- type: vue35.PropType<boolean>;
328
+ type: vue30.PropType<boolean>;
319
329
  default: boolean;
320
330
  };
321
331
  }>> & Readonly<{}>, {
322
- messageLabel: string | vue35.ComputedRef<string>;
332
+ messageLabel: string | vue30.ComputedRef<string>;
323
333
  formatMessage: AnyFunction;
324
334
  hideRequiredAsterisk: boolean;
325
- }, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any>;
335
+ }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
326
336
  declare const __VLS_export$4: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
327
337
  declare const _default$3: typeof __VLS_export$4;
328
338
  type __VLS_WithSlots$2<T, S> = T & {
@@ -332,7 +342,7 @@ type __VLS_WithSlots$2<T, S> = T & {
332
342
  };
333
343
  //#endregion
334
344
  //#region src/form/form-field.vue.d.ts
335
- declare const __VLS_export$3: vue35.DefineComponent<{}, {}, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any>;
345
+ declare const __VLS_export$3: vue30.DefineComponent<{}, {}, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
336
346
  declare const _default$2: typeof __VLS_export$3;
337
347
  //#endregion
338
348
  //#region src/form/index.d.ts
@@ -372,19 +382,19 @@ type __VLS_Slots$1 = {} & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof
372
382
  } & {
373
383
  after?: (props: typeof __VLS_19) => any;
374
384
  };
375
- declare const __VLS_base$1: vue35.DefineComponent<vue35.ExtractPropTypes<{
385
+ declare const __VLS_base$1: vue30.DefineComponent<vue30.ExtractPropTypes<{
376
386
  columns: {
377
- type: vue35.PropType<TdTableColumnProps[]>;
387
+ type: vue30.PropType<TdTableColumnProps[]>;
378
388
  default: () => never[];
379
389
  };
380
- }>, TableInstance, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<vue35.ExtractPropTypes<{
390
+ }>, TableInstance, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
381
391
  columns: {
382
- type: vue35.PropType<TdTableColumnProps[]>;
392
+ type: vue30.PropType<TdTableColumnProps[]>;
383
393
  default: () => never[];
384
394
  };
385
395
  }>> & Readonly<{}>, {
386
396
  columns: TdTableColumnProps[];
387
- }, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any>;
397
+ }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
388
398
  declare const __VLS_export$2: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
389
399
  declare const _default$4: typeof __VLS_export$2;
390
400
  type __VLS_WithSlots$1<T, S> = T & {
@@ -394,37 +404,37 @@ type __VLS_WithSlots$1<T, S> = T & {
394
404
  };
395
405
  //#endregion
396
406
  //#region src/table/table-col.vue.d.ts
397
- declare const __VLS_export$1: vue35.DefineComponent<vue35.ExtractPropTypes<{
407
+ declare const __VLS_export$1: vue30.DefineComponent<vue30.ExtractPropTypes<{
398
408
  slots: {
399
- type: vue35.PropType<OrArray<SlotDef>>;
409
+ type: vue30.PropType<OrArray<SlotDef>>;
400
410
  default: () => null;
401
411
  };
402
412
  columns: {
403
- type: vue35.PropType<any[]>;
413
+ type: vue30.PropType<any[]>;
404
414
  default: () => never[];
405
415
  };
406
416
  transform: {
407
- type: vue35.PropType<AnyFunction[]>;
417
+ type: vue30.PropType<AnyFunction[]>;
408
418
  default: () => never[];
409
419
  };
410
- }>, {}, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<vue35.ExtractPropTypes<{
420
+ }>, {}, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
411
421
  slots: {
412
- type: vue35.PropType<OrArray<SlotDef>>;
422
+ type: vue30.PropType<OrArray<SlotDef>>;
413
423
  default: () => null;
414
424
  };
415
425
  columns: {
416
- type: vue35.PropType<any[]>;
426
+ type: vue30.PropType<any[]>;
417
427
  default: () => never[];
418
428
  };
419
429
  transform: {
420
- type: vue35.PropType<AnyFunction[]>;
430
+ type: vue30.PropType<AnyFunction[]>;
421
431
  default: () => never[];
422
432
  };
423
433
  }>> & Readonly<{}>, {
424
434
  slots: OrArray<SlotDef>;
425
435
  columns: any[];
426
436
  transform: AnyFunction[];
427
- }, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any>;
437
+ }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
428
438
  declare const _default$5: typeof __VLS_export$1;
429
439
  //#endregion
430
440
  //#region src/table/index.d.ts
@@ -432,143 +442,10 @@ type Instance$1 = InstanceType<typeof _default$4>;
432
442
  type TdTableInstance = Instance$1 & Omit<TableInstance, keyof Instance$1>;
433
443
  //#endregion
434
444
  //#region src/dialog/utils.d.ts
435
- declare const dialogPropsDef: {
436
- appendToBody?: BooleanConstructor | undefined;
437
- appendTo?: ({
438
- readonly type: vue35.PropType<string | HTMLElement>;
439
- readonly required: false;
440
- readonly validator: ((val: unknown) => boolean) | undefined;
441
- __epPropKey: true;
442
- } & {
443
- readonly default: "body";
444
- }) | undefined;
445
- beforeClose?: {
446
- readonly type: vue35.PropType<element_plus0.DialogBeforeCloseFn>;
447
- readonly required: false;
448
- readonly validator: ((val: unknown) => boolean) | undefined;
449
- __epPropKey: true;
450
- } | undefined;
451
- destroyOnClose?: BooleanConstructor | undefined;
452
- closeOnClickModal?: ({
453
- readonly type: vue35.PropType<boolean>;
454
- readonly required: false;
455
- readonly validator: ((val: unknown) => boolean) | undefined;
456
- __epPropKey: true;
457
- } & {
458
- readonly default: true;
459
- }) | undefined;
460
- closeOnPressEscape?: ({
461
- readonly type: vue35.PropType<boolean>;
462
- readonly required: false;
463
- readonly validator: ((val: unknown) => boolean) | undefined;
464
- __epPropKey: true;
465
- } & {
466
- readonly default: true;
467
- }) | undefined;
468
- lockScroll?: ({
469
- readonly type: vue35.PropType<boolean>;
470
- readonly required: false;
471
- readonly validator: ((val: unknown) => boolean) | undefined;
472
- __epPropKey: true;
473
- } & {
474
- readonly default: true;
475
- }) | undefined;
476
- modal?: ({
477
- readonly type: vue35.PropType<boolean>;
478
- readonly required: false;
479
- readonly validator: ((val: unknown) => boolean) | undefined;
480
- __epPropKey: true;
481
- } & {
482
- readonly default: true;
483
- }) | undefined;
484
- openDelay?: ({
485
- readonly type: vue35.PropType<number>;
486
- readonly required: false;
487
- readonly validator: ((val: unknown) => boolean) | undefined;
488
- __epPropKey: true;
489
- } & {
490
- readonly default: 0;
491
- }) | undefined;
492
- closeDelay?: ({
493
- readonly type: vue35.PropType<number>;
494
- readonly required: false;
495
- readonly validator: ((val: unknown) => boolean) | undefined;
496
- __epPropKey: true;
497
- } & {
498
- readonly default: 0;
499
- }) | undefined;
500
- top?: {
501
- readonly type: vue35.PropType<string>;
502
- readonly required: false;
503
- readonly validator: ((val: unknown) => boolean) | undefined;
504
- __epPropKey: true;
505
- } | undefined;
506
- modelValue?: BooleanConstructor | undefined;
507
- modalClass?: StringConstructor | undefined;
508
- headerClass?: StringConstructor | undefined;
509
- bodyClass?: StringConstructor | undefined;
510
- footerClass?: StringConstructor | undefined;
511
- width?: {
512
- readonly type: vue35.PropType<string | number>;
513
- readonly required: false;
514
- readonly validator: ((val: unknown) => boolean) | undefined;
515
- __epPropKey: true;
516
- } | undefined;
517
- zIndex?: {
518
- readonly type: vue35.PropType<number>;
519
- readonly required: false;
520
- readonly validator: ((val: unknown) => boolean) | undefined;
521
- __epPropKey: true;
522
- } | undefined;
523
- trapFocus?: BooleanConstructor | undefined;
524
- headerAriaLevel?: ({
525
- readonly type: vue35.PropType<string>;
526
- readonly required: false;
527
- readonly validator: ((val: unknown) => boolean) | undefined;
528
- __epPropKey: true;
529
- } & {
530
- readonly default: "2";
531
- }) | undefined;
532
- center?: BooleanConstructor | undefined;
533
- alignCenter?: BooleanConstructor | undefined;
534
- closeIcon?: {
535
- readonly type: vue35.PropType<string | vue35.Component>;
536
- readonly required: false;
537
- readonly validator: ((val: unknown) => boolean) | undefined;
538
- __epPropKey: true;
539
- } | undefined;
540
- draggable?: BooleanConstructor | undefined;
541
- overflow?: BooleanConstructor | undefined;
542
- fullscreen?: BooleanConstructor | undefined;
543
- showClose?: ({
544
- readonly type: vue35.PropType<boolean>;
545
- readonly required: false;
546
- readonly validator: ((val: unknown) => boolean) | undefined;
547
- __epPropKey: true;
548
- } & {
549
- readonly default: true;
550
- }) | undefined;
551
- title?: ({
552
- readonly type: vue35.PropType<string>;
553
- readonly required: false;
554
- readonly validator: ((val: unknown) => boolean) | undefined;
555
- __epPropKey: true;
556
- } & {
557
- readonly default: "";
558
- }) | undefined;
559
- ariaLevel?: ({
560
- readonly type: vue35.PropType<string>;
561
- readonly required: false;
562
- readonly validator: ((val: unknown) => boolean) | undefined;
563
- __epPropKey: true;
564
- } & {
565
- readonly default: "2";
566
- }) | undefined;
567
- };
568
- type TdDialogProps = ExtractPublicPropTypes<Omit<typeof dialogProps, "modelValue">>;
445
+ type TdDialogProps = Omit<DialogProps, "modelValue">;
569
446
  //#endregion
570
447
  //#region src/dialog/dialog.vue.d.ts
571
- declare function open(options?: TdDialogProps): {
448
+ declare function open(options?: Partial<TdDialogProps>): {
572
449
  promise: Promise<any>;
573
450
  close: typeof close;
574
451
  };
@@ -590,7 +467,7 @@ declare var __VLS_13: "default" | "title" | "header" | "footer", __VLS_14: {
590
467
  titleClass?: string | undefined;
591
468
  };
592
469
  type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any };
593
- declare const __VLS_base: vue35.DefineComponent<{}, __TdDialogExpose, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any>;
470
+ declare const __VLS_base: vue30.DefineComponent<{}, __TdDialogExpose, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
594
471
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
595
472
  declare const _default: typeof __VLS_export;
596
473
  type __VLS_WithSlots<T, S> = T & {
@@ -604,13 +481,13 @@ type Instance = InstanceType<typeof _default>;
604
481
  type TdDialogInstance = Instance & Omit<DialogInstance, keyof Instance & string>;
605
482
  //#endregion
606
483
  //#region src/hooks/use-reuse.d.ts
607
- declare function useReuse(): (vue35.DefineComponent<{}, () => null, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any> | vue35.DefineComponent<{}, () => vue35.VNode<vue35.RendererNode, vue35.RendererElement, {
484
+ declare function useReuse(): (vue30.DefineComponent<{}, () => null, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any> | vue30.DefineComponent<{}, () => vue30.VNode<vue30.RendererNode, vue30.RendererElement, {
608
485
  [key: string]: any;
609
- }>[] | undefined, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue35.ComponentProvideOptions, true, {}, any> | vue35.ComputedRef<Readonly<{
610
- [name: string]: vue35.Slot<any> | undefined;
486
+ }>[] | undefined, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any> | vue30.ComputedRef<Readonly<{
487
+ [name: string]: vue30.Slot<any> | undefined;
611
488
  }>>)[];
612
489
  //#endregion
613
490
  //#region src/utils/index.d.ts
614
491
  declare function getKey(obj: any): string;
615
492
  //#endregion
616
- export { _default as TdDialog, TdDialogInstance, type TdDialogProps, _default$1 as TdForm, _default$2 as TdFormField, type TdFormFieldProps, TdFormInstance, _default$3 as TdFormItem, TdFormItemInstance, type TdFormProps, _default$4 as TdTable, _default$5 as TdTableCol, type TdTableColumnProps, TdTableInstance, type TdTableProps, dialogPropsDef, formPropsDef, getKey, tableColumnPropsDef, tablePropsDef, useReuse };
493
+ export { _default as TdDialog, TdDialogInstance, type TdDialogProps, _default$1 as TdForm, _default$2 as TdFormField, type TdFormFieldProps, TdFormInstance, _default$3 as TdFormItem, TdFormItemInstance, type TdFormProps, _default$4 as TdTable, _default$5 as TdTableCol, type TdTableColumnProps, TdTableInstance, type TdTableProps, formPropsDef, getKey, tableColumnPropsDef, tablePropsDef, useReuse, widget };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, isRef, markRaw, mergeProps, normalizeClass, normalizeProps, normalizeStyle, onMounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toRaw, toRef, unref, useAttrs, useSlots, useTemplateRef, withCtx, withModifiers } from "vue";
2
- import { ElDialog, ElForm, ElFormItem, ElTable, ElTableColumn, dialogProps, useNamespace } from "element-plus";
2
+ import { ElDialog, ElForm, ElFormItem, ElTable, ElTableColumn, useNamespace } from "element-plus";
3
3
  import { cut, ensureArray, getDeepValue, groupBy, isFunction, isNullOrUndef, isObject, isString, pick, setDeepValue, toCamelCase, toKebabCase, uid } from "yatter";
4
4
 
5
5
  //#region src/utils/index.ts
@@ -213,6 +213,9 @@ const tdformItemProps = {
213
213
  default: false
214
214
  }
215
215
  };
216
+ function widget(p) {
217
+ return p;
218
+ }
216
219
 
217
220
  //#endregion
218
221
  //#region src/form/form-item.vue?vue&type=script&setup=true&lang.ts
@@ -226,7 +229,7 @@ var form_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
226
229
  const formCtx = inject(formCtxKey);
227
230
  const attrs = useAttrs();
228
231
  const itemAttr = computed(() => {
229
- const res = { ...formCtx.itemOption };
232
+ const res = { ...formCtx?.itemOption };
230
233
  for (const [k, v] of Object.entries(attrs)) Reflect.set(res, k, isRef(v) ? v.value : v);
231
234
  return res;
232
235
  });
@@ -858,16 +861,11 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
858
861
  //#region src/table/table.vue
859
862
  var table_default = table_vue_vue_type_script_setup_true_lang_default;
860
863
 
861
- //#endregion
862
- //#region src/dialog/utils.ts
863
- const dialogPropsDef = { ...cut(dialogProps, ["modelValue"]) };
864
-
865
864
  //#endregion
866
865
  //#region src/dialog/dialog.vue?vue&type=script&setup=true&lang.ts
867
866
  var dialog_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
868
867
  name: "TdDialog",
869
868
  __name: "dialog",
870
- props: dialogPropsDef,
871
869
  setup(__props, { expose: __expose }) {
872
870
  const propsFromApi = ref({});
873
871
  const visible = ref(false);
@@ -875,7 +873,7 @@ var dialog_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
875
873
  const dialogRef = useTemplateRef("dialog");
876
874
  const attrs = useAttrs();
877
875
  const subProps = computed(() => ({
878
- ...attrs,
876
+ ...cut(attrs, ["model-value"]),
879
877
  ...propsFromApi.value
880
878
  }));
881
879
  const slots = useSlots();
@@ -977,4 +975,4 @@ function useReuse() {
977
975
  }
978
976
 
979
977
  //#endregion
980
- export { dialog_default as TdDialog, form_default as TdForm, form_field_default as TdFormField, form_item_default as TdFormItem, table_default as TdTable, table_col_default as TdTableCol, dialogPropsDef, formPropsDef, getKey, tableColumnPropsDef, tablePropsDef, useReuse };
978
+ export { dialog_default as TdDialog, form_default as TdForm, form_field_default as TdFormField, form_item_default as TdFormItem, table_default as TdTable, table_col_default as TdTableCol, formPropsDef, getKey, tableColumnPropsDef, tablePropsDef, useReuse, widget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiddy",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "packageManager": "pnpm@10.11.0",
5
5
  "description": "A set of Vue 3 components based on element-plus",
6
6
  "type": "module",