@hugeicons/vue 1.0.1 → 1.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/README.md CHANGED
@@ -295,7 +295,10 @@ This project is licensed under the [MIT License](LICENSE.md).
295
295
 
296
296
  ## Changelog
297
297
 
298
- ### v1.1.0
298
+ ### v1.0.2
299
+ - Fix: Remove stroke attribute from SVG when no stroke width is passed to improve icon rendering flexibility
300
+
301
+ ### v1.0.1
299
302
  - Added `absoluteStrokeWidth` prop for consistent stroke width scaling
300
303
  - Improved stroke width handling by applying it at the SVG level
301
304
  - Enhanced TypeScript types and documentation
@@ -6,7 +6,7 @@ var HugeiconsIcon_vue_vue_type_script_lang = require('./HugeiconsIcon.vue2.js');
6
6
  var vue = require('vue');
7
7
  var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
8
8
 
9
- const _hoisted_1 = ["width", "height", "color", "stroke-width"];
9
+ const _hoisted_1 = ["width", "height", "color", "stroke-width", "stroke"];
10
10
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11
11
  return vue.openBlock(), vue.createElementBlock("svg", vue.mergeProps({
12
12
  width: _ctx.computedSize,
@@ -16,7 +16,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
16
16
  fill: "none",
17
17
  color: _ctx.color,
18
18
  "stroke-width": _ctx.calculatedStrokeWidth,
19
- stroke: "currentColor"
19
+ stroke: _ctx.calculatedStrokeWidth !== void 0 ? "currentColor" : void 0
20
20
  }, _ctx.$attrs), [
21
21
  (vue.openBlock(true), vue.createElementBlock(
22
22
  vue.Fragment,
@@ -1 +1 @@
1
- {"version":3,"file":"HugeiconsIcon.vue.js","sources":["../../../src/components/HugeiconsIcon.vue"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n stroke=\"currentColor\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":["computedSize","_openBlock","_createElementBlock","_mergeProps","color","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","transformAttrs"],"mappings":";;;;;;;;;AAEU,SAAA,WAAA,CAAEA,IAAY,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;AACb,EAAA,OAAAC,aAAA,EAAc,EAAAC,sBAAA,CAAA,KAAA,EAAAC,cAAA,CAAA;AAAA,IACpB,OAAO,IAAE,CAAA,YAAA;AAAA,IACV,MAAM,EAAA,IAAA,CAAA,YAAA;AAAA,IACN,OAAK,EAAA,CAAA,SAAA,CAAA;AAAA,IACJ,KAAOC,EAAAA,4BAAAA;AAAAA,IACP,IAAA,EAAA,MAAA;AAAA,IACD,OAAM,IAAC,CAAA,KAAA;AAAA,IACO,cAAA,EAAA,IAAA,CAAA,qBAAA;AAAA,IAAA,MAAA,EAAA,cAAA;;mBAE0C,IAAK,CAAA,EAAAF,sBAAA;AAAA,MAAAG,YAAA;AAAA,MAAA,IAAA;AAAA,MAAAC,cAAA,CAAA,IAAA,CAAA,WAAA,EAAA,CAAA,OAAA,EAAA,KAAA,KAAA;AAZjE,QAAA,OAAAL,aAAA,EAAA,EAAAM,eAAA;AAAA,UAAAC,2BAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA;AAAA,UAAAL,cAAA,CAAA;AAAA,YAegBM,GAAAA,EAAAA,KAAAA;AAAAA,YAAAA,OAAAA,EAAAA,IAAAA;AAfhB,WAAA,EAAA,IAAA,CAAA,cAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,UAAA,IAAA;AAAA,UAAA,EAAA;AAAA;AAAA,SAAA,CAAA;AAAA,OAAA,CAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"HugeiconsIcon.vue.js","sources":["../../../src/components/HugeiconsIcon.vue"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n :stroke=\"calculatedStrokeWidth !== undefined ? 'currentColor' : undefined\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":["computedSize","_openBlock","_createElementBlock","_mergeProps","color","calculatedStrokeWidth","currentIcon","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","transformAttrs"],"mappings":";;;;;;;;;AAEU,SAAA,WAAA,CAAEA,IAAY,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;AACb,EAAA,OAAAC,aAAA,EAAc,EAAAC,sBAAA,CAAA,KAAA,EAAAC,cAAA,CAAA;AAAA,IACpB,OAAO,IAAE,CAAA,YAAA;AAAA,IACV,MAAM,EAAA,IAAA,CAAA,YAAA;AAAA,IACN,OAAK,EAAA,CAAA,SAAA,CAAA;AAAA,IACJ,KAAOC,EAAAA,4BAAAA;AAAAA,IACP,IAAA,EAAA,MAAA;AAAA,IACA,OAAM,IAAEC,CAAAA,KAAAA;AAAAA,IACK,cAAA,EAAA,IAAA,CAAA,qBAAA;AAAA,IAAA,MAAA,EAAA,IAAA,CAAA,qBAAA,KAOH,KAL0BC,CAAAA,GAAAA,cAAAA,GAAAA,KAAAA,CAAAA;AAAAA,GAAAA,EAAAA,IAAAA,CAAAA,MAAAA,CAAAA,EAAAA;mBAAmB,IAAK,CAAA,EAAAJ,sBAAA;AAAA,MAAAK,YAAA;AAAA,MAAA,IAAA;AAAA,MAAAC,cAAA,CAAA,IAAA,CAAA,WAAA,EAAA,CAAA,OAAA,EAAA,KAAA,KAAA;AAZjE,QAAA,OAAAP,aAAA,EAAA,EAAAQ,eAAA;AAAA,UAAAC,2BAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA;AAAA,UAAAP,cAAA,CAAA;AAAA,YAegBQ,GAAAA,EAAAA,KAAAA;AAAAA,YAAAA,OAAAA,EAAAA,IAAAA;AAfhB,WAAA,EAAA,IAAA,CAAA,cAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,UAAA,IAAA;AAAA,UAAA,EAAA;AAAA;AAAA,SAAA,CAAA;AAAA,OAAA,CAAA;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"HugeiconsIcon.vue2.js","sources":["../../../src/components/HugeiconsIcon.vue"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n stroke=\"currentColor\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":["defineComponent","computed"],"mappings":";;;;;;AAwBA,gBAAeA,mBAAe,CAAC;AAC7B,EAAA,IAAI,EAAE,eAAe;AACrB,EAAA,YAAY,EAAE,KAAK;AACnB,EAAA,KAAK,EAAE;IACL,IAAI,EAAE;MACJ,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CAAA;AACrD,MAAA,OAAO,KAAK,CAAC,mBAAA;AACX,UAAE,CAAC,KAAK,CAAC,WAAA,GAAc,EAAE,IAAI,YAAY,CAAC,KAAA;AAC1C,UAAE,KAAK,CAAC,WAAW,CAAA;AACvB,KAAC,CAAC,CAAA;;AAEF,IAAA,MAAM,WAAY,GAAEA,YAAQ,CAAC,MAAM;MACjC,OAAO,KAAK,CAAC,OAAA,IAAW,KAAK,CAAC,OAAQ,GAAE,KAAK,CAAC,OAAA,GAAU,KAAK,CAAC,IAAI,CAAA;AACpE,KAAC,CAAC,CAAA;;IAEF,MAAM,cAAe,GAAE,CAAC,KAAK,KAA0B;MACrD,MAAM,MAAO,GAAE,EAAE,GAAG,OAAO,CAAA;AAC3B,MAAA,IAAI,MAAM,CAAC,QAAQ,EAAE;AACnB,QAAA,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAA;AACrC,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAA;AACxB,OAAA;MACA,OAAO,MAAM,CAAA;KACd,CAAA;;AAED,IAAA,OAAO;MACL,YAAY;AACZ,MAAA,qBAAqB;AACrB,MAAA,cAAc;MACd,WAAA;KACD,CAAA;AACH,GAAA;AACF,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"HugeiconsIcon.vue2.js","sources":["../../../src/components/HugeiconsIcon.vue"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n :stroke=\"calculatedStrokeWidth !== undefined ? 'currentColor' : undefined\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":["defineComponent","computed"],"mappings":";;;;;;AAwBA,gBAAeA,mBAAe,CAAC;AAC7B,EAAA,IAAI,EAAE,eAAe;AACrB,EAAA,YAAY,EAAE,KAAK;AACnB,EAAA,KAAK,EAAE;IACL,IAAI,EAAE;MACJ,IAAI,EAAE,KAAM;MACZ,QAAQ,EAAE,IAAA;KACX;IACD,IAAI,EAAE;AACJ,MAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;MACtB,OAAO,EAAE,EAAE;AACX,MAAA,SAAS,CAAC,KAAK,EAAmB;QAChC,MAAM,IAAA,GAAO,OAAO,UAAU,QAA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C,MAAM;MACjC,OAAO,KAAK,CAAC,OAAA,IAAW,KAAK,CAAC,OAAQ,GAAE,KAAK,CAAC,OAAA,GAAU,KAAK,CAAC,IAAI,CAAA;AACpE,KAAC,CAAC,CAAA;;IAEF,MAAM,cAAe,GAAE,CAAC,KAAK,KAA0B;MACrD,MAAM,MAAO,GAAE,EAAE,GAAG,OAAO,CAAA;AAC3B,MAAA,IAAI,MAAM,CAAC,QAAQ,EAAE;AACnB,QAAA,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAA;AACrC,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAA;AACxB,OAAA;MACA,OAAO,MAAM,CAAA;KACd,CAAA;;AAED,IAAA,OAAO;MACL,YAAY;AACZ,MAAA,qBAAqB;AACrB,MAAA,cAAc;MACd,WAAA;KACD,CAAA;AACH,GAAA;AACF,CAAC,CAAC;;;;"}
@@ -2,7 +2,7 @@ import _sfc_main from './HugeiconsIcon.vue2.js';
2
2
  import { openBlock, createElementBlock, mergeProps, Fragment, renderList, createBlock, resolveDynamicComponent } from 'vue';
3
3
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
- const _hoisted_1 = ["width", "height", "color", "stroke-width"];
5
+ const _hoisted_1 = ["width", "height", "color", "stroke-width", "stroke"];
6
6
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7
7
  return openBlock(), createElementBlock("svg", mergeProps({
8
8
  width: _ctx.computedSize,
@@ -12,7 +12,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
12
12
  fill: "none",
13
13
  color: _ctx.color,
14
14
  "stroke-width": _ctx.calculatedStrokeWidth,
15
- stroke: "currentColor"
15
+ stroke: _ctx.calculatedStrokeWidth !== void 0 ? "currentColor" : void 0
16
16
  }, _ctx.$attrs), [
17
17
  (openBlock(true), createElementBlock(
18
18
  Fragment,
@@ -1 +1 @@
1
- {"version":3,"file":"HugeiconsIcon.vue.js","sources":["../../../src/components/HugeiconsIcon.vue"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n stroke=\"currentColor\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":["computedSize","_openBlock","_createElementBlock","_mergeProps","color","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","transformAttrs"],"mappings":";;;;;AAEU,SAAA,WAAA,CAAEA,IAAY,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;AACb,EAAA,OAAAC,SAAA,EAAc,EAAAC,kBAAA,CAAA,KAAA,EAAAC,UAAA,CAAA;AAAA,IACpB,OAAO,IAAE,CAAA,YAAA;AAAA,IACV,MAAM,EAAA,IAAA,CAAA,YAAA;AAAA,IACN,OAAK,EAAA,CAAA,SAAA,CAAA;AAAA,IACJ,KAAOC,EAAAA,4BAAAA;AAAAA,IACP,IAAA,EAAA,MAAA;AAAA,IACD,OAAM,IAAC,CAAA,KAAA;AAAA,IACO,cAAA,EAAA,IAAA,CAAA,qBAAA;AAAA,IAAA,MAAA,EAAA,cAAA;;eAE0C,IAAK,CAAA,EAAAF,kBAAA;AAAA,MAAAG,QAAA;AAAA,MAAA,IAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,WAAA,EAAA,CAAA,OAAA,EAAA,KAAA,KAAA;AAZjE,QAAA,OAAAL,SAAA,EAAA,EAAAM,WAAA;AAAA,UAAAC,uBAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA;AAAA,UAAAL,UAAA,CAAA;AAAA,YAegBM,GAAAA,EAAAA,KAAAA;AAAAA,YAAAA,OAAAA,EAAAA,IAAAA;AAfhB,WAAA,EAAA,IAAA,CAAA,cAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,UAAA,IAAA;AAAA,UAAA,EAAA;AAAA;AAAA,SAAA,CAAA;AAAA,OAAA,CAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"HugeiconsIcon.vue.js","sources":["../../../src/components/HugeiconsIcon.vue"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n :stroke=\"calculatedStrokeWidth !== undefined ? 'currentColor' : undefined\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":["computedSize","_openBlock","_createElementBlock","_mergeProps","color","calculatedStrokeWidth","currentIcon","_Fragment","_renderList","_createBlock","_resolveDynamicCompon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ent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n stroke=\"currentColor\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":[],"mappings":";;AAwBA,gBAAe,eA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AAA;;AAEF,IAAA,MAAM,qBAAsB,GAAE,QAAQ,CAAC,MAAM;MAC3C,IAAI,KAAK,CAAC,gBAAgB,SAAS,EAAE,OAAO,SAAS,CAAA;AACrD,MAAA,OAAO,KAAK,CAAC,mBAAA;AACX,UAAE,CAAC,KAAK,CAAC,WAAA,GAAc,EAAE,IAAI,YAAY,CAAC,KAAA;AAC1C,UAAE,KAAK,CAAC,WAAW,CAAA;AACvB,KAAC,CAAC,CAAA;;AAEF,IAAA,MAAM,WAAY,GAAE,QAAQ,CAAC,MAAM;MACjC,OAAO,KAAK,CAAC,OAAA,IAAW,KAAK,CAAC,OAAQ,GAAE,KAAK,CAAC,OAAA,GAAU,KAAK,CAAC,IAAI,CAAA;AACpE,KAAC,CAAC,CAAA;;IAEF,MAAM,cAAe,GAAE,CAAC,KAAK,KAA0B;MACrD,MAAM,MAAO,GAAE,EAAE,GAAG,OAAO,CAAA;AAC3B,MAAA,IAAI,MAAM,CAAC,QAAQ,EAAE;AACnB,QAAA,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAA;AACrC,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAA;AACxB,OAAA;MACA,OAAO,MAAM,CAAA;KACd,CAAA;;AAED,IAAA,OAAO;MACL,YAAY;AACZ,MAAA,qBAAqB;AACrB,MAAA,cAAc;MACd,WAAA;KACD,CAAA;AACH,GAAA;AACF,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"HugeiconsIcon.vue2.js","sources":["../../../src/components/HugeiconsIcon.vue"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n :stroke=\"calculatedStrokeWidth !== undefined ? 'currentColor' : undefined\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> "],"names":[],"mappings":";;AAwBA,gBAAe,eAAe,CAAC;AAC7B,EAAA,IAAI,EAAE,eAAe;AACrB,EAAA,YAAY,EAAE,KAAK;AACnB,EAAA,KAAK,EAAE;IACL,IAAI,EAAE;MACJ,IAAI,EAAE,KAAM;MACZ,QAAQ,EAAE,IAAA;KACX;IACD,IAAI,EAAE;AACJ,MAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;MACt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E,KAAK,CAAC,WAAW,CAAA;AACvB,KAAC,CAAC,CAAA;;AAEF,IAAA,MAAM,WAAY,GAAE,QAAQ,CAAC,MAAM;MACjC,OAAO,KAAK,CAAC,OAAA,IAAW,KAAK,CAAC,OAAQ,GAAE,KAAK,CAAC,OAAA,GAAU,KAAK,CAAC,IAAI,CAAA;AACpE,KAAC,CAAC,CAAA;;IAEF,MAAM,cAAe,GAAE,CAAC,KAAK,KAA0B;MACrD,MAAM,MAAO,GAAE,EAAE,GAAG,OAAO,CAAA;AAC3B,MAAA,IAAI,MAAM,CAAC,QAAQ,EAAE;AACnB,QAAA,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAA;AACrC,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAA;AACxB,OAAA;MACA,OAAO,MAAM,CAAA;KACd,CAAA;;AAED,IAAA,OAAO;MACL,YAAY;AACZ,MAAA,qBAAqB;AACrB,MAAA,cAAc;MACd,WAAA;KACD,CAAA;AACH,GAAA;AACF,CAAC,CAAC;;;;"}
package/dist/umd/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HugeiconsVue={},e.Vue)}(this,(function(e,t){"use strict";var o=t.defineComponent({name:"HugeiconsIcon",inheritAttrs:!1,props:{icon:{type:Array,required:!0},size:{type:[Number,String],default:24,validator(e){const t="string"==typeof e?parseInt(e,10):e;return!isNaN(t)&&t>0}},strokeWidth:{type:Number,default:void 0},absoluteStrokeWidth:{type:Boolean,default:!1},altIcon:{type:Array,default:void 0},showAlt:{type:Boolean,default:!1},color:{type:String,default:"currentColor"}},setup(e){const o=t.computed((()=>{const t="string"==typeof e.size?parseInt(e.size,10):e.size;return!isNaN(t)&&t>0?t:24})),r=t.computed((()=>{if(void 0!==e.strokeWidth)return e.absoluteStrokeWidth?24*e.strokeWidth/o.value:e.strokeWidth})),n=t.computed((()=>e.altIcon&&e.showAlt?e.altIcon:e.icon));return{computedSize:o,calculatedStrokeWidth:r,transformAttrs:e=>{const t={...e};return t.fillRule&&(t["fill-rule"]=t.fillRule,delete t.fillRule),t},currentIcon:n}}});const r=["width","height","color","stroke-width"];var n=((e,t)=>{const o=e.__vccOpts||e;for(const[e,r]of t)o[e]=r;return o})(o,[["render",function(e,o,n,i,c,s){return t.openBlock(),t.createElementBlock("svg",t.mergeProps({width:e.computedSize,height:e.computedSize,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"none",color:e.color,"stroke-width":e.calculatedStrokeWidth,stroke:"currentColor"},e.$attrs),[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.currentIcon,((o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o[0]),t.mergeProps({key:r,ref_for:!0},e.transformAttrs(o[1])),null,16)))),128))],16,r)}],["__file","/Users/mac/Documents/Projects/Hugeicons/monorepo/hugeicons/packages/vue/src/components/HugeiconsIcon.vue"]]);const i={install:e=>{e.component("HugeiconsIcon",n)}};e.HugeiconsIcon=n,e.HugeiconsPlugin=i,e.default=i,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HugeiconsVue={},e.Vue)}(this,(function(e,t){"use strict";var o=t.defineComponent({name:"HugeiconsIcon",inheritAttrs:!1,props:{icon:{type:Array,required:!0},size:{type:[Number,String],default:24,validator(e){const t="string"==typeof e?parseInt(e,10):e;return!isNaN(t)&&t>0}},strokeWidth:{type:Number,default:void 0},absoluteStrokeWidth:{type:Boolean,default:!1},altIcon:{type:Array,default:void 0},showAlt:{type:Boolean,default:!1},color:{type:String,default:"currentColor"}},setup(e){const o=t.computed((()=>{const t="string"==typeof e.size?parseInt(e.size,10):e.size;return!isNaN(t)&&t>0?t:24})),r=t.computed((()=>{if(void 0!==e.strokeWidth)return e.absoluteStrokeWidth?24*e.strokeWidth/o.value:e.strokeWidth})),n=t.computed((()=>e.altIcon&&e.showAlt?e.altIcon:e.icon));return{computedSize:o,calculatedStrokeWidth:r,transformAttrs:e=>{const t={...e};return t.fillRule&&(t["fill-rule"]=t.fillRule,delete t.fillRule),t},currentIcon:n}}});const r=["width","height","color","stroke-width","stroke"];var n=((e,t)=>{const o=e.__vccOpts||e;for(const[e,r]of t)o[e]=r;return o})(o,[["render",function(e,o,n,i,c,s){return t.openBlock(),t.createElementBlock("svg",t.mergeProps({width:e.computedSize,height:e.computedSize,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"none",color:e.color,"stroke-width":e.calculatedStrokeWidth,stroke:void 0!==e.calculatedStrokeWidth?"currentColor":void 0},e.$attrs),[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.currentIcon,((o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o[0]),t.mergeProps({key:r,ref_for:!0},e.transformAttrs(o[1])),null,16)))),128))],16,r)}],["__file","/Users/mac/Documents/Projects/Hugeicons/monorepo/hugeicons/packages/vue/src/components/HugeiconsIcon.vue"]]);const i={install:e=>{e.component("HugeiconsIcon",n)}};e.HugeiconsIcon=n,e.HugeiconsPlugin=i,e.default=i,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/components/HugeiconsIcon.vue","../../src/index.ts"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n stroke=\"currentColor\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> ","import type { App } from 'vue';\nimport HugeiconsIcon from './components/HugeiconsIcon.vue';\n\nexport { default as HugeiconsIcon } from './components/HugeiconsIcon.vue';\nexport * from './types';\n\nexport const HugeiconsPlugin = {\n install: (app: App) => {\n app.component('HugeiconsIcon', HugeiconsIcon);\n }\n};\n\nexport default HugeiconsPlugin; "],"names":["_sfc_main","defineComponent","name","inheritAttrs","props","icon","type","Array","required","size","Number","String","default","validator","value","parseInt","isNaN","strokeWidth","undefined","absoluteStrokeWidth","Boolean","altIcon","showAlt","color","setup","computedSize","computed","calculatedStrokeWidth","currentIcon","transformAttrs","attrs","result","fillRule","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_mergeProps","width","_ctx","height","viewBox","xmlns","fill","stroke","createElementBlock","_Fragment","Fragment","_renderList","element","index","_createBlock","createBlock","_resolveDynamicComponent","HugeiconsPlugin","install","app","component","HugeiconsIcon"],"mappings":"iRAwBA,IAAAA,EAAeC,kBAAgB,CAC7BC,KAAM,gBACNC,cAAc,EACdC,MAAO,CACLC,KAAM,CACJC,KAAMC,MACNC,UAAU,GAEZC,KAAM,CACJH,KAAM,CAACI,OAAQC,QACfC,QAAS,GACT,SAAAC,CAAUC,GACR,MAAML,EAAwB,iBAAVK,EAAqBC,SAASD,EAAO,IAAMA,EAC/D,OAAQE,MAAMP,IAASA,EAAO,CAChC,GAEFQ,YAAa,CACXX,KAAMI,OACNE,aAASM,GAEXC,oBAAqB,CACnBb,KAAMc,QACNR,SAAS,GAEXS,QAAS,CACPf,KAAMC,MACNK,aAASM,GAEXI,QAAS,CACPhB,KAAMc,QACNR,SAAS,GAEXW,MAAO,CACLjB,KAAMK,OACNC,QAAS,iBAGb,KAAAY,CAAMpB,GACJ,MAAMqB,EAAeC,EAAAA,UAAS,KAC5B,MAAMjB,EAA6B,iBAAfL,EAAMK,KAAoBM,SAASX,EAAMK,KAAM,IAAML,EAAMK,KAC/E,OAAQO,MAAMP,IAASA,EAAO,EAAIA,EAAO,EAAE,IAGvCkB,EAAwBD,EAAAA,UAAS,KACrC,QAA0BR,IAAtBd,EAAMa,YACV,OAAOb,EAAMe,oBACY,GAApBf,EAAMa,YAAoBQ,EAAaX,MACxCV,EAAMa,WAAW,IAGjBW,EAAcF,EAAAA,UAAS,IACpBtB,EAAMiB,SAAWjB,EAAMkB,QAAUlB,EAAMiB,QAAUjB,EAAMC,OAYhE,MAAO,CACLoB,eACAE,wBACAE,eAZsBC,IACtB,MAAMC,EAAS,IAAKD,GAKpB,OAJIC,EAAOC,WACTD,EAAO,aAAeA,EAAOC,gBACtBD,EAAOC,UAETD,CAAM,EAObH,cAEJ,8IA3FQ,SAAEH,EAAYQ,EAAAC,EAAAC,EAAAC,EAAAC,GACb,OAAAC,cAAcC,qBAAA,MAAAC,EAAAA,WAAA,CACpBC,MAAOC,EAAEjB,aACVkB,OAAMD,EAAAjB,aACNmB,QAAK,YACJC,MAAOtB,6BACPuB,KAAA,OACDvB,MAAMmB,EAACnB,MACO,eAAAmB,EAAAf,sBAAAoB,OAAA,yCAE0C,GAAKR,EAAAS,mBAAAC,EAAAC,SAAA,KAAAC,EAAAA,WAAAT,EAAAd,aAAA,CAAAwB,EAAAC,KAZjEf,EAAAA,YAAAgB,EAAAC,YAAAC,0BAAAJ,EAAA,IAAAZ,aAAA,CAegBX,IAAAA,EAAAA,SAAAA,GAfhBa,EAAAb,eAAAuB,EAAA,KAAA,KAAA,8ICMO,MAAMK,EAAkB,CAC7BC,QAAUC,IACRA,EAAIC,UAAU,gBAAiBC,EAAc"}
1
+ {"version":3,"file":"index.js","sources":["../../src/components/HugeiconsIcon.vue","../../src/index.ts"],"sourcesContent":["<template>\n <svg\n :width=\"computedSize\"\n :height=\"computedSize\"\n :viewBox=\"`0 0 24 24`\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n :color=\"color\"\n :stroke-width=\"calculatedStrokeWidth\"\n :stroke=\"calculatedStrokeWidth !== undefined ? 'currentColor' : undefined\"\n v-bind=\"$attrs\"\n >\n <template v-for=\"(element, index) in currentIcon\" :key=\"index\">\n <component\n :is=\"element[0]\"\n v-bind=\"transformAttrs(element[1])\"\n />\n </template>\n </svg>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, PropType, computed } from 'vue';\n\nexport default defineComponent({\n name: 'HugeiconsIcon',\n inheritAttrs: false,\n props: {\n icon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n required: true\n },\n size: {\n type: [Number, String],\n default: 24,\n validator(value: number | string) {\n const size = typeof value === 'string' ? parseInt(value, 10) : value;\n return !isNaN(size) && size > 0;\n }\n },\n strokeWidth: {\n type: Number,\n default: undefined\n },\n absoluteStrokeWidth: {\n type: Boolean,\n default: false\n },\n altIcon: {\n type: Array as PropType<[string, Record<string, any>][]>,\n default: undefined\n },\n showAlt: {\n type: Boolean,\n default: false\n },\n color: {\n type: String,\n default: 'currentColor'\n }\n },\n setup(props) {\n const computedSize = computed(() => {\n const size = typeof props.size === 'string' ? parseInt(props.size, 10) : props.size;\n return !isNaN(size) && size > 0 ? size : 24;\n });\n\n const calculatedStrokeWidth = computed(() => {\n if (props.strokeWidth === undefined) return undefined;\n return props.absoluteStrokeWidth \n ? (props.strokeWidth * 24) / computedSize.value \n : props.strokeWidth;\n });\n\n const currentIcon = computed(() => {\n return props.altIcon && props.showAlt ? props.altIcon : props.icon;\n });\n\n const transformAttrs = (attrs: Record<string, any>) => {\n const result = { ...attrs };\n if (result.fillRule) {\n result['fill-rule'] = result.fillRule;\n delete result.fillRule;\n }\n return result;\n };\n\n return {\n computedSize,\n calculatedStrokeWidth,\n transformAttrs,\n currentIcon\n };\n }\n});\n</script> ","import type { App } from 'vue';\nimport HugeiconsIcon from './components/HugeiconsIcon.vue';\n\nexport { default as HugeiconsIcon } from './components/HugeiconsIcon.vue';\nexport * from './types';\n\nexport const HugeiconsPlugin = {\n install: (app: App) => {\n app.component('HugeiconsIcon', HugeiconsIcon);\n }\n};\n\nexport default HugeiconsPlugin; "],"names":["_sfc_main","defineComponent","name","inheritAttrs","props","icon","type","Array","required","size","Number","String","default","validator","value","parseInt","isNaN","strokeWidth","undefined","absoluteStrokeWidth","Boolean","altIcon","showAlt","color","setup","computedSize","computed","calculatedStrokeWidth","currentIcon","transformAttrs","attrs","result","fillRule","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_mergeProps","width","_ctx","height","viewBox","xmlns","fill","stroke","createElementBlock","_Fragment","Fragment","_renderList","element","index","_createBlock","createBlock","_resolveDynamicComponent","HugeiconsPlugin","install","app","component","HugeiconsIcon"],"mappings":"iRAwBA,IAAAA,EAAeC,kBAAgB,CAC7BC,KAAM,gBACNC,cAAc,EACdC,MAAO,CACLC,KAAM,CACJC,KAAMC,MACNC,UAAU,GAEZC,KAAM,CACJH,KAAM,CAACI,OAAQC,QACfC,QAAS,GACT,SAAAC,CAAUC,GACR,MAAML,EAAwB,iBAAVK,EAAqBC,SAASD,EAAO,IAAMA,EAC/D,OAAQE,MAAMP,IAASA,EAAO,CAChC,GAEFQ,YAAa,CACXX,KAAMI,OACNE,aAASM,GAEXC,oBAAqB,CACnBb,KAAMc,QACNR,SAAS,GAEXS,QAAS,CACPf,KAAMC,MACNK,aAASM,GAEXI,QAAS,CACPhB,KAAMc,QACNR,SAAS,GAEXW,MAAO,CACLjB,KAAMK,OACNC,QAAS,iBAGb,KAAAY,CAAMpB,GACJ,MAAMqB,EAAeC,EAAAA,UAAS,KAC5B,MAAMjB,EAA6B,iBAAfL,EAAMK,KAAoBM,SAASX,EAAMK,KAAM,IAAML,EAAMK,KAC/E,OAAQO,MAAMP,IAASA,EAAO,EAAIA,EAAO,EAAE,IAGvCkB,EAAwBD,EAAAA,UAAS,KACrC,QAA0BR,IAAtBd,EAAMa,YACV,OAAOb,EAAMe,oBACY,GAApBf,EAAMa,YAAoBQ,EAAaX,MACxCV,EAAMa,WAAW,IAGjBW,EAAcF,EAAAA,UAAS,IACpBtB,EAAMiB,SAAWjB,EAAMkB,QAAUlB,EAAMiB,QAAUjB,EAAMC,OAYhE,MAAO,CACLoB,eACAE,wBACAE,eAZsBC,IACtB,MAAMC,EAAS,IAAKD,GAKpB,OAJIC,EAAOC,WACTD,EAAO,aAAeA,EAAOC,gBACtBD,EAAOC,UAETD,CAAM,EAObH,cAEJ,uJA3FQ,SAAEH,EAAYQ,EAAAC,EAAAC,EAAAC,EAAAC,GACb,OAAAC,cAAcC,qBAAA,MAAAC,EAAAA,WAAA,CACpBC,MAAOC,EAAEjB,aACVkB,OAAMD,EAAAjB,aACNmB,QAAK,YACJC,MAAOtB,6BACPuB,KAAA,OACAvB,MAAMmB,EAAEf,MACK,eAAAe,EAAAf,sBAAAoB,YAOH,IAPGL,EAAAf,sBAEuBC,oBAAAA,GAAAA,EAAAA,QAAAA,eAAmB,GAAKW,EAAAS,mBAAAC,EAAAC,SAAA,KAAAC,EAAAA,WAAAT,EAAAd,aAAA,CAAAwB,EAAAC,KAZjEf,EAAAA,YAAAgB,EAAAC,YAAAC,0BAAAJ,EAAA,IAAAZ,aAAA,CAegBX,IAAAA,EAAAA,SAAAA,GAfhBa,EAAAb,eAAAuB,EAAA,KAAA,KAAA,8ICMO,MAAMK,EAAkB,CAC7BC,QAAUC,IACRA,EAAIC,UAAU,gBAAiBC,EAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hugeicons/vue",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "HugeIcons Pro Vue Component Library https://hugeicons.com",
5
5
  "homepage": "https://hugeicons.com",
6
6
  "main": "./dist/cjs/index.js",