cosey 0.6.34 → 0.7.1

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.
Files changed (67) hide show
  1. package/components/components.d.ts +3 -1
  2. package/components/components.js +1 -0
  3. package/components/editor/components/select.vue.d.ts +2 -2
  4. package/components/editor/editor.d.ts +2 -2
  5. package/components/editor/index.d.ts +6 -6
  6. package/components/field/components/remote-select/remote-select.d.ts +1 -1
  7. package/components/field/field.api.d.ts +1 -1
  8. package/components/form/form-item.api.d.ts +1 -1
  9. package/components/form/index.d.ts +1 -1
  10. package/components/form-drawer/form-drawer.vue.d.ts +6 -6
  11. package/components/form-drawer/index.d.ts +17 -17
  12. package/components/form-list/form-list.api.d.ts +1 -1
  13. package/components/form-list/index.d.ts +4 -4
  14. package/components/form-query/form-query.d.ts +2 -2
  15. package/components/form-query/index.d.ts +6 -6
  16. package/components/image-card/image-card.d.ts +2 -2
  17. package/components/image-card/index.d.ts +6 -6
  18. package/components/index.d.ts +1 -0
  19. package/components/index.js +3 -1
  20. package/components/input-number-range/index.d.ts +5 -5
  21. package/components/input-number-range/input-number-range.vue.d.ts +2 -2
  22. package/components/remote-select/index.d.ts +45 -45
  23. package/components/remote-select/remote-select.api.d.ts +1 -1
  24. package/components/remote-select/remote-select.d.ts +16 -16
  25. package/components/ribbon/index.d.ts +100 -0
  26. package/components/ribbon/index.js +8 -0
  27. package/components/ribbon/ribbon.api.d.ts +34 -0
  28. package/components/ribbon/ribbon.api.js +28 -0
  29. package/components/ribbon/ribbon.d.ts +53 -0
  30. package/components/ribbon/ribbon.js +53 -0
  31. package/components/ribbon/ribbon.style.d.ts +4 -0
  32. package/components/ribbon/ribbon.style.js +121 -0
  33. package/components/snug-menu/index.d.ts +5 -5
  34. package/components/snug-menu/snug-menu-item.vue.js +9 -3
  35. package/components/snug-menu/snug-menu.vue.d.ts +2 -2
  36. package/components/table/index.d.ts +40 -40
  37. package/components/table/index.js +1 -1
  38. package/components/table/table-column/renderer.d.ts +1 -1
  39. package/components/table/table-column/table-column.api.d.ts +131 -0
  40. package/components/table/table-column/table-column.api.js +33 -0
  41. package/components/table/table-column/table-column.d.ts +100 -127
  42. package/components/table/table-column/table-column.js +103 -30
  43. package/components/table/table-column-editor/item.vue.d.ts +1 -1
  44. package/components/table/table-column-editor/list.vue.d.ts +1 -1
  45. package/components/table/table-column-editor/table-column-editor.d.ts +1 -1
  46. package/components/table/table-column-editor/table-column-editor.vue.d.ts +1 -1
  47. package/components/table/table-export/item.vue.d.ts +1 -1
  48. package/components/table/table-export/list.vue.d.ts +1 -1
  49. package/components/table/table-export/table-export.d.ts +1 -1
  50. package/components/table/table-export/table-export.vue.d.ts +6 -6
  51. package/components/table/table-query/table-query.vue.d.ts +2 -2
  52. package/components/table/table.d.ts +8 -8
  53. package/components/table/table.vue.d.ts +23 -23
  54. package/components/table/table.vue.js +2 -2
  55. package/components/table-action/item.d.ts +3 -3
  56. package/components/transition-group/index.d.ts +3 -3
  57. package/components/transition-group/transition-group.d.ts +1 -1
  58. package/components/upload/index.d.ts +6 -6
  59. package/components/upload/upload.d.ts +2 -2
  60. package/layout/layout-menu/layout-menu.vue.js +7 -1
  61. package/layout/layout-menu/style/index.js +4 -0
  62. package/layout/layout-user-menu/style/index.js +1 -1
  63. package/package.json +1 -1
  64. package/utils/excel/index.d.ts +1 -1
  65. package/utils/excel/type.d.ts +1 -1
  66. package/components/table/table-column/table-column.vue.d.ts +0 -104
  67. package/components/table/table-column/table-column.vue.js +0 -106
