@aotearoan/neon 22.1.2 → 22.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/common/enums/NeonToggleStyle.cjs.js +1 -1
  2. package/dist/common/enums/NeonToggleStyle.cjs.js.map +1 -1
  3. package/dist/common/enums/NeonToggleStyle.es.js +2 -2
  4. package/dist/common/enums/NeonToggleStyle.es.js.map +1 -1
  5. package/dist/common/utils/NeonDateUtils.cjs.js +1 -1
  6. package/dist/common/utils/NeonDateUtils.cjs.js.map +1 -1
  7. package/dist/common/utils/NeonDateUtils.es.js +45 -39
  8. package/dist/common/utils/NeonDateUtils.es.js.map +1 -1
  9. package/dist/common/utils/NeonFileUtils.cjs.js +2 -0
  10. package/dist/common/utils/NeonFileUtils.cjs.js.map +1 -0
  11. package/dist/common/utils/NeonFileUtils.es.js +10 -0
  12. package/dist/common/utils/NeonFileUtils.es.js.map +1 -0
  13. package/dist/components/navigation/stepper/NeonStepper.vue.cjs.js +1 -1
  14. package/dist/components/navigation/stepper/NeonStepper.vue.cjs.js.map +1 -1
  15. package/dist/components/navigation/stepper/NeonStepper.vue.es.js +29 -21
  16. package/dist/components/navigation/stepper/NeonStepper.vue.es.js.map +1 -1
  17. package/dist/components/presentation/badge/NeonBadge.cjs.js +1 -1
  18. package/dist/components/presentation/badge/NeonBadge.cjs.js.map +1 -1
  19. package/dist/components/presentation/badge/NeonBadge.es.js +51 -26
  20. package/dist/components/presentation/badge/NeonBadge.es.js.map +1 -1
  21. package/dist/components/presentation/badge/NeonBadge.vue.cjs.js +1 -1
  22. package/dist/components/presentation/badge/NeonBadge.vue.cjs.js.map +1 -1
  23. package/dist/components/presentation/badge/NeonBadge.vue.es.js +28 -14
  24. package/dist/components/presentation/badge/NeonBadge.vue.es.js.map +1 -1
  25. package/dist/components/presentation/image-carousel/NeonImageCarousel.cjs.js +1 -1
  26. package/dist/components/presentation/image-carousel/NeonImageCarousel.cjs.js.map +1 -1
  27. package/dist/components/presentation/image-carousel/NeonImageCarousel.es.js +44 -32
  28. package/dist/components/presentation/image-carousel/NeonImageCarousel.es.js.map +1 -1
  29. package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js +1 -1
  30. package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js.map +1 -1
  31. package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.es.js +116 -86
  32. package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.es.js.map +1 -1
  33. package/dist/components/user-input/file/NeonFile.cjs.js +1 -1
  34. package/dist/components/user-input/file/NeonFile.cjs.js.map +1 -1
  35. package/dist/components/user-input/file/NeonFile.es.js +20 -12
  36. package/dist/components/user-input/file/NeonFile.es.js.map +1 -1
  37. package/dist/components/user-input/file/NeonFile.vue.cjs.js +1 -1
  38. package/dist/components/user-input/file/NeonFile.vue.cjs.js.map +1 -1
  39. package/dist/components/user-input/file/NeonFile.vue.es.js +7 -5
  40. package/dist/components/user-input/file/NeonFile.vue.es.js.map +1 -1
  41. package/dist/components/user-input/toggle/NeonToggle.cjs.js +1 -1
  42. package/dist/components/user-input/toggle/NeonToggle.cjs.js.map +1 -1
  43. package/dist/components/user-input/toggle/NeonToggle.es.js +19 -18
  44. package/dist/components/user-input/toggle/NeonToggle.es.js.map +1 -1
  45. package/dist/components/user-input/toggle/NeonToggle.vue.cjs.js +1 -1
  46. package/dist/components/user-input/toggle/NeonToggle.vue.cjs.js.map +1 -1
  47. package/dist/components/user-input/toggle/NeonToggle.vue.es.js +9 -9
  48. package/dist/components/user-input/toggle/NeonToggle.vue.es.js.map +1 -1
  49. package/dist/neon.cjs.js +1 -1
  50. package/dist/neon.es.js +40 -38
  51. package/dist/neon.es.js.map +1 -1
  52. package/dist/src/common/enums/NeonToggleStyle.d.ts +3 -1
  53. package/dist/src/common/models/NeonDate.d.ts +2 -0
  54. package/dist/src/common/utils/NeonFileUtils.d.ts +6 -0
  55. package/dist/src/components/feedback/dialog/NeonDialog.d.ts +2 -2
  56. package/dist/src/components/feedback/note/NeonNote.d.ts +1 -1
  57. package/dist/src/components/layout/card-list/NeonCardList.d.ts +1 -1
  58. package/dist/src/components/layout/modal/NeonModal.d.ts +1 -1
  59. package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.d.ts +4953 -471
  60. package/dist/src/components/navigation/menu/NeonMenu.d.ts +4920 -402
  61. package/dist/src/components/navigation/mobile-menu/NeonMobileMenu.d.ts +4897 -469
  62. package/dist/src/components/presentation/badge/NeonBadge.d.ts +1501 -3
  63. package/dist/src/components/presentation/dropdown/NeonDropdown.d.ts +1529 -17
  64. package/dist/src/components/presentation/image-carousel/NeonImageCarousel.d.ts +36 -23
  65. package/dist/src/components/user-input/button/NeonButton.d.ts +1 -1
  66. package/dist/src/components/user-input/chip/NeonChip.d.ts +1 -1
  67. package/dist/src/components/user-input/date-picker/NeonDatePicker.d.ts +1801 -218
  68. package/dist/src/components/user-input/drop-zone/NeonDropZone.d.ts +1 -1
  69. package/dist/src/components/user-input/file/NeonFile.d.ts +636 -7
  70. package/dist/src/components/user-input/filter-list/NeonFilterList.d.ts +1 -1
  71. package/dist/src/components/user-input/number/NeonNumber.d.ts +1 -1
  72. package/dist/src/components/user-input/search/NeonSearch.d.ts +5247 -693
  73. package/dist/src/components/user-input/select/NeonSelect.d.ts +4571 -71
  74. package/dist/src/components/user-input/toggle/NeonToggle.d.ts +1 -0
  75. package/dist/src/neon.d.ts +1 -0
  76. package/package.json +1 -1
  77. package/src/sass/components/_badge.scss +79 -0
  78. package/src/sass/components/_image-carousel.scss +109 -14
  79. package/src/sass/components/_stepper.scss +8 -3
  80. package/src/sass/components/_toggle.scss +29 -6
  81. package/src/sass/includes/_dependencies.scss +1 -1
  82. package/src/sass/variables.scss +33 -2
