cosey 0.5.15 → 0.6.0

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 (76) hide show
  1. package/components/audio-card/audio-card.api.d.ts +3 -6
  2. package/components/audio-card/audio-card.d.ts +6 -12
  3. package/components/audio-card/index.d.ts +9 -18
  4. package/components/audio-viewer/audio-viewer.api.d.ts +3 -6
  5. package/components/audio-viewer/audio-viewer.d.ts +6 -12
  6. package/components/audio-viewer/audio-viewer.js +12 -67
  7. package/components/audio-viewer/index.d.ts +9 -18
  8. package/components/close/close.js +5 -2
  9. package/components/components.d.ts +5 -1
  10. package/components/components.js +2 -0
  11. package/components/editor/components/toolbar/toolbar.js +1 -1
  12. package/components/field/components/number/number.vue.js +16 -3
  13. package/components/icon/icon.d.ts +1 -1
  14. package/components/icon/icon.vue.d.ts +11 -1
  15. package/components/icon/icon.vue.js +13 -8
  16. package/components/icon/index.d.ts +5 -1
  17. package/components/image-card/image-card.api.d.ts +131 -0
  18. package/components/image-card/image-card.api.js +17 -0
  19. package/components/image-card/image-card.d.ts +140 -16
  20. package/components/image-card/image-card.js +55 -11
  21. package/components/image-card/index.d.ts +25 -33
  22. package/components/image-card/index.js +2 -2
  23. package/components/index.js +1 -1
  24. package/components/input-number-range/input-number-range.vue.js +1 -1
  25. package/components/mask/mask.js +5 -2
  26. package/components/media-card/media-card.js +10 -5
  27. package/components/media-card/media-card.style.d.ts +1 -0
  28. package/components/media-card/media-card.style.js +12 -1
  29. package/components/media-viewer/index.d.ts +9 -18
  30. package/components/media-viewer/media-viewer-dialog.api.d.ts +21 -0
  31. package/components/media-viewer/media-viewer-dialog.api.js +17 -0
  32. package/components/media-viewer/media-viewer-dialog.d.ts +31 -0
  33. package/components/media-viewer/media-viewer-dialog.js +82 -0
  34. package/components/{video-viewer/video-viewer.style.js → media-viewer/media-viewer-dialog.style.js} +8 -6
  35. package/components/media-viewer/media-viewer.api.d.ts +6 -12
  36. package/components/media-viewer/media-viewer.api.js +4 -14
  37. package/components/media-viewer/media-viewer.d.ts +6 -12
  38. package/components/svga-card/index.d.ts +136 -0
  39. package/components/svga-card/index.js +8 -0
  40. package/components/svga-card/svga-card.api.d.ts +41 -0
  41. package/components/svga-card/svga-card.api.js +13 -0
  42. package/components/svga-card/svga-card.d.ts +73 -0
  43. package/components/svga-card/svga-card.js +56 -0
  44. package/components/svga-card/svga-card.style.js +17 -0
  45. package/components/svga-viewer/index.d.ts +80 -0
  46. package/components/svga-viewer/index.js +7 -0
  47. package/components/svga-viewer/svga-viewer.api.d.ts +25 -0
  48. package/components/svga-viewer/svga-viewer.api.js +11 -0
  49. package/components/svga-viewer/svga-viewer.d.ts +38 -0
  50. package/components/svga-viewer/svga-viewer.js +55 -0
  51. package/components/transition/index.d.ts +3 -3
  52. package/components/transition/transition.d.ts +1 -1
  53. package/components/transition-group/index.d.ts +9 -9
  54. package/components/transition-group/transition-group.api.d.ts +2 -2
  55. package/components/transition-group/transition-group.d.ts +5 -5
  56. package/components/upload/upload-item.d.ts +3 -0
  57. package/components/upload/upload-item.js +23 -4
  58. package/components/upload/upload.api.d.ts +1 -0
  59. package/components/upload/upload.api.js +2 -1
  60. package/components/upload/upload.style.js +19 -2
  61. package/components/video-card/index.d.ts +9 -18
  62. package/components/video-card/video-card.api.d.ts +3 -6
  63. package/components/video-card/video-card.d.ts +6 -12
  64. package/components/video-card/video-card.js +3 -2
  65. package/components/video-viewer/index.d.ts +9 -18
  66. package/components/video-viewer/video-viewer.api.d.ts +3 -6
  67. package/components/video-viewer/video-viewer.api.js +2 -2
  68. package/components/video-viewer/video-viewer.d.ts +6 -12
  69. package/components/video-viewer/video-viewer.js +13 -68
  70. package/layout/layout-tabbar/layout-tabbar.vue.js +1 -1
  71. package/package.json +3 -1
  72. package/components/audio-viewer/audio-viewer.style.js +0 -19
  73. package/components/image-card/image-card.vue.d.ts +0 -260
  74. package/components/image-card/image-card.vue.js +0 -64
  75. /package/components/{audio-viewer/audio-viewer.style.d.ts → media-viewer/media-viewer-dialog.style.d.ts} +0 -0
  76. /package/components/{video-viewer/video-viewer.style.d.ts → svga-card/svga-card.style.d.ts} +0 -0
