@aotearoan/neon 23.2.2 → 23.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/enums/NeonLayoutSize.cjs.js +2 -0
- package/dist/common/enums/NeonLayoutSize.cjs.js.map +1 -0
- package/dist/common/enums/NeonLayoutSize.es.js +5 -0
- package/dist/common/enums/NeonLayoutSize.es.js.map +1 -0
- package/dist/components/layout/inline/NeonInline.cjs.js +1 -1
- package/dist/components/layout/inline/NeonInline.cjs.js.map +1 -1
- package/dist/components/layout/inline/NeonInline.es.js +5 -6
- package/dist/components/layout/inline/NeonInline.es.js.map +1 -1
- package/dist/components/layout/inline/NeonInline.vue.cjs.js +1 -1
- package/dist/components/layout/inline/NeonInline.vue.cjs.js.map +1 -1
- package/dist/components/layout/inline/NeonInline.vue.es.js +4 -4
- package/dist/components/layout/inline/NeonInline.vue.es.js.map +1 -1
- package/dist/components/layout/stack/NeonStack.cjs.js +1 -1
- package/dist/components/layout/stack/NeonStack.cjs.js.map +1 -1
- package/dist/components/layout/stack/NeonStack.es.js +3 -3
- package/dist/components/layout/stack/NeonStack.es.js.map +1 -1
- package/dist/components/user-input/field/NeonField.cjs.js +1 -1
- package/dist/components/user-input/field/NeonField.cjs.js.map +1 -1
- package/dist/components/user-input/field/NeonField.es.js +8 -3
- package/dist/components/user-input/field/NeonField.es.js.map +1 -1
- package/dist/components/user-input/field/NeonField.vue.cjs.js +1 -1
- package/dist/components/user-input/field/NeonField.vue.cjs.js.map +1 -1
- package/dist/components/user-input/field/NeonField.vue.es.js +15 -13
- package/dist/components/user-input/field/NeonField.vue.es.js.map +1 -1
- package/dist/components/user-input/file/NeonFile.cjs.js +1 -1
- package/dist/components/user-input/file/NeonFile.cjs.js.map +1 -1
- package/dist/components/user-input/file/NeonFile.es.js +25 -20
- package/dist/components/user-input/file/NeonFile.es.js.map +1 -1
- package/dist/components/user-input/file/NeonFile.vue.cjs.js +1 -1
- package/dist/components/user-input/file/NeonFile.vue.cjs.js.map +1 -1
- package/dist/components/user-input/file/NeonFile.vue.es.js +13 -12
- package/dist/components/user-input/file/NeonFile.vue.es.js.map +1 -1
- package/dist/neon.cjs.js +1 -1
- package/dist/neon.es.js +97 -95
- package/dist/neon.es.js.map +1 -1
- package/dist/src/common/enums/NeonLayoutSize.d.ts +10 -0
- package/dist/src/components/feedback/banner/NeonBanner.d.ts +12 -15
- package/dist/src/components/feedback/note/NeonNote.d.ts +12 -15
- package/dist/src/components/layout/card-list/NeonCardList.d.ts +12 -15
- package/dist/src/components/layout/inline/NeonInline.d.ts +13 -16
- package/dist/src/components/layout/page/NeonPage.d.ts +12 -15
- package/dist/src/components/layout/stack/NeonStack.d.ts +6 -6
- package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.d.ts +27 -42
- package/dist/src/components/navigation/menu/NeonMenu.d.ts +27 -0
- package/dist/src/components/navigation/mobile-menu/NeonMobileMenu.d.ts +33 -24
- package/dist/src/components/presentation/badge/NeonBadge.d.ts +9 -0
- package/dist/src/components/presentation/dropdown/NeonDropdown.d.ts +11 -6
- package/dist/src/components/presentation/image-carousel/NeonImageCarousel.d.ts +5 -5
- package/dist/src/components/user-input/chip/NeonChip.d.ts +1 -1
- package/dist/src/components/user-input/date-picker/NeonDatePicker.d.ts +16 -8
- package/dist/src/components/user-input/field/NeonField.d.ts +19 -2
- package/dist/src/components/user-input/file/NeonFile.d.ts +91 -55
- package/dist/src/components/user-input/search/NeonSearch.d.ts +64 -4
- package/dist/src/components/user-input/select/NeonSelect.d.ts +165 -54
- package/dist/src/neon.d.ts +1 -0
- package/package.json +1 -1
- package/src/sass/components/_drop-zone.scss +4 -9
- package/src/sass/components/_field.scss +5 -0
- package/src/sass/components/_file.scss +8 -0
- package/src/sass/components/_inline.scss +2 -35
- package/src/sass/components/_page-container.scss +2 -0
- package/src/sass/components/_select.scss +18 -1
- package/src/sass/components/_stack.scss +2 -35
- package/src/sass/includes/_layout.scss +42 -0
- package/src/sass/variables.scss +26 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonLayoutSize.cjs.js","sources":["../../../src/common/enums/NeonLayoutSize.ts"],"sourcesContent":["/**\n * Describes the available gap options for the NeonInline & Neon Stack components, expanding on NeonSize to add a Zero\n * gap option.\n */\nexport enum NeonLayoutSize {\n Zero = 'z',\n Small = 's',\n Medium = 'm',\n Large = 'l',\n}\n"],"names":["NeonLayoutSize"],"mappings":"gFAIO,IAAKA,GAAAA,IACVA,EAAA,KAAO,IACPA,EAAA,MAAQ,IACRA,EAAA,OAAS,IACTA,EAAA,MAAQ,IAJEA,IAAAA,GAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonLayoutSize.es.js","sources":["../../../src/common/enums/NeonLayoutSize.ts"],"sourcesContent":["/**\n * Describes the available gap options for the NeonInline & Neon Stack components, expanding on NeonSize to add a Zero\n * gap option.\n */\nexport enum NeonLayoutSize {\n Zero = 'z',\n Small = 's',\n Medium = 'm',\n Large = 'l',\n}\n"],"names":["NeonLayoutSize"],"mappings":"AAIO,IAAKA,sBAAAA,OACVA,EAAA,OAAO,KACPA,EAAA,QAAQ,KACRA,EAAA,SAAS,KACTA,EAAA,QAAQ,KAJEA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),n=require("../../../common/enums/
|
|
1
|
+
"use strict";const e=require("vue"),n=require("../../../common/enums/NeonLayoutSize.cjs.js"),t=e.defineComponent({name:"NeonInline",props:{gap:{type:String,default:()=>n.NeonLayoutSize.Large},breakpoint:{type:String}}});module.exports=t;
|
|
2
2
|
//# sourceMappingURL=NeonInline.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonInline.cjs.js","sources":["../../../../src/components/layout/inline/NeonInline.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport {
|
|
1
|
+
{"version":3,"file":"NeonInline.cjs.js","sources":["../../../../src/components/layout/inline/NeonInline.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport type { NeonResponsive } from '@/common/enums/NeonResponsive';\nimport { NeonLayoutSize } from '@/common/enums/NeonLayoutSize';\n\n/**\n * A horizontal layout component. NeonInline provides a way of laying out it's contents with standard gaps. At the\n * specified breakpoint the layout will wrap to vertical.\n */\nexport default defineComponent({\n name: 'NeonInline',\n props: {\n /**\n * Size of the gap between items\n */\n gap: { type: String as () => NeonLayoutSize, default: () => NeonLayoutSize.Large },\n /**\n * Breakpoint at which to layout switches to vertical column layout. If no breakpoint is provided there is no\n * responsive switch.\n */\n breakpoint: { type: String as () => NeonResponsive },\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonLayoutSize"],"mappings":"6FAQAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,MAAO,CAIL,IAAK,CAAE,KAAM,OAAgC,QAAS,IAAMC,EAAAA,eAAe,KAAA,EAK3E,WAAY,CAAE,KAAM,MAAA,CAA+B,CAEvD,CAAC"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { defineComponent as e } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { NeonResponsive as n } from "../../../common/enums/NeonResponsive.es.js";
|
|
2
|
+
import { NeonLayoutSize as n } from "../../../common/enums/NeonLayoutSize.es.js";
|
|
4
3
|
const p = e({
|
|
5
4
|
name: "NeonInline",
|
|
6
5
|
props: {
|
|
7
6
|
/**
|
|
8
7
|
* Size of the gap between items
|
|
9
8
|
*/
|
|
10
|
-
gap: { type: String, default: () =>
|
|
9
|
+
gap: { type: String, default: () => n.Large },
|
|
11
10
|
/**
|
|
12
|
-
* Breakpoint at which to layout switches to vertical.
|
|
13
|
-
*
|
|
11
|
+
* Breakpoint at which to layout switches to vertical column layout. If no breakpoint is provided there is no
|
|
12
|
+
* responsive switch.
|
|
14
13
|
*/
|
|
15
|
-
breakpoint: { type: String
|
|
14
|
+
breakpoint: { type: String }
|
|
16
15
|
}
|
|
17
16
|
});
|
|
18
17
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonInline.es.js","sources":["../../../../src/components/layout/inline/NeonInline.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport {
|
|
1
|
+
{"version":3,"file":"NeonInline.es.js","sources":["../../../../src/components/layout/inline/NeonInline.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport type { NeonResponsive } from '@/common/enums/NeonResponsive';\nimport { NeonLayoutSize } from '@/common/enums/NeonLayoutSize';\n\n/**\n * A horizontal layout component. NeonInline provides a way of laying out it's contents with standard gaps. At the\n * specified breakpoint the layout will wrap to vertical.\n */\nexport default defineComponent({\n name: 'NeonInline',\n props: {\n /**\n * Size of the gap between items\n */\n gap: { type: String as () => NeonLayoutSize, default: () => NeonLayoutSize.Large },\n /**\n * Breakpoint at which to layout switches to vertical column layout. If no breakpoint is provided there is no\n * responsive switch.\n */\n breakpoint: { type: String as () => NeonResponsive },\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonLayoutSize"],"mappings":";;AAQA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,KAAK,EAAE,MAAM,QAAgC,SAAS,MAAMC,EAAe,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAK3E,YAAY,EAAE,MAAM,OAAA;AAAA,EAA+B;AAEvD,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const r=require("./NeonInline.cjs.js"),
|
|
1
|
+
"use strict";const r=require("./NeonInline.cjs.js"),n=require("vue"),o=require("../../../_virtual/_plugin-vue_export-helper.cjs.js");function t(e,s,l,p,a,u){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([[`neon-inline--gap-${e.gap}`,e.breakpoint&&`neon-inline--breakpoint-${e.breakpoint}`],"neon-inline"])},[n.renderSlot(e.$slots,"default")],2)}const i=o(r,[["render",t]]);module.exports=i;
|
|
2
2
|
//# sourceMappingURL=NeonInline.vue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonInline.vue.cjs.js","sources":["../../../../src/components/layout/inline/NeonInline.vue"],"sourcesContent":["<template>\n <div :class=\"[`neon-inline--gap-${gap}`, `neon-inline--breakpoint-${breakpoint}`]\" class=\"neon-inline\">\n <!-- @slot
|
|
1
|
+
{"version":3,"file":"NeonInline.vue.cjs.js","sources":["../../../../src/components/layout/inline/NeonInline.vue"],"sourcesContent":["<template>\n <div :class=\"[`neon-inline--gap-${gap}`, breakpoint && `neon-inline--breakpoint-${breakpoint}`]\" class=\"neon-inline\">\n <!-- @slot inline contents -->\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonInline.ts\"></script>\n"],"names":["_createElementBlock","_ctx","_renderSlot"],"mappings":"kLACEA,EAAAA,mBAGM,MAAA,CAHA,6CAA4BC,EAAA,GAAG,GAAIA,cAAU,2BAA+BA,EAAA,UAAU,IAAW,aAAa,CAAA,IAElHC,aAAaD,EAAA,OAAA,SAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import n from "./NeonInline.es.js";
|
|
2
2
|
import { openBlock as o, createElementBlock as r, normalizeClass as i, renderSlot as t } from "vue";
|
|
3
3
|
import a from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
-
function
|
|
4
|
+
function p(e, l, s, f, m, c) {
|
|
5
5
|
return o(), r("div", {
|
|
6
|
-
class: i([[`neon-inline--gap-${e.gap}`, `neon-inline--breakpoint-${e.breakpoint}`], "neon-inline"])
|
|
6
|
+
class: i([[`neon-inline--gap-${e.gap}`, e.breakpoint && `neon-inline--breakpoint-${e.breakpoint}`], "neon-inline"])
|
|
7
7
|
}, [
|
|
8
8
|
t(e.$slots, "default")
|
|
9
9
|
], 2);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const u = /* @__PURE__ */ a(n, [["render", p]]);
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
u as default
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=NeonInline.vue.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonInline.vue.es.js","sources":["../../../../src/components/layout/inline/NeonInline.vue"],"sourcesContent":["<template>\n <div :class=\"[`neon-inline--gap-${gap}`, `neon-inline--breakpoint-${breakpoint}`]\" class=\"neon-inline\">\n <!-- @slot
|
|
1
|
+
{"version":3,"file":"NeonInline.vue.es.js","sources":["../../../../src/components/layout/inline/NeonInline.vue"],"sourcesContent":["<template>\n <div :class=\"[`neon-inline--gap-${gap}`, breakpoint && `neon-inline--breakpoint-${breakpoint}`]\" class=\"neon-inline\">\n <!-- @slot inline contents -->\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonInline.ts\"></script>\n"],"names":["_createElementBlock","_ctx","_renderSlot"],"mappings":";;;;cACEA,EAGM,OAAA;AAAA,IAHA,+BAA4BC,EAAA,GAAG,IAAIA,gBAAU,2BAA+BA,EAAA,UAAU,KAAW,aAAa,CAAA;AAAA;IAElHC,EAAaD,EAAA,QAAA,SAAA;AAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),t=require("../../../common/enums/NeonLayoutSize.cjs.js"),n=e.defineComponent({name:"NeonStack",props:{gap:{type:String,default:()=>t.NeonLayoutSize.Large}}});module.exports=n;
|
|
2
2
|
//# sourceMappingURL=NeonStack.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonStack.cjs.js","sources":["../../../../src/components/layout/stack/NeonStack.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport {
|
|
1
|
+
{"version":3,"file":"NeonStack.cjs.js","sources":["../../../../src/components/layout/stack/NeonStack.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonLayoutSize } from '@/common/enums/NeonLayoutSize';\n\n/**\n * A vertical layout component. NeonStack provides a way of laying out it's contents with standard gaps at each\n * breakpoint. For cases where the gap needs to be different it is recommended to just use a <em>div</em> & apply a gap\n * using CSS. Alternatively, NeonStack could be used by also applying a gap in CSS.\n */\nexport default defineComponent({\n name: 'NeonStack',\n props: {\n /** Size of the gap between items */\n gap: { type: String as () => NeonLayoutSize, default: () => NeonLayoutSize.Large },\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonLayoutSize"],"mappings":"6FAQAA,EAAeC,kBAAgB,CAC7B,KAAM,YACN,MAAO,CAEL,IAAK,CAAE,KAAM,OAAgC,QAAS,IAAMC,EAAAA,eAAe,KAAA,CAAM,CAErF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { NeonLayoutSize as o } from "../../../common/enums/NeonLayoutSize.es.js";
|
|
3
|
+
const n = e({
|
|
4
4
|
name: "NeonStack",
|
|
5
5
|
props: {
|
|
6
6
|
/** Size of the gap between items */
|
|
@@ -8,6 +8,6 @@ const a = e({
|
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
n as default
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=NeonStack.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonStack.es.js","sources":["../../../../src/components/layout/stack/NeonStack.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport {
|
|
1
|
+
{"version":3,"file":"NeonStack.es.js","sources":["../../../../src/components/layout/stack/NeonStack.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonLayoutSize } from '@/common/enums/NeonLayoutSize';\n\n/**\n * A vertical layout component. NeonStack provides a way of laying out it's contents with standard gaps at each\n * breakpoint. For cases where the gap needs to be different it is recommended to just use a <em>div</em> & apply a gap\n * using CSS. Alternatively, NeonStack could be used by also applying a gap in CSS.\n */\nexport default defineComponent({\n name: 'NeonStack',\n props: {\n /** Size of the gap between items */\n gap: { type: String as () => NeonLayoutSize, default: () => NeonLayoutSize.Large },\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonLayoutSize"],"mappings":";;AAQA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA;AAAA,IAEL,KAAK,EAAE,MAAM,QAAgC,SAAS,MAAMC,EAAe,MAAA;AAAA,EAAM;AAErF,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),t=require("../../../common/enums/NeonFunctionalColor.cjs.js"),o=e.defineComponent({name:"NeonField",props:{label:{type:String,required:!0},labelFor:{type:String,default:null},optional:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionalLabel:{type:String,default:"Optional"},message:{type:String,default:
|
|
1
|
+
"use strict";const e=require("vue"),t=require("../../../common/enums/NeonFunctionalColor.cjs.js"),o=e.defineComponent({name:"NeonField",props:{label:{type:String,required:!0},labelFor:{type:String,default:null},optional:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionalLabel:{type:String,default:"Optional"},noMessage:{type:Boolean,default:!1},message:{type:String,default:""},messageColor:{type:String,default:t.NeonFunctionalColor.LowContrast}}});module.exports=o;
|
|
2
2
|
//# sourceMappingURL=NeonField.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonField.cjs.js","sources":["../../../../src/components/user-input/field/NeonField.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\n\n/**\n * An HTML label implementation supporting optional labels. Use in the same way as an HTML label either wrapping the input\n * or using the label alongside the input.\n */\nexport default defineComponent({\n name: 'NeonField',\n props: {\n /**\n * The label text to render.\n */\n label: { type: String, required: true },\n /**\n * The equivalent of the <em>for</em> attribute on an HTML label.\n */\n labelFor: { type: String, default: null },\n /**\n * Display an \"optional\" indicator with the label.\n */\n optional: { type: Boolean, default: false },\n /**\n * Display label with disabled state.\n */\n disabled: { type: Boolean, default: false },\n /**\n * The default \"optional\" label text.\n */\n optionalLabel: { type: String, default: 'Optional' },\n /**\n * Message to display below the input field.\n */\n message: { type: String, default:
|
|
1
|
+
{"version":3,"file":"NeonField.cjs.js","sources":["../../../../src/components/user-input/field/NeonField.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\n\n/**\n * An HTML label implementation supporting optional labels. Use in the same way as an HTML label either wrapping the input\n * or using the label alongside the input.\n */\nexport default defineComponent({\n name: 'NeonField',\n props: {\n /**\n * The label text to render.\n */\n label: { type: String, required: true },\n /**\n * The equivalent of the <em>for</em> attribute on an HTML label.\n */\n labelFor: { type: String, default: null },\n /**\n * Display an \"optional\" indicator with the label.\n */\n optional: { type: Boolean, default: false },\n /**\n * Display label with disabled state.\n */\n disabled: { type: Boolean, default: false },\n /**\n * The default \"optional\" label text.\n */\n optionalLabel: { type: String, default: 'Optional' },\n /**\n * Remove empty message space below input. By default, a blank message will be displayed below each input which\n * helps simplify form layouts.\n */\n noMessage: { type: Boolean, default: false },\n /**\n * Message to display below the input field.\n */\n message: { type: String, default: '' },\n /**\n * The color of message displayed under input. Can be any functional color.\n */\n messageColor: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.LowContrast },\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonFunctionalColor"],"mappings":"kGAOAA,EAAeC,kBAAgB,CAC7B,KAAM,YACN,MAAO,CAIL,MAAO,CAAE,KAAM,OAAQ,SAAU,EAAA,EAIjC,SAAU,CAAE,KAAM,OAAQ,QAAS,IAAA,EAInC,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,EAIpC,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,EAIpC,cAAe,CAAE,KAAM,OAAQ,QAAS,UAAA,EAKxC,UAAW,CAAE,KAAM,QAAS,QAAS,EAAA,EAIrC,QAAS,CAAE,KAAM,OAAQ,QAAS,EAAA,EAIlC,aAAc,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,WAAA,CAAY,CAExG,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e } from "vue";
|
|
2
2
|
import { NeonFunctionalColor as t } from "../../../common/enums/NeonFunctionalColor.es.js";
|
|
3
|
-
const
|
|
3
|
+
const l = e({
|
|
4
4
|
name: "NeonField",
|
|
5
5
|
props: {
|
|
6
6
|
/**
|
|
@@ -23,10 +23,15 @@ const a = e({
|
|
|
23
23
|
* The default "optional" label text.
|
|
24
24
|
*/
|
|
25
25
|
optionalLabel: { type: String, default: "Optional" },
|
|
26
|
+
/**
|
|
27
|
+
* Remove empty message space below input. By default, a blank message will be displayed below each input which
|
|
28
|
+
* helps simplify form layouts.
|
|
29
|
+
*/
|
|
30
|
+
noMessage: { type: Boolean, default: !1 },
|
|
26
31
|
/**
|
|
27
32
|
* Message to display below the input field.
|
|
28
33
|
*/
|
|
29
|
-
message: { type: String, default:
|
|
34
|
+
message: { type: String, default: "" },
|
|
30
35
|
/**
|
|
31
36
|
* The color of message displayed under input. Can be any functional color.
|
|
32
37
|
*/
|
|
@@ -34,6 +39,6 @@ const a = e({
|
|
|
34
39
|
}
|
|
35
40
|
});
|
|
36
41
|
export {
|
|
37
|
-
|
|
42
|
+
l as default
|
|
38
43
|
};
|
|
39
44
|
//# sourceMappingURL=NeonField.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonField.es.js","sources":["../../../../src/components/user-input/field/NeonField.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\n\n/**\n * An HTML label implementation supporting optional labels. Use in the same way as an HTML label either wrapping the input\n * or using the label alongside the input.\n */\nexport default defineComponent({\n name: 'NeonField',\n props: {\n /**\n * The label text to render.\n */\n label: { type: String, required: true },\n /**\n * The equivalent of the <em>for</em> attribute on an HTML label.\n */\n labelFor: { type: String, default: null },\n /**\n * Display an \"optional\" indicator with the label.\n */\n optional: { type: Boolean, default: false },\n /**\n * Display label with disabled state.\n */\n disabled: { type: Boolean, default: false },\n /**\n * The default \"optional\" label text.\n */\n optionalLabel: { type: String, default: 'Optional' },\n /**\n * Message to display below the input field.\n */\n message: { type: String, default:
|
|
1
|
+
{"version":3,"file":"NeonField.es.js","sources":["../../../../src/components/user-input/field/NeonField.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\n\n/**\n * An HTML label implementation supporting optional labels. Use in the same way as an HTML label either wrapping the input\n * or using the label alongside the input.\n */\nexport default defineComponent({\n name: 'NeonField',\n props: {\n /**\n * The label text to render.\n */\n label: { type: String, required: true },\n /**\n * The equivalent of the <em>for</em> attribute on an HTML label.\n */\n labelFor: { type: String, default: null },\n /**\n * Display an \"optional\" indicator with the label.\n */\n optional: { type: Boolean, default: false },\n /**\n * Display label with disabled state.\n */\n disabled: { type: Boolean, default: false },\n /**\n * The default \"optional\" label text.\n */\n optionalLabel: { type: String, default: 'Optional' },\n /**\n * Remove empty message space below input. By default, a blank message will be displayed below each input which\n * helps simplify form layouts.\n */\n noMessage: { type: Boolean, default: false },\n /**\n * Message to display below the input field.\n */\n message: { type: String, default: '' },\n /**\n * The color of message displayed under input. Can be any functional color.\n */\n messageColor: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.LowContrast },\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonFunctionalColor"],"mappings":";;AAOA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO,EAAE,MAAM,QAAQ,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAIjC,UAAU,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAInC,UAAU,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,UAAU,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,eAAe,EAAE,MAAM,QAAQ,SAAS,WAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKxC,WAAW,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIrC,SAAS,EAAE,MAAM,QAAQ,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIlC,cAAc,EAAE,MAAM,QAAqC,SAASC,EAAoB,YAAA;AAAA,EAAY;AAExG,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const l=require("./NeonField.cjs.js"),e=require("vue"),s=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),t=
|
|
1
|
+
"use strict";const l=require("./NeonField.cjs.js"),e=require("vue"),s=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),t={class:"neon-field__label-wrapper"},a=["for"],r={key:0,class:"neon-field__optional"},i={class:"neon-field__contents"};function d(o,n,c,_,m,u){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"neon-field--optional":o.optional,"neon-field--disabled":o.disabled,"neon-field--with-message":o.message!==null},"neon-field"])},[e.createElementVNode("span",t,[e.createElementVNode("label",{for:o.labelFor,class:"neon-field__label"},e.toDisplayString(o.label),9,a),o.optional?(e.openBlock(),e.createElementBlock("span",r,e.toDisplayString(o.optionalLabel),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",i,[e.renderSlot(o.$slots,"default"),o.noMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([`neon-color-${o.messageColor}`,"neon-field__message"]),onClick:n[0]||(n[0]=e.withModifiers(()=>{},["prevent","stop"]))},e.toDisplayString(o.message),3))])],2)}const p=s(l,[["render",d]]);module.exports=p;
|
|
2
2
|
//# sourceMappingURL=NeonField.vue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonField.vue.cjs.js","sources":["../../../../src/components/user-input/field/NeonField.vue"],"sourcesContent":["<template>\n <
|
|
1
|
+
{"version":3,"file":"NeonField.vue.cjs.js","sources":["../../../../src/components/user-input/field/NeonField.vue"],"sourcesContent":["<template>\n <div\n :class=\"{\n 'neon-field--optional': optional,\n 'neon-field--disabled': disabled,\n 'neon-field--with-message': message !== null,\n }\"\n class=\"neon-field\"\n >\n <span class=\"neon-field__label-wrapper\">\n <label :for=\"labelFor\" class=\"neon-field__label\">{{ label }}</label>\n <span v-if=\"optional\" class=\"neon-field__optional\">{{ optionalLabel }}</span>\n </span>\n <div class=\"neon-field__contents\">\n <!-- @slot optionally wrap the field with the label -->\n <slot></slot>\n <span v-if=\"!noMessage\" :class=\"`neon-color-${messageColor}`\" class=\"neon-field__message\" @click.prevent.stop=\"\">\n {{ message }}\n </span>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonField.ts\"></script>\n"],"names":["_hoisted_1","_hoisted_4","_createElementBlock","_normalizeClass","_ctx","_createElementVNode","_hoisted_2","_hoisted_3","_toDisplayString","_renderSlot"],"mappings":"oIASUA,EAAA,CAAA,MAAM,2BAA2B,qBAEf,MAAM,wBAEzBC,EAAA,CAAA,MAAM,sBAAsB,+CAZnCC,EAAAA,mBAmBM,MAAA,CAlBH,MAAKC,EAAAA,eAAA,CAAA,wBAAkCC,EAAA,gCAAwCA,EAAA,oCAA4CA,EAAA,UAAO,MAK7H,YAAY,CAAA,IAElBC,EAAAA,mBAGO,OAHPL,EAGO,CAFLK,EAAAA,mBAAoE,QAAA,CAA5D,IAAKD,EAAA,SAAU,MAAM,uCAAuBA,EAAA,KAAK,EAAA,EAAAE,CAAA,EAC7CF,EAAA,wBAAZF,EAAAA,mBAA6E,OAA7EK,EAA6EC,EAAAA,gBAAvBJ,EAAA,aAAa,EAAA,CAAA,iCAErEC,EAAAA,mBAMM,MANNJ,EAMM,CAJJQ,aAAaL,EAAA,OAAA,SAAA,EACAA,EAAA,qDAAbF,EAAAA,mBAEO,OAAA,OAFkB,MAAKC,EAAAA,eAAA,CAAA,cAAgBC,EAAA,YAAY,GAAU,qBAAqB,CAAA,EAAE,oCAAD,IAAA,CAAA,EAAsB,CAAA,UAAA,MAAA,CAAA,sBAC3GA,EAAA,OAAO,EAAA,CAAA"}
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import r from "./NeonField.es.js";
|
|
2
2
|
import { openBlock as o, createElementBlock as n, normalizeClass as i, createElementVNode as s, toDisplayString as l, createCommentVNode as t, renderSlot as d, withModifiers as p } from "vue";
|
|
3
3
|
import f from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
-
const m =
|
|
4
|
+
const m = { class: "neon-field__label-wrapper" }, _ = ["for"], c = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "neon-field__optional"
|
|
7
7
|
}, b = { class: "neon-field__contents" };
|
|
8
|
-
function
|
|
9
|
-
return o(), n("
|
|
8
|
+
function u(e, a, g, $, h, k) {
|
|
9
|
+
return o(), n("div", {
|
|
10
10
|
class: i([{
|
|
11
11
|
"neon-field--optional": e.optional,
|
|
12
12
|
"neon-field--disabled": e.disabled,
|
|
13
13
|
"neon-field--with-message": e.message !== null
|
|
14
|
-
}, "neon-field"])
|
|
15
|
-
for: e.labelFor
|
|
14
|
+
}, "neon-field"])
|
|
16
15
|
}, [
|
|
17
|
-
s("span",
|
|
18
|
-
s("
|
|
19
|
-
|
|
16
|
+
s("span", m, [
|
|
17
|
+
s("label", {
|
|
18
|
+
for: e.labelFor,
|
|
19
|
+
class: "neon-field__label"
|
|
20
|
+
}, l(e.label), 9, _),
|
|
21
|
+
e.optional ? (o(), n("span", c, l(e.optionalLabel), 1)) : t("", !0)
|
|
20
22
|
]),
|
|
21
23
|
s("div", b, [
|
|
22
24
|
d(e.$slots, "default"),
|
|
23
|
-
e.
|
|
25
|
+
e.noMessage ? t("", !0) : (o(), n("span", {
|
|
24
26
|
key: 0,
|
|
25
27
|
class: i([`neon-color-${e.messageColor}`, "neon-field__message"]),
|
|
26
28
|
onClick: a[0] || (a[0] = p(() => {
|
|
27
29
|
}, ["prevent", "stop"]))
|
|
28
|
-
}, l(e.message), 3))
|
|
30
|
+
}, l(e.message), 3))
|
|
29
31
|
])
|
|
30
|
-
],
|
|
32
|
+
], 2);
|
|
31
33
|
}
|
|
32
|
-
const
|
|
34
|
+
const y = /* @__PURE__ */ f(r, [["render", u]]);
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
y as default
|
|
35
37
|
};
|
|
36
38
|
//# sourceMappingURL=NeonField.vue.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonField.vue.es.js","sources":["../../../../src/components/user-input/field/NeonField.vue"],"sourcesContent":["<template>\n <
|
|
1
|
+
{"version":3,"file":"NeonField.vue.es.js","sources":["../../../../src/components/user-input/field/NeonField.vue"],"sourcesContent":["<template>\n <div\n :class=\"{\n 'neon-field--optional': optional,\n 'neon-field--disabled': disabled,\n 'neon-field--with-message': message !== null,\n }\"\n class=\"neon-field\"\n >\n <span class=\"neon-field__label-wrapper\">\n <label :for=\"labelFor\" class=\"neon-field__label\">{{ label }}</label>\n <span v-if=\"optional\" class=\"neon-field__optional\">{{ optionalLabel }}</span>\n </span>\n <div class=\"neon-field__contents\">\n <!-- @slot optionally wrap the field with the label -->\n <slot></slot>\n <span v-if=\"!noMessage\" :class=\"`neon-color-${messageColor}`\" class=\"neon-field__message\" @click.prevent.stop=\"\">\n {{ message }}\n </span>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonField.ts\"></script>\n"],"names":["_hoisted_1","_hoisted_4","_createElementBlock","_normalizeClass","_ctx","_createElementVNode","_hoisted_2","_hoisted_3","_toDisplayString","_renderSlot"],"mappings":";;;AASU,MAAAA,IAAA,EAAA,OAAM,4BAA2B;;EAEf,OAAM;GAEzBC,IAAA,EAAA,OAAM,uBAAsB;;cAZnCC,EAmBM,OAAA;AAAA,IAlBH,OAAKC,EAAA,CAAA;AAAA,8BAAkCC,EAAA;AAAA,8BAAwCA,EAAA;AAAA,kCAA4CA,EAAA,YAAO;AAAA,OAK7H,YAAY,CAAA;AAAA;IAElBC,EAGO,QAHPL,GAGO;AAAA,MAFLK,EAAoE,SAAA;AAAA,QAA5D,KAAKD,EAAA;AAAA,QAAU,OAAM;AAAA,WAAuBA,EAAA,KAAK,GAAA,GAAAE,CAAA;AAAA,MAC7CF,EAAA,iBAAZF,EAA6E,QAA7EK,GAA6EC,EAAvBJ,EAAA,aAAa,GAAA,CAAA;;IAErEC,EAMM,OANNJ,GAMM;AAAA,MAJJQ,EAAaL,EAAA,QAAA,SAAA;AAAA,MACAA,EAAA,8BAAbF,EAEO,QAAA;AAAA;QAFkB,OAAKC,EAAA,CAAA,cAAgBC,EAAA,YAAY,IAAU,qBAAqB,CAAA;AAAA,QAAE,2BAAD,MAAA;AAAA,QAAA,GAAsB,CAAA,WAAA,MAAA,CAAA;AAAA,WAC3GA,EAAA,OAAO,GAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const o=require("vue"),p=require("../../../common/enums/NeonSize.cjs.js"),m=require("../../../common/enums/NeonFunctionalColor.cjs.js"),y=require("../../../common/enums/NeonState.cjs.js"),S=require("../button/NeonButton.vue.cjs.js"),g=require("../input/NeonInput.vue.cjs.js"),N=require("../list/NeonList.vue.cjs.js"),v=require("../../../common/enums/NeonButtonStyle.cjs.js"),q=o.defineComponent({name:"NeonFile",components:{NeonButton:S,NeonInput:g,NeonList:N},props:{disabled:{type:Boolean,default:!1},directUpload:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},id:{type:String,default:null},size:{type:String,default:p.NeonSize.Medium},state:{type:String,default:y.NeonState.Ready},color:{type:String,default:m.NeonFunctionalColor.Primary},buttonStyle:{type:String,default:v.NeonButtonStyle.Solid},circular:{type:Boolean,default:null},label:{type:String,default:null},icon:{type:String,default:null},title:{type:String,default:"Upload"}},emits:["update:modelValue"],setup(n,{emit:r}){const u=o.ref(null),t=o.ref([]),s=o.ref(""),c=o.computed(()=>t.value.map(e=>({key:e.name,label:e.name}))),a=()=>{r("update:modelValue",n.multiple?t.value:t.value[0]),n.directUpload&&(t.value=[])};return{fileInput:u,files:t,fileList:c,fileInputModel:s,remove:e=>{n.disabled||(t.value=t.value.filter(l=>l.name!==e),a())},clearAll:()=>{n.disabled||(t.value=[],a())},openFileDialog:()=>{var e,l;(l=(e=u.value)==null?void 0:e.neonInput)==null||l.click()},onInput:e=>{if(e!=null&&e.target){const l=e.target.files,i=l?Array.from(l).filter(d=>!t.value.find(f=>f.name===d.name)):[];t.value=n.multiple?[...t.value,...i]:i,a()}}}}});module.exports=q;
|
|
2
2
|
//# sourceMappingURL=NeonFile.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonFile.cjs.js","sources":["../../../../src/components/user-input/file/NeonFile.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonState } from '@/common/enums/NeonState';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport NeonList from '@/components/user-input/list/NeonList.vue';\n\n/**\n * A file upload component. This is a wrapper around an HTML file input. It can display multiple files as well as\n * providing a convenient UI for removing/clearing files from the list.\n */\nexport default defineComponent({\n name: 'NeonFile',\n components: {\n NeonButton,\n NeonInput,\n NeonList,\n },\n props: {\n /**\n * The disabled state of the component\n */\n disabled: { type: Boolean, default: false },\n /**\n * Files are uploaded directly once added, there is no waiting to click a confirmation button\n */\n directUpload: { type: Boolean, default: false },\n /**\n * Support multiple files.\n */\n multiple: { type: Boolean, default: false },\n /**\n * HTML file input accept property for filtering the files the user is allowed to select. This is a mime type,\n * e.g. 'application/pdf'.\n */\n accept: { type: String, default: null },\n /**\n * Provide an id to attach to the internal HTML input[file] (also adds an aria-controls link between the button and\n * the hidden input).\n */\n id: { type: String, default: null },\n /**\n * The file component size\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The state of the input, used to indicate loading, success and error states\n */\n state: { type: String as () => NeonState, default: NeonState.Ready },\n /**\n * The file component color\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Make the button circular. NOTE: This is only for icon only buttons.\n */\n circular: { type: Boolean, default: null },\n /**\n * The label of the file component button\n */\n label: { type: String, default: null },\n /**\n * The icon of the file component button\n */\n icon: { type: String, default: null },\n /**\n * Title for the file upload button.\n */\n title: { type: String, default: 'Upload' },\n },\n emits: [\n /**\n * Emitted when files are selected and uploaded\n * @type {File | File[]} either a single File (multiple = false) or a list of File objects (multiple = true)\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const fileInput = ref<InstanceType<typeof NeonInput> | null>(null);\n const files = ref<Array<File>>([]);\n const fileInputModel = ref('');\n\n const fileList = computed(() => {\n return files.value.map((file) => ({ key: file.name, label: file.name }));\n });\n\n const emitFiles = () => {\n emit('update:modelValue', props.multiple ? files.value : files.value[0]);\n if (props.directUpload) {\n files.value = [];\n }\n };\n\n const remove = (filename: string) => {\n if (!props.disabled) {\n files.value = files.value.filter((f) => f.name !== filename);\n emitFiles();\n }\n };\n\n const clearAll = () => {\n if (!props.disabled) {\n files.value = [];\n emitFiles();\n }\n };\n\n const openFileDialog = () => {\n fileInput.value?.neonInput?.click();\n };\n\n const onInput = (event: Event) => {\n if (event?.target) {\n const theFiles = (event.target as HTMLInputElement).files;\n const newFiles = theFiles\n ? Array.from(theFiles).filter((file) => !files.value.find((f) => f.name === file.name))\n : [];\n files.value = props.multiple ? [...files.value, ...newFiles] : newFiles;\n emitFiles();\n }\n };\n\n return {\n fileInput,\n files,\n fileList,\n fileInputModel,\n remove,\n clearAll,\n openFileDialog,\n onInput,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonInput","NeonList","NeonSize","NeonState","NeonFunctionalColor","props","emit","fileInput","ref","files","fileInputModel","fileList","computed","file","emitFiles","filename","f","_b","_a","event","theFiles","newFiles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NeonFile.cjs.js","sources":["../../../../src/components/user-input/file/NeonFile.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonState } from '@/common/enums/NeonState';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport NeonList from '@/components/user-input/list/NeonList.vue';\nimport { NeonButtonStyle } from '@/common/enums/NeonButtonStyle';\n\n/**\n * A file upload component. This is a wrapper around an HTML file input. It can display multiple files as well as\n * providing a convenient UI for removing/clearing files from the list.\n */\nexport default defineComponent({\n name: 'NeonFile',\n components: {\n NeonButton,\n NeonInput,\n NeonList,\n },\n props: {\n /**\n * The disabled state of the component\n */\n disabled: { type: Boolean, default: false },\n /**\n * Files are uploaded directly once added, there is no waiting to click a confirmation button\n */\n directUpload: { type: Boolean, default: false },\n /**\n * Support multiple files.\n */\n multiple: { type: Boolean, default: false },\n /**\n * HTML file input accept property for filtering the files the user is allowed to select. This is a mime type,\n * e.g. 'application/pdf'.\n */\n accept: { type: String, default: null },\n /**\n * Provide an id to attach to the internal HTML input[file] (also adds an aria-controls link between the button and\n * the hidden input).\n */\n id: { type: String, default: null },\n /**\n * The file component size\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The state of the input, used to indicate loading, success and error states\n */\n state: { type: String as () => NeonState, default: NeonState.Ready },\n /**\n * The file component color\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * The style of button to use for the upload\n */\n buttonStyle: { type: String as () => NeonButtonStyle, default: NeonButtonStyle.Solid },\n /**\n * Make the button circular. NOTE: This is only for icon only buttons.\n */\n circular: { type: Boolean, default: null },\n /**\n * The label of the file component button\n */\n label: { type: String, default: null },\n /**\n * The icon of the file component button\n */\n icon: { type: String, default: null },\n /**\n * Title for the file upload button.\n */\n title: { type: String, default: 'Upload' },\n },\n emits: [\n /**\n * Emitted when files are selected and uploaded\n * @type {File | File[]} either a single File (multiple = false) or a list of File objects (multiple = true)\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const fileInput = ref<InstanceType<typeof NeonInput> | null>(null);\n const files = ref<Array<File>>([]);\n const fileInputModel = ref('');\n\n const fileList = computed(() => {\n return files.value.map((file) => ({ key: file.name, label: file.name }));\n });\n\n const emitFiles = () => {\n emit('update:modelValue', props.multiple ? files.value : files.value[0]);\n if (props.directUpload) {\n files.value = [];\n }\n };\n\n const remove = (filename: string) => {\n if (!props.disabled) {\n files.value = files.value.filter((f) => f.name !== filename);\n emitFiles();\n }\n };\n\n const clearAll = () => {\n if (!props.disabled) {\n files.value = [];\n emitFiles();\n }\n };\n\n const openFileDialog = () => {\n fileInput.value?.neonInput?.click();\n };\n\n const onInput = (event: Event) => {\n if (event?.target) {\n const theFiles = (event.target as HTMLInputElement).files;\n const newFiles = theFiles\n ? Array.from(theFiles).filter((file) => !files.value.find((f) => f.name === file.name))\n : [];\n files.value = props.multiple ? [...files.value, ...newFiles] : newFiles;\n emitFiles();\n }\n };\n\n return {\n fileInput,\n files,\n fileList,\n fileInputModel,\n remove,\n clearAll,\n openFileDialog,\n onInput,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonInput","NeonList","NeonSize","NeonState","NeonFunctionalColor","NeonButtonStyle","props","emit","fileInput","ref","files","fileInputModel","fileList","computed","file","emitFiles","filename","f","_b","_a","event","theFiles","newFiles"],"mappings":"oYAaAA,EAAeC,kBAAgB,CAC7B,KAAM,WACN,WAAY,CACV,WAAAC,EACA,UAAAC,EACA,SAAAC,CAAA,EAEF,MAAO,CAIL,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,EAIpC,aAAc,CAAE,KAAM,QAAS,QAAS,EAAA,EAIxC,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,EAKpC,OAAQ,CAAE,KAAM,OAAQ,QAAS,IAAA,EAKjC,GAAI,CAAE,KAAM,OAAQ,QAAS,IAAA,EAI7B,KAAM,CAAE,KAAM,OAA0B,QAASC,EAAAA,SAAS,MAAA,EAI1D,MAAO,CAAE,KAAM,OAA2B,QAASC,EAAAA,UAAU,KAAA,EAI7D,MAAO,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,OAAA,EAIjF,YAAa,CAAE,KAAM,OAAiC,QAASC,EAAAA,gBAAgB,KAAA,EAI/E,SAAU,CAAE,KAAM,QAAS,QAAS,IAAA,EAIpC,MAAO,CAAE,KAAM,OAAQ,QAAS,IAAA,EAIhC,KAAM,CAAE,KAAM,OAAQ,QAAS,IAAA,EAI/B,MAAO,CAAE,KAAM,OAAQ,QAAS,QAAA,CAAS,EAE3C,MAAO,CAKL,mBAAA,EAEF,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACrB,MAAMC,EAAYC,EAAAA,IAA2C,IAAI,EAC3DC,EAAQD,EAAAA,IAAiB,EAAE,EAC3BE,EAAiBF,EAAAA,IAAI,EAAE,EAEvBG,EAAWC,EAAAA,SAAS,IACjBH,EAAM,MAAM,IAAKI,IAAU,CAAE,IAAKA,EAAK,KAAM,MAAOA,EAAK,IAAA,EAAO,CACxE,EAEKC,EAAY,IAAM,CACtBR,EAAK,oBAAqBD,EAAM,SAAWI,EAAM,MAAQA,EAAM,MAAM,CAAC,CAAC,EACnEJ,EAAM,eACRI,EAAM,MAAQ,CAAA,EAElB,EA+BA,MAAO,CACL,UAAAF,EACA,MAAAE,EACA,SAAAE,EACA,eAAAD,EACA,OAlCcK,GAAqB,CAC9BV,EAAM,WACTI,EAAM,MAAQA,EAAM,MAAM,OAAQO,GAAMA,EAAE,OAASD,CAAQ,EAC3DD,EAAA,EAEJ,EA8BE,SA5Be,IAAM,CAChBT,EAAM,WACTI,EAAM,MAAQ,CAAA,EACdK,EAAA,EAEJ,EAwBE,eAtBqB,IAAM,UAC3BG,GAAAC,EAAAX,EAAU,QAAV,YAAAW,EAAiB,YAAjB,MAAAD,EAA4B,OAC9B,EAqBE,QAnBeE,GAAiB,CAChC,GAAIA,GAAA,MAAAA,EAAO,OAAQ,CACjB,MAAMC,EAAYD,EAAM,OAA4B,MAC9CE,EAAWD,EACb,MAAM,KAAKA,CAAQ,EAAE,OAAQP,GAAS,CAACJ,EAAM,MAAM,KAAM,GAAM,EAAE,OAASI,EAAK,IAAI,CAAC,EACpF,CAAA,EACJJ,EAAM,MAAQJ,EAAM,SAAW,CAAC,GAAGI,EAAM,MAAO,GAAGY,CAAQ,EAAIA,EAC/DP,EAAA,CACF,CACF,CAUE,CAEJ,CACF,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as s, ref as
|
|
1
|
+
import { defineComponent as s, ref as a, computed as c } from "vue";
|
|
2
2
|
import { NeonSize as y } from "../../../common/enums/NeonSize.es.js";
|
|
3
|
-
import { NeonFunctionalColor as
|
|
4
|
-
import { NeonState as
|
|
3
|
+
import { NeonFunctionalColor as S } from "../../../common/enums/NeonFunctionalColor.es.js";
|
|
4
|
+
import { NeonState as g } from "../../../common/enums/NeonState.es.js";
|
|
5
5
|
import v from "../button/NeonButton.vue.es.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
6
|
+
import N from "../input/NeonInput.vue.es.js";
|
|
7
|
+
import F from "../list/NeonList.vue.es.js";
|
|
8
|
+
import { NeonButtonStyle as b } from "../../../common/enums/NeonButtonStyle.es.js";
|
|
9
|
+
const h = s({
|
|
9
10
|
name: "NeonFile",
|
|
10
11
|
components: {
|
|
11
12
|
NeonButton: v,
|
|
12
|
-
NeonInput:
|
|
13
|
-
NeonList:
|
|
13
|
+
NeonInput: N,
|
|
14
|
+
NeonList: F
|
|
14
15
|
},
|
|
15
16
|
props: {
|
|
16
17
|
/**
|
|
@@ -42,11 +43,15 @@ const V = s({
|
|
|
42
43
|
/**
|
|
43
44
|
* The state of the input, used to indicate loading, success and error states
|
|
44
45
|
*/
|
|
45
|
-
state: { type: String, default:
|
|
46
|
+
state: { type: String, default: g.Ready },
|
|
46
47
|
/**
|
|
47
48
|
* The file component color
|
|
48
49
|
*/
|
|
49
|
-
color: { type: String, default:
|
|
50
|
+
color: { type: String, default: S.Primary },
|
|
51
|
+
/**
|
|
52
|
+
* The style of button to use for the upload
|
|
53
|
+
*/
|
|
54
|
+
buttonStyle: { type: String, default: b.Solid },
|
|
50
55
|
/**
|
|
51
56
|
* Make the button circular. NOTE: This is only for icon only buttons.
|
|
52
57
|
*/
|
|
@@ -72,34 +77,34 @@ const V = s({
|
|
|
72
77
|
"update:modelValue"
|
|
73
78
|
],
|
|
74
79
|
setup(o, { emit: r }) {
|
|
75
|
-
const i =
|
|
76
|
-
r("update:modelValue", o.multiple ?
|
|
80
|
+
const i = a(null), t = a([]), f = a(""), m = c(() => t.value.map((e) => ({ key: e.name, label: e.name }))), n = () => {
|
|
81
|
+
r("update:modelValue", o.multiple ? t.value : t.value[0]), o.directUpload && (t.value = []);
|
|
77
82
|
};
|
|
78
83
|
return {
|
|
79
84
|
fileInput: i,
|
|
80
|
-
files:
|
|
85
|
+
files: t,
|
|
81
86
|
fileList: m,
|
|
82
87
|
fileInputModel: f,
|
|
83
88
|
remove: (e) => {
|
|
84
|
-
o.disabled || (
|
|
89
|
+
o.disabled || (t.value = t.value.filter((l) => l.name !== e), n());
|
|
85
90
|
},
|
|
86
91
|
clearAll: () => {
|
|
87
|
-
o.disabled || (
|
|
92
|
+
o.disabled || (t.value = [], n());
|
|
88
93
|
},
|
|
89
94
|
openFileDialog: () => {
|
|
90
|
-
var e,
|
|
91
|
-
(
|
|
95
|
+
var e, l;
|
|
96
|
+
(l = (e = i.value) == null ? void 0 : e.neonInput) == null || l.click();
|
|
92
97
|
},
|
|
93
98
|
onInput: (e) => {
|
|
94
99
|
if (e != null && e.target) {
|
|
95
|
-
const
|
|
96
|
-
|
|
100
|
+
const l = e.target.files, u = l ? Array.from(l).filter((p) => !t.value.find((d) => d.name === p.name)) : [];
|
|
101
|
+
t.value = o.multiple ? [...t.value, ...u] : u, n();
|
|
97
102
|
}
|
|
98
103
|
}
|
|
99
104
|
};
|
|
100
105
|
}
|
|
101
106
|
});
|
|
102
107
|
export {
|
|
103
|
-
|
|
108
|
+
h as default
|
|
104
109
|
};
|
|
105
110
|
//# sourceMappingURL=NeonFile.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonFile.es.js","sources":["../../../../src/components/user-input/file/NeonFile.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonState } from '@/common/enums/NeonState';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport NeonList from '@/components/user-input/list/NeonList.vue';\n\n/**\n * A file upload component. This is a wrapper around an HTML file input. It can display multiple files as well as\n * providing a convenient UI for removing/clearing files from the list.\n */\nexport default defineComponent({\n name: 'NeonFile',\n components: {\n NeonButton,\n NeonInput,\n NeonList,\n },\n props: {\n /**\n * The disabled state of the component\n */\n disabled: { type: Boolean, default: false },\n /**\n * Files are uploaded directly once added, there is no waiting to click a confirmation button\n */\n directUpload: { type: Boolean, default: false },\n /**\n * Support multiple files.\n */\n multiple: { type: Boolean, default: false },\n /**\n * HTML file input accept property for filtering the files the user is allowed to select. This is a mime type,\n * e.g. 'application/pdf'.\n */\n accept: { type: String, default: null },\n /**\n * Provide an id to attach to the internal HTML input[file] (also adds an aria-controls link between the button and\n * the hidden input).\n */\n id: { type: String, default: null },\n /**\n * The file component size\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The state of the input, used to indicate loading, success and error states\n */\n state: { type: String as () => NeonState, default: NeonState.Ready },\n /**\n * The file component color\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Make the button circular. NOTE: This is only for icon only buttons.\n */\n circular: { type: Boolean, default: null },\n /**\n * The label of the file component button\n */\n label: { type: String, default: null },\n /**\n * The icon of the file component button\n */\n icon: { type: String, default: null },\n /**\n * Title for the file upload button.\n */\n title: { type: String, default: 'Upload' },\n },\n emits: [\n /**\n * Emitted when files are selected and uploaded\n * @type {File | File[]} either a single File (multiple = false) or a list of File objects (multiple = true)\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const fileInput = ref<InstanceType<typeof NeonInput> | null>(null);\n const files = ref<Array<File>>([]);\n const fileInputModel = ref('');\n\n const fileList = computed(() => {\n return files.value.map((file) => ({ key: file.name, label: file.name }));\n });\n\n const emitFiles = () => {\n emit('update:modelValue', props.multiple ? files.value : files.value[0]);\n if (props.directUpload) {\n files.value = [];\n }\n };\n\n const remove = (filename: string) => {\n if (!props.disabled) {\n files.value = files.value.filter((f) => f.name !== filename);\n emitFiles();\n }\n };\n\n const clearAll = () => {\n if (!props.disabled) {\n files.value = [];\n emitFiles();\n }\n };\n\n const openFileDialog = () => {\n fileInput.value?.neonInput?.click();\n };\n\n const onInput = (event: Event) => {\n if (event?.target) {\n const theFiles = (event.target as HTMLInputElement).files;\n const newFiles = theFiles\n ? Array.from(theFiles).filter((file) => !files.value.find((f) => f.name === file.name))\n : [];\n files.value = props.multiple ? [...files.value, ...newFiles] : newFiles;\n emitFiles();\n }\n };\n\n return {\n fileInput,\n files,\n fileList,\n fileInputModel,\n remove,\n clearAll,\n openFileDialog,\n onInput,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonInput","NeonList","NeonSize","NeonState","NeonFunctionalColor","props","emit","fileInput","ref","files","fileInputModel","fileList","computed","file","emitFiles","filename","f","_b","_a","event","theFiles","newFiles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NeonFile.es.js","sources":["../../../../src/components/user-input/file/NeonFile.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonState } from '@/common/enums/NeonState';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport NeonList from '@/components/user-input/list/NeonList.vue';\nimport { NeonButtonStyle } from '@/common/enums/NeonButtonStyle';\n\n/**\n * A file upload component. This is a wrapper around an HTML file input. It can display multiple files as well as\n * providing a convenient UI for removing/clearing files from the list.\n */\nexport default defineComponent({\n name: 'NeonFile',\n components: {\n NeonButton,\n NeonInput,\n NeonList,\n },\n props: {\n /**\n * The disabled state of the component\n */\n disabled: { type: Boolean, default: false },\n /**\n * Files are uploaded directly once added, there is no waiting to click a confirmation button\n */\n directUpload: { type: Boolean, default: false },\n /**\n * Support multiple files.\n */\n multiple: { type: Boolean, default: false },\n /**\n * HTML file input accept property for filtering the files the user is allowed to select. This is a mime type,\n * e.g. 'application/pdf'.\n */\n accept: { type: String, default: null },\n /**\n * Provide an id to attach to the internal HTML input[file] (also adds an aria-controls link between the button and\n * the hidden input).\n */\n id: { type: String, default: null },\n /**\n * The file component size\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The state of the input, used to indicate loading, success and error states\n */\n state: { type: String as () => NeonState, default: NeonState.Ready },\n /**\n * The file component color\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * The style of button to use for the upload\n */\n buttonStyle: { type: String as () => NeonButtonStyle, default: NeonButtonStyle.Solid },\n /**\n * Make the button circular. NOTE: This is only for icon only buttons.\n */\n circular: { type: Boolean, default: null },\n /**\n * The label of the file component button\n */\n label: { type: String, default: null },\n /**\n * The icon of the file component button\n */\n icon: { type: String, default: null },\n /**\n * Title for the file upload button.\n */\n title: { type: String, default: 'Upload' },\n },\n emits: [\n /**\n * Emitted when files are selected and uploaded\n * @type {File | File[]} either a single File (multiple = false) or a list of File objects (multiple = true)\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const fileInput = ref<InstanceType<typeof NeonInput> | null>(null);\n const files = ref<Array<File>>([]);\n const fileInputModel = ref('');\n\n const fileList = computed(() => {\n return files.value.map((file) => ({ key: file.name, label: file.name }));\n });\n\n const emitFiles = () => {\n emit('update:modelValue', props.multiple ? files.value : files.value[0]);\n if (props.directUpload) {\n files.value = [];\n }\n };\n\n const remove = (filename: string) => {\n if (!props.disabled) {\n files.value = files.value.filter((f) => f.name !== filename);\n emitFiles();\n }\n };\n\n const clearAll = () => {\n if (!props.disabled) {\n files.value = [];\n emitFiles();\n }\n };\n\n const openFileDialog = () => {\n fileInput.value?.neonInput?.click();\n };\n\n const onInput = (event: Event) => {\n if (event?.target) {\n const theFiles = (event.target as HTMLInputElement).files;\n const newFiles = theFiles\n ? Array.from(theFiles).filter((file) => !files.value.find((f) => f.name === file.name))\n : [];\n files.value = props.multiple ? [...files.value, ...newFiles] : newFiles;\n emitFiles();\n }\n };\n\n return {\n fileInput,\n files,\n fileList,\n fileInputModel,\n remove,\n clearAll,\n openFileDialog,\n onInput,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonInput","NeonList","NeonSize","NeonState","NeonFunctionalColor","NeonButtonStyle","props","emit","fileInput","ref","files","fileInputModel","fileList","computed","file","emitFiles","filename","f","_b","_a","event","theFiles","newFiles"],"mappings":";;;;;;;;AAaA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,UAAU,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,cAAc,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIxC,UAAU,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKpC,QAAQ,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjC,IAAI,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAI7B,MAAM,EAAE,MAAM,QAA0B,SAASC,EAAS,OAAA;AAAA;AAAA;AAAA;AAAA,IAI1D,OAAO,EAAE,MAAM,QAA2B,SAASC,EAAU,MAAA;AAAA;AAAA;AAAA;AAAA,IAI7D,OAAO,EAAE,MAAM,QAAqC,SAASC,EAAoB,QAAA;AAAA;AAAA;AAAA;AAAA,IAIjF,aAAa,EAAE,MAAM,QAAiC,SAASC,EAAgB,MAAA;AAAA;AAAA;AAAA;AAAA,IAI/E,UAAU,EAAE,MAAM,SAAS,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAIhC,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAI/B,OAAO,EAAE,MAAM,QAAQ,SAAS,SAAA;AAAA,EAAS;AAAA,EAE3C,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL;AAAA,EAAA;AAAA,EAEF,MAAMC,GAAO,EAAE,MAAAC,KAAQ;AACrB,UAAMC,IAAYC,EAA2C,IAAI,GAC3DC,IAAQD,EAAiB,EAAE,GAC3BE,IAAiBF,EAAI,EAAE,GAEvBG,IAAWC,EAAS,MACjBH,EAAM,MAAM,IAAI,CAACI,OAAU,EAAE,KAAKA,EAAK,MAAM,OAAOA,EAAK,KAAA,EAAO,CACxE,GAEKC,IAAY,MAAM;AACtB,MAAAR,EAAK,qBAAqBD,EAAM,WAAWI,EAAM,QAAQA,EAAM,MAAM,CAAC,CAAC,GACnEJ,EAAM,iBACRI,EAAM,QAAQ,CAAA;AAAA,IAElB;AA+BA,WAAO;AAAA,MACL,WAAAF;AAAA,MACA,OAAAE;AAAA,MACA,UAAAE;AAAA,MACA,gBAAAD;AAAA,MACA,QAlCa,CAACK,MAAqB;AACnC,QAAKV,EAAM,aACTI,EAAM,QAAQA,EAAM,MAAM,OAAO,CAACO,MAAMA,EAAE,SAASD,CAAQ,GAC3DD,EAAA;AAAA,MAEJ;AAAA,MA8BE,UA5Be,MAAM;AACrB,QAAKT,EAAM,aACTI,EAAM,QAAQ,CAAA,GACdK,EAAA;AAAA,MAEJ;AAAA,MAwBE,gBAtBqB,MAAM;;AAC3B,SAAAG,KAAAC,IAAAX,EAAU,UAAV,gBAAAW,EAAiB,cAAjB,QAAAD,EAA4B;AAAA,MAC9B;AAAA,MAqBE,SAnBc,CAACE,MAAiB;AAChC,YAAIA,KAAA,QAAAA,EAAO,QAAQ;AACjB,gBAAMC,IAAYD,EAAM,OAA4B,OAC9CE,IAAWD,IACb,MAAM,KAAKA,CAAQ,EAAE,OAAO,CAACP,MAAS,CAACJ,EAAM,MAAM,KAAK,CAACO,MAAMA,EAAE,SAASH,EAAK,IAAI,CAAC,IACpF,CAAA;AACJ,UAAAJ,EAAM,QAAQJ,EAAM,WAAW,CAAC,GAAGI,EAAM,OAAO,GAAGY,CAAQ,IAAIA,GAC/DP,EAAA;AAAA,QACF;AAAA,MACF;AAAA,IAUE;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const d=require("./NeonFile.cjs.js"),l=require("vue"),a=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r=["aria-disabled"],u={class:"neon-button-group neon-file__actions"};function p(e,o,c,m,f,C){const s=l.resolveComponent("neon-list"),t=l.resolveComponent("neon-input"),n=l.resolveComponent("neon-button");return l.openBlock(),l.createElementBlock("div",{"aria-disabled":e.disabled,class:l.normalizeClass([[`neon-file--${e.color}`,`neon-file--${e.size}`,{"neon-file--disabled":e.disabled,"neon-file--single":!e.multiple,"neon-file--direct-upload":e.directUpload}],"neon-file"])},[e.directUpload?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(s,{key:0,color:e.color,disabled:e.disabled,modelValue:e.fileList,size:e.size,onClose:e.remove},null,8,["color","disabled","modelValue","size","onClose"])),l.createVNode(t,{id:e.id,ref:"fileInput",modelValue:e.fileInputModel,"onUpdate:modelValue":o[0]||(o[0]=i=>e.fileInputModel=i),accept:e.accept,disabled:e.disabled,multiple:e.multiple,tabindex:-1,class:"neon-file__input",type:"file",onInput:e.onInput},null,8,["id","modelValue","accept","disabled","multiple","onInput"]),l.createElementVNode("div",u,[e.multiple&&!e.directUpload?(l.openBlock(),l.createBlock(n,{key:0,disabled:e.disabled||e.files.length===0,size:e.size,"button-style":"text",color:"low-contrast",label:"Clear all",onClick:o[1]||(o[1]=i=>e.clearAll())},null,8,["disabled","size"])):l.createCommentVNode("",!0),l.createVNode(n,{"aria-controls":e.id?e.id:void 0,"button-style":e.buttonStyle,circular:e.circular,color:e.color,disabled:e.disabled,icon:e.icon,label:e.label,size:e.size,state:e.state,title:e.title,onClick:e.openFileDialog},null,8,["aria-controls","button-style","circular","color","disabled","icon","label","size","state","title","onClick"])])],10,r)}const b=a(d,[["render",p]]);module.exports=b;
|
|
2
2
|
//# sourceMappingURL=NeonFile.vue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonFile.vue.cjs.js","sources":["../../../../src/components/user-input/file/NeonFile.vue"],"sourcesContent":["<template>\n <div\n :aria-disabled=\"disabled\"\n :class=\"[\n `neon-file--${color}`,\n `neon-file--${size}`,\n { 'neon-file--disabled': disabled, 'neon-file--single': !multiple, 'neon-file--direct-upload': directUpload },\n ]\"\n class=\"neon-file\"\n >\n <neon-list\n v-if=\"!directUpload\"\n :color=\"color\"\n :disabled=\"disabled\"\n :modelValue=\"fileList\"\n :size=\"size\"\n @close=\"remove\"\n />\n <neon-input\n :id=\"id\"\n ref=\"fileInput\"\n v-model=\"fileInputModel\"\n :accept=\"accept\"\n :disabled=\"disabled\"\n :multiple=\"multiple\"\n :tabindex=\"-1\"\n class=\"neon-file__input\"\n type=\"file\"\n @input=\"onInput\"\n />\n <div class=\"neon-button-group neon-file__actions\">\n <neon-button\n v-if=\"multiple && !directUpload\"\n :disabled=\"disabled || files.length === 0\"\n :size=\"size\"\n button-style=\"text\"\n color=\"low-contrast\"\n label=\"Clear all\"\n @click=\"clearAll()\"\n />\n <neon-button\n :aria-controls=\"id ? id : undefined\"\n :circular=\"circular\"\n :color=\"color\"\n :disabled=\"disabled\"\n :icon=\"icon\"\n :label=\"label\"\n :size=\"size\"\n :state=\"state\"\n :title=\"title\"\n @click=\"openFileDialog\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonFile.ts\" />\n"],"names":["_hoisted_2","_createElementBlock","_ctx","_normalizeClass","_createBlock","_component_neon_list","_createVNode","_component_neon_input","$event","_createElementVNode","_component_neon_button"],"mappings":"uJA8BSA,EAAA,CAAA,MAAM,sCAAsC,8JA7BnDC,EAAAA,
|
|
1
|
+
{"version":3,"file":"NeonFile.vue.cjs.js","sources":["../../../../src/components/user-input/file/NeonFile.vue"],"sourcesContent":["<template>\n <div\n :aria-disabled=\"disabled\"\n :class=\"[\n `neon-file--${color}`,\n `neon-file--${size}`,\n { 'neon-file--disabled': disabled, 'neon-file--single': !multiple, 'neon-file--direct-upload': directUpload },\n ]\"\n class=\"neon-file\"\n >\n <neon-list\n v-if=\"!directUpload\"\n :color=\"color\"\n :disabled=\"disabled\"\n :modelValue=\"fileList\"\n :size=\"size\"\n @close=\"remove\"\n />\n <neon-input\n :id=\"id\"\n ref=\"fileInput\"\n v-model=\"fileInputModel\"\n :accept=\"accept\"\n :disabled=\"disabled\"\n :multiple=\"multiple\"\n :tabindex=\"-1\"\n class=\"neon-file__input\"\n type=\"file\"\n @input=\"onInput\"\n />\n <div class=\"neon-button-group neon-file__actions\">\n <neon-button\n v-if=\"multiple && !directUpload\"\n :disabled=\"disabled || files.length === 0\"\n :size=\"size\"\n button-style=\"text\"\n color=\"low-contrast\"\n label=\"Clear all\"\n @click=\"clearAll()\"\n />\n <neon-button\n :aria-controls=\"id ? id : undefined\"\n :button-style=\"buttonStyle\"\n :circular=\"circular\"\n :color=\"color\"\n :disabled=\"disabled\"\n :icon=\"icon\"\n :label=\"label\"\n :size=\"size\"\n :state=\"state\"\n :title=\"title\"\n @click=\"openFileDialog\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonFile.ts\" />\n"],"names":["_hoisted_2","_createElementBlock","_ctx","_normalizeClass","_createBlock","_component_neon_list","_createVNode","_component_neon_input","$event","_createElementVNode","_component_neon_button"],"mappings":"uJA8BSA,EAAA,CAAA,MAAM,sCAAsC,8JA7BnDC,EAAAA,mBAqDM,MAAA,CApDH,gBAAeC,EAAA,SACf,MAAKC,EAAAA,eAAA,CAAA,eAAwBD,EAAA,KAAK,iBAAwBA,EAAA,IAAI,0BAAmCA,EAAA,SAAQ,oBAAA,CAAwBA,EAAA,SAAQ,2BAA8BA,EAAA,YAAY,GAK9K,WAAW,CAAA,IAGRA,EAAA,wDADTE,EAAAA,YAOEC,EAAA,OALC,MAAOH,EAAA,MACP,SAAUA,EAAA,SACV,WAAYA,EAAA,SACZ,KAAMA,EAAA,KACN,QAAOA,EAAA,oEAEVI,EAAAA,YAWEC,EAAA,CAVC,GAAIL,EAAA,GACL,IAAI,uBACKA,EAAA,oDAAAA,EAAA,eAAcM,GACtB,OAAQN,EAAA,OACR,SAAUA,EAAA,SACV,SAAUA,EAAA,SACV,SAAU,GACX,MAAM,mBACN,KAAK,OACJ,QAAOA,EAAA,8EAEVO,EAAAA,mBAuBM,MAvBNT,EAuBM,CArBIE,EAAA,WAAaA,EAAA,4BADrBE,EAAAA,YAQEM,EAAA,OANC,SAAUR,EAAA,UAAYA,EAAA,MAAM,SAAM,EAClC,KAAMA,EAAA,KACP,eAAa,OACb,MAAM,eACN,MAAM,YACL,uBAAOA,EAAA,sEAEVI,EAAAA,YAYEI,EAAA,CAXC,gBAAeR,EAAA,GAAKA,EAAA,GAAK,OACzB,eAAcA,EAAA,YACd,SAAUA,EAAA,SACV,MAAOA,EAAA,MACP,SAAUA,EAAA,SACV,KAAMA,EAAA,KACN,MAAOA,EAAA,MACP,KAAMA,EAAA,KACN,MAAOA,EAAA,MACP,MAAOA,EAAA,MACP,QAAOA,EAAA"}
|