@@ -1,100 +1,130 @@
1
- import b from "./NeonImageCarousel.es.js";
2
- import { resolveComponent as d, openBlock as a, createElementBlock as s, withKeys as i, withModifiers as r, normalizeClass as u, createElementVNode as l, createVNode as g, Fragment as p, renderList as v, createBlock as f, withCtx as k, toDisplayString as y, createCommentVNode as h } from "vue";
3
- import C from "../../../_virtual/_plugin-vue_export-helper.es.js";
4
- const $ = {
5
- class: "neon-image-carousel__container",
6
- tabindex: "-1"
7
- }, I = {
1
+ import $ from "./NeonImageCarousel.es.js";
2
+ import { resolveComponent as m, openBlock as s, createElementBlock as r, createElementVNode as l, withKeys as i, withModifiers as t, normalizeClass as d, createBlock as v, createCommentVNode as c, createVNode as g, Fragment as b, renderList as C, toDisplayString as k, withCtx as f } from "vue";
3
+ import w from "../../../_virtual/_plugin-vue_export-helper.es.js";
4
+ const I = { class: "neon-image-carousel-wrapper" }, L = {
8
5
  ref: "carouselItems",
9
6
  class: "no-style neon-image-carousel__items"
10
- }, w = ["alt", "src"], L = {
7
+ }, z = ["alt", "src"], K = {
8
+ key: 0,
9
+ class: "neon-image-carousel__item-title"
10
+ }, N = {
11
11
  class: "neon-image-carousel__nav",
12
12
  tabindex: "-1"
13
- }, K = ["onClick"], N = {
13
+ }, B = ["onClickCapture"], T = {
14
14
  key: 0,
15
15
  class: "neon-image-carousel__label",
16
16
  tabindex: "-1"
17
17
  };
18
- function z(e, t, B, T, V, D) {
19
- const m = d("neon-button"), _ = d("neon-link");
20
- return a(), s("div", {
21
- class: u([{ "neon-image-carousel--initialised": e.initialised }, "neon-image-carousel"]),
22
- tabindex: "0",
23
- onKeydown: [
24
- t[0] || (t[0] = i(r((...n) => e.previous && e.previous(...n), ["stop", "prevent"]), ["left"])),
25
- t[1] || (t[1] = i(r((...n) => e.next && e.next(...n), ["stop", "prevent"]), ["right"]))
26
- ]
27
- }, [
28
- l("div", $, [
29
- g(m, {
30
- circular: !0,
31
- disabled: e.currentImage === 0,
32
- title: e.previousLabel,
33
- transparent: !0,
34
- "button-style": "text",
35
- class: "neon-image-carousel__previous",
36
- color: "neutral",
37
- icon: "chevron-left",
38
- size: "l",
39
- onClick: e.previous
40
- }, null, 8, ["disabled", "title", "onClick"]),
41
- l("ul", I, [
42
- (a(!0), s(p, null, v(e.images, (n, o) => (a(), s("li", {
43
- key: n.src,
44
- ref_for: !0,
45
- ref: "carouselItem",
46
- class: u([{ "neon-image-carousel__item--active": o === e.currentImage }, "neon-image-carousel__item"])
47
- }, [
48
- l("img", {
49
- alt: n.alt,
50
- src: n.src,
51
- class: "neon-image-carousel__image"
52
- }, null, 8, w)
53
- ], 2))), 128))
54
- ], 512),
55
- g(m, {
56
- circular: !0,
57
- disabled: e.currentImage === e.images.length - 1,
58
- title: e.nextLabel,
59
- transparent: !0,
60
- "button-style": "text",
61
- class: "neon-image-carousel__next",
62
- color: "neutral",
63
- icon: "chevron-right",
64
- size: "l",
65
- onClick: e.next
66
- }, null, 8, ["disabled", "title", "onClick"])
67
- ]),
68
- l("div", L, [
69
- (a(!0), s(p, null, v(e.images, (n, o) => (a(), f(_, {
70
- key: o,
71
- "aria-label": `Display image ${o + 1}`,
72
- class: "neon-image-carousel__nav-item-link",
73
- "outline-style": "none",
74
- role: "button",
75
- tabindex: "0",
76
- onKeydown: [
77
- i(r((c) => e.scrollTo(o), ["stop", "prevent"]), ["enter"]),
78
- i(r((c) => e.scrollTo(o), ["stop", "prevent"]), ["space"])
79
- ]
18
+ function V(e, n, D, E, h, F) {
19
+ const u = m("neon-button"), _ = m("neon-link"), y = m("neon-stack");
20
+ return s(), r("div", I, [
21
+ l("div", {
22
+ class: d([{
23
+ "neon-image-carousel--initialised": e.initialised,
24
+ "neon-image-carousel--expanded": e.expanded
25
+ }, "neon-image-carousel"]),
26
+ tabindex: "0",
27
+ onKeydown: [
28
+ n[4] || (n[4] = i(t((...o) => e.previous && e.previous(...o), ["stop", "prevent"]), ["left"])),
29
+ n[5] || (n[5] = i(t((...o) => e.next && e.next(...o), ["stop", "prevent"]), ["right"])),
30
+ n[6] || (n[6] = i((o) => e.expanded = !1, ["esc"]))
31
+ ]
32
+ }, [
33
+ l("div", {
34
+ class: "neon-image-carousel__container",
35
+ tabindex: "-1",
36
+ onClick: n[2] || (n[2] = t((o) => e.expanded = !1, ["stop"]))
37
+ }, [
38
+ e.expanded ? (s(), v(u, {
39
+ key: 0,
40
+ title: e.closeLabel,
41
+ "button-style": "text",
42
+ class: "neon-image-carousel__close",
43
+ color: "low-contrast",
44
+ icon: "close",
45
+ size: "l",
46
+ transparent: "",
47
+ onClick: n[0] || (n[0] = (o) => e.expanded = !1)
48
+ }, null, 8, ["title"])) : c("", !0),
49
+ g(u, {
50
+ disabled: e.currentImage === 0,
51
+ title: e.previousLabel,
52
+ transparent: !0,
53
+ "button-style": "text",
54
+ class: "neon-image-carousel__previous",
55
+ color: "neutral",
56
+ icon: "arrow-left-1",
57
+ size: "l",
58
+ onClickCapture: t(e.previous, ["stop"])
59
+ }, null, 8, ["disabled", "title", "onClickCapture"]),
60
+ l("ul", L, [
61
+ (s(!0), r(b, null, C(e.images, (o, a) => (s(), r("li", {
62
+ key: o.src,
63
+ ref_for: !0,
64
+ ref: "carouselItem",
65
+ class: d([{ "neon-image-carousel__item--active": a === e.currentImage }, "neon-image-carousel__item"])
66
+ }, [
67
+ l("img", {
68
+ alt: o.alt,
69
+ src: o.src,
70
+ class: "neon-image-carousel__image",
71
+ onClick: n[1] || (n[1] = t((p) => e.expanded = !e.expanded, ["stop"]))
72
+ }, null, 8, z),
73
+ e.expanded ? (s(), r("p", K, k(o.alt), 1)) : c("", !0)
74
+ ], 2))), 128))
75
+ ], 512),
76
+ g(u, {
77
+ disabled: e.currentImage === e.images.length - 1,
78
+ title: e.nextLabel,
79
+ transparent: !0,
80
+ "button-style": "text",
81
+ class: "neon-image-carousel__next",
82
+ color: "neutral",
83
+ icon: "arrow-right-1",
84
+ size: "l",
85
+ onClickCapture: t(e.next, ["stop"])
86
+ }, null, 8, ["disabled", "title", "onClickCapture"])
87
+ ]),
88
+ g(y, {
89
+ class: "neon-image-carousel__nav-container",
90
+ gap: "s",
91
+ onClick: n[3] || (n[3] = t((o) => e.expanded = !1, ["stop"]))
80
92
  }, {
81
- default: k(() => [
82
- l("div", {
83
- class: u([{ "neon-image-carousel__nav-item--active": o === e.currentImage }, "neon-image-carousel__nav-item"]),
84
- tabindex: "-1",
85
- onClick: (c) => e.scrollTo(o)
86
- }, [...t[2] || (t[2] = [
87
- l("div", { class: "neon-image-carousel__nav-item-indicator" }, null, -1)
88
- ])], 10, K)
93
+ default: f(() => [
94
+ l("div", N, [
95
+ (s(!0), r(b, null, C(e.images, (o, a) => (s(), v(_, {
96
+ key: a,
97
+ "aria-label": `Display image ${a + 1}`,
98
+ class: "neon-image-carousel__nav-item-link",
99
+ "outline-style": "none",
100
+ role: "button",
101
+ tabindex: "0",
102
+ onKeydownCapture: [
103
+ i(t((p) => e.scrollTo(a), ["stop", "prevent"]), ["enter"]),
104
+ i(t((p) => e.scrollTo(a), ["stop", "prevent"]), ["space"])
105
+ ]
106
+ }, {
107
+ default: f(() => [
108
+ l("div", {
109
+ class: d([{ "neon-image-carousel__nav-item--active": a === e.currentImage }, "neon-image-carousel__nav-item"]),
110
+ tabindex: "-1",
111
+ onClickCapture: t((p) => e.scrollTo(a), ["stop"])
112
+ }, [...n[7] || (n[7] = [
113
+ l("div", { class: "neon-image-carousel__nav-item-indicator" }, null, -1)
114
+ ])], 42, B)
115
+ ]),
116
+ _: 2
117
+ }, 1032, ["aria-label", "onKeydownCapture"]))), 128))
118
+ ]),
119
+ e.hideLabel ? c("", !0) : (s(), r("span", T, k(e.imageCountLabel || `${e.images.length} ${e.images.length === 1 ? "image" : "images"}`), 1))
89
120
  ]),
90
- _: 2
91
- }, 1032, ["aria-label", "onKeydown"]))), 128))
92
- ]),
93
- e.hideLabel ? h("", !0) : (a(), s("span", N, y(e.imageCountLabel || `${e.images.length} ${e.images.length === 1 ? "image" : "images"}`), 1))
94
- ], 34);
121
+ _: 1
122
+ })
123
+ ], 34)
124
+ ]);
95
125
  }
96
- const S = /* @__PURE__ */ C(b, [["render", z]]);
126
+ const q = /* @__PURE__ */ w($, [["render", V]]);
97
127
  export {
98
- S as default
128
+ q as default
99
129
  };
100
130
  //# sourceMappingURL=NeonImageCarousel.vue.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonImageCarousel.vue.es.js","sources":["../../../../src/components/presentation/image-carousel/NeonImageCarousel.vue"],"sourcesContent":["<template>\n <div\n :class=\"{ 'neon-image-carousel--initialised': initialised }\"\n class=\"neon-image-carousel\"\n tabindex=\"0\"\n @keydown.stop.prevent.left=\"previous\"\n @keydown.stop.prevent.right=\"next\"\n >\n <div class=\"neon-image-carousel__container\" tabindex=\"-1\">\n <neon-button\n :circular=\"true\"\n :disabled=\"currentImage === 0\"\n :title=\"previousLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__previous\"\n color=\"neutral\"\n icon=\"chevron-left\"\n size=\"l\"\n @click=\"previous\"\n />\n <ul ref=\"carouselItems\" class=\"no-style neon-image-carousel__items\">\n <li\n v-for=\"(image, index) in images\"\n :key=\"image.src\"\n ref=\"carouselItem\"\n :class=\"{ 'neon-image-carousel__item--active': index === currentImage }\"\n class=\"neon-image-carousel__item\"\n >\n <img :alt=\"image.alt\" :src=\"image.src\" class=\"neon-image-carousel__image\" />\n </li>\n </ul>\n <neon-button\n :circular=\"true\"\n :disabled=\"currentImage === images.length - 1\"\n :title=\"nextLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__next\"\n color=\"neutral\"\n icon=\"chevron-right\"\n size=\"l\"\n @click=\"next\"\n />\n </div>\n <div class=\"neon-image-carousel__nav\" tabindex=\"-1\">\n <neon-link\n v-for=\"(_image, index) in images\"\n :key=\"index\"\n :aria-label=\"`Display image ${index + 1}`\"\n class=\"neon-image-carousel__nav-item-link\"\n outline-style=\"none\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.stop.prevent.enter=\"scrollTo(index)\"\n @keydown.stop.prevent.space=\"scrollTo(index)\"\n >\n <div\n :class=\"{ 'neon-image-carousel__nav-item--active': index === currentImage }\"\n class=\"neon-image-carousel__nav-item\"\n tabindex=\"-1\"\n @click=\"scrollTo(index)\"\n >\n <div class=\"neon-image-carousel__nav-item-indicator\"></div>\n </div>\n </neon-link>\n </div>\n <span v-if=\"!hideLabel\" class=\"neon-image-carousel__label\" tabindex=\"-1\">\n {{ imageCountLabel || `${images.length} ${images.length === 1 ? 'image' : 'images'}` }}\n </span>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonImageCarousel.ts\" />\n"],"names":["_createElementBlock","_normalizeClass","_ctx","args","_createElementVNode","_hoisted_1","_createVNode","_component_neon_button","_hoisted_2","_openBlock","_Fragment","_renderList","image","index","_hoisted_4","_image","_createBlock","_component_neon_link","_withKeys","_withModifiers","$event","_hoisted_6","_toDisplayString"],"mappings":";;;;EAQS,OAAM;AAAA,EAAiC,UAAS;;EAa/C,KAAI;AAAA,EAAgB,OAAM;;EAwB3B,OAAM;AAAA,EAA2B,UAAS;;;EAsBvB,OAAM;AAAA,EAA6B,UAAS;;;;cAlEtEA,EAqEM,OAAA;AAAA,IApEH,OAAKC,EAAA,CAAA,EAAA,oCAAwCC,EAAA,YAAW,GACnD,qBAAqB,CAAA;AAAA,IAC3B,UAAS;AAAA,IACR,WAAO;AAAA,oCAAoBA,EAAA,YAAAA,EAAA,SAAA,GAAAC,CAAA,GAAQ,CAAA,QAAA,SAAA,CAAA,GAAA,CAAA,MAAA,CAAA;AAAA,oCACPD,EAAA,QAAAA,EAAA,KAAA,GAAAC,CAAA,GAAI,CAAA,QAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;;IAEjCC,EAoCM,OApCNC,GAoCM;AAAA,MAnCJC,EAWEC,GAAA;AAAA,QAVC,UAAU;AAAA,QACV,UAAUL,EAAA,iBAAY;AAAA,QACtB,OAAOA,EAAA;AAAA,QACP,aAAa;AAAA,QACd,gBAAa;AAAA,QACb,OAAM;AAAA,QACN,OAAM;AAAA,QACN,MAAK;AAAA,QACL,MAAK;AAAA,QACJ,SAAOA,EAAA;AAAA;MAEVE,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BACvD,+BAA+B,CAAA;AAAA,YACrC,UAAS;AAAA,YACR,SAAK,CAAAkB,MAAElB,EAAA,SAASW,CAAK;AAAA;YAEtBT,EAA2D,OAAA,EAAtD,OAAM,0CAAyC,GAAA,MAAA,EAAA;AAAA;;;;;IAI7CF,EAAA,8BAAbF,EAEO,QAFPqB,GAEOC,EADFpB,EAAA,mBAAe,GAAOA,EAAA,OAAO,MAAM,IAAIA,EAAA,OAAO,WAAM,IAAA,UAAA,QAAA,EAAA,GAAA,CAAA;AAAA;;;"}
1
+ {"version":3,"file":"NeonImageCarousel.vue.es.js","sources":["../../../../src/components/presentation/image-carousel/NeonImageCarousel.vue"],"sourcesContent":["<template>\n <div class=\"neon-image-carousel-wrapper\">\n <div\n :class=\"{\n 'neon-image-carousel--initialised': initialised,\n 'neon-image-carousel--expanded': expanded,\n }\"\n class=\"neon-image-carousel\"\n tabindex=\"0\"\n @keydown.stop.prevent.left=\"previous\"\n @keydown.stop.prevent.right=\"next\"\n @keydown.esc=\"expanded = false\"\n >\n <div class=\"neon-image-carousel__container\" tabindex=\"-1\" @click.stop=\"expanded = false\">\n <neon-button\n v-if=\"expanded\"\n :title=\"closeLabel\"\n button-style=\"text\"\n class=\"neon-image-carousel__close\"\n color=\"low-contrast\"\n icon=\"close\"\n size=\"l\"\n transparent\n @click=\"expanded = false\"\n />\n <neon-button\n :disabled=\"currentImage === 0\"\n :title=\"previousLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__previous\"\n color=\"neutral\"\n icon=\"arrow-left-1\"\n size=\"l\"\n @click.capture.stop=\"previous\"\n />\n <ul ref=\"carouselItems\" class=\"no-style neon-image-carousel__items\">\n <li\n v-for=\"(image, index) in images\"\n :key=\"image.src\"\n ref=\"carouselItem\"\n :class=\"{ 'neon-image-carousel__item--active': index === currentImage }\"\n class=\"neon-image-carousel__item\"\n >\n <img\n :alt=\"image.alt\"\n :src=\"image.src\"\n class=\"neon-image-carousel__image\"\n @click.stop=\"expanded = !expanded\"\n />\n <p v-if=\"expanded\" class=\"neon-image-carousel__item-title\">{{ image.alt }}</p>\n </li>\n </ul>\n <neon-button\n :disabled=\"currentImage === images.length - 1\"\n :title=\"nextLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__next\"\n color=\"neutral\"\n icon=\"arrow-right-1\"\n size=\"l\"\n @click.capture.stop=\"next\"\n />\n </div>\n <neon-stack class=\"neon-image-carousel__nav-container\" gap=\"s\" @click.stop=\"expanded = false\">\n <div class=\"neon-image-carousel__nav\" tabindex=\"-1\">\n <neon-link\n v-for=\"(_image, index) in images\"\n :key=\"index\"\n :aria-label=\"`Display image ${index + 1}`\"\n class=\"neon-image-carousel__nav-item-link\"\n outline-style=\"none\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.stop.prevent.capture.enter=\"scrollTo(index)\"\n @keydown.stop.prevent.capture.space=\"scrollTo(index)\"\n >\n <div\n :class=\"{ 'neon-image-carousel__nav-item--active': index === currentImage }\"\n class=\"neon-image-carousel__nav-item\"\n tabindex=\"-1\"\n @click.capture.stop=\"scrollTo(index)\"\n >\n <div class=\"neon-image-carousel__nav-item-indicator\"></div>\n </div>\n </neon-link>\n </div>\n <span v-if=\"!hideLabel\" class=\"neon-image-carousel__label\" tabindex=\"-1\">\n {{ imageCountLabel || `${images.length} ${images.length === 1 ? 'image' : 'images'}` }}\n </span>\n </neon-stack>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonImageCarousel.ts\" />\n"],"names":["_hoisted_1","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_ctx","args","_createBlock","_component_neon_button","_createVNode","_hoisted_2","_Fragment","_renderList","image","index","_cache","_withModifiers","$event","_hoisted_4","_toDisplayString","_component_neon_stack","_hoisted_5","_image","_component_neon_link","_withKeys","_hoisted_7"],"mappings":";;;AACO,MAAAA,IAAA,EAAA,OAAM,8BAA6B;EAmC9B,KAAI;AAAA,EAAgB,OAAM;;;EAcP,OAAM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,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA,gBACdU,EAAAR,EAAA,CAAAC,MAAAZ,EAAA,SAASS,CAAK,GAAA,CAAA,QAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;;yBAEnD,MAOM;AAAA,gBAPNX,EAOM,OAAA;AAAA,kBANH,OAAKC,EAAA,CAAA,EAAA,yCAA6CU,MAAUT,EAAA,gBACvD,+BAA+B,CAAA;AAAA,kBACrC,UAAS;AAAA,kBACY,gBAAAW,EAAA,CAAAC,MAAAZ,EAAA,SAASS,CAAK,GAAA,CAAA,MAAA,CAAA;AAAA;kBAEnCX,EAA2D,OAAA,EAAtD,OAAM,0CAAyC,GAAA,MAAA,EAAA;AAAA;;;;;UAI7CE,EAAA,8BAAbH,EAEO,QAFPuB,GAEON,EADFd,EAAA,mBAAe,GAAOA,EAAA,OAAO,MAAM,IAAIA,EAAA,OAAO,WAAM,IAAA,UAAA,QAAA,EAAA,GAAA,CAAA;AAAA;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("vue"),p=require("../../../common/enums/NeonSize.cjs.js"),m=require("../../../common/enums/NeonFunctionalColor.cjs.js"),y=require("../../../common/enums/NeonState.cjs.js"),g=require("../button/NeonButton.vue.cjs.js"),S=require("../input/NeonInput.vue.cjs.js"),N=require("../list/NeonList.vue.cjs.js"),v=n.defineComponent({name:"NeonFile",components:{NeonButton:g,NeonInput:S,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},label:{type:String,default:null},icon:{type:String,default:null}},emits:["update:modelValue"],setup(l,{emit:r}){const i=n.ref(null),t=n.ref([]),s=n.ref(""),c=n.computed(()=>t.value.map(e=>({key:e.name,label:e.name}))),a=()=>{r("update:modelValue",l.multiple?t.value:t.value[0]),l.directUpload&&(t.value=[])};return{fileInput:i,files:t,fileList:c,fileInputModel:s,remove:e=>{l.disabled||(t.value=t.value.filter(o=>o.name!==e),a())},clearAll:()=>{l.disabled||(t.value=[],a())},openFileDialog:()=>{var e;(e=i.value)==null||e.click()},onInput:e=>{if(e!=null&&e.target){const o=e.target.files,u=o?Array.from(o).filter(d=>!t.value.find(f=>f.name===d.name)):[];t.value=l.multiple?[...t.value,...u]:u,a()}}}}});module.exports=v;
1
+ "use strict";const a=require("vue"),p=require("../../../common/enums/NeonSize.cjs.js"),m=require("../../../common/enums/NeonFunctionalColor.cjs.js"),y=require("../../../common/enums/NeonState.cjs.js"),g=require("../button/NeonButton.vue.cjs.js"),S=require("../input/NeonInput.vue.cjs.js"),N=require("../list/NeonList.vue.cjs.js"),v=a.defineComponent({name:"NeonFile",components:{NeonButton:g,NeonInput:S,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},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 i=a.ref(null),t=a.ref([]),s=a.ref(""),c=a.computed(()=>t.value.map(e=>({key:e.name,label:e.name}))),o=()=>{r("update:modelValue",n.multiple?t.value:t.value[0]),n.directUpload&&(t.value=[])};return{fileInput:i,files:t,fileList:c,fileInputModel:s,remove:e=>{n.disabled||(t.value=t.value.filter(l=>l.name!==e),o())},clearAll:()=>{n.disabled||(t.value=[],o())},openFileDialog:()=>{var e,l;(l=(e=i.value)==null?void 0:e.neonInput)==null||l.click()},onInput:e=>{if(e!=null&&e.target){const l=e.target.files,u=l?Array.from(l).filter(d=>!t.value.find(f=>f.name===d.name)):[];t.value=n.multiple?[...t.value,...u]:u,o()}}}}});module.exports=v;
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 * 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 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<HTMLInputElement | 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?.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","_a","event","theFiles","newFiles"],"mappings":"0UAYAA,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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,EAC/DN,EAAA,CACF,CACF,CAUE,CAEJ,CACF,CAAC"}
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":"0UAYAA,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,EAI7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,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"}
@@ -47,6 +47,10 @@ const V = s({
47
47
  * The file component color
48
48
  */
49
49
  color: { type: String, default: g.Primary },
50
+ /**
51
+ * Make the button circular. NOTE: This is only for icon only buttons.
52
+ */
53
+ circular: { type: Boolean, default: null },
50
54
  /**
51
55
  * The label of the file component button
52
56
  */
@@ -54,7 +58,11 @@ const V = s({
54
58
  /**
55
59
  * The icon of the file component button
56
60
  */
57
- icon: { type: String, default: null }
61
+ icon: { type: String, default: null },
62
+ /**
63
+ * Title for the file upload button.
64
+ */
65
+ title: { type: String, default: "Upload" }
58
66
  },
59
67
  emits: [
60
68
  /**
@@ -63,29 +71,29 @@ const V = s({
63
71
  */
64
72
  "update:modelValue"
65
73
  ],
66
- setup(t, { emit: r }) {
67
- const i = n(null), l = n([]), m = n(""), f = c(() => l.value.map((e) => ({ key: e.name, label: e.name }))), a = () => {
68
- r("update:modelValue", t.multiple ? l.value : l.value[0]), t.directUpload && (l.value = []);
74
+ setup(o, { emit: r }) {
75
+ const i = n(null), l = n([]), f = n(""), m = c(() => l.value.map((e) => ({ key: e.name, label: e.name }))), a = () => {
76
+ r("update:modelValue", o.multiple ? l.value : l.value[0]), o.directUpload && (l.value = []);
69
77
  };
70
78
  return {
71
79
  fileInput: i,
72
80
  files: l,
73
- fileList: f,
74
- fileInputModel: m,
81
+ fileList: m,
82
+ fileInputModel: f,
75
83
  remove: (e) => {
76
- t.disabled || (l.value = l.value.filter((o) => o.name !== e), a());
84
+ o.disabled || (l.value = l.value.filter((t) => t.name !== e), a());
77
85
  },
78
86
  clearAll: () => {
79
- t.disabled || (l.value = [], a());
87
+ o.disabled || (l.value = [], a());
80
88
  },
81
89
  openFileDialog: () => {
82
- var e;
83
- (e = i.value) == null || e.click();
90
+ var e, t;
91
+ (t = (e = i.value) == null ? void 0 : e.neonInput) == null || t.click();
84
92
  },
85
93
  onInput: (e) => {
86
94
  if (e != null && e.target) {
87
- const o = e.target.files, u = o ? Array.from(o).filter((d) => !l.value.find((p) => p.name === d.name)) : [];
88
- l.value = t.multiple ? [...l.value, ...u] : u, a();
95
+ const t = e.target.files, u = t ? Array.from(t).filter((p) => !l.value.find((d) => d.name === p.name)) : [];
96
+ l.value = o.multiple ? [...l.value, ...u] : u, a();
89
97
  }
90
98
  }
91
99
  };
@@ -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 * 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 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<HTMLInputElement | 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?.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","_a","event","theFiles","newFiles"],"mappings":";;;;;;;AAYA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B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M,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,IAAAV,EAAU,UAAV,QAAAU,EAAiB;AAAA,MACnB;AAAA,MAqBE,SAnBc,CAACC,MAAiB;AAChC,YAAIA,KAAA,QAAAA,EAAO,QAAQ;AACjB,gBAAMC,IAAYD,EAAM,OAA4B,OAC9CE,IAAWD,IACb,MAAM,KAAKA,CAAQ,EAAE,OAAO,CAACN,MAAS,CAACJ,EAAM,MAAM,KAAK,CAACO,MAAMA,EAAE,SAASH,EAAK,IAAI,CAAC,IACpF,CAAA;AACJ,UAAAJ,EAAM,QAAQJ,EAAM,WAAW,CAAC,GAAGI,EAAM,OAAO,GAAGW,CAAQ,IAAIA,GAC/DN,EAAA;AAAA,QACF;AAAA,MACF;AAAA,IAUE;AAAA,EAEJ;AACF,CAAC;"}
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":";;;;;;;AAYA,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,M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,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 a=require("./NeonFile.cjs.js"),l=require("vue"),t=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r=["aria-disabled"],p={class:"neon-button-group neon-file__actions"};function u(e,o,c,m,f,C){const s=l.resolveComponent("neon-list"),d=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(d,{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",p,[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,color:e.color,disabled:e.disabled,icon:e.icon,label:e.label,size:e.size,state:e.state,onClick:e.openFileDialog},null,8,["aria-controls","color","disabled","icon","label","size","state","onClick"])])],10,r)}const b=t(a,[["render",u]]);module.exports=b;
1
+ "use strict";const a=require("./NeonFile.cjs.js"),l=require("vue"),t=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r=["aria-disabled"],u={class:"neon-button-group neon-file__actions"};function p(e,o,b,m,f,C){const s=l.resolveComponent("neon-list"),d=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(d,{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,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","circular","color","disabled","icon","label","size","state","title","onClick"])])],10,r)}const c=t(a,[["render",p]]);module.exports=c;
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 :color=\"color\"\n :disabled=\"disabled\"\n :icon=\"icon\"\n :label=\"label\"\n :size=\"size\"\n :state=\"state\"\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,mBAkDM,MAAA,CAjDH,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,mBAoBM,MApBNT,EAoBM,CAlBIE,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,YASEI,EAAA,CARC,gBAAeR,EAAA,GAAKA,EAAA,GAAK,OACzB,MAAOA,EAAA,MACP,SAAUA,EAAA,SACV,KAAMA,EAAA,KACN,MAAOA,EAAA,MACP,KAAMA,EAAA,KACN,MAAOA,EAAA,MACP,QAAOA,EAAA"}
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,mBAoDM,MAAA,CAnDH,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,mBAsBM,MAtBNT,EAsBM,CApBIE,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,YAWEI,EAAA,CAVC,gBAAeR,EAAA,GAAKA,EAAA,GAAK,OACzB,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"}
@@ -1,5 +1,5 @@
1
1
  import u from "./NeonFile.es.js";
2
- import { resolveComponent as o, openBlock as n, createElementBlock as m, normalizeClass as b, createBlock as s, createCommentVNode as a, createVNode as t, createElementVNode as f } from "vue";
2
+ import { resolveComponent as o, openBlock as n, createElementBlock as m, normalizeClass as b, createBlock as a, createCommentVNode as s, createVNode as t, createElementVNode as f } from "vue";
3
3
  import c from "../../../_virtual/_plugin-vue_export-helper.es.js";
4
4
  const z = ["aria-disabled"], C = { class: "neon-button-group neon-file__actions" };
5
5
  function k(e, l, V, $, I, v) {
@@ -12,7 +12,7 @@ function k(e, l, V, $, I, v) {
12
12
  { "neon-file--disabled": e.disabled, "neon-file--single": !e.multiple, "neon-file--direct-upload": e.directUpload }
13
13
  ], "neon-file"])
14
14
  }, [
15
- e.directUpload ? a("", !0) : (n(), s(r, {
15
+ e.directUpload ? s("", !0) : (n(), a(r, {
16
16
  key: 0,
17
17
  color: e.color,
18
18
  disabled: e.disabled,
@@ -34,7 +34,7 @@ function k(e, l, V, $, I, v) {
34
34
  onInput: e.onInput
35
35
  }, null, 8, ["id", "modelValue", "accept", "disabled", "multiple", "onInput"]),
36
36
  f("div", C, [
37
- e.multiple && !e.directUpload ? (n(), s(i, {
37
+ e.multiple && !e.directUpload ? (n(), a(i, {
38
38
  key: 0,
39
39
  disabled: e.disabled || e.files.length === 0,
40
40
  size: e.size,
@@ -42,17 +42,19 @@ function k(e, l, V, $, I, v) {
42
42
  color: "low-contrast",
43
43
  label: "Clear all",
44
44
  onClick: l[1] || (l[1] = (d) => e.clearAll())
45
- }, null, 8, ["disabled", "size"])) : a("", !0),
45
+ }, null, 8, ["disabled", "size"])) : s("", !0),
46
46
  t(i, {
47
47
  "aria-controls": e.id ? e.id : void 0,
48
+ circular: e.circular,
48
49
  color: e.color,
49
50
  disabled: e.disabled,
50
51
  icon: e.icon,
51
52
  label: e.label,
52
53
  size: e.size,
53
54
  state: e.state,
55
+ title: e.title,
54
56
  onClick: e.openFileDialog
55
- }, null, 8, ["aria-controls", "color", "disabled", "icon", "label", "size", "state", "onClick"])
57
+ }, null, 8, ["aria-controls", "circular", "color", "disabled", "icon", "label", "size", "state", "title", "onClick"])
56
58
  ])
57
59
  ], 10, z);
58
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NeonFile.vue.es.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 :color=\"color\"\n :disabled=\"disabled\"\n :icon=\"icon\"\n :label=\"label\"\n :size=\"size\"\n :state=\"state\"\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":";;;6BA8BSA,IAAA,EAAA,OAAM,uCAAsC;;;cA7BnDC,EAkDM,OAAA;AAAA,IAjDH,iBAAeC,EAAA;AAAA,IACf,OAAKC,EAAA,CAAA;AAAA,oBAAwBD,EAAA,KAAK;AAAA,oBAAwBA,EAAA,IAAI;AAAA,+BAAmCA,EAAA,UAAQ,qBAAA,CAAwBA,EAAA,UAAQ,4BAA8BA,EAAA,aAAY;AAAA,OAK9K,WAAW,CAAA;AAAA;IAGRA,EAAA,iCADTE,EAOEC,GAAA;AAAA;MALC,OAAOH,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACV,YAAYA,EAAA;AAAA,MACZ,MAAMA,EAAA;AAAA,MACN,SAAOA,EAAA;AAAA;IAEVI,EAWEC,GAAA;AAAA,MAVC,IAAIL,EAAA;AAAA,MACL,KAAI;AAAA,kBACKA,EAAA;AAAA,oDAAAA,EAAA,iBAAcM;AAAA,MACtB,QAAQN,EAAA;AAAA,MACR,UAAUA,EAAA;AAAA,MACV,UAAUA,EAAA;AAAA,MACV,UAAU;AAAA,MACX,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,SAAOA,EAAA;AAAA;IAEVO,EAoBM,OApBNT,GAoBM;AAAA,MAlBIE,EAAA,aAAaA,EAAA,qBADrBE,EAQEM,GAAA;AAAA;QANC,UAAUR,EAAA,YAAYA,EAAA,MAAM,WAAM;AAAA,QAClC,MAAMA,EAAA;AAAA,QACP,gBAAa;AAAA,QACb,OAAM;AAAA,QACN,OAAM;AAAA,QACL,gCAAOA,EAAA;;MAEVI,EASEI,GAAA;AAAA,QARC,iBAAeR,EAAA,KAAKA,EAAA,KAAK;AAAA,QACzB,OAAOA,EAAA;AAAA,QACP,UAAUA,EAAA;AAAA,QACV,MAAMA,EAAA;AAAA,QACN,OAAOA,EAAA;AAAA,QACP,MAAMA,EAAA;AAAA,QACN,OAAOA,EAAA;AAAA,QACP,SAAOA,EAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"NeonFile.vue.es.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":";;;6BA8BSA,IAAA,EAAA,OAAM,uCAAsC;;;cA7BnDC,EAoDM,OAAA;AAAA,IAnDH,iBAAeC,EAAA;AAAA,IACf,OAAKC,EAAA,CAAA;AAAA,oBAAwBD,EAAA,KAAK;AAAA,oBAAwBA,EAAA,IAAI;AAAA,+BAAmCA,EAAA,UAAQ,qBAAA,CAAwBA,EAAA,UAAQ,4BAA8BA,EAAA,aAAY;AAAA,OAK9K,WAAW,CAAA;AAAA;IAGRA,EAAA,iCADTE,EAOEC,GAAA;AAAA;MALC,OAAOH,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACV,YAAYA,EAAA;AAAA,MACZ,MAAMA,EAAA;AAAA,MACN,SAAOA,EAAA;AAAA;IAEVI,EAWEC,GAAA;AAAA,MAVC,IAAIL,EAAA;AAAA,MACL,KAAI;AAAA,kBACKA,EAAA;AAAA,oDAAAA,EAAA,iBAAcM;AAAA,MACtB,QAAQN,EAAA;AAAA,MACR,UAAUA,EAAA;AAAA,MACV,UAAUA,EAAA;AAAA,MACV,UAAU;AAAA,MACX,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,SAAOA,EAAA;AAAA;IAEVO,EAsBM,OAtBNT,GAsBM;AAAA,MApBIE,EAAA,aAAaA,EAAA,qBADrBE,EAQEM,GAAA;AAAA;QANC,UAAUR,EAAA,YAAYA,EAAA,MAAM,WAAM;AAAA,QAClC,MAAMA,EAAA;AAAA,QACP,gBAAa;AAAA,QACb,OAAM;AAAA,QACN,OAAM;AAAA,QACL,gCAAOA,EAAA;;MAEVI,EAWEI,GAAA;AAAA,QAVC,iBAAeR,EAAA,KAAKA,EAAA,KAAK;AAAA,QACzB,UAAUA,EAAA;AAAA,QACV,OAAOA,EAAA;AAAA,QACP,UAAUA,EAAA;AAAA,QACV,MAAMA,EAAA;AAAA,QACN,OAAOA,EAAA;AAAA,QACP,MAAMA,EAAA;AAAA,QACN,OAAOA,EAAA;AAAA,QACP,OAAOA,EAAA;AAAA,QACP,SAAOA,EAAA;AAAA;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("vue"),d=require("../../../common/enums/NeonSize.cjs.js"),c=require("../../../common/enums/NeonFunctionalColor.cjs.js"),g=require("../../../common/enums/NeonToggleStyle.cjs.js"),y=require("../../../common/enums/NeonOrientation.cjs.js"),m=require("../../presentation/icon/NeonIcon.vue.cjs.js"),p=n.defineComponent({name:"NeonToggle",components:{NeonIcon:m},props:{name:{type:String,required:!0},modelValue:{type:String,required:!0},model:{type:Array,required:!0},toggleStyle:{type:String,default:()=>g.NeonToggleStyle.Toggle},size:{type:String,default:()=>d.NeonSize.Medium},orientation:{type:String,default:()=>y.NeonOrientation.Vertical},color:{type:String,default:()=>c.NeonFunctionalColor.Primary},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:i,slots:r}){const l=n.useAttrs(),o=e=>{i("update:modelValue",e)},u=e=>{!t.disabled&&!e.disabled&&t.modelValue!==e.key&&o(e.key)},s=n.computed(()=>{const{onClick:e,...a}=l;return a});return{selectOption:e=>{!t.disabled&&!e.disabled&&o(e.key)},onInput:u,sanitizedAttributes:s,slots:r}}});module.exports=p;
1
+ "use strict";const n=require("vue"),c=require("../../../common/enums/NeonSize.cjs.js"),g=require("../../../common/enums/NeonFunctionalColor.cjs.js"),i=require("../../../common/enums/NeonToggleStyle.cjs.js"),y=require("../../../common/enums/NeonOrientation.cjs.js"),m=require("../../presentation/icon/NeonIcon.vue.cjs.js"),p=n.defineComponent({name:"NeonToggle",components:{NeonIcon:m},props:{name:{type:String,required:!0},modelValue:{type:String,required:!0},model:{type:Array,required:!0},toggleStyle:{type:String,default:()=>i.NeonToggleStyle.Toggle},size:{type:String,default:()=>c.NeonSize.Medium},orientation:{type:String,default:()=>y.NeonOrientation.Vertical},color:{type:String,default:()=>g.NeonFunctionalColor.Primary},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:r,slots:l}){const u=n.useAttrs(),o=e=>{r("update:modelValue",e)},s=e=>{!t.disabled&&!e.disabled&&t.modelValue!==e.key&&o(e.key)},a=n.computed(()=>{const{onClick:e,...d}=u;return d});return{selectOption:e=>{!t.disabled&&!e.disabled&&o(e.key)},onInput:s,sanitizedAttributes:a,slots:l,NeonToggleStyle:i.NeonToggleStyle}}});module.exports=p;
2
2
  //# sourceMappingURL=NeonToggle.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonToggle.cjs.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport type { NeonToggleModel } from '@/common/models/NeonToggleModel';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonToggleStyle } from '@/common/enums/NeonToggleStyle';\nimport { NeonOrientation } from '@/common/enums/NeonOrientation';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\n\n/**\n * <p>A toggle component for selecting one value from a range of options. This is equivalent to a radio button group. It can be styled as a <em>Toggle</em> or as <em>Radio buttons</em>.\n */\nexport default defineComponent({\n name: 'NeonToggle',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The name of the radio button group.\n */\n name: { type: String, required: true },\n /**\n * The key of the selected option.\n */\n modelValue: { type: String, required: true },\n /**\n * The list of options to present to the user.\n */\n model: { type: Array as () => Array<NeonToggleModel>, required: true },\n /**\n * The style of toggle to display to the user.\n */\n toggleStyle: { type: String as () => NeonToggleStyle, default: () => NeonToggleStyle.Toggle },\n /**\n * The size of the toggle.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Medium },\n /**\n * The orientation of the toggle if the style is a radio button group.\n */\n orientation: { type: String as () => NeonOrientation, default: () => NeonOrientation.Vertical },\n /**\n * The color of the toggle.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Primary },\n /**\n * Whether the toggle is disabled.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the selected value changes.\n * @type {string} The key of the selected model item.\n */\n 'update:modelValue',\n ],\n setup(props, { emit, slots }) {\n const attrs = useAttrs();\n const emitInput = (key: string) => {\n emit('update:modelValue', key);\n };\n\n const onInput = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled && props.modelValue !== option.key) {\n emitInput(option.key);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const selectOption = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled) {\n emitInput(option.key);\n }\n };\n\n return {\n selectOption,\n onInput,\n sanitizedAttributes,\n slots,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonToggleStyle","NeonSize","NeonOrientation","NeonFunctionalColor","props","emit","slots","attrs","useAttrs","emitInput","key","onInput","option","sanitizedAttributes","computed","onClick","sanitized"],"mappings":"kUAWAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,SAAAC,CAAA,EAEF,MAAO,CAIL,KAAM,CAAE,KAAM,OAAQ,SAAU,EAAA,EAIhC,WAAY,CAAE,KAAM,OAAQ,SAAU,EAAA,EAItC,MAAO,CAAE,KAAM,MAAuC,SAAU,EAAA,EAIhE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,EAAAA,gBAAgB,MAAA,EAIrF,KAAM,CAAE,KAAM,OAA0B,QAAS,IAAMC,EAAAA,SAAS,MAAA,EAIhE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,EAAAA,gBAAgB,QAAA,EAIrF,MAAO,CAAE,KAAM,OAAqC,QAAS,IAAMC,EAAAA,oBAAoB,OAAA,EAIvF,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,CAAM,EAE5C,MAAO,CAKL,mBAAA,EAEF,MAAMC,EAAO,CAAE,KAAAC,EAAM,MAAAC,GAAS,CAC5B,MAAMC,EAAQC,EAAAA,SAAA,EACRC,EAAaC,GAAgB,CACjCL,EAAK,oBAAqBK,CAAG,CAC/B,EAEMC,EAAWC,GAA4B,CACvC,CAACR,EAAM,UAAY,CAACQ,EAAO,UAAYR,EAAM,aAAeQ,EAAO,KACrEH,EAAUG,EAAO,GAAG,CAExB,EAEMC,EAAsBC,EAAAA,SAAS,IAAM,CAEzC,KAAM,CAAE,QAAAC,EAAS,GAAGC,CAAA,EAAcT,EAClC,OAAOS,CACT,CAAC,EAQD,MAAO,CACL,aAPoBJ,GAA4B,CAC5C,CAACR,EAAM,UAAY,CAACQ,EAAO,UAC7BH,EAAUG,EAAO,GAAG,CAExB,EAIE,QAAAD,EACA,oBAAAE,EACA,MAAAP,CAAA,CAEJ,CACF,CAAC"}
1
+ {"version":3,"file":"NeonToggle.cjs.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport type { NeonToggleModel } from '@/common/models/NeonToggleModel';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonToggleStyle } from '@/common/enums/NeonToggleStyle';\nimport { NeonOrientation } from '@/common/enums/NeonOrientation';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\n\n/**\n * <p>A toggle component for selecting one value from a range of options. This is equivalent to a radio button group. It can be styled as a <em>Toggle</em> or as <em>Radio buttons</em>.\n */\nexport default defineComponent({\n name: 'NeonToggle',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The name of the radio button group.\n */\n name: { type: String, required: true },\n /**\n * The key of the selected option.\n */\n modelValue: { type: String, required: true },\n /**\n * The list of options to present to the user.\n */\n model: { type: Array as () => Array<NeonToggleModel>, required: true },\n /**\n * The style of toggle to display to the user.\n */\n toggleStyle: { type: String as () => NeonToggleStyle, default: () => NeonToggleStyle.Toggle },\n /**\n * The size of the toggle.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Medium },\n /**\n * The orientation of the toggle if the style is a radio button group.\n */\n orientation: { type: String as () => NeonOrientation, default: () => NeonOrientation.Vertical },\n /**\n * The color of the toggle.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Primary },\n /**\n * Whether the toggle is disabled.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the selected value changes.\n * @type {string} The key of the selected model item.\n */\n 'update:modelValue',\n ],\n setup(props, { emit, slots }) {\n const attrs = useAttrs();\n const emitInput = (key: string) => {\n emit('update:modelValue', key);\n };\n\n const onInput = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled && props.modelValue !== option.key) {\n emitInput(option.key);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const selectOption = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled) {\n emitInput(option.key);\n }\n };\n\n return {\n selectOption,\n onInput,\n sanitizedAttributes,\n slots,\n NeonToggleStyle,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonToggleStyle","NeonSize","NeonOrientation","NeonFunctionalColor","props","emit","slots","attrs","useAttrs","emitInput","key","onInput","option","sanitizedAttributes","computed","onClick","sanitized"],"mappings":"kUAWAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,SAAAC,CAAA,EAEF,MAAO,CAIL,KAAM,CAAE,KAAM,OAAQ,SAAU,EAAA,EAIhC,WAAY,CAAE,KAAM,OAAQ,SAAU,EAAA,EAItC,MAAO,CAAE,KAAM,MAAuC,SAAU,EAAA,EAIhE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,EAAAA,gBAAgB,MAAA,EAIrF,KAAM,CAAE,KAAM,OAA0B,QAAS,IAAMC,EAAAA,SAAS,MAAA,EAIhE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,EAAAA,gBAAgB,QAAA,EAIrF,MAAO,CAAE,KAAM,OAAqC,QAAS,IAAMC,EAAAA,oBAAoB,OAAA,EAIvF,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,CAAM,EAE5C,MAAO,CAKL,mBAAA,EAEF,MAAMC,EAAO,CAAE,KAAAC,EAAM,MAAAC,GAAS,CAC5B,MAAMC,EAAQC,EAAAA,SAAA,EACRC,EAAaC,GAAgB,CACjCL,EAAK,oBAAqBK,CAAG,CAC/B,EAEMC,EAAWC,GAA4B,CACvC,CAACR,EAAM,UAAY,CAACQ,EAAO,UAAYR,EAAM,aAAeQ,EAAO,KACrEH,EAAUG,EAAO,GAAG,CAExB,EAEMC,EAAsBC,EAAAA,SAAS,IAAM,CAEzC,KAAM,CAAE,QAAAC,EAAS,GAAGC,CAAA,EAAcT,EAClC,OAAOS,CACT,CAAC,EAQD,MAAO,CACL,aAPoBJ,GAA4B,CAC5C,CAACR,EAAM,UAAY,CAACQ,EAAO,UAC7BH,EAAUG,EAAO,GAAG,CAExB,EAIE,QAAAD,EACA,oBAAAE,EACA,MAAAP,EAAA,gBACAN,EAAAA,eAAA,CAEJ,CACF,CAAC"}