@fangzhongya/icons 0.0.26 → 0.0.28

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.
@@ -100,12 +100,6 @@ var icon_default = _vue.defineComponent.call(void 0, {
100
100
  size: {
101
101
  type: [String, Number]
102
102
  },
103
- /**
104
- */
105
- runtime: {
106
- type: Boolean,
107
- default: false
108
- },
109
103
  /**
110
104
  * @props { String } flip='' ( 'horizontal' | 'vertical' | 'both' | '' )
111
105
  * 图标方向
@@ -2,7 +2,7 @@
2
2
  var index_default = {
3
3
  prefix: "fang-icons",
4
4
  info: {},
5
- lastModified: 1767876618213,
5
+ lastModified: 1767880063865,
6
6
  icons: {
7
7
  bar: {
8
8
  body: '<path d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"></path>'
@@ -2,7 +2,7 @@
2
2
  var index_default = {
3
3
  prefix: "fang-icons",
4
4
  info: {},
5
- lastModified: 1767876618213,
5
+ lastModified: 1767880063865,
6
6
  icons: {
7
7
  bar: {
8
8
  body: '<path d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"></path>'
@@ -100,12 +100,6 @@ var icon_default = defineComponent({
100
100
  size: {
101
101
  type: [String, Number]
102
102
  },
103
- /**
104
- */
105
- runtime: {
106
- type: Boolean,
107
- default: false
108
- },
109
103
  /**
110
104
  * @props { String } flip='' ( 'horizontal' | 'vertical' | 'both' | '' )
111
105
  * 图标方向
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTEKHTJSDcjs = require('../chunk-TEKHTJSD.cjs');
3
+ var _chunk2LL6OGUUcjs = require('../chunk-2LL6OGUU.cjs');
4
4
  require('../chunk-3376ZTRC.cjs');
5
5
  require('../chunk-IIVF4KK5.cjs');
6
6
  require('../chunk-75ZPJI57.cjs');
7
7
 
8
8
 
9
- exports.default = _chunkTEKHTJSDcjs.icon_default;
9
+ exports.default = _chunk2LL6OGUUcjs.icon_default;
@@ -35,12 +35,6 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
35
35
  size: {
36
36
  type: (StringConstructor | NumberConstructor)[];
37
37
  };
38
- /**
39
- */
40
- runtime: {
41
- type: BooleanConstructor;
42
- default: boolean;
43
- };
44
38
  /**
45
39
  * @props { String } flip='' ( 'horizontal' | 'vertical' | 'both' | '' )
46
40
  * 图标方向
@@ -103,12 +97,6 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
103
97
  size: {
104
98
  type: (StringConstructor | NumberConstructor)[];
105
99
  };
106
- /**
107
- */
108
- runtime: {
109
- type: BooleanConstructor;
110
- default: boolean;
111
- };
112
100
  /**
113
101
  * @props { String } flip='' ( 'horizontal' | 'vertical' | 'both' | '' )
114
102
  * 图标方向
@@ -138,7 +126,6 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
138
126
  };
139
127
  }>> & Readonly<{}>, {
140
128
  name: string | Record<string, any>;
141
- runtime: boolean;
142
129
  flip: Flip;
143
130
  rotate: number;
144
131
  directory: string;
@@ -35,12 +35,6 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
35
35
  size: {
36
36
  type: (StringConstructor | NumberConstructor)[];
37
37
  };
38
- /**
39
- */
40
- runtime: {
41
- type: BooleanConstructor;
42
- default: boolean;
43
- };
44
38
  /**
45
39
  * @props { String } flip='' ( 'horizontal' | 'vertical' | 'both' | '' )
46
40
  * 图标方向
@@ -103,12 +97,6 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
103
97
  size: {
104
98
  type: (StringConstructor | NumberConstructor)[];
105
99
  };
106
- /**
107
- */
108
- runtime: {
109
- type: BooleanConstructor;
110
- default: boolean;
111
- };
112
100
  /**
113
101
  * @props { String } flip='' ( 'horizontal' | 'vertical' | 'both' | '' )
114
102
  * 图标方向
@@ -138,7 +126,6 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
138
126
  };
139
127
  }>> & Readonly<{}>, {
140
128
  name: string | Record<string, any>;
141
- runtime: boolean;
142
129
  flip: Flip;
143
130
  rotate: number;
144
131
  directory: string;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  icon_default
3
- } from "../chunk-FY4NYXM7.js";
3
+ } from "../chunk-TKF4GGHW.js";
4
4
  import "../chunk-BYXBJQAS.js";
5
5
  import "../chunk-MOHILOKE.js";
6
6
  import "../chunk-MLKGABMK.js";
package/dist/index.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-icons",
3
3
  "info": {},
4
- "lastModified": 1767876618213,
4
+ "lastModified": 1767880063865,
5
5
  "icons": {
6
6
  "bar": {
7
7
  "body": "<path d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\"></path>"
package/dist/json.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkRS35DSE3cjs = require('./chunk-RS35DSE3.cjs');
3
+ var _chunk6HEYV6HJcjs = require('./chunk-6HEYV6HJ.cjs');
4
4
  require('./chunk-75ZPJI57.cjs');
5
5
 
6
6
 
7
- exports.default = _chunkRS35DSE3cjs.json_default;
7
+ exports.default = _chunk6HEYV6HJcjs.json_default;
package/dist/json.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  var prefix = "fang-icons";
2
2
  var info = {
3
3
  };
4
- var lastModified = 1767876618213;
4
+ var lastModified = 1767880063865;
5
5
  var icons = {
6
6
  bar: {
7
7
  body: "<path d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\"></path>"
package/dist/json.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  var prefix = "fang-icons";
2
2
  var info = {
3
3
  };
4
- var lastModified = 1767876618213;
4
+ var lastModified = 1767880063865;
5
5
  var icons = {
6
6
  bar: {
7
7
  body: "<path d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\"></path>"
package/dist/json.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  json_default
3
- } from "./chunk-FDMRAGOU.js";
3
+ } from "./chunk-TGMIXPQX.js";
4
4
  import "./chunk-MLKGABMK.js";
5
5
  export {
6
6
  json_default as default
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTEKHTJSDcjs = require('../chunk-TEKHTJSD.cjs');
3
+ var _chunk2LL6OGUUcjs = require('../chunk-2LL6OGUU.cjs');
4
4
  require('../chunk-3376ZTRC.cjs');
5
5
  require('../chunk-IIVF4KK5.cjs');
6
6
 
@@ -13,9 +13,15 @@ var _vue = require('vue');
13
13
  var picker_default = _vue.defineComponent.call(void 0, {
14
14
  name: "Picker",
15
15
  props: {
16
+ icon: {
17
+ type: Object
18
+ },
16
19
  dialog: {
17
20
  type: Object
18
21
  },
22
+ clearable: {
23
+ type: Boolean
24
+ },
19
25
  /**
20
26
  * @props { String } modelValue= ( )
21
27
  * 图标名称
@@ -70,6 +76,17 @@ var picker_default = _vue.defineComponent.call(void 0, {
70
76
  return obj;
71
77
  }
72
78
  });
79
+ const iconVue = _vue.computed.call(void 0, () => {
80
+ if (props.icon) {
81
+ if (typeof props.icon === "string") {
82
+ return _vue.resolveComponent.call(void 0, props.icon);
83
+ } else {
84
+ return props.icon;
85
+ }
86
+ } else {
87
+ return _chunk2LL6OGUUcjs.icon_default;
88
+ }
89
+ });
73
90
  let size = props.size;
74
91
  if (typeof size === "number") {
75
92
  size = size + "px";
@@ -100,7 +117,7 @@ var picker_default = _vue.defineComponent.call(void 0, {
100
117
  }
101
118
  },
102
119
  [
103
- _vue.h.call(void 0, _chunkTEKHTJSDcjs.icon_default, {
120
+ _vue.h.call(void 0, iconVue.value, {
104
121
  type: props.type,
105
122
  size: props.size,
106
123
  name: props.modelValue
@@ -115,12 +132,34 @@ var picker_default = _vue.defineComponent.call(void 0, {
115
132
  }
116
133
  },
117
134
  name.value
118
- )
135
+ ),
136
+ props.clearable && name.value ? _vue.h.call(void 0,
137
+ "span",
138
+ {
139
+ style: {
140
+ cursor: "pointer",
141
+ padding: "5px",
142
+ fontSize: "16px",
143
+ width: "24px",
144
+ textAlign: "center"
145
+ },
146
+ onClick(e) {
147
+ e.stopPropagation();
148
+ name.value = void 0;
149
+ emit(
150
+ "update:modelValue",
151
+ name.value
152
+ );
153
+ }
154
+ },
155
+ "x"
156
+ ) : void 0
119
157
  ]
120
158
  ),
121
159
  _vue.h.call(void 0,
122
160
  props.dialog || _chunkEEMF44IHcjs.dialog_default,
123
161
  {
162
+ title: "\u9009\u62E9\u56FE\u6807",
124
163
  modelValue: box.value,
125
164
  "onUpdate:modelValue": (v) => {
126
165
  box.value = v;
@@ -181,11 +220,28 @@ var picker_default = _vue.defineComponent.call(void 0, {
181
220
  },
182
221
  name.value
183
222
  ),
184
- _vue.h.call(void 0, _chunkTEKHTJSDcjs.icon_default, {
223
+ _vue.h.call(void 0, iconVue.value, {
185
224
  type: props.type,
186
225
  size: props.size,
187
226
  name: name.value
188
- })
227
+ }),
228
+ props.clearable && name.value ? _vue.h.call(void 0,
229
+ "span",
230
+ {
231
+ style: {
232
+ cursor: "pointer",
233
+ marginLeft: "10px",
234
+ padding: "5px",
235
+ fontSize: "16px",
236
+ textAlign: "center"
237
+ },
238
+ onClick() {
239
+ name.value = void 0;
240
+ box.value = false;
241
+ }
242
+ },
243
+ "\u6E05\u7A7A"
244
+ ) : void 0
189
245
  ]
190
246
  )
191
247
  ]
@@ -232,7 +288,7 @@ var picker_default = _vue.defineComponent.call(void 0, {
232
288
  }
233
289
  },
234
290
  [
235
- _vue.h.call(void 0, _chunkTEKHTJSDcjs.icon_default, {
291
+ _vue.h.call(void 0, _chunk2LL6OGUUcjs.icon_default, {
236
292
  style: {
237
293
  margin: "5px",
238
294
  marginBottom: 0,
@@ -21,9 +21,15 @@ type Icons = {
21
21
  icons: IconsValue;
22
22
  };
23
23
  declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
24
+ icon: {
25
+ type: ObjectConstructor;
26
+ };
24
27
  dialog: {
25
28
  type: ObjectConstructor;
26
29
  };
30
+ clearable: {
31
+ type: BooleanConstructor;
32
+ };
27
33
  /**
28
34
  * @props { String } modelValue= ( )
29
35
  * 图标名称
@@ -56,9 +62,15 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
56
62
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
57
63
  [key: string]: any;
58
64
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
65
+ icon: {
66
+ type: ObjectConstructor;
67
+ };
59
68
  dialog: {
60
69
  type: ObjectConstructor;
61
70
  };
71
+ clearable: {
72
+ type: BooleanConstructor;
73
+ };
62
74
  /**
63
75
  * @props { String } modelValue= ( )
64
76
  * 图标名称
@@ -91,6 +103,7 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
91
103
  }>> & Readonly<{
92
104
  "onUpdate:modelValue"?: (...args: any[]) => any;
93
105
  }>, {
106
+ clearable: boolean;
94
107
  size: string | number;
95
108
  icons: Icons;
96
109
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
@@ -21,9 +21,15 @@ type Icons = {
21
21
  icons: IconsValue;
22
22
  };
23
23
  declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
24
+ icon: {
25
+ type: ObjectConstructor;
26
+ };
24
27
  dialog: {
25
28
  type: ObjectConstructor;
26
29
  };
30
+ clearable: {
31
+ type: BooleanConstructor;
32
+ };
27
33
  /**
28
34
  * @props { String } modelValue= ( )
29
35
  * 图标名称
@@ -56,9 +62,15 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
56
62
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
57
63
  [key: string]: any;
58
64
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
65
+ icon: {
66
+ type: ObjectConstructor;
67
+ };
59
68
  dialog: {
60
69
  type: ObjectConstructor;
61
70
  };
71
+ clearable: {
72
+ type: BooleanConstructor;
73
+ };
62
74
  /**
63
75
  * @props { String } modelValue= ( )
64
76
  * 图标名称
@@ -91,6 +103,7 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
91
103
  }>> & Readonly<{
92
104
  "onUpdate:modelValue"?: (...args: any[]) => any;
93
105
  }>, {
106
+ clearable: boolean;
94
107
  size: string | number;
95
108
  icons: Icons;
96
109
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  icon_default
3
- } from "../chunk-FY4NYXM7.js";
3
+ } from "../chunk-TKF4GGHW.js";
4
4
  import "../chunk-BYXBJQAS.js";
5
5
  import "../chunk-MOHILOKE.js";
6
6
  import {
@@ -9,13 +9,19 @@ import {
9
9
  import "../chunk-MLKGABMK.js";
10
10
 
11
11
  // packages/picker/index.ts
12
- import { h, defineComponent, ref, computed } from "vue";
12
+ import { h, defineComponent, ref, resolveComponent, computed } from "vue";
13
13
  var picker_default = defineComponent({
14
14
  name: "Picker",
15
15
  props: {
16
+ icon: {
17
+ type: Object
18
+ },
16
19
  dialog: {
17
20
  type: Object
18
21
  },
22
+ clearable: {
23
+ type: Boolean
24
+ },
19
25
  /**
20
26
  * @props { String } modelValue= ( )
21
27
  * 图标名称
@@ -70,6 +76,17 @@ var picker_default = defineComponent({
70
76
  return obj;
71
77
  }
72
78
  });
79
+ const iconVue = computed(() => {
80
+ if (props.icon) {
81
+ if (typeof props.icon === "string") {
82
+ return resolveComponent(props.icon);
83
+ } else {
84
+ return props.icon;
85
+ }
86
+ } else {
87
+ return icon_default;
88
+ }
89
+ });
73
90
  let size = props.size;
74
91
  if (typeof size === "number") {
75
92
  size = size + "px";
@@ -100,7 +117,7 @@ var picker_default = defineComponent({
100
117
  }
101
118
  },
102
119
  [
103
- h(icon_default, {
120
+ h(iconVue.value, {
104
121
  type: props.type,
105
122
  size: props.size,
106
123
  name: props.modelValue
@@ -115,12 +132,34 @@ var picker_default = defineComponent({
115
132
  }
116
133
  },
117
134
  name.value
118
- )
135
+ ),
136
+ props.clearable && name.value ? h(
137
+ "span",
138
+ {
139
+ style: {
140
+ cursor: "pointer",
141
+ padding: "5px",
142
+ fontSize: "16px",
143
+ width: "24px",
144
+ textAlign: "center"
145
+ },
146
+ onClick(e) {
147
+ e.stopPropagation();
148
+ name.value = void 0;
149
+ emit(
150
+ "update:modelValue",
151
+ name.value
152
+ );
153
+ }
154
+ },
155
+ "x"
156
+ ) : void 0
119
157
  ]
120
158
  ),
121
159
  h(
122
160
  props.dialog || dialog_default,
123
161
  {
162
+ title: "\u9009\u62E9\u56FE\u6807",
124
163
  modelValue: box.value,
125
164
  "onUpdate:modelValue": (v) => {
126
165
  box.value = v;
@@ -181,11 +220,28 @@ var picker_default = defineComponent({
181
220
  },
182
221
  name.value
183
222
  ),
184
- h(icon_default, {
223
+ h(iconVue.value, {
185
224
  type: props.type,
186
225
  size: props.size,
187
226
  name: name.value
188
- })
227
+ }),
228
+ props.clearable && name.value ? h(
229
+ "span",
230
+ {
231
+ style: {
232
+ cursor: "pointer",
233
+ marginLeft: "10px",
234
+ padding: "5px",
235
+ fontSize: "16px",
236
+ textAlign: "center"
237
+ },
238
+ onClick() {
239
+ name.value = void 0;
240
+ box.value = false;
241
+ }
242
+ },
243
+ "\u6E05\u7A7A"
244
+ ) : void 0
189
245
  ]
190
246
  )
191
247
  ]
@@ -4,7 +4,7 @@
4
4
  var _chunk6CU3NPDGcjs = require('../chunk-6CU3NPDG.cjs');
5
5
 
6
6
 
7
- var _chunkRS35DSE3cjs = require('../chunk-RS35DSE3.cjs');
7
+ var _chunk6HEYV6HJcjs = require('../chunk-6HEYV6HJ.cjs');
8
8
  require('../chunk-3376ZTRC.cjs');
9
9
  require('../chunk-IIVF4KK5.cjs');
10
10
  require('../chunk-75ZPJI57.cjs');
@@ -1222,7 +1222,7 @@ function findComponents(code, name) {
1222
1222
  return components;
1223
1223
  }
1224
1224
  function getText(iconName, match) {
1225
- const svg = _chunk6CU3NPDGcjs.getIconifySVG.call(void 0, _chunkRS35DSE3cjs.json_default, iconName, 'v-bind="scope"');
1225
+ const svg = _chunk6CU3NPDGcjs.getIconifySVG.call(void 0, _chunk6HEYV6HJcjs.json_default, iconName, 'v-bind="scope"');
1226
1226
  const s = match.fullMatch.replace(`name="${iconName}"`, "").replace(`</${match.componentName}>`, "");
1227
1227
  const text = `${s}<template #default="scope">${svg}</template></${match.componentName}>`;
1228
1228
  return { text, imptext: "" };
@@ -1248,7 +1248,7 @@ function replaceComponent(match, type, dynamic, customReplacement) {
1248
1248
  if (customReplacement) {
1249
1249
  return customReplacement(iconName, attributes);
1250
1250
  }
1251
- let svgContent = _chunkRS35DSE3cjs.json_default.icons[iconName];
1251
+ let svgContent = _chunk6HEYV6HJcjs.json_default.icons[iconName];
1252
1252
  if (!svgContent) {
1253
1253
  return { text: match.fullMatch, imptext: "" };
1254
1254
  }
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-7QX4NRMQ.js";
5
5
  import {
6
6
  json_default
7
- } from "../chunk-FDMRAGOU.js";
7
+ } from "../chunk-TGMIXPQX.js";
8
8
  import "../chunk-BYXBJQAS.js";
9
9
  import "../chunk-MOHILOKE.js";
10
10
  import "../chunk-MLKGABMK.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fangzhongya/icons",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.0.26",
5
+ "version": "0.0.28",
6
6
  "description ": "个人图标库",
7
7
  "author": "fangzhongya ",
8
8
  "license": "MIT",