@@ -1,11 +1,11 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
2
  export declare const audioCardProps: {
3
+ src: {
4
+ type: StringConstructor;
5
+ };
3
6
  teleported: {
4
7
  type: BooleanConstructor;
5
8
  };
6
- zIndex: {
7
- type: NumberConstructor;
8
- };
9
9
  closeOnPressEscape: {
10
10
  type: BooleanConstructor;
11
11
  default: boolean;
@@ -13,9 +13,6 @@ export declare const audioCardProps: {
13
13
  hideOnClickModal: {
14
14
  type: BooleanConstructor;
15
15
  };
16
- src: {
17
- type: StringConstructor;
18
- };
19
16
  size: {
20
17
  type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
21
18
  default: string;
@@ -1,10 +1,10 @@
1
1
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ src: {
3
+ type: StringConstructor;
4
+ };
2
5
  teleported: {
3
6
  type: BooleanConstructor;
4
7
  };
5
- zIndex: {
6
- type: NumberConstructor;
7
- };
8
8
  closeOnPressEscape: {
9
9
  type: BooleanConstructor;
10
10
  default: boolean;
@@ -12,9 +12,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
12
  hideOnClickModal: {
13
13
  type: BooleanConstructor;
14
14
  };
15
- src: {
16
- type: StringConstructor;
17
- };
18
15
  size: {
19
16
  type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
20
17
  default: string;
@@ -35,12 +32,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
35
32
  open: () => boolean;
36
33
  close: () => boolean;
37
34
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
35
+ src: {
36
+ type: StringConstructor;
37
+ };
38
38
  teleported: {
39
39
  type: BooleanConstructor;
40
40
  };
41
- zIndex: {
42
- type: NumberConstructor;
43
- };
44
41
  closeOnPressEscape: {
45
42
  type: BooleanConstructor;
46
43
  default: boolean;
@@ -48,9 +45,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
48
45
  hideOnClickModal: {
49
46
  type: BooleanConstructor;
50
47
  };
51
- src: {
52
- type: StringConstructor;
53
- };
54
48
  size: {
55
49
  type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
56
50
  default: string;
@@ -1,12 +1,12 @@
1
1
  export * from './audio-card.api';
2
2
  declare const _AudioCard: {
3
3
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
4
+ src: {
5
+ type: StringConstructor;
6
+ };
4
7
  teleported: {
5
8
  type: BooleanConstructor;
6
9
  };
7
- zIndex: {
8
- type: NumberConstructor;
9
- };
10
10
  closeOnPressEscape: {
11
11
  type: BooleanConstructor;
12
12
  default: boolean;
@@ -14,9 +14,6 @@ declare const _AudioCard: {
14
14
  hideOnClickModal: {
15
15
  type: BooleanConstructor;
16
16
  };
17
- src: {
18
- type: StringConstructor;
19
- };
20
17
  size: {
21
18
  type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
22
19
  default: string;
@@ -52,12 +49,12 @@ declare const _AudioCard: {
52
49
  M: {};
53
50
  Defaults: {};
54
51
  }, Readonly<import("vue").ExtractPropTypes<{
52
+ src: {
53
+ type: StringConstructor;
54
+ };
55
55
  teleported: {
56
56
  type: BooleanConstructor;
57
57
  };
58
- zIndex: {
59
- type: NumberConstructor;
60
- };
61
58
  closeOnPressEscape: {
62
59
  type: BooleanConstructor;
63
60
  default: boolean;
@@ -65,9 +62,6 @@ declare const _AudioCard: {
65
62
  hideOnClickModal: {
66
63
  type: BooleanConstructor;
67
64
  };
68
- src: {
69
- type: StringConstructor;
70
- };
71
65
  size: {
72
66
  type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
73
67
  default: string;
@@ -97,12 +91,12 @@ declare const _AudioCard: {
97
91
  __isTeleport?: never;
98
92
  __isSuspense?: never;
99
93
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
94
+ src: {
95
+ type: StringConstructor;
96
+ };
100
97
  teleported: {
101
98
  type: BooleanConstructor;
102
99
  };
103
- zIndex: {
104
- type: NumberConstructor;
105
- };
106
100
  closeOnPressEscape: {
107
101
  type: BooleanConstructor;
108
102
  default: boolean;
@@ -110,9 +104,6 @@ declare const _AudioCard: {
110
104
  hideOnClickModal: {
111
105
  type: BooleanConstructor;
112
106
  };
113
- src: {
114
- type: StringConstructor;
115
- };
116
107
  size: {
117
108
  type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
118
109
  default: string;
@@ -1,12 +1,12 @@
1
1
  import { ExtractPropTypes, SlotsType } from 'vue';
2
2
  import { MediaViewerSlots } from '../media-viewer/media-viewer.api';
3
3
  export declare const audioViewerProps: {
4
+ src: {
5
+ type: StringConstructor;
6
+ };
4
7
  teleported: {
5
8
  type: BooleanConstructor;
6
9
  };
7
- zIndex: {
8
- type: NumberConstructor;
9
- };
10
10
  closeOnPressEscape: {
11
11
  type: BooleanConstructor;
12
12
  default: boolean;
@@ -14,9 +14,6 @@ export declare const audioViewerProps: {
14
14
  hideOnClickModal: {
15
15
  type: BooleanConstructor;
16
16
  };
17
- src: {
18
- type: StringConstructor;
19
- };
20
17
  };
21
18
  export type AudioViewerProps = ExtractPropTypes<typeof audioViewerProps>;
22
19
  export interface AudioViewerSlots extends MediaViewerSlots {
@@ -1,10 +1,10 @@
1
1
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ src: {
3
+ type: StringConstructor;
4
+ };
2
5
  teleported: {
3
6
  type: BooleanConstructor;
4
7
  };
5
- zIndex: {
6
- type: NumberConstructor;
7
- };
8
8
  closeOnPressEscape: {
9
9
  type: BooleanConstructor;
10
10
  default: boolean;
@@ -12,18 +12,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
12
  hideOnClickModal: {
13
13
  type: BooleanConstructor;
14
14
  };
15
- src: {
16
- type: StringConstructor;
17
- };
18
15
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
16
  close: () => boolean;
20
17
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
+ src: {
19
+ type: StringConstructor;
20
+ };
21
21
  teleported: {
22
22
  type: BooleanConstructor;
23
23
  };
24
- zIndex: {
25
- type: NumberConstructor;
26
- };
27
24
  closeOnPressEscape: {
28
25
  type: BooleanConstructor;
29
26
  default: boolean;
@@ -31,9 +28,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
31
28
  hideOnClickModal: {
32
29
  type: BooleanConstructor;
33
30
  };
34
- src: {
35
- type: StringConstructor;
36
- };
37
31
  }>> & Readonly<{
38
32
  onClose?: (() => any) | undefined;
39
33
  }>, {
@@ -1,12 +1,7 @@
1
- import { defineComponent, ref, useTemplateRef, onMounted, onBeforeUnmount, createVNode, resolveComponent } from 'vue';
2
- import { useZIndex } from 'element-plus';
3
- import ElTeleport from 'element-plus/es/components/teleport/index';
4
- import ElFocusTrap from 'element-plus/es/components/focus-trap/index';
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, createVNode, mergeProps } from 'vue';
5
2
  import { audioViewerEmits, audioViewerSlots, audioViewerProps } from './audio-viewer.api.js';
6
- import { Mask as _Mask } from '../mask/index.js';
7
- import { Close as _Close } from '../close/index.js';
8
- import stdin_default$1 from './audio-viewer.style.js';
9
- import { useComponentConfig } from '../config-provider/config-provider.api.js';
3
+ import { MediaViewerDialog } from '../media-viewer/media-viewer-dialog.js';
4
+ import { omit } from 'lodash-es';
10
5
 
11
6
  var stdin_default = defineComponent({
12
7
  name: "CoAudioViewer",
@@ -16,31 +11,7 @@ var stdin_default = defineComponent({
16
11
  setup(props, {
17
12
  emit
18
13
  }) {
19
- const {
20
- prefixCls
21
- } = useComponentConfig("audio-viewer", props);
22
- const {
23
- hashId
24
- } = stdin_default$1(prefixCls);
25
- const {
26
- nextZIndex
27
- } = useZIndex();
28
- const wrapper = ref();
29
- const zIndex = ref(props.zIndex ?? nextZIndex());
30
- function onFocusoutPrevented(event) {
31
- if (event.detail?.focusReason === "pointer") {
32
- event.preventDefault();
33
- }
34
- }
35
- function onCloseRequested() {
36
- if (props.closeOnPressEscape) {
37
- hide();
38
- }
39
- }
40
- function hide() {
41
- emit("close");
42
- }
43
- const audioRef = useTemplateRef("audio");
14
+ const audioRef = ref();
44
15
  onMounted(() => {
45
16
  audioRef.value?.play();
46
17
  });
@@ -48,40 +19,14 @@ var stdin_default = defineComponent({
48
19
  audioRef.value?.pause();
49
20
  });
50
21
  return () => {
51
- return createVNode(ElTeleport, {
52
- "to": "body",
53
- "disabled": !props.teleported
54
- }, {
55
- default: () => [createVNode(resolveComponent("transition"), {
56
- "name": "co-viewer-fade",
57
- "appear": true
58
- }, {
59
- default: () => [createVNode("div", {
60
- "ref": "wrapper",
61
- "tabindex": -1,
62
- "class": [hashId.value, prefixCls.value],
63
- "style": {
64
- zIndex: zIndex.value
65
- }
66
- }, [createVNode(ElFocusTrap, {
67
- "loop": true,
68
- "trapped": true,
69
- "focus-trap-el": wrapper,
70
- "focus-start-el": "container",
71
- "onFocusout-prevented": onFocusoutPrevented,
72
- "onRelease-requested": onCloseRequested
73
- }, {
74
- default: () => [createVNode(_Mask, {
75
- "onClick": () => props.hideOnClickModal && hide()
76
- }, null), createVNode(_Close, {
77
- "onClick": () => hide()
78
- }, null), createVNode("audio", {
79
- "ref": "audio",
80
- "controls": true,
81
- "src": props.src
82
- }, null)]
83
- })])]
84
- })]
22
+ return createVNode(MediaViewerDialog, mergeProps(omit(props, "src"), {
23
+ "onClose": () => emit("close")
24
+ }), {
25
+ default: () => [createVNode("audio", {
26
+ "ref": audioRef,
27
+ "controls": true,
28
+ "src": props.src
29
+ }, null)]
85
30
  });
86
31
  };
87
32
  }
@@ -1,12 +1,12 @@
1
1
  export * from './audio-viewer';
2
2
  declare const _AudioViewer: {
3
3
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
4
+ src: {
5
+ type: StringConstructor;
6
+ };
4
7
  teleported: {
5
8
  type: BooleanConstructor;
6
9
  };
7
- zIndex: {
8
- type: NumberConstructor;
9
- };
10
10
  closeOnPressEscape: {
11
11
  type: BooleanConstructor;
12
12
  default: boolean;
@@ -14,9 +14,6 @@ declare const _AudioViewer: {
14
14
  hideOnClickModal: {
15
15
  type: BooleanConstructor;
16
16
  };
17
- src: {
18
- type: StringConstructor;
19
- };
20
17
  }>> & Readonly<{
21
18
  onClose?: (() => any) | undefined;
22
19
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -33,12 +30,12 @@ declare const _AudioViewer: {
33
30
  M: {};
34
31
  Defaults: {};
35
32
  }, Readonly<import("vue").ExtractPropTypes<{
33
+ src: {
34
+ type: StringConstructor;
35
+ };
36
36
  teleported: {
37
37
  type: BooleanConstructor;
38
38
  };
39
- zIndex: {
40
- type: NumberConstructor;
41
- };
42
39
  closeOnPressEscape: {
43
40
  type: BooleanConstructor;
44
41
  default: boolean;
@@ -46,9 +43,6 @@ declare const _AudioViewer: {
46
43
  hideOnClickModal: {
47
44
  type: BooleanConstructor;
48
45
  };
49
- src: {
50
- type: StringConstructor;
51
- };
52
46
  }>> & Readonly<{
53
47
  onClose?: (() => any) | undefined;
54
48
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
@@ -60,12 +54,12 @@ declare const _AudioViewer: {
60
54
  __isTeleport?: never;
61
55
  __isSuspense?: never;
62
56
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
57
+ src: {
58
+ type: StringConstructor;
59
+ };
63
60
  teleported: {
64
61
  type: BooleanConstructor;
65
62
  };
66
- zIndex: {
67
- type: NumberConstructor;
68
- };
69
63
  closeOnPressEscape: {
70
64
  type: BooleanConstructor;
71
65
  default: boolean;
@@ -73,9 +67,6 @@ declare const _AudioViewer: {
73
67
  hideOnClickModal: {
74
68
  type: BooleanConstructor;
75
69
  };
76
- src: {
77
- type: StringConstructor;
78
- };
79
70
  }>> & Readonly<{
80
71
  onClose?: (() => any) | undefined;
81
72
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -7,7 +7,9 @@ import { useComponentConfig } from '../config-provider/config-provider.api.js';
7
7
  var stdin_default = defineComponent({
8
8
  name: "CoClose",
9
9
  emits: closeEmits,
10
- setup(props) {
10
+ setup(props, {
11
+ emit
12
+ }) {
11
13
  const {
12
14
  prefixCls
13
15
  } = useComponentConfig("close", props);
@@ -16,7 +18,8 @@ var stdin_default = defineComponent({
16
18
  } = stdin_default$1(prefixCls);
17
19
  return () => {
18
20
  return createVNode("span", {
19
- "class": [hashId.value, prefixCls.value]
21
+ "class": [hashId.value, prefixCls.value],
22
+ "onClick": event => emit("click", event)
20
23
  }, [createVNode(stdin_default$2, {
21
24
  "name": "co:close-large"
22
25
  }, null)]);
@@ -38,6 +38,8 @@ import { ScrollView } from './scroll-view';
38
38
  import { SnugMenu, SnugMenuItem } from './snug-menu';
39
39
  import { StackDialog } from './stack-dialog';
40
40
  import { SvgIcon } from './svg-icon';
41
+ import { SvgaCard } from './svga-card';
42
+ import { SvgaViewer } from './svga-viewer';
41
43
  import { Table } from './table';
42
44
  import { TableAction } from './table-action';
43
45
  import { Toggle } from './toggle';
@@ -93,6 +95,8 @@ declare module 'vue' {
93
95
  CoSnugMenuItem: typeof SnugMenuItem;
94
96
  CoStackDialog: typeof StackDialog;
95
97
  CoSvgIcon: typeof SvgIcon;
98
+ CoSvgaCard: typeof SvgaCard;
99
+ CoSvgaViewer: typeof SvgaViewer;
96
100
  CoTable: typeof Table;
97
101
  CoTableAction: typeof TableAction;
98
102
  CoToggle: typeof Toggle;
@@ -103,4 +107,4 @@ declare module 'vue' {
103
107
  CoVideoViewer: typeof VideoViewer;
104
108
  }
105
109
  }
106
- export { AudioCard, AudioViewer, Card, Close, Col, ConfigProvider, Container, ContextMenu, ContextMenuItem, ContextSubMenu, Copy, DndSort, DndSortItem, Editor, Field, FileCard, Form, FormDialog, FormDrawer, FormGroup, FormItem, FormList, FormQuery, Highlight, HorizontalTree, Icon, IconifyIcon, ImageCard, InputNumberRange, LongText, Mask, MediaCard, MediaCardGroup, MediaViewer, NumberFormat, OnlyChild, OptionalWrapper, Panel, RemoteSelect, Row, ScrollView, SnugMenu, SnugMenuItem, StackDialog, SvgIcon, Table, TableAction, Toggle, Transition, TransitionGroup, Upload, VideoCard, VideoViewer, };
110
+ export { AudioCard, AudioViewer, Card, Close, Col, ConfigProvider, Container, ContextMenu, ContextMenuItem, ContextSubMenu, Copy, DndSort, DndSortItem, Editor, Field, FileCard, Form, FormDialog, FormDrawer, FormGroup, FormItem, FormList, FormQuery, Highlight, HorizontalTree, Icon, IconifyIcon, ImageCard, InputNumberRange, LongText, Mask, MediaCard, MediaCardGroup, MediaViewer, NumberFormat, OnlyChild, OptionalWrapper, Panel, RemoteSelect, Row, ScrollView, SnugMenu, SnugMenuItem, StackDialog, SvgIcon, SvgaCard, SvgaViewer, Table, TableAction, Toggle, Transition, TransitionGroup, Upload, VideoCard, VideoViewer, };
@@ -38,6 +38,8 @@ export { ScrollView } from './scroll-view/index.js';
38
38
  export { SnugMenu, SnugMenuItem } from './snug-menu/index.js';
39
39
  export { StackDialog } from './stack-dialog/index.js';
40
40
  export { SvgIcon } from './svg-icon/index.js';
41
+ export { SvgaCard } from './svga-card/index.js';
42
+ export { SvgaViewer } from './svga-viewer/index.js';
41
43
  export { Table } from './table/index.js';
42
44
  export { TableAction } from './table-action/index.js';
43
45
  export { Toggle } from './toggle/index.js';
@@ -60,7 +60,7 @@ class Toolbar extends EventTarget {
60
60
  const formats = this.quill.getFormat(range);
61
61
  const indent = parseInt(formats.indent || "0", 10);
62
62
  if (value === "+1" || value === "-1") {
63
- const modifier = value === "+1" ? INDENT_STEP : -3;
63
+ const modifier = value === "+1" ? INDENT_STEP : -INDENT_STEP;
64
64
  this.quill.format("indent", indent + modifier, Quill.sources.USER);
65
65
  }
66
66
  }
@@ -1,8 +1,8 @@
1
1
  import { ElInputNumber } from 'element-plus';
2
2
  import { defineComponent, computed, h, mergeProps } from 'vue';
3
- import { isNullish } from '../../../../utils/is.js';
4
3
  import { useLocale } from '../../../../hooks/useLocale.js';
5
4
  import { addNullablePlaceholder } from '../../../../utils/vue.js';
5
+ import { isString } from '../../../../utils/is.js';
6
6
 
7
7
  var stdin_default = defineComponent((props, {
8
8
  slots
@@ -10,7 +10,20 @@ var stdin_default = defineComponent((props, {
10
10
  const {
11
11
  t
12
12
  } = useLocale();
13
- const value = computed(() => props.componentProps?.modelValue);
13
+ const value = computed(() => {
14
+ let value2 = props.componentProps?.modelValue;
15
+ if (isString(value2)) {
16
+ if (value2 === "") {
17
+ value2 = null;
18
+ } else {
19
+ value2 = +value2;
20
+ if (isNaN(value2)) {
21
+ value2 = null;
22
+ }
23
+ }
24
+ }
25
+ return value2;
26
+ });
14
27
  return () => {
15
28
  if (props.readonly) {
16
29
  return addNullablePlaceholder(value.value);
@@ -23,7 +36,7 @@ var stdin_default = defineComponent((props, {
23
36
  }
24
37
  }, {
25
38
  ...props.componentProps,
26
- modelValue: isNullish(value.value) ? value.value : isNaN(+value.value) ? null : +value.value
39
+ modelValue: value.value
27
40
  }), slots);
28
41
  };
29
42
  }, {
@@ -1,5 +1,5 @@
1
1
  import { type IconifyIconProps } from '../iconify-icon';
2
2
  export interface IconProps {
3
- name: IconifyIconProps['name'] | (string & {});
3
+ name?: IconifyIconProps['name'] | (string & {});
4
4
  size?: number | 'sm' | 'md' | 'lg' | 'xl' | ({} & string);
5
5
  }
@@ -1,3 +1,13 @@
1
1
  import { type IconProps } from './icon';
2
- declare const _default: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
3
8
  export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, computed, createBlock, openBlock, unref, normalizeProps, mergeProps } from 'vue';
1
+ import { defineComponent, ref, watch, computed, createElementBlock, createBlock, openBlock, normalizeProps, mergeProps, renderSlot, unref } from 'vue';
2
2
  import { SvgIcon as _SvgIcon } from '../svg-icon/index.js';
3
3
  import { IconifyIcon as _IconifyIcon } from '../iconify-icon/index.js';
4
4
  import stdin_default$1 from './style/index.js';
@@ -12,7 +12,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
12
12
  props: {
13
13
  name: {
14
14
  type: [String, Object],
15
- required: true
15
+ required: false
16
16
  },
17
17
  size: {
18
18
  type: [Number, String, Object],
@@ -30,10 +30,12 @@ var stdin_default = /* @__PURE__ */defineComponent({
30
30
  const prefix = ref();
31
31
  const name = ref("");
32
32
  watch(() => props.name, () => {
33
- const result = /^(?:([^:]+):)?([^:]+)$/.exec(props.name);
34
- if (result) {
35
- prefix.value = result[1];
36
- name.value = result[2];
33
+ if (props.name) {
34
+ const result = /^(?:([^:]+):)?([^:]+)$/.exec(props.name);
35
+ if (result) {
36
+ prefix.value = result[1];
37
+ name.value = result[2];
38
+ }
37
39
  }
38
40
  }, {
39
41
  immediate: true
@@ -56,11 +58,14 @@ var stdin_default = /* @__PURE__ */defineComponent({
56
58
  };
57
59
  });
58
60
  return (_ctx, _cache) => {
59
- return prefix.value === "svg" ? (openBlock(), createBlock(unref(_SvgIcon), normalizeProps(mergeProps({
61
+ return _ctx.$slots.default ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({
60
62
  key: 0
63
+ }, mergedProps.value)), [renderSlot(_ctx.$slots, "default")], 16
64
+ /* FULL_PROPS */)) : prefix.value === "svg" ? (openBlock(), createBlock(unref(_SvgIcon), normalizeProps(mergeProps({
65
+ key: 1
61
66
  }, mergedProps.value)), null, 16
62
67
  /* FULL_PROPS */)) : (openBlock(), createBlock(unref(_IconifyIcon), mergeProps({
63
- key: 1
68
+ key: 2
64
69
  }, mergedProps.value, {
65
70
  prefix: prefix.value
66
71
  }), null, 16, ["prefix"]));
@@ -11,6 +11,10 @@ declare const _Icon: {
11
11
  __isFragment?: never;
12
12
  __isTeleport?: never;
13
13
  __isSuspense?: never;
14
- } & import("vue").ComponentOptionsBase<Readonly<import("./icon").IconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
14
+ } & import("vue").ComponentOptionsBase<Readonly<import("./icon").IconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
15
+ $slots: {
16
+ default?: (props: {}) => any;
17
+ };
18
+ }) & import("vue").Plugin;
15
19
  export { _Icon as Icon };
16
20
  export default _Icon;