@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.
- package/dist/common/enums/NeonToggleStyle.cjs.js +1 -1
- package/dist/common/enums/NeonToggleStyle.cjs.js.map +1 -1
- package/dist/common/enums/NeonToggleStyle.es.js +2 -2
- package/dist/common/enums/NeonToggleStyle.es.js.map +1 -1
- package/dist/common/utils/NeonDateUtils.cjs.js +1 -1
- package/dist/common/utils/NeonDateUtils.cjs.js.map +1 -1
- package/dist/common/utils/NeonDateUtils.es.js +45 -39
- package/dist/common/utils/NeonDateUtils.es.js.map +1 -1
- package/dist/common/utils/NeonFileUtils.cjs.js +2 -0
- package/dist/common/utils/NeonFileUtils.cjs.js.map +1 -0
- package/dist/common/utils/NeonFileUtils.es.js +10 -0
- package/dist/common/utils/NeonFileUtils.es.js.map +1 -0
- package/dist/components/navigation/stepper/NeonStepper.vue.cjs.js +1 -1
- package/dist/components/navigation/stepper/NeonStepper.vue.cjs.js.map +1 -1
- package/dist/components/navigation/stepper/NeonStepper.vue.es.js +29 -21
- package/dist/components/navigation/stepper/NeonStepper.vue.es.js.map +1 -1
- package/dist/components/presentation/badge/NeonBadge.cjs.js +1 -1
- package/dist/components/presentation/badge/NeonBadge.cjs.js.map +1 -1
- package/dist/components/presentation/badge/NeonBadge.es.js +51 -26
- package/dist/components/presentation/badge/NeonBadge.es.js.map +1 -1
- package/dist/components/presentation/badge/NeonBadge.vue.cjs.js +1 -1
- package/dist/components/presentation/badge/NeonBadge.vue.cjs.js.map +1 -1
- package/dist/components/presentation/badge/NeonBadge.vue.es.js +28 -14
- package/dist/components/presentation/badge/NeonBadge.vue.es.js.map +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.cjs.js +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.cjs.js.map +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.es.js +44 -32
- package/dist/components/presentation/image-carousel/NeonImageCarousel.es.js.map +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js.map +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.es.js +116 -86
- package/dist/components/presentation/image-carousel/NeonImageCarousel.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 +20 -12
- 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 +7 -5
- package/dist/components/user-input/file/NeonFile.vue.es.js.map +1 -1
- package/dist/components/user-input/toggle/NeonToggle.cjs.js +1 -1
- package/dist/components/user-input/toggle/NeonToggle.cjs.js.map +1 -1
- package/dist/components/user-input/toggle/NeonToggle.es.js +19 -18
- package/dist/components/user-input/toggle/NeonToggle.es.js.map +1 -1
- package/dist/components/user-input/toggle/NeonToggle.vue.cjs.js +1 -1
- package/dist/components/user-input/toggle/NeonToggle.vue.cjs.js.map +1 -1
- package/dist/components/user-input/toggle/NeonToggle.vue.es.js +9 -9
- package/dist/components/user-input/toggle/NeonToggle.vue.es.js.map +1 -1
- package/dist/neon.cjs.js +1 -1
- package/dist/neon.es.js +40 -38
- package/dist/neon.es.js.map +1 -1
- package/dist/src/common/enums/NeonToggleStyle.d.ts +3 -1
- package/dist/src/common/models/NeonDate.d.ts +2 -0
- package/dist/src/common/utils/NeonFileUtils.d.ts +6 -0
- package/dist/src/components/feedback/dialog/NeonDialog.d.ts +2 -2
- package/dist/src/components/feedback/note/NeonNote.d.ts +1 -1
- package/dist/src/components/layout/card-list/NeonCardList.d.ts +1 -1
- package/dist/src/components/layout/modal/NeonModal.d.ts +1 -1
- package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.d.ts +4953 -471
- package/dist/src/components/navigation/menu/NeonMenu.d.ts +4920 -402
- package/dist/src/components/navigation/mobile-menu/NeonMobileMenu.d.ts +4897 -469
- package/dist/src/components/presentation/badge/NeonBadge.d.ts +1501 -3
- package/dist/src/components/presentation/dropdown/NeonDropdown.d.ts +1529 -17
- package/dist/src/components/presentation/image-carousel/NeonImageCarousel.d.ts +36 -23
- package/dist/src/components/user-input/button/NeonButton.d.ts +1 -1
- package/dist/src/components/user-input/chip/NeonChip.d.ts +1 -1
- package/dist/src/components/user-input/date-picker/NeonDatePicker.d.ts +1801 -218
- package/dist/src/components/user-input/drop-zone/NeonDropZone.d.ts +1 -1
- package/dist/src/components/user-input/file/NeonFile.d.ts +636 -7
- package/dist/src/components/user-input/filter-list/NeonFilterList.d.ts +1 -1
- package/dist/src/components/user-input/number/NeonNumber.d.ts +1 -1
- package/dist/src/components/user-input/search/NeonSearch.d.ts +5247 -693
- package/dist/src/components/user-input/select/NeonSelect.d.ts +4571 -71
- package/dist/src/components/user-input/toggle/NeonToggle.d.ts +1 -0
- package/dist/src/neon.d.ts +1 -0
- package/package.json +1 -1
- package/src/sass/components/_badge.scss +79 -0
- package/src/sass/components/_image-carousel.scss +109 -14
- package/src/sass/components/_stepper.scss +8 -3
- package/src/sass/components/_toggle.scss +29 -6
- package/src/sass/includes/_dependencies.scss +1 -1
- package/src/sass/variables.scss +33 -2
|
@@ -1,100 +1,130 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
3
|
-
import
|
|
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
|
-
},
|
|
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
|
-
},
|
|
13
|
+
}, B = ["onClickCapture"], T = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "neon-image-carousel__label",
|
|
16
16
|
tabindex: "-1"
|
|
17
17
|
};
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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:
|
|
82
|
-
l("div",
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
_:
|
|
91
|
-
}
|
|
92
|
-
])
|
|
93
|
-
|
|
94
|
-
], 34);
|
|
121
|
+
_: 1
|
|
122
|
+
})
|
|
123
|
+
], 34)
|
|
124
|
+
]);
|
|
95
125
|
}
|
|
96
|
-
const
|
|
126
|
+
const q = /* @__PURE__ */ w($, [["render", V]]);
|
|
97
127
|
export {
|
|
98
|
-
|
|
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=\"{
|
|
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;;EAgBxB,OAAM;AAAA,EAA2B,UAAS;;;EAsBvB,OAAM;AAAA,EAA6B,UAAS;;;;AAvF1E,SAAAC,EAAA,GAAAC,EA4FM,OA5FNF,GA4FM;AAAA,IA3FJG,EA0FM,OAAA;AAAA,MAzFH,OAAKC,EAAA,CAAA;AAAA,4CAAgDC,EAAA;AAAA,yCAAsDA,EAAA;AAAA,SAItG,qBAAqB,CAAA;AAAA,MAC3B,UAAS;AAAA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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
|
|
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<
|
|
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,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AA4B,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"}
|
|
@@ -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(
|
|
67
|
-
const i = n(null), l = n([]),
|
|
68
|
-
r("update:modelValue",
|
|
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:
|
|
74
|
-
fileInputModel:
|
|
81
|
+
fileList: m,
|
|
82
|
+
fileInputModel: f,
|
|
75
83
|
remove: (e) => {
|
|
76
|
-
|
|
84
|
+
o.disabled || (l.value = l.value.filter((t) => t.name !== e), a());
|
|
77
85
|
},
|
|
78
86
|
clearAll: () => {
|
|
79
|
-
|
|
87
|
+
o.disabled || (l.value = [], a());
|
|
80
88
|
},
|
|
81
89
|
openFileDialog: () => {
|
|
82
|
-
var e;
|
|
83
|
-
(e = i.value) == null
|
|
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
|
|
88
|
-
l.value =
|
|
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<
|
|
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,MAAM,QAAqC,SAASC,EAAoB,QAAA;AAAA;AAAA;AAAA;AAAA,IAIjF,UAAU,EAAE,MAAM,SAAS,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AA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,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"],
|
|
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,
|
|
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
|
|
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 ?
|
|
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(),
|
|
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"])) :
|
|
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,
|
|
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"),
|
|
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,
|
|
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"}
|