@@ -328,7 +328,7 @@ declare const _RemoteSelect: {
328
328
  };
329
329
  tagType: {
330
330
  default: string;
331
- type: import("vue").PropType<"warning" | "success" | "primary" | "info" | "danger">;
331
+ type: import("vue").PropType<"primary" | "success" | "warning" | "info" | "danger">;
332
332
  required: false;
333
333
  validator: ((val: unknown) => boolean) | undefined;
334
334
  __epPropKey: true;
@@ -404,9 +404,9 @@ declare const _RemoteSelect: {
404
404
  }>> & Readonly<{
405
405
  onClear?: (() => any) | undefined;
406
406
  onBlur?: ((evt: FocusEvent) => any) | undefined;
407
- "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
408
407
  onChange?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
409
408
  onFocus?: ((evt: FocusEvent) => any) | undefined;
409
+ "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
410
410
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
411
411
  "onRemove-tag"?: ((val: unknown) => any) | undefined;
412
412
  "onPopup-scroll"?: ((args_0: {
@@ -429,32 +429,32 @@ declare const _RemoteSelect: {
429
429
  offset: number;
430
430
  multiple: boolean;
431
431
  disabled: boolean;
432
+ teleported: boolean;
432
433
  immediate: boolean;
433
- valueKey: string;
434
- modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
435
434
  placement: any;
435
+ loading: boolean;
436
+ pagination: boolean | import("element-plus").PaginationProps;
437
+ modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
436
438
  popperClass: string;
437
- teleported: boolean;
439
+ validateEvent: boolean;
440
+ tabindex: string | number;
441
+ showArrow: boolean;
442
+ persistent: boolean;
443
+ effect: import("element-plus").PopperEffect;
444
+ fallbackPlacements: Placement[];
445
+ popperOptions: any;
446
+ valueKey: string;
438
447
  fitInputWidth: boolean;
439
448
  autocomplete: string;
440
449
  clearable: boolean;
441
- tabindex: string | number;
442
- validateEvent: boolean;
443
- loading: boolean;
444
450
  valueOnClear: string | number | boolean | Function | null;
445
451
  filterable: boolean;
446
452
  collapseTags: boolean;
447
453
  maxCollapseTags: number;
448
454
  collapseTagsTooltip: boolean;
449
- fallbackPlacements: Placement[];
450
- effect: import("element-plus").PopperEffect;
451
- tagType: "warning" | "success" | "primary" | "info" | "danger";
455
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
452
456
  tagEffect: "dark" | "light" | "plain";
453
- persistent: boolean;
454
- pagination: boolean | import("element-plus").PaginationProps;
455
457
  automaticDropdown: boolean;
456
- popperOptions: any;
457
- showArrow: boolean;
458
458
  allowCreate: boolean;
459
459
  remote: boolean;
460
460
  multipleLimit: number;
@@ -796,7 +796,7 @@ declare const _RemoteSelect: {
796
796
  };
797
797
  tagType: {
798
798
  default: string;
799
- type: import("vue").PropType<"warning" | "success" | "primary" | "info" | "danger">;
799
+ type: import("vue").PropType<"primary" | "success" | "warning" | "info" | "danger">;
800
800
  required: false;
801
801
  validator: ((val: unknown) => boolean) | undefined;
802
802
  __epPropKey: true;
@@ -872,9 +872,9 @@ declare const _RemoteSelect: {
872
872
  }>> & Readonly<{
873
873
  onClear?: (() => any) | undefined;
874
874
  onBlur?: ((evt: FocusEvent) => any) | undefined;
875
- "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
876
875
  onChange?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
877
876
  onFocus?: ((evt: FocusEvent) => any) | undefined;
877
+ "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
878
878
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
879
879
  "onRemove-tag"?: ((val: unknown) => any) | undefined;
880
880
  "onPopup-scroll"?: ((args_0: {
@@ -885,32 +885,32 @@ declare const _RemoteSelect: {
885
885
  offset: number;
886
886
  multiple: boolean;
887
887
  disabled: boolean;
888
+ teleported: boolean;
888
889
  immediate: boolean;
889
- valueKey: string;
890
- modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
891
890
  placement: any;
891
+ loading: boolean;
892
+ pagination: boolean | import("element-plus").PaginationProps;
893
+ modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
892
894
  popperClass: string;
893
- teleported: boolean;
895
+ validateEvent: boolean;
896
+ tabindex: string | number;
897
+ showArrow: boolean;
898
+ persistent: boolean;
899
+ effect: import("element-plus").PopperEffect;
900
+ fallbackPlacements: Placement[];
901
+ popperOptions: any;
902
+ valueKey: string;
894
903
  fitInputWidth: boolean;
895
904
  autocomplete: string;
896
905
  clearable: boolean;
897
- tabindex: string | number;
898
- validateEvent: boolean;
899
- loading: boolean;
900
906
  valueOnClear: string | number | boolean | Function | null;
901
907
  filterable: boolean;
902
908
  collapseTags: boolean;
903
909
  maxCollapseTags: number;
904
910
  collapseTagsTooltip: boolean;
905
- fallbackPlacements: Placement[];
906
- effect: import("element-plus").PopperEffect;
907
- tagType: "warning" | "success" | "primary" | "info" | "danger";
911
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
908
912
  tagEffect: "dark" | "light" | "plain";
909
- persistent: boolean;
910
- pagination: boolean | import("element-plus").PaginationProps;
911
913
  automaticDropdown: boolean;
912
- popperOptions: any;
913
- showArrow: boolean;
914
914
  allowCreate: boolean;
915
915
  remote: boolean;
916
916
  multipleLimit: number;
@@ -1107,7 +1107,7 @@ declare const _RemoteSelect: {
1107
1107
  };
1108
1108
  tagType: {
1109
1109
  default: string;
1110
- type: import("vue").PropType<"warning" | "success" | "primary" | "info" | "danger">;
1110
+ type: import("vue").PropType<"primary" | "success" | "warning" | "info" | "danger">;
1111
1111
  required: false;
1112
1112
  validator: ((val: unknown) => boolean) | undefined;
1113
1113
  __epPropKey: true;
@@ -1183,9 +1183,9 @@ declare const _RemoteSelect: {
1183
1183
  }>> & Readonly<{
1184
1184
  onClear?: (() => any) | undefined;
1185
1185
  onBlur?: ((evt: FocusEvent) => any) | undefined;
1186
- "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
1187
1186
  onChange?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
1188
1187
  onFocus?: ((evt: FocusEvent) => any) | undefined;
1188
+ "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
1189
1189
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
1190
1190
  "onRemove-tag"?: ((val: unknown) => any) | undefined;
1191
1191
  "onPopup-scroll"?: ((args_0: {
@@ -1208,32 +1208,32 @@ declare const _RemoteSelect: {
1208
1208
  offset: number;
1209
1209
  multiple: boolean;
1210
1210
  disabled: boolean;
1211
+ teleported: boolean;
1211
1212
  immediate: boolean;
1212
- valueKey: string;
1213
- modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
1214
1213
  placement: any;
1214
+ loading: boolean;
1215
+ pagination: boolean | import("element-plus").PaginationProps;
1216
+ modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
1215
1217
  popperClass: string;
1216
- teleported: boolean;
1218
+ validateEvent: boolean;
1219
+ tabindex: string | number;
1220
+ showArrow: boolean;
1221
+ persistent: boolean;
1222
+ effect: import("element-plus").PopperEffect;
1223
+ fallbackPlacements: Placement[];
1224
+ popperOptions: any;
1225
+ valueKey: string;
1217
1226
  fitInputWidth: boolean;
1218
1227
  autocomplete: string;
1219
1228
  clearable: boolean;
1220
- tabindex: string | number;
1221
- validateEvent: boolean;
1222
- loading: boolean;
1223
1229
  valueOnClear: string | number | boolean | Function | null;
1224
1230
  filterable: boolean;
1225
1231
  collapseTags: boolean;
1226
1232
  maxCollapseTags: number;
1227
1233
  collapseTagsTooltip: boolean;
1228
- fallbackPlacements: Placement[];
1229
- effect: import("element-plus").PopperEffect;
1230
- tagType: "warning" | "success" | "primary" | "info" | "danger";
1234
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
1231
1235
  tagEffect: "dark" | "light" | "plain";
1232
- persistent: boolean;
1233
- pagination: boolean | import("element-plus").PaginationProps;
1234
1236
  automaticDropdown: boolean;
1235
- popperOptions: any;
1236
- showArrow: boolean;
1237
1237
  allowCreate: boolean;
1238
1238
  remote: boolean;
1239
1239
  multipleLimit: number;
@@ -189,7 +189,7 @@ export declare const remoteSelectProps: {
189
189
  };
190
190
  tagType: {
191
191
  default: string;
192
- type: PropType<"warning" | "success" | "primary" | "info" | "danger">;
192
+ type: PropType<"primary" | "success" | "warning" | "info" | "danger">;
193
193
  required: false;
194
194
  validator: ((val: unknown) => boolean) | undefined;
195
195
  __epPropKey: true;
@@ -185,7 +185,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
185
185
  };
186
186
  tagType: {
187
187
  default: string;
188
- type: import("vue").PropType<"warning" | "success" | "primary" | "info" | "danger">;
188
+ type: import("vue").PropType<"primary" | "success" | "warning" | "info" | "danger">;
189
189
  required: false;
190
190
  validator: ((val: unknown) => boolean) | undefined;
191
191
  __epPropKey: true;
@@ -456,7 +456,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
456
456
  };
457
457
  tagType: {
458
458
  default: string;
459
- type: import("vue").PropType<"warning" | "success" | "primary" | "info" | "danger">;
459
+ type: import("vue").PropType<"primary" | "success" | "warning" | "info" | "danger">;
460
460
  required: false;
461
461
  validator: ((val: unknown) => boolean) | undefined;
462
462
  __epPropKey: true;
@@ -532,9 +532,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
532
532
  }>> & Readonly<{
533
533
  onClear?: (() => any) | undefined;
534
534
  onBlur?: ((evt: FocusEvent) => any) | undefined;
535
- "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
536
535
  onChange?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
537
536
  onFocus?: ((evt: FocusEvent) => any) | undefined;
537
+ "onUpdate:modelValue"?: ((val: ((string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null) | undefined) => any) | undefined;
538
538
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
539
539
  "onRemove-tag"?: ((val: unknown) => any) | undefined;
540
540
  "onPopup-scroll"?: ((args_0: {
@@ -545,32 +545,32 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
545
545
  offset: number;
546
546
  multiple: boolean;
547
547
  disabled: boolean;
548
+ teleported: boolean;
548
549
  immediate: boolean;
549
- valueKey: string;
550
- modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
551
550
  placement: any;
551
+ loading: boolean;
552
+ pagination: boolean | PaginationProps;
553
+ modelValue: (string | number | boolean | Record<string, any>) | (string | number | boolean | Record<string, any>)[] | null;
552
554
  popperClass: string;
553
- teleported: boolean;
555
+ validateEvent: boolean;
556
+ tabindex: string | number;
557
+ showArrow: boolean;
558
+ persistent: boolean;
559
+ effect: import("element-plus").PopperEffect;
560
+ fallbackPlacements: Placement[];
561
+ popperOptions: any;
562
+ valueKey: string;
554
563
  fitInputWidth: boolean;
555
564
  autocomplete: string;
556
565
  clearable: boolean;
557
- tabindex: string | number;
558
- validateEvent: boolean;
559
- loading: boolean;
560
566
  valueOnClear: string | number | boolean | Function | null;
561
567
  filterable: boolean;
562
568
  collapseTags: boolean;
563
569
  maxCollapseTags: number;
564
570
  collapseTagsTooltip: boolean;
565
- fallbackPlacements: Placement[];
566
- effect: import("element-plus").PopperEffect;
567
- tagType: "warning" | "success" | "primary" | "info" | "danger";
571
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
568
572
  tagEffect: "dark" | "light" | "plain";
569
- persistent: boolean;
570
- pagination: boolean | PaginationProps;
571
573
  automaticDropdown: boolean;
572
- popperOptions: any;
573
- showArrow: boolean;
574
574
  allowCreate: boolean;
575
575
  remote: boolean;
576
576
  multipleLimit: number;
@@ -0,0 +1,100 @@
1
+ export * from './ribbon.api';
2
+ declare const _Ribbon: {
3
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
4
+ direction: {
5
+ type: import("vue").PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
6
+ default: string;
7
+ };
8
+ gap: {
9
+ type: NumberConstructor;
10
+ default: number;
11
+ };
12
+ size: {
13
+ type: NumberConstructor;
14
+ default: number;
15
+ };
16
+ breadth: {
17
+ type: NumberConstructor;
18
+ default: number;
19
+ };
20
+ background: {
21
+ type: StringConstructor;
22
+ };
23
+ color: {
24
+ type: StringConstructor;
25
+ };
26
+ }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
27
+ direction: "top-left" | "top-right" | "bottom-left" | "bottom-right";
28
+ gap: number;
29
+ size: number;
30
+ breadth: number;
31
+ }, true, {}, import("vue").SlotsType<import("./ribbon.api").RibbonSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
32
+ P: {};
33
+ B: {};
34
+ D: {};
35
+ C: {};
36
+ M: {};
37
+ Defaults: {};
38
+ }, Readonly<import("vue").ExtractPropTypes<{
39
+ direction: {
40
+ type: import("vue").PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
41
+ default: string;
42
+ };
43
+ gap: {
44
+ type: NumberConstructor;
45
+ default: number;
46
+ };
47
+ size: {
48
+ type: NumberConstructor;
49
+ default: number;
50
+ };
51
+ breadth: {
52
+ type: NumberConstructor;
53
+ default: number;
54
+ };
55
+ background: {
56
+ type: StringConstructor;
57
+ };
58
+ color: {
59
+ type: StringConstructor;
60
+ };
61
+ }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
62
+ direction: "top-left" | "top-right" | "bottom-left" | "bottom-right";
63
+ gap: number;
64
+ size: number;
65
+ breadth: number;
66
+ }>;
67
+ __isFragment?: never;
68
+ __isTeleport?: never;
69
+ __isSuspense?: never;
70
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
71
+ direction: {
72
+ type: import("vue").PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
73
+ default: string;
74
+ };
75
+ gap: {
76
+ type: NumberConstructor;
77
+ default: number;
78
+ };
79
+ size: {
80
+ type: NumberConstructor;
81
+ default: number;
82
+ };
83
+ breadth: {
84
+ type: NumberConstructor;
85
+ default: number;
86
+ };
87
+ background: {
88
+ type: StringConstructor;
89
+ };
90
+ color: {
91
+ type: StringConstructor;
92
+ };
93
+ }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
94
+ direction: "top-left" | "top-right" | "bottom-left" | "bottom-right";
95
+ gap: number;
96
+ size: number;
97
+ breadth: number;
98
+ }, {}, string, import("vue").SlotsType<import("./ribbon.api").RibbonSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
99
+ export { _Ribbon as Ribbon };
100
+ export default _Ribbon;
@@ -0,0 +1,8 @@
1
+ import { withInstall } from '../utils.js';
2
+ import stdin_default$1 from './ribbon.js';
3
+ export { ribbonEmits, ribbonProps, ribbonSlots } from './ribbon.api.js';
4
+
5
+ const _Ribbon = withInstall(stdin_default$1);
6
+ var stdin_default = _Ribbon;
7
+
8
+ export { _Ribbon as Ribbon, stdin_default as default };
@@ -0,0 +1,34 @@
1
+ import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
2
+ export declare const ribbonProps: {
3
+ direction: {
4
+ type: PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
5
+ default: string;
6
+ };
7
+ gap: {
8
+ type: NumberConstructor;
9
+ default: number;
10
+ };
11
+ size: {
12
+ type: NumberConstructor;
13
+ default: number;
14
+ };
15
+ breadth: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ background: {
20
+ type: StringConstructor;
21
+ };
22
+ color: {
23
+ type: StringConstructor;
24
+ };
25
+ };
26
+ export type RibbonProps = ExtractPropTypes<typeof ribbonProps>;
27
+ export interface RibbonSlots {
28
+ default: {};
29
+ }
30
+ export declare const ribbonSlots: SlotsType<RibbonSlots>;
31
+ export declare const ribbonEmits: {};
32
+ export type RibbonEmits = typeof ribbonEmits;
33
+ export interface RibbonExpose {
34
+ }
@@ -0,0 +1,28 @@
1
+ const ribbonProps = {
2
+ direction: {
3
+ type: String,
4
+ default: "top-right"
5
+ },
6
+ gap: {
7
+ type: Number,
8
+ default: 0
9
+ },
10
+ size: {
11
+ type: Number,
12
+ default: 150
13
+ },
14
+ breadth: {
15
+ type: Number,
16
+ default: 0.5
17
+ },
18
+ background: {
19
+ type: String
20
+ },
21
+ color: {
22
+ type: String
23
+ }
24
+ };
25
+ const ribbonSlots = {};
26
+ const ribbonEmits = {};
27
+
28
+ export { ribbonEmits, ribbonProps, ribbonSlots };
@@ -0,0 +1,53 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ direction: {
3
+ type: import("vue").PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
4
+ default: string;
5
+ };
6
+ gap: {
7
+ type: NumberConstructor;
8
+ default: number;
9
+ };
10
+ size: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ breadth: {
15
+ type: NumberConstructor;
16
+ default: number;
17
+ };
18
+ background: {
19
+ type: StringConstructor;
20
+ };
21
+ color: {
22
+ type: StringConstructor;
23
+ };
24
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
+ direction: {
26
+ type: import("vue").PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
27
+ default: string;
28
+ };
29
+ gap: {
30
+ type: NumberConstructor;
31
+ default: number;
32
+ };
33
+ size: {
34
+ type: NumberConstructor;
35
+ default: number;
36
+ };
37
+ breadth: {
38
+ type: NumberConstructor;
39
+ default: number;
40
+ };
41
+ background: {
42
+ type: StringConstructor;
43
+ };
44
+ color: {
45
+ type: StringConstructor;
46
+ };
47
+ }>> & Readonly<{}>, {
48
+ direction: "top-left" | "top-right" | "bottom-left" | "bottom-right";
49
+ gap: number;
50
+ size: number;
51
+ breadth: number;
52
+ }, import("vue").SlotsType<import("./ribbon.api").RibbonSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
53
+ export default _default;
@@ -0,0 +1,53 @@
1
+ import { defineComponent, computed, createVNode } from 'vue';
2
+ import { ribbonEmits, ribbonSlots, ribbonProps } from './ribbon.api.js';
3
+ import { useToken } from '../theme/util/useToken.js';
4
+ import stdin_default$1 from './ribbon.style.js';
5
+ import { useComponentConfig } from '../config-provider/config-provider.api.js';
6
+
7
+ var stdin_default = defineComponent({
8
+ name: "CoRibbon",
9
+ props: ribbonProps,
10
+ slots: ribbonSlots,
11
+ emits: ribbonEmits,
12
+ setup(props, {
13
+ slots
14
+ }) {
15
+ const {
16
+ prefixCls
17
+ } = useComponentConfig("ribbon", props);
18
+ const {
19
+ hashId
20
+ } = stdin_default$1(prefixCls);
21
+ const {
22
+ token
23
+ } = useToken();
24
+ const ribbon = computed(() => {
25
+ return {
26
+ width: props.size + "px",
27
+ height: props.size + "px",
28
+ "--gap": props.gap + "px",
29
+ "--bg": props.background || token.value.colorPrimary
30
+ };
31
+ });
32
+ const silkStyle = computed(() => {
33
+ const hypotenuse = Math.sqrt(Math.pow(props.size, 2) * 2);
34
+ const breadth = hypotenuse / 2 * props.breadth;
35
+ return {
36
+ width: hypotenuse + "px",
37
+ height: breadth + "px",
38
+ color: props.color
39
+ };
40
+ });
41
+ return () => {
42
+ return createVNode("div", {
43
+ "class": [hashId.value, prefixCls.value, `is-${props.direction}`],
44
+ "style": ribbon.value
45
+ }, [createVNode("div", {
46
+ "class": `${prefixCls.value}-silk`,
47
+ "style": silkStyle.value
48
+ }, [slots.default?.({})])]);
49
+ };
50
+ }
51
+ });
52
+
53
+ export { stdin_default as default };
@@ -0,0 +1,4 @@
1
+ declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../theme/theme-context").ThemeManager) => {
2
+ hashId: import("vue").Ref<string, string>;
3
+ };
4
+ export default _default;