@aotearoan/neon 18.2.13 → 19.0.1

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 (99) hide show
  1. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.cjs.js +1 -1
  2. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.cjs.js.map +1 -1
  3. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.es.js +36 -34
  4. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.es.js.map +1 -1
  5. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.vue.cjs.js +1 -1
  6. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.vue.cjs.js.map +1 -1
  7. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.vue.es.js +1 -0
  8. package/dist/components/navigation/dropdown-menu/NeonDropdownMenu.vue.es.js.map +1 -1
  9. package/dist/components/navigation/stepper/NeonStepper.cjs.js +1 -1
  10. package/dist/components/navigation/stepper/NeonStepper.cjs.js.map +1 -1
  11. package/dist/components/navigation/stepper/NeonStepper.es.js +1 -1
  12. package/dist/components/navigation/stepper/NeonStepper.es.js.map +1 -1
  13. package/dist/components/presentation/dropdown/NeonDropdown.cjs.js +1 -1
  14. package/dist/components/presentation/dropdown/NeonDropdown.cjs.js.map +1 -1
  15. package/dist/components/presentation/dropdown/NeonDropdown.es.js +18 -18
  16. package/dist/components/presentation/dropdown/NeonDropdown.es.js.map +1 -1
  17. package/dist/components/user-input/button/NeonButton.cjs.js +1 -1
  18. package/dist/components/user-input/button/NeonButton.cjs.js.map +1 -1
  19. package/dist/components/user-input/button/NeonButton.es.js +1 -1
  20. package/dist/components/user-input/button/NeonButton.es.js.map +1 -1
  21. package/dist/components/user-input/chip/NeonChip.cjs.js +1 -1
  22. package/dist/components/user-input/chip/NeonChip.cjs.js.map +1 -1
  23. package/dist/components/user-input/chip/NeonChip.es.js +6 -6
  24. package/dist/components/user-input/chip/NeonChip.es.js.map +1 -1
  25. package/dist/components/user-input/color/NeonColor.cjs.js +1 -1
  26. package/dist/components/user-input/color/NeonColor.cjs.js.map +1 -1
  27. package/dist/components/user-input/color/NeonColor.es.js +8 -8
  28. package/dist/components/user-input/color/NeonColor.es.js.map +1 -1
  29. package/dist/components/user-input/date-picker/NeonDatePicker.vue.cjs.js +1 -1
  30. package/dist/components/user-input/date-picker/NeonDatePicker.vue.cjs.js.map +1 -1
  31. package/dist/components/user-input/date-picker/NeonDatePicker.vue.es.js +15 -13
  32. package/dist/components/user-input/date-picker/NeonDatePicker.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 +6 -6
  36. package/dist/components/user-input/file/NeonFile.es.js.map +1 -1
  37. package/dist/components/user-input/input/NeonInput.cjs.js +1 -1
  38. package/dist/components/user-input/input/NeonInput.cjs.js.map +1 -1
  39. package/dist/components/user-input/input/NeonInput.es.js +37 -32
  40. package/dist/components/user-input/input/NeonInput.es.js.map +1 -1
  41. package/dist/components/user-input/input/NeonInput.vue.cjs.js +1 -1
  42. package/dist/components/user-input/input/NeonInput.vue.cjs.js.map +1 -1
  43. package/dist/components/user-input/input/NeonInput.vue.es.js +21 -19
  44. package/dist/components/user-input/input/NeonInput.vue.es.js.map +1 -1
  45. package/dist/components/user-input/number/NeonNumber.cjs.js +1 -1
  46. package/dist/components/user-input/number/NeonNumber.cjs.js.map +1 -1
  47. package/dist/components/user-input/number/NeonNumber.es.js +10 -10
  48. package/dist/components/user-input/number/NeonNumber.es.js.map +1 -1
  49. package/dist/components/user-input/range-slider/NeonRangeSlider.cjs.js +1 -1
  50. package/dist/components/user-input/range-slider/NeonRangeSlider.cjs.js.map +1 -1
  51. package/dist/components/user-input/range-slider/NeonRangeSlider.es.js +5 -5
  52. package/dist/components/user-input/range-slider/NeonRangeSlider.es.js.map +1 -1
  53. package/dist/components/user-input/search/NeonSearch.cjs.js +1 -1
  54. package/dist/components/user-input/search/NeonSearch.cjs.js.map +1 -1
  55. package/dist/components/user-input/search/NeonSearch.es.js +60 -45
  56. package/dist/components/user-input/search/NeonSearch.es.js.map +1 -1
  57. package/dist/components/user-input/search/NeonSearch.vue.cjs.js +1 -1
  58. package/dist/components/user-input/search/NeonSearch.vue.cjs.js.map +1 -1
  59. package/dist/components/user-input/search/NeonSearch.vue.es.js +15 -11
  60. package/dist/components/user-input/search/NeonSearch.vue.es.js.map +1 -1
  61. package/dist/components/user-input/select/NeonSelect.cjs.js +1 -1
  62. package/dist/components/user-input/select/NeonSelect.cjs.js.map +1 -1
  63. package/dist/components/user-input/select/NeonSelect.es.js +58 -56
  64. package/dist/components/user-input/select/NeonSelect.es.js.map +1 -1
  65. package/dist/components/user-input/select/NeonSelect.vue.cjs.js +1 -1
  66. package/dist/components/user-input/select/NeonSelect.vue.cjs.js.map +1 -1
  67. package/dist/components/user-input/select/NeonSelect.vue.es.js +1 -0
  68. package/dist/components/user-input/select/NeonSelect.vue.es.js.map +1 -1
  69. package/dist/components/user-input/slider/NeonSlider.cjs.js +1 -1
  70. package/dist/components/user-input/slider/NeonSlider.cjs.js.map +1 -1
  71. package/dist/components/user-input/slider/NeonSlider.es.js +4 -4
  72. package/dist/components/user-input/slider/NeonSlider.es.js.map +1 -1
  73. package/dist/components/user-input/toggle/NeonToggle.cjs.js +1 -1
  74. package/dist/components/user-input/toggle/NeonToggle.cjs.js.map +1 -1
  75. package/dist/components/user-input/toggle/NeonToggle.es.js +4 -4
  76. package/dist/components/user-input/toggle/NeonToggle.es.js.map +1 -1
  77. package/dist/src/components/layout/card-list/NeonCardList.d.ts +0 -6
  78. package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.d.ts +1505 -1
  79. package/dist/src/components/navigation/menu/NeonMenu.d.ts +1511 -31
  80. package/dist/src/components/presentation/dropdown/NeonDropdown.d.ts +12 -3
  81. package/dist/src/components/user-input/chip/NeonChip.d.ts +0 -10
  82. package/dist/src/components/user-input/color/NeonColor.d.ts +9 -0
  83. package/dist/src/components/user-input/date-picker/NeonDatePicker.d.ts +43 -62
  84. package/dist/src/components/user-input/file/NeonFile.d.ts +21 -8
  85. package/dist/src/components/user-input/input/NeonInput.d.ts +17 -0
  86. package/dist/src/components/user-input/number/NeonNumber.d.ts +51 -18
  87. package/dist/src/components/user-input/password/NeonPassword.d.ts +9 -0
  88. package/dist/src/components/user-input/search/NeonSearch.d.ts +2271 -28
  89. package/dist/src/components/user-input/select/NeonSelect.d.ts +1623 -38
  90. package/package.json +1 -1
  91. package/src/sass/components/_badge.scss +1 -3
  92. package/src/sass/components/_button.scss +3 -2
  93. package/src/sass/components/_drawer.scss +1 -1
  94. package/src/sass/components/_dropdown-menu.scss +1 -0
  95. package/src/sass/components/_dropdown.scss +1 -1
  96. package/src/sass/components/_input.scss +2 -11
  97. package/src/sass/components/_search.scss +7 -2
  98. package/src/sass/components/_select.scss +1 -0
  99. package/src/sass/variables.scss +12 -2
@@ -1,4 +1,4 @@
1
- import w from "./NeonDatePicker.es.js";
1
+ import Y from "./NeonDatePicker.es.js";
2
2
  import { resolveComponent as m, openBlock as l, createElementBlock as t, normalizeClass as k, createVNode as u, withCtx as $, createElementVNode as r, Fragment as b, toDisplayString as y, withKeys as d, withModifiers as o, renderList as v, createBlock as c, createCommentVNode as h, mergeProps as z } from "vue";
3
3
  import M from "../../../_virtual/_plugin-vue_export-helper.es.js";
4
4
  const f = ["aria-label", "tabindex"], K = {
@@ -12,7 +12,7 @@ const f = ["aria-label", "tabindex"], K = {
12
12
  class: "neon-date-picker__calendar-title-readonly"
13
13
  }, R = { class: "neon-date-picker__calendar-header-actions" }, T = { class: "neon-date-picker__calendar-dows" }, j = { class: "neon-button-group" };
14
14
  function q(e, a, A, G, H, I) {
15
- const g = m("neon-input"), s = m("neon-button"), D = m("neon-dropdown");
15
+ const C = m("neon-input"), s = m("neon-button"), D = m("neon-dropdown");
16
16
  return l(), t("div", {
17
17
  class: k([[
18
18
  `neon-date-picker--${e.size}`,
@@ -30,10 +30,11 @@ function q(e, a, A, G, H, I) {
30
30
  a[23] || (a[23] = (n) => e.calendarOpen = n),
31
31
  a[24] || (a[24] = (n) => e.resetToCalendar())
32
32
  ],
33
+ color: e.color,
33
34
  placement: e.placement
34
35
  }, {
35
36
  "dropdown-button": $(() => [
36
- u(g, {
37
+ u(C, {
37
38
  color: e.color,
38
39
  disabled: e.disabled,
39
40
  "icon-readonly": !0,
@@ -222,9 +223,9 @@ function q(e, a, A, G, H, I) {
222
223
  key: i,
223
224
  class: "neon-date-picker__calendar-dates"
224
225
  }, [
225
- (l(!0), t(b, null, v(n, (p, C) => (l(), t(b, null, [
226
+ (l(!0), t(b, null, v(n, (p, g) => (l(), t(b, null, [
226
227
  p ? (l(), c(s, {
227
- key: C,
228
+ key: g,
228
229
  circular: !0,
229
230
  class: k([{
230
231
  "neon-date-picker__calendar-date--selected": e.modelValue === e.isoDate(p, e.calendar.pageMonth, e.calendar.pageYear),
@@ -240,10 +241,10 @@ function q(e, a, A, G, H, I) {
240
241
  transparent: !0,
241
242
  "button-style": "text",
242
243
  size: "m",
243
- onClickCapture: o((Y) => e.emitDate(e.isoDate(p, e.calendar.pageMonth, e.calendar.pageYear)), ["stop", "prevent"]),
244
- onKeydownCapture: d(o((Y) => e.emitDate(e.isoDate(p, e.calendar.pageMonth, e.calendar.pageYear)), ["stop", "prevent"]), ["enter"])
244
+ onClickCapture: o((w) => e.emitDate(e.isoDate(p, e.calendar.pageMonth, e.calendar.pageYear)), ["stop", "prevent"]),
245
+ onKeydownCapture: d(o((w) => e.emitDate(e.isoDate(p, e.calendar.pageMonth, e.calendar.pageYear)), ["stop", "prevent"]), ["enter"])
245
246
  }, null, 8, ["class", "color", "disabled", "label", "tabindex", "onClickCapture", "onKeydownCapture"])) : (l(), t("div", {
246
- key: `${C}-empty`,
247
+ key: `${g}-empty`,
247
248
  class: "neon-date-picker__calendar-date neon-date-picker__calendar-date--empty"
248
249
  }))
249
250
  ], 64))), 256))
@@ -256,7 +257,7 @@ function q(e, a, A, G, H, I) {
256
257
  label: e.clearLabel,
257
258
  "button-style": "text",
258
259
  class: "neon-date-picker__calendar-clear-button",
259
- color: "high-contrast",
260
+ color: "low-contrast",
260
261
  size: "s",
261
262
  onClickCapture: a[19] || (a[19] = o((n) => e.clear(), ["stop", "prevent"])),
262
263
  onKeydownCapture: a[20] || (a[20] = d(o((n) => e.clear(), ["stop", "prevent"]), ["enter"]))
@@ -274,8 +275,9 @@ function q(e, a, A, G, H, I) {
274
275
  ], 512)
275
276
  ]),
276
277
  _: 1
277
- }, 8, ["modelValue", "placement"]),
278
- u(g, z({
278
+ }, 8, ["modelValue", "color", "placement"]),
279
+ u(C, z({
280
+ color: e.color,
279
281
  disabled: e.disabled,
280
282
  "hide-icon": !0,
281
283
  max: e.max,
@@ -285,10 +287,10 @@ function q(e, a, A, G, H, I) {
285
287
  tabindex: -1,
286
288
  class: "neon-date-picker__native-input",
287
289
  type: "date"
288
- }, e.attrs, { "onUpdate:modelValue": e.emitDate }), null, 16, ["disabled", "max", "min", "model-value", "size", "onUpdate:modelValue"])
290
+ }, e.attrs, { "onUpdate:modelValue": e.emitDate }), null, 16, ["color", "disabled", "max", "min", "model-value", "size", "onUpdate:modelValue"])
289
291
  ], 2);
290
292
  }
291
- const X = /* @__PURE__ */ M(w, [["render", q]]);
293
+ const X = /* @__PURE__ */ M(Y, [["render", q]]);
292
294
  export {
293
295
  X as default
294
296
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NeonDatePicker.vue.es.js","sources":["../../../../src/components/user-input/date-picker/NeonDatePicker.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n `neon-date-picker--${size}`,\n `neon-date-picker--${color}`,\n {\n 'neon-date-picker--disabled': disabled,\n 'neon-date-picker--open': calendarOpen,\n },\n ]\"\n class=\"neon-date-picker\"\n >\n <neon-dropdown ref=\"dropdown\" v-model=\"calendarOpen\" :placement=\"placement\" @update:modelValue=\"resetToCalendar()\">\n <template #dropdown-button>\n <neon-input\n :color=\"color\"\n :disabled=\"disabled\"\n :icon-readonly=\"true\"\n :model-value=\"formattedValue\"\n :placeholder=\"placeholder\"\n :size=\"size\"\n :tabindex=\"-1\"\n class=\"neon-date-picker__button\"\n icon=\"calendar\"\n type=\"text\"\n />\n <div\n :aria-label=\"openCalendarLabel\"\n :tabindex=\"disabled ? -1 : 0\"\n class=\"neon-date-picker__button-click-capture\"\n role=\"button\"\n @click.stop.prevent.capture=\"!disabled && openCalendar()\"\n @keydown.enter.stop.prevent.capture=\"openCalendar()\"\n @keydown.space.stop.prevent.capture=\"openCalendar()\"\n ></div>\n </template>\n <template #default>\n <div ref=\"calendarRef\" class=\"neon-date-picker__calendar\">\n <template v-if=\"yearSelectionOpen\">\n <div class=\"neon-date-picker__calendar-header\">\n <span class=\"neon-date-picker__calendar-title-readonly\">\n {{ `${calendar.pageDecadeStart}–${calendar.pageDecadeStart + 9}` }}\n </span>\n <div class=\"neon-date-picker__calendar-header-actions\">\n <neon-button\n :aria-label=\"previousDecadeLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isPreviousDecadeDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__previous-button\"\n icon=\"chevron-left\"\n size=\"m\"\n @click.stop.prevent.capture=\"onPreviousDecade()\"\n @keydown.enter.stop.prevent.capture=\"onPreviousDecade()\"\n />\n <neon-button\n :aria-label=\"nextDecadeLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isNextDecadeDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__next-button\"\n icon=\"chevron-right\"\n size=\"m\"\n @click.stop.prevent.capture=\"onNextDecade()\"\n @keydown.enter.stop.prevent.capture=\"onNextDecade()\"\n />\n </div>\n </div>\n <hr />\n <div class=\"neon-date-picker__calendar-options\">\n <neon-button\n v-for=\"index in 10\"\n :key=\"index\"\n :class=\"{\n 'neon-date-picker__calendar-option--selected':\n calendar.pageYear === calendar.pageDecadeStart + index - 1,\n 'neon-date-picker__calendar-option--today':\n calendar.today.year === calendar.pageDecadeStart + index - 1,\n 'neon-date-picker__calendar-option--disabled': isYearDisabled(calendar.pageDecadeStart + index - 1),\n }\"\n :color=\"color\"\n :disabled=\"isYearDisabled(calendar.pageDecadeStart + index - 1)\"\n :full-width=\"true\"\n :label=\"`${calendar.pageDecadeStart + index - 1}`\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-option\"\n size=\"s\"\n @click.stop.prevent.capture=\"selectYear(calendar.pageDecadeStart + index - 1)\"\n @keydown.enter.stop.prevent.capture=\"selectYear(calendar.pageDecadeStart + index - 1)\"\n />\n </div>\n </template>\n <template v-else-if=\"monthSelectionOpen\">\n <div class=\"neon-date-picker__calendar-header\">\n <span v-if=\"isChangeYearDisabled\" class=\"neon-date-picker__calendar-title-readonly\">\n {{ calendar.pageYear }}\n </span>\n <neon-button\n v-else\n :aria-label=\"changeYearLabel\"\n :label=\"`${calendar.pageYear}`\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-header-title\"\n color=\"high-contrast\"\n icon=\"switch\"\n icon-position=\"right\"\n size=\"m\"\n @click.stop.prevent.capture=\"changeYear()\"\n @keydown.enter.stop.prevent.capture=\"changeYear()\"\n />\n <div class=\"neon-date-picker__calendar-header-actions\">\n <neon-button\n :aria-label=\"previousYearLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isPreviousYearDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__previous-button\"\n icon=\"chevron-left\"\n size=\"m\"\n @click.stop.prevent.capture=\"onPreviousYear()\"\n @keydown.enter.stop.prevent.capture=\"onPreviousYear()\"\n />\n <neon-button\n :aria-label=\"nextYearLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isNextYearDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__next-button\"\n icon=\"chevron-right\"\n size=\"m\"\n @click.stop.prevent.capture=\"onNextYear()\"\n @keydown.enter.stop.prevent.capture=\"onNextYear()\"\n />\n </div>\n </div>\n <hr />\n <div class=\"neon-date-picker__calendar-options\">\n <neon-button\n v-for=\"(month, index) in calendar.months\"\n :key=\"index\"\n :class=\"{\n 'neon-date-picker__calendar-option--selected': index + 1 === calendar.pageMonth,\n 'neon-date-picker__calendar-option--today':\n index + 1 === calendar.today.month && calendar.today.year === calendar.pageYear,\n 'neon-date-picker__calendar-option--disabled': isMonthDisabled(calendar.pageYear, index + 1),\n }\"\n :color=\"color\"\n :disabled=\"isMonthDisabled(calendar.pageYear, index + 1)\"\n :full-width=\"true\"\n :label=\"month\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-option\"\n size=\"s\"\n @click.stop.prevent.capture=\"selectMonth(index + 1)\"\n @keydown.enter.stop.prevent.capture=\"selectMonth(index + 1)\"\n />\n </div>\n </template>\n <template v-else>\n <div class=\"neon-date-picker__calendar-header\">\n <span v-if=\"isChangeDateDisabled\" class=\"neon-date-picker__calendar-title-readonly\">\n {{ `${calendar.pageMonthName} ${calendar.pageYear}` }}\n </span>\n <neon-button\n v-else\n :aria-label=\"changeMonthLabel\"\n :label=\"`${calendar.pageMonthName} ${calendar.pageYear}`\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-header-title\"\n color=\"high-contrast\"\n icon=\"switch\"\n icon-position=\"right\"\n size=\"m\"\n @click.stop.prevent.capture=\"changeMonth()\"\n @keydown.enter.stop.prevent.capture=\"changeMonth()\"\n />\n <div class=\"neon-date-picker__calendar-header-actions\">\n <neon-button\n :aria-label=\"previousMonthLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isPreviousDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__previous-button\"\n icon=\"chevron-left\"\n size=\"m\"\n @click.stop.prevent.capture=\"onPrevious()\"\n @keydown.enter.stop.prevent.capture=\"onPrevious()\"\n />\n <neon-button\n :aria-label=\"nextMonthLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isNextDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__next-button\"\n icon=\"chevron-right\"\n size=\"m\"\n @click.stop.prevent.capture=\"onNext()\"\n @keydown.enter.stop.prevent.capture=\"onNext()\"\n />\n </div>\n </div>\n <div class=\"neon-date-picker__calendar-dows\">\n <div v-for=\"dow in calendar.dowNames\" :key=\"dow\" class=\"neon-date-picker__calendar-dow\">{{ dow }}</div>\n </div>\n <hr />\n <div v-for=\"(dateRow, index) in calendar.dates\" :key=\"index\" class=\"neon-date-picker__calendar-dates\">\n <template v-for=\"(dateCol, index) in dateRow\">\n <neon-button\n v-if=\"dateCol\"\n :key=\"index\"\n :circular=\"true\"\n :class=\"{\n 'neon-date-picker__calendar-date--selected':\n modelValue === isoDate(dateCol, calendar.pageMonth, calendar.pageYear),\n 'neon-date-picker__calendar-date--today':\n today === isoDate(dateCol, calendar.pageMonth, calendar.pageYear),\n 'neon-date-picker__calendar-date--disabled': isDisabled(\n isoDate(dateCol, calendar.pageMonth, calendar.pageYear),\n ),\n }\"\n :color=\"color\"\n :disabled=\"isDisabled(isoDate(dateCol, calendar.pageMonth, calendar.pageYear))\"\n :label=\"`${dateCol}`\"\n :tabindex=\"isDisabled(isoDate(dateCol, calendar.pageMonth, calendar.pageYear)) ? -1 : 0\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-date\"\n size=\"m\"\n @click.stop.prevent.capture=\"emitDate(isoDate(dateCol, calendar.pageMonth, calendar.pageYear))\"\n @keydown.enter.stop.prevent.capture=\"\n emitDate(isoDate(dateCol, calendar.pageMonth, calendar.pageYear))\n \"\n />\n <div\n v-else\n :key=\"`${index}-empty`\"\n class=\"neon-date-picker__calendar-date neon-date-picker__calendar-date--empty\"\n />\n </template>\n </div>\n </template>\n <hr />\n <div class=\"neon-button-group\">\n <neon-button\n v-if=\"optional\"\n :label=\"clearLabel\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-clear-button\"\n color=\"high-contrast\"\n size=\"s\"\n @click.stop.prevent.capture=\"clear()\"\n @keydown.enter.stop.prevent.capture=\"clear()\"\n />\n <neon-button\n :color=\"color\"\n :label=\"doneLabel\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-done-button\"\n size=\"s\"\n @click.stop.prevent.capture=\"done()\"\n @keydown.enter.stop.prevent.capture=\"done()\"\n />\n </div>\n </div>\n </template>\n </neon-dropdown>\n <neon-input\n :disabled=\"disabled\"\n :hide-icon=\"true\"\n :max=\"max\"\n :min=\"min\"\n :model-value=\"modelValue\"\n :size=\"size\"\n :tabindex=\"-1\"\n class=\"neon-date-picker__native-input\"\n type=\"date\"\n v-bind=\"attrs\"\n @update:modelValue=\"emitDate\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonDatePicker.ts\"></script>\n"],"names":["_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_13","_hoisted_14","_hoisted_15","_createElementBlock","_normalizeClass","_ctx","_createVNode","_component_neon_dropdown","$event","_component_neon_input","_createElementVNode","_cache","_withModifiers","_hoisted_2","_Fragment","_toDisplayString","_component_neon_button","_renderList","index","_withKeys","_openBlock","_hoisted_8","_createBlock","month","_hoisted_12","dow","dateRow","dateCol","_mergeProps"],"mappings":";;;;EAqCa,KAAI;AAAA,EAAc,OAAM;GAEpBA,IAAA,EAAA,OAAM,oCAAmC,GACtCC,IAAA,EAAA,OAAM,4CAA2C,GAGlDC,IAAA,EAAA,OAAM,4CAA2C,GA4BnDC,IAAA,EAAA,OAAM,qCAAoC,GAwB1CC,IAAA,EAAA,OAAM,oCAAmC;;EACV,OAAM;GAgBnCC,IAAA,EAAA,OAAM,4CAA2C,GA4BnDC,IAAA,EAAA,OAAM,qCAAoC,GAuB1CC,IAAA,EAAA,OAAM,oCAAmC;;EACV,OAAM;GAgBnCC,IAAA,EAAA,OAAM,4CAA2C,GA2BnDC,IAAA,EAAA,OAAM,kCAAiC,GAyCzCC,IAAA,EAAA,OAAM,oBAAmB;;;cAvPt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,EAAA;AAAA,MACN,UAAU;AAAA,MACX,OAAM;AAAA,MACN,MAAK;AAAA,OACGA,EAAA,OAAK,EACZ,uBAAmBA,EAAA,SAAQ,CAAA,GAAA,MAAA,IAAA,CAAA,YAAA,OAAA,OAAA,eAAA,QAAA,qBAAA,CAAA;AAAA;;;"}
1
+ {"version":3,"file":"NeonDatePicker.vue.es.js","sources":["../../../../src/components/user-input/date-picker/NeonDatePicker.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n `neon-date-picker--${size}`,\n `neon-date-picker--${color}`,\n {\n 'neon-date-picker--disabled': disabled,\n 'neon-date-picker--open': calendarOpen,\n },\n ]\"\n class=\"neon-date-picker\"\n >\n <neon-dropdown\n ref=\"dropdown\"\n v-model=\"calendarOpen\"\n :color=\"color\"\n :placement=\"placement\"\n @update:modelValue=\"resetToCalendar()\"\n >\n <template #dropdown-button>\n <neon-input\n :color=\"color\"\n :disabled=\"disabled\"\n :icon-readonly=\"true\"\n :model-value=\"formattedValue\"\n :placeholder=\"placeholder\"\n :size=\"size\"\n :tabindex=\"-1\"\n class=\"neon-date-picker__button\"\n icon=\"calendar\"\n type=\"text\"\n />\n <div\n :aria-label=\"openCalendarLabel\"\n :tabindex=\"disabled ? -1 : 0\"\n class=\"neon-date-picker__button-click-capture\"\n role=\"button\"\n @click.stop.prevent.capture=\"!disabled && openCalendar()\"\n @keydown.enter.stop.prevent.capture=\"openCalendar()\"\n @keydown.space.stop.prevent.capture=\"openCalendar()\"\n ></div>\n </template>\n <template #default>\n <div ref=\"calendarRef\" class=\"neon-date-picker__calendar\">\n <template v-if=\"yearSelectionOpen\">\n <div class=\"neon-date-picker__calendar-header\">\n <span class=\"neon-date-picker__calendar-title-readonly\">\n {{ `${calendar.pageDecadeStart}–${calendar.pageDecadeStart + 9}` }}\n </span>\n <div class=\"neon-date-picker__calendar-header-actions\">\n <neon-button\n :aria-label=\"previousDecadeLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isPreviousDecadeDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__previous-button\"\n icon=\"chevron-left\"\n size=\"m\"\n @click.stop.prevent.capture=\"onPreviousDecade()\"\n @keydown.enter.stop.prevent.capture=\"onPreviousDecade()\"\n />\n <neon-button\n :aria-label=\"nextDecadeLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isNextDecadeDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__next-button\"\n icon=\"chevron-right\"\n size=\"m\"\n @click.stop.prevent.capture=\"onNextDecade()\"\n @keydown.enter.stop.prevent.capture=\"onNextDecade()\"\n />\n </div>\n </div>\n <hr />\n <div class=\"neon-date-picker__calendar-options\">\n <neon-button\n v-for=\"index in 10\"\n :key=\"index\"\n :class=\"{\n 'neon-date-picker__calendar-option--selected':\n calendar.pageYear === calendar.pageDecadeStart + index - 1,\n 'neon-date-picker__calendar-option--today':\n calendar.today.year === calendar.pageDecadeStart + index - 1,\n 'neon-date-picker__calendar-option--disabled': isYearDisabled(calendar.pageDecadeStart + index - 1),\n }\"\n :color=\"color\"\n :disabled=\"isYearDisabled(calendar.pageDecadeStart + index - 1)\"\n :full-width=\"true\"\n :label=\"`${calendar.pageDecadeStart + index - 1}`\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-option\"\n size=\"s\"\n @click.stop.prevent.capture=\"selectYear(calendar.pageDecadeStart + index - 1)\"\n @keydown.enter.stop.prevent.capture=\"selectYear(calendar.pageDecadeStart + index - 1)\"\n />\n </div>\n </template>\n <template v-else-if=\"monthSelectionOpen\">\n <div class=\"neon-date-picker__calendar-header\">\n <span v-if=\"isChangeYearDisabled\" class=\"neon-date-picker__calendar-title-readonly\">\n {{ calendar.pageYear }}\n </span>\n <neon-button\n v-else\n :aria-label=\"changeYearLabel\"\n :label=\"`${calendar.pageYear}`\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-header-title\"\n color=\"high-contrast\"\n icon=\"switch\"\n icon-position=\"right\"\n size=\"m\"\n @click.stop.prevent.capture=\"changeYear()\"\n @keydown.enter.stop.prevent.capture=\"changeYear()\"\n />\n <div class=\"neon-date-picker__calendar-header-actions\">\n <neon-button\n :aria-label=\"previousYearLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isPreviousYearDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__previous-button\"\n icon=\"chevron-left\"\n size=\"m\"\n @click.stop.prevent.capture=\"onPreviousYear()\"\n @keydown.enter.stop.prevent.capture=\"onPreviousYear()\"\n />\n <neon-button\n :aria-label=\"nextYearLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isNextYearDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__next-button\"\n icon=\"chevron-right\"\n size=\"m\"\n @click.stop.prevent.capture=\"onNextYear()\"\n @keydown.enter.stop.prevent.capture=\"onNextYear()\"\n />\n </div>\n </div>\n <hr />\n <div class=\"neon-date-picker__calendar-options\">\n <neon-button\n v-for=\"(month, index) in calendar.months\"\n :key=\"index\"\n :class=\"{\n 'neon-date-picker__calendar-option--selected': index + 1 === calendar.pageMonth,\n 'neon-date-picker__calendar-option--today':\n index + 1 === calendar.today.month && calendar.today.year === calendar.pageYear,\n 'neon-date-picker__calendar-option--disabled': isMonthDisabled(calendar.pageYear, index + 1),\n }\"\n :color=\"color\"\n :disabled=\"isMonthDisabled(calendar.pageYear, index + 1)\"\n :full-width=\"true\"\n :label=\"month\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-option\"\n size=\"s\"\n @click.stop.prevent.capture=\"selectMonth(index + 1)\"\n @keydown.enter.stop.prevent.capture=\"selectMonth(index + 1)\"\n />\n </div>\n </template>\n <template v-else>\n <div class=\"neon-date-picker__calendar-header\">\n <span v-if=\"isChangeDateDisabled\" class=\"neon-date-picker__calendar-title-readonly\">\n {{ `${calendar.pageMonthName} ${calendar.pageYear}` }}\n </span>\n <neon-button\n v-else\n :aria-label=\"changeMonthLabel\"\n :label=\"`${calendar.pageMonthName} ${calendar.pageYear}`\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-header-title\"\n color=\"high-contrast\"\n icon=\"switch\"\n icon-position=\"right\"\n size=\"m\"\n @click.stop.prevent.capture=\"changeMonth()\"\n @keydown.enter.stop.prevent.capture=\"changeMonth()\"\n />\n <div class=\"neon-date-picker__calendar-header-actions\">\n <neon-button\n :aria-label=\"previousMonthLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isPreviousDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__previous-button\"\n icon=\"chevron-left\"\n size=\"m\"\n @click.stop.prevent.capture=\"onPrevious()\"\n @keydown.enter.stop.prevent.capture=\"onPrevious()\"\n />\n <neon-button\n :aria-label=\"nextMonthLabel\"\n :circular=\"true\"\n :color=\"color\"\n :disabled=\"isNextDisabled\"\n button-style=\"text\"\n class=\"neon-date-picker__next-button\"\n icon=\"chevron-right\"\n size=\"m\"\n @click.stop.prevent.capture=\"onNext()\"\n @keydown.enter.stop.prevent.capture=\"onNext()\"\n />\n </div>\n </div>\n <div class=\"neon-date-picker__calendar-dows\">\n <div v-for=\"dow in calendar.dowNames\" :key=\"dow\" class=\"neon-date-picker__calendar-dow\">{{ dow }}</div>\n </div>\n <hr />\n <div v-for=\"(dateRow, index) in calendar.dates\" :key=\"index\" class=\"neon-date-picker__calendar-dates\">\n <template v-for=\"(dateCol, index) in dateRow\">\n <neon-button\n v-if=\"dateCol\"\n :key=\"index\"\n :circular=\"true\"\n :class=\"{\n 'neon-date-picker__calendar-date--selected':\n modelValue === isoDate(dateCol, calendar.pageMonth, calendar.pageYear),\n 'neon-date-picker__calendar-date--today':\n today === isoDate(dateCol, calendar.pageMonth, calendar.pageYear),\n 'neon-date-picker__calendar-date--disabled': isDisabled(\n isoDate(dateCol, calendar.pageMonth, calendar.pageYear),\n ),\n }\"\n :color=\"color\"\n :disabled=\"isDisabled(isoDate(dateCol, calendar.pageMonth, calendar.pageYear))\"\n :label=\"`${dateCol}`\"\n :tabindex=\"isDisabled(isoDate(dateCol, calendar.pageMonth, calendar.pageYear)) ? -1 : 0\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-date\"\n size=\"m\"\n @click.stop.prevent.capture=\"emitDate(isoDate(dateCol, calendar.pageMonth, calendar.pageYear))\"\n @keydown.enter.stop.prevent.capture=\"\n emitDate(isoDate(dateCol, calendar.pageMonth, calendar.pageYear))\n \"\n />\n <div\n v-else\n :key=\"`${index}-empty`\"\n class=\"neon-date-picker__calendar-date neon-date-picker__calendar-date--empty\"\n />\n </template>\n </div>\n </template>\n <hr />\n <div class=\"neon-button-group\">\n <neon-button\n v-if=\"optional\"\n :label=\"clearLabel\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-clear-button\"\n color=\"low-contrast\"\n size=\"s\"\n @click.stop.prevent.capture=\"clear()\"\n @keydown.enter.stop.prevent.capture=\"clear()\"\n />\n <neon-button\n :color=\"color\"\n :label=\"doneLabel\"\n button-style=\"text\"\n class=\"neon-date-picker__calendar-done-button\"\n size=\"s\"\n @click.stop.prevent.capture=\"done()\"\n @keydown.enter.stop.prevent.capture=\"done()\"\n />\n </div>\n </div>\n </template>\n </neon-dropdown>\n <neon-input\n :color=\"color\"\n :disabled=\"disabled\"\n :hide-icon=\"true\"\n :max=\"max\"\n :min=\"min\"\n :model-value=\"modelValue\"\n :size=\"size\"\n :tabindex=\"-1\"\n class=\"neon-date-picker__native-input\"\n type=\"date\"\n v-bind=\"attrs\"\n @update:modelValue=\"emitDate\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonDatePicker.ts\"></script>\n"],"names":["_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_13","_hoisted_14","_hoisted_15","_createElementBlock","_normalizeClass","_ctx","_createVNode","_component_neon_dropdown","$event","_component_neon_input","_createElementVNode","_cache","_withModifiers","_hoisted_2","_Fragment","_toDisplayString","_component_neon_button","_renderList","index","_withKeys","_openBlock","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CAAA,QAAA,SAAA,CAAA;AAAA,6DACGA,EAAA,MAAK,GAAA,CAAA,QAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;YAE5CC,EAQEU,GAAA;AAAA,cAPC,OAAOX,EAAA;AAAA,cACP,OAAOA,EAAA;AAAA,cACR,gBAAa;AAAA,cACb,OAAM;AAAA,cACN,MAAK;AAAA,yDACwBA,EAAA,KAAI,GAAA,CAAA,QAAA,SAAA,CAAA;AAAA,6DACIA,EAAA,KAAI,GAAA,CAAA,QAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;;;;;;IAMnDC,EAaEG,GAbFmB,EAaE;AAAA,MAZC,OAAOvB,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACV,aAAW;AAAA,MACX,KAAKA,EAAA;AAAA,MACL,KAAKA,EAAA;AAAA,MACL,eAAaA,EAAA;AAAA,MACb,MAAMA,EAAA;AAAA,MACN,UAAU;AAAA,MACX,OAAM;AAAA,MACN,MAAK;AAAA,OACGA,EAAA,OAAK,EACZ,uBAAmBA,EAAA,SAAQ,CAAA,GAAA,MAAA,IAAA,CAAA,SAAA,YAAA,OAAA,OAAA,eAAA,QAAA,qBAAA,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.LowContrast},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 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;
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.LowContrast },\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,OAA0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AAA,EACJJ,EAAM,MAAQJ,EAAM,SAAW,CAAC,GAAGI,EAAM,MAAO,GAAGW,CAAQ,EAAIA,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 * 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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AM,MAAQJ,EAAM,SAAW,CAAC,GAAGI,EAAM,MAAO,GAAGW,CAAQ,EAAIA,EAC/DN,EAAA,CACF,CACF,CAUE,CAEJ,CACF,CAAC"}
@@ -5,7 +5,7 @@ import { NeonState as S } from "../../../common/enums/NeonState.es.js";
5
5
  import v from "../button/NeonButton.vue.es.js";
6
6
  import F from "../input/NeonInput.vue.es.js";
7
7
  import N from "../list/NeonList.vue.es.js";
8
- const U = s({
8
+ const V = s({
9
9
  name: "NeonFile",
10
10
  components: {
11
11
  NeonButton: v,
@@ -46,7 +46,7 @@ const U = s({
46
46
  /**
47
47
  * The file component color
48
48
  */
49
- color: { type: String, default: g.LowContrast },
49
+ color: { type: String, default: g.Primary },
50
50
  /**
51
51
  * The label of the file component button
52
52
  */
@@ -64,14 +64,14 @@ const U = s({
64
64
  "update:modelValue"
65
65
  ],
66
66
  setup(t, { emit: r }) {
67
- const i = n(null), l = n([]), f = n(""), m = c(() => l.value.map((e) => ({ key: e.name, label: e.name }))), a = () => {
67
+ const i = n(null), l = n([]), m = n(""), f = c(() => l.value.map((e) => ({ key: e.name, label: e.name }))), a = () => {
68
68
  r("update:modelValue", t.multiple ? l.value : l.value[0]), t.directUpload && (l.value = []);
69
69
  };
70
70
  return {
71
71
  fileInput: i,
72
72
  files: l,
73
- fileList: m,
74
- fileInputModel: f,
73
+ fileList: f,
74
+ fileInputModel: m,
75
75
  remove: (e) => {
76
76
  t.disabled || (l.value = l.value.filter((o) => o.name !== e), a());
77
77
  },
@@ -92,6 +92,6 @@ const U = s({
92
92
  }
93
93
  });
94
94
  export {
95
- U as default
95
+ V as default
96
96
  };
97
97
  //# sourceMappingURL=NeonFile.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonFile.es.js","sources":["../../../../src/components/user-input/file/NeonFile.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonState } from '@/common/enums/NeonState';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport NeonList from '@/components/user-input/list/NeonList.vue';\n\n/**\n * A file upload component. This is a wrapper around an HTML file input. It can display multiple files as well as\n * providing a convenient UI for removing/clearing files from the list.\n */\nexport default defineComponent({\n name: 'NeonFile',\n components: {\n NeonButton,\n NeonInput,\n NeonList,\n },\n props: {\n /**\n * The disabled state of the component\n */\n disabled: { type: Boolean, default: false },\n /**\n * Files are uploaded directly once added, there is no waiting to click a confirmation button\n */\n directUpload: { type: Boolean, default: false },\n /**\n * Support multiple files.\n */\n multiple: { type: Boolean, default: false },\n /**\n * HTML file input accept property for filtering the files the user is allowed to select. This is a mime type,\n * e.g. 'application/pdf'.\n */\n accept: { type: String, default: null },\n /**\n * Provide an id to attach to the internal HTML input[file] (also adds an aria-controls link between the button and\n * the hidden input).\n */\n id: { type: String, default: null },\n /**\n * The file component size\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The state of the input, used to indicate loading, success and error states\n */\n state: { type: String as () => NeonState, default: NeonState.Ready },\n /**\n * The file component color\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.LowContrast },\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,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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AKA,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 * 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,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;AA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,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,2 +1,2 @@
1
- "use strict";const n=require("vue"),a=require("../../../common/enums/NeonInputType.cjs.js"),o=require("../../../common/enums/NeonState.cjs.js"),x=require("../../../common/enums/NeonSize.cjs.js"),c=require("../../../common/enums/NeonFunctionalColor.cjs.js"),B=require("../../presentation/icon/NeonIcon.vue.cjs.js"),q=require("../../../common/utils/NeonDebounceUtils.cjs.js"),F=require("../../../common/enums/NeonInputMode.cjs.js"),T=n.defineComponent({name:"NeonInput",components:{NeonIcon:B},props:{id:{type:String,default:null},modelValue:{type:String,default:null},type:{type:String,default:a.NeonInputType.Text},placeholder:{type:String,default:null},size:{type:String,default:x.NeonSize.Medium},color:{type:String,default:c.NeonFunctionalColor.LowContrast},inputmode:{type:String,default:F.NeonInputMode.Text},state:{type:String,default:o.NeonState.Ready},rows:{type:Number,default:null},icon:{type:String,default:null},iconReadonly:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},tabindex:{type:Number,default:0},disabled:{type:Boolean,default:!1},stateHighlight:{type:Boolean,default:!0},stateIcon:{type:Boolean,default:!0},maxlength:{type:Number,default:null},debounce:{type:Number,default:void 0}},emits:["focus","blur","icon-click","update:modelValue"],setup(e,{emit:l}){const m=n.useAttrs(),i=n.ref(null),r=n.ref(!1),N=n.computed(()=>{const{onBlur:t,onFocus:u,onIconClick:d,...w}=m;return w}),s=q.NeonDebounceUtils.debounce(t=>{l("update:modelValue",t)},e.debounce),f=n.computed(()=>{switch(e.state){case o.NeonState.Loading:return"loading";case o.NeonState.Success:return e.stateIcon?"check":void 0;case o.NeonState.Error:return e.stateIcon?"times":void 0;default:return e.icon?e.icon:e.modelValue&&e.modelValue.length>0?"times":void 0}}),g=n.computed(()=>f.value&&!e.hideIcon&&(e.state!=="ready"||e.icon||e.modelValue&&!e.disabled&&e.modelValue.length>0)),y=n.computed(()=>{switch(e.state){case o.NeonState.Success:return c.NeonFunctionalColor.Success;case o.NeonState.Error:return c.NeonFunctionalColor.Error;case o.NeonState.Loading:return e.color;default:return c.NeonFunctionalColor.LowContrast}}),h=()=>{var t;(t=i.value)==null||t.focus()},S=()=>{var t;(t=i.value)==null||t.click()},b=()=>{r.value=!0,l("focus")},I=()=>{r.value=!1,l("blur")},v=t=>{e.disabled||(e.icon?l("icon-click"):s(""),t.preventDefault(),t.stopPropagation())},V=t=>{const u=t.target.value,d=e.maxlength&&u.length>e.maxlength?u.substring(0,e.maxlength):u;e.modelValue!==d&&s(d)},C=t=>{t.key!=="Backspace"&&e.maxlength&&e.modelValue&&e.modelValue.length>=e.maxlength&&t.preventDefault()},k=n.computed(()=>{if(e.placeholder)return e.placeholder;switch(e.type){case a.NeonInputType.Email:return"gbelson@hooli.com";case a.NeonInputType.Tel:return"+41785551234";case a.NeonInputType.Url:return"http://www.getskeleton.com";default:return""}});return{neonInput:i,focused:r,sanitizedAttributes:N,iconVisible:g,iconName:f,iconColor:y,computedPlaceholder:k,focus:h,click:S,onFocus:b,onBlur:I,iconClicked:v,changeValue:V,onKeyDown:C}}});module.exports=T;
1
+ "use strict";const n=require("vue"),c=require("../../../common/enums/NeonInputType.cjs.js"),o=require("../../../common/enums/NeonState.cjs.js"),w=require("../../../common/enums/NeonSize.cjs.js"),i=require("../../../common/enums/NeonFunctionalColor.cjs.js"),B=require("../../presentation/icon/NeonIcon.vue.cjs.js"),q=require("../../../common/utils/NeonDebounceUtils.cjs.js"),F=require("../../../common/enums/NeonInputMode.cjs.js"),T=n.defineComponent({name:"NeonInput",components:{NeonIcon:B},props:{id:{type:String,default:null},modelValue:{type:String,default:null},type:{type:String,default:c.NeonInputType.Text},placeholder:{type:String,default:null},size:{type:String,default:w.NeonSize.Medium},color:{type:String,default:i.NeonFunctionalColor.Primary},inputmode:{type:String,default:F.NeonInputMode.Text},autocomplete:{type:String,default:"on"},state:{type:String,default:o.NeonState.Ready},rows:{type:Number,default:null},icon:{type:String,default:null},iconReadonly:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},tabindex:{type:Number,default:0},disabled:{type:Boolean,default:!1},stateHighlight:{type:Boolean,default:!0},stateIcon:{type:Boolean,default:!0},maxlength:{type:Number,default:null},debounce:{type:Number,default:void 0}},emits:["focus","blur","icon-click","update:modelValue"],setup(e,{emit:l}){const m=n.useAttrs(),u=n.ref(null),r=n.ref(!1),y=n.computed(()=>{const{onBlur:t,onFocus:a,onIconClick:d,...C}=m;return C}),s=q.NeonDebounceUtils.debounce(t=>{l("update:modelValue",t)},e.debounce),f=n.computed(()=>{switch(e.state){case o.NeonState.Loading:return"loading";case o.NeonState.Success:return e.stateIcon?"check":void 0;case o.NeonState.Error:return e.stateIcon?"times":void 0;default:return e.icon?e.icon:e.modelValue&&e.modelValue.length>0?"times":void 0}}),g=n.computed(()=>f.value&&!e.hideIcon&&(e.state!=="ready"||e.icon||e.modelValue&&!e.disabled&&e.modelValue.length>0)),N=n.computed(()=>{switch(e.state){case o.NeonState.Success:return i.NeonFunctionalColor.Success;case o.NeonState.Error:return i.NeonFunctionalColor.Error;case o.NeonState.Loading:return e.color;default:return i.NeonFunctionalColor.LowContrast}}),h=()=>{var t;(t=u.value)==null||t.focus()},S=()=>{var t;(t=u.value)==null||t.click()},b=()=>{r.value=!0,l("focus")},I=()=>{r.value=!1,l("blur")},v=t=>{e.disabled||(e.icon?l("icon-click"):s(""),t.preventDefault(),t.stopPropagation())},V=t=>{const a=t.target.value,d=e.maxlength&&a.length>e.maxlength?a.substring(0,e.maxlength):a;e.modelValue!==d&&s(d)},x=t=>{t.key!=="Backspace"&&e.maxlength&&e.modelValue&&e.modelValue.length>=e.maxlength&&t.preventDefault()},k=n.computed(()=>{if(e.placeholder)return e.placeholder;switch(e.type){case c.NeonInputType.Email:return"gbelson@hooli.com";case c.NeonInputType.Tel:return"+41785551234";case c.NeonInputType.Url:return"http://www.getskeleton.com";default:return""}});return n.defineExpose({neonInput:u}),{neonInput:u,focused:r,sanitizedAttributes:y,iconVisible:g,iconName:f,iconColor:N,computedPlaceholder:k,focus:h,click:S,onFocus:b,onBlur:I,iconClicked:v,changeValue:V,onKeyDown:x}}});module.exports=T;
2
2
  //# sourceMappingURL=NeonInput.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonInput.cjs.js","sources":["../../../../src/components/user-input/input/NeonInput.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonInputType } from '@/common/enums/NeonInputType';\nimport { NeonState } from '@/common/enums/NeonState';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\nimport { NeonDebounceUtils } from '@/common/utils/NeonDebounceUtils';\nimport { NeonInputMode } from '@/common/enums/NeonInputMode';\n\n/**\n * Equivalent of, and wrapper around, an HTML input. Also supports <strong>textarea</strong>.\n */\nexport default defineComponent({\n name: 'NeonInput',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The id the input\n */\n id: { type: String, default: null },\n /**\n * The value of the input\n */\n modelValue: { type: String, default: null },\n /**\n * The type of input this is. NOTE: Neon provides custom components as alternatives in the following cases:\n * * file (use <a href=\"/user-input/file\">NeonFile</a>)\n * * password (use <a href=\"/user-input/password\">NeonPassword</a>)\n */\n type: { type: String as () => NeonInputType, default: NeonInputType.Text },\n /**\n * Placeholder text to display in the input\n */\n placeholder: { type: String, default: null },\n /**\n * Size of the input\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * Color of the input\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.LowContrast },\n /**\n * The HTML input mode as specified <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode\">here</a>.\n */\n inputmode: { type: String as () => NeonInputMode, default: NeonInputMode.Text },\n /**\n * The state of the input\n */\n state: { type: String as () => NeonState, default: NeonState.Ready },\n /**\n * The number of rows to display in the case of a textarea\n */\n rows: { type: Number, default: null },\n /**\n * The name of a clickable icon to display inside the input. This is used for clearing contents or e.g. in the case of\n * NeonPassword toggle showing/hiding the password. Defaults to <em>times</em> (for clearing the input's contents).\n */\n icon: { type: String, default: null },\n /**\n * Make the input field icon read-only, i.e. it will not emit events or be treated as a focusable button.\n */\n iconReadonly: { type: Boolean, default: false },\n /**\n * Hide the icon button, e.g. the X button to clear the input's contents.\n */\n hideIcon: { type: Boolean, default: false },\n /**\n * Tabindex to assign to the input.\n */\n tabindex: { type: Number, default: 0 },\n /**\n * The disabled state of the input\n */\n disabled: { type: Boolean, default: false },\n /**\n * When the state is success or error, display the field with the state color indicator, e.g. border or background\n * color.\n */\n stateHighlight: { type: Boolean, default: true },\n /**\n * When the state is success or error, display the state icon.\n */\n stateIcon: { type: Boolean, default: true },\n /**\n * The character limit for a textarea.\n */\n maxlength: { type: Number, default: null },\n /**\n * Debounce time in ms, if no value is provided the default value set in NeonDebounceUtils is used (=300ms).\n * Set to 0 to disable debounce.\n */\n debounce: { type: Number, default: undefined },\n },\n emits: [\n /**\n * Emitted when the input has gained focus\n * @type {void}\n */\n 'focus',\n /**\n * Emitted when the input has lost focus\n * @type {void}\n */\n 'blur',\n /**\n * Emitted when the icon is clicked\n * @type {void}\n */\n 'icon-click',\n /**\n * Emitted when the input value is changed, NOTE: is not triggered if input is over the textarea length limit\n * @type {string} the contents of the input\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const neonInput = ref<HTMLElement | null>(null);\n const focused = ref(false);\n\n const sanitizedAttributes = computed(() => {\n const {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onBlur,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onFocus,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onIconClick,\n ...sanitized\n } = attrs;\n\n return sanitized;\n });\n\n const emitModelValue = NeonDebounceUtils.debounce((value: string) => {\n emit('update:modelValue', value);\n }, props.debounce);\n\n const iconName = computed(() => {\n switch (props.state) {\n case NeonState.Loading:\n return 'loading';\n case NeonState.Success:\n return props.stateIcon ? 'check' : undefined;\n case NeonState.Error:\n return props.stateIcon ? 'times' : undefined;\n default:\n if (props.icon) {\n return props.icon;\n } else if (props.modelValue && props.modelValue.length > 0) {\n return 'times';\n }\n\n return undefined;\n }\n });\n\n const iconVisible = computed(() => {\n return (\n iconName.value &&\n !props.hideIcon &&\n (props.state !== 'ready' || props.icon || (props.modelValue && !props.disabled && props.modelValue.length > 0))\n );\n });\n\n const iconColor = computed(() => {\n switch (props.state) {\n case NeonState.Success:\n return NeonFunctionalColor.Success;\n case NeonState.Error:\n return NeonFunctionalColor.Error;\n case NeonState.Loading:\n return props.color;\n default:\n return NeonFunctionalColor.LowContrast;\n }\n });\n\n const focus = () => {\n neonInput.value?.focus();\n };\n\n const click = () => {\n neonInput.value?.click();\n };\n\n const onFocus = () => {\n focused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n focused.value = false;\n emit('blur');\n };\n\n const iconClicked = ($event: Event) => {\n if (!props.disabled) {\n if (props.icon) {\n emit('icon-click');\n } else {\n emitModelValue('');\n }\n $event.preventDefault();\n $event.stopPropagation();\n }\n };\n\n const changeValue = (event: Event) => {\n const val = (event.target as HTMLInputElement).value;\n const v = props.maxlength && val.length > props.maxlength ? val.substring(0, props.maxlength) : val;\n if (props.modelValue !== v) {\n emitModelValue(v);\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (\n event.key !== 'Backspace' &&\n props.maxlength &&\n props.modelValue &&\n props.modelValue.length >= props.maxlength\n ) {\n event.preventDefault();\n }\n };\n\n const computedPlaceholder = computed(() => {\n if (props.placeholder) {\n return props.placeholder;\n } else {\n switch (props.type) {\n case NeonInputType.Email:\n return 'gbelson@hooli.com';\n case NeonInputType.Tel:\n return '+41785551234';\n case NeonInputType.Url:\n return 'http://www.getskeleton.com';\n default:\n return '';\n }\n }\n });\n\n return {\n neonInput,\n focused,\n sanitizedAttributes,\n iconVisible,\n iconName,\n iconColor,\n computedPlaceholder,\n focus,\n click,\n onFocus,\n onBlur,\n iconClicked,\n changeValue,\n onKeyDown,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonInputType","NeonSize","NeonFunctionalColor","NeonInputMode","NeonState","props","emit","attrs","useAttrs","neonInput","ref","focused","sanitizedAttributes","computed","onBlur","onFocus","onIconClick","sanitized","emitModelValue","NeonDebounceUtils","value","iconName","iconVisible","iconColor","focus","_a","click","iconClicked","$event","changeValue","event","val","v","onKeyDown","computedPlaceholder"],"mappings":"8aAYAA,EAAeC,kBAAgB,CAC7B,KAAM,YACN,WAAY,CACV,SAAAC,CAAA,EAEF,MAAO,CAIL,GAAI,CAAE,KAAM,OAAQ,QAAS,IAAA,EAI7B,WAAY,CAAE,KAAM,OAAQ,QAAS,IAAA,EAMrC,KAAM,CAAE,KAAM,OAA+B,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EAAI0B,EAC5F1B,EAAM,aAAe2B,GACvBd,EAAec,CAAC,CAEpB,EAEMC,EAAaH,GAAyB,CAExCA,EAAM,MAAQ,aACdzB,EAAM,WACNA,EAAM,YACNA,EAAM,WAAW,QAAUA,EAAM,WAEjCyB,EAAM,eAAA,CAEV,EAEMI,EAAsBrB,EAAAA,SAAS,IAAM,CACzC,GAAIR,EAAM,YACR,OAAOA,EAAM,YAEb,OAAQA,EAAM,KAAA,CACZ,KAAKL,EAAAA,cAAc,MACjB,MAAO,oBACT,KAAKA,EAAAA,cAAc,IACjB,MAAO,eACT,KAAKA,EAAAA,cAAc,IACjB,MAAO,6BACT,QACE,MAAO,EAAA,CAGf,CAAC,EAED,MAAO,CACL,UAAAS,EACA,QAAAE,EACA,oBAAAC,EACA,YAAAU,EACA,SAAAD,EACA,UAAAE,EACA,oBAAAW,EACA,MAAAV,EACA,MAAAE,EACA,QAAAX,EACA,OAAAD,EACA,YAAAa,EACA,YAAAE,EACA,UAAAI,CAAA,CAEJ,CACF,CAAC"}
1
+ {"version":3,"file":"NeonInput.cjs.js","sources":["../../../../src/components/user-input/input/NeonInput.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, defineExpose, ref, useAttrs } from 'vue';\nimport { NeonInputType } from '@/common/enums/NeonInputType';\nimport { NeonState } from '@/common/enums/NeonState';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\nimport { NeonDebounceUtils } from '@/common/utils/NeonDebounceUtils';\nimport { NeonInputMode } from '@/common/enums/NeonInputMode';\n\n/**\n * Equivalent of, and wrapper around, an HTML input. Also supports <strong>textarea</strong>.\n */\nexport default defineComponent({\n name: 'NeonInput',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The id the input\n */\n id: { type: String, default: null },\n /**\n * The value of the input\n */\n modelValue: { type: String, default: null },\n /**\n * The type of input this is. NOTE: Neon provides custom components as alternatives in the following cases:\n * * file (use <a href=\"/user-input/file\">NeonFile</a>)\n * * password (use <a href=\"/user-input/password\">NeonPassword</a>)\n */\n type: { type: String as () => NeonInputType, default: NeonInputType.Text },\n /**\n * Placeholder text to display in the input\n */\n placeholder: { type: String, default: null },\n /**\n * Size of the input\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * Color of the input\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * The HTML input mode as specified <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode\">here</a>.\n */\n inputmode: { type: String as () => NeonInputMode, default: NeonInputMode.Text },\n /**\n * The HTML autocomplete mode as specified <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\">here</a>.\n * NOTE: No enum is provided in Neon as some values can be used in combination, please refer to the full list of values in the preceding link.\n */\n autocomplete: { type: String, default: 'on' },\n /**\n * The state of the input\n */\n state: { type: String as () => NeonState, default: NeonState.Ready },\n /**\n * The number of rows to display in the case of a textarea\n */\n rows: { type: Number, default: null },\n /**\n * The name of a clickable icon to display inside the input. This is used for clearing contents or e.g. in the case of\n * NeonPassword toggle showing/hiding the password. Defaults to <em>times</em> (for clearing the input's contents).\n */\n icon: { type: String, default: null },\n /**\n * Make the input field icon read-only, i.e. it will not emit events or be treated as a focusable button.\n */\n iconReadonly: { type: Boolean, default: false },\n /**\n * Hide the icon button, e.g. the X button to clear the input's contents.\n */\n hideIcon: { type: Boolean, default: false },\n /**\n * Tabindex to assign to the input.\n */\n tabindex: { type: Number, default: 0 },\n /**\n * The disabled state of the input\n */\n disabled: { type: Boolean, default: false },\n /**\n * When the state is success or error, display the field with the state color indicator, e.g. border or background\n * color.\n */\n stateHighlight: { type: Boolean, default: true },\n /**\n * When the state is success or error, display the state icon.\n */\n stateIcon: { type: Boolean, default: true },\n /**\n * The character limit for a textarea.\n */\n maxlength: { type: Number, default: null },\n /**\n * Debounce time in ms, if no value is provided the default value set in NeonDebounceUtils is used (=300ms).\n * Set to 0 to disable debounce.\n */\n debounce: { type: Number, default: undefined },\n },\n emits: [\n /**\n * Emitted when the input has gained focus\n * @type {void}\n */\n 'focus',\n /**\n * Emitted when the input has lost focus\n * @type {void}\n */\n 'blur',\n /**\n * Emitted when the icon is clicked\n * @type {void}\n */\n 'icon-click',\n /**\n * Emitted when the input value is changed, NOTE: is not triggered if input is over the textarea length limit\n * @type {string} the contents of the input\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const neonInput = ref<HTMLElement | null>(null);\n const focused = ref(false);\n\n const sanitizedAttributes = computed(() => {\n const {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onBlur,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onFocus,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onIconClick,\n ...sanitized\n } = attrs;\n\n return sanitized;\n });\n\n const emitModelValue = NeonDebounceUtils.debounce((value: string) => {\n emit('update:modelValue', value);\n }, props.debounce);\n\n const iconName = computed(() => {\n switch (props.state) {\n case NeonState.Loading:\n return 'loading';\n case NeonState.Success:\n return props.stateIcon ? 'check' : undefined;\n case NeonState.Error:\n return props.stateIcon ? 'times' : undefined;\n default:\n if (props.icon) {\n return props.icon;\n } else if (props.modelValue && props.modelValue.length > 0) {\n return 'times';\n }\n\n return undefined;\n }\n });\n\n const iconVisible = computed(() => {\n return (\n iconName.value &&\n !props.hideIcon &&\n (props.state !== 'ready' || props.icon || (props.modelValue && !props.disabled && props.modelValue.length > 0))\n );\n });\n\n const iconColor = computed(() => {\n switch (props.state) {\n case NeonState.Success:\n return NeonFunctionalColor.Success;\n case NeonState.Error:\n return NeonFunctionalColor.Error;\n case NeonState.Loading:\n return props.color;\n default:\n return NeonFunctionalColor.LowContrast;\n }\n });\n\n const focus = () => {\n neonInput.value?.focus();\n };\n\n const click = () => {\n neonInput.value?.click();\n };\n\n const onFocus = () => {\n focused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n focused.value = false;\n emit('blur');\n };\n\n const iconClicked = ($event: Event) => {\n if (!props.disabled) {\n if (props.icon) {\n emit('icon-click');\n } else {\n emitModelValue('');\n }\n $event.preventDefault();\n $event.stopPropagation();\n }\n };\n\n const changeValue = (event: Event) => {\n const val = (event.target as HTMLInputElement).value;\n const v = props.maxlength && val.length > props.maxlength ? val.substring(0, props.maxlength) : val;\n if (props.modelValue !== v) {\n emitModelValue(v);\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (\n event.key !== 'Backspace' &&\n props.maxlength &&\n props.modelValue &&\n props.modelValue.length >= props.maxlength\n ) {\n event.preventDefault();\n }\n };\n\n const computedPlaceholder = computed(() => {\n if (props.placeholder) {\n return props.placeholder;\n } else {\n switch (props.type) {\n case NeonInputType.Email:\n return 'gbelson@hooli.com';\n case NeonInputType.Tel:\n return '+41785551234';\n case NeonInputType.Url:\n return 'http://www.getskeleton.com';\n default:\n return '';\n }\n }\n });\n\n defineExpose({ neonInput });\n\n return {\n neonInput,\n focused,\n sanitizedAttributes,\n iconVisible,\n iconName,\n iconColor,\n computedPlaceholder,\n focus,\n click,\n onFocus,\n onBlur,\n iconClicked,\n changeValue,\n onKeyDown,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonInputType","NeonSize","NeonFunctionalColor","NeonInputMode","NeonState","props","emit","attrs","useAttrs","neonInput","ref","focused","sanitizedAttributes","computed","onBlur","onFocus","onIconClick","sanitized","emitModelValue","NeonDebounceUtils","value","iconName","iconVisible","iconColor","focus","_a","click","iconClicked","$event","changeValue","event","val","v","onKeyDown","computedPlaceholder","defineExpose"],"mappings":"8aAYAA,EAAeC,kBAAgB,CAC7B,KAAM,YACN,WAAY,CACV,SAAAC,CAAA,EAEF,MAAO,CAIL,GAAI,CAAE,KAAM,OAAQ,QAAS,IAAA,EAI7B,WAAY,CAAE,KAAM,OAAQ,QAAS,IAAA,EAMrC,KAAM,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B,EAAI,OAAS1B,EAAM,UAAY0B,EAAI,UAAU,EAAG1B,EAAM,SAAS,EAAI0B,EAC5F1B,EAAM,aAAe2B,GACvBd,EAAec,CAAC,CAEpB,EAEMC,EAAaH,GAAyB,CAExCA,EAAM,MAAQ,aACdzB,EAAM,WACNA,EAAM,YACNA,EAAM,WAAW,QAAUA,EAAM,WAEjCyB,EAAM,eAAA,CAEV,EAEMI,EAAsBrB,EAAAA,SAAS,IAAM,CACzC,GAAIR,EAAM,YACR,OAAOA,EAAM,YAEb,OAAQA,EAAM,KAAA,CACZ,KAAKL,EAAAA,cAAc,MACjB,MAAO,oBACT,KAAKA,EAAAA,cAAc,IACjB,MAAO,eACT,KAAKA,EAAAA,cAAc,IACjB,MAAO,6BACT,QACE,MAAO,EAAA,CAGf,CAAC,EAEDmC,OAAAA,EAAAA,aAAa,CAAE,UAAA1B,EAAW,EAEnB,CACL,UAAAA,EACA,QAAAE,EACA,oBAAAC,EACA,YAAAU,EACA,SAAAD,EACA,UAAAE,EACA,oBAAAW,EACA,MAAAV,EACA,MAAAE,EACA,QAAAX,EACA,OAAAD,EACA,YAAAa,EACA,YAAAE,EACA,UAAAI,CAAA,CAEJ,CACF,CAAC"}
@@ -1,15 +1,15 @@
1
- import { defineComponent as C, useAttrs as z, ref as m, computed as l } from "vue";
2
- import { NeonInputType as u } from "../../../common/enums/NeonInputType.es.js";
1
+ import { defineComponent as C, useAttrs as E, ref as m, computed as l, defineExpose as z } from "vue";
2
+ import { NeonInputType as c } from "../../../common/enums/NeonInputType.es.js";
3
3
  import { NeonState as n } from "../../../common/enums/NeonState.es.js";
4
4
  import { NeonSize as D } from "../../../common/enums/NeonSize.es.js";
5
- import { NeonFunctionalColor as c } from "../../../common/enums/NeonFunctionalColor.es.js";
6
- import E from "../../presentation/icon/NeonIcon.vue.es.js";
7
- import { NeonDebounceUtils as F } from "../../../common/utils/NeonDebounceUtils.es.js";
5
+ import { NeonFunctionalColor as i } from "../../../common/enums/NeonFunctionalColor.es.js";
6
+ import F from "../../presentation/icon/NeonIcon.vue.es.js";
7
+ import { NeonDebounceUtils as T } from "../../../common/utils/NeonDebounceUtils.es.js";
8
8
  import { NeonInputMode as L } from "../../../common/enums/NeonInputMode.es.js";
9
- const K = C({
9
+ const j = C({
10
10
  name: "NeonInput",
11
11
  components: {
12
- NeonIcon: E
12
+ NeonIcon: F
13
13
  },
14
14
  props: {
15
15
  /**
@@ -25,7 +25,7 @@ const K = C({
25
25
  * * file (use <a href="/user-input/file">NeonFile</a>)
26
26
  * * password (use <a href="/user-input/password">NeonPassword</a>)
27
27
  */
28
- type: { type: String, default: u.Text },
28
+ type: { type: String, default: c.Text },
29
29
  /**
30
30
  * Placeholder text to display in the input
31
31
  */
@@ -37,11 +37,16 @@ const K = C({
37
37
  /**
38
38
  * Color of the input
39
39
  */
40
- color: { type: String, default: c.LowContrast },
40
+ color: { type: String, default: i.Primary },
41
41
  /**
42
42
  * The HTML input mode as specified <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode">here</a>.
43
43
  */
44
44
  inputmode: { type: String, default: L.Text },
45
+ /**
46
+ * The HTML autocomplete mode as specified <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values">here</a>.
47
+ * NOTE: No enum is provided in Neon as some values can be used in combination, please refer to the full list of values in the preceding link.
48
+ */
49
+ autocomplete: { type: String, default: "on" },
45
50
  /**
46
51
  * The state of the input
47
52
  */
@@ -113,18 +118,18 @@ const K = C({
113
118
  "update:modelValue"
114
119
  ],
115
120
  setup(e, { emit: o }) {
116
- const g = z(), i = m(null), r = m(!1), y = l(() => {
121
+ const g = E(), a = m(null), r = m(!1), y = l(() => {
117
122
  const {
118
123
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
119
124
  onBlur: t,
120
125
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
121
- onFocus: a,
126
+ onFocus: u,
122
127
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
123
128
  onIconClick: d,
124
129
  ...B
125
130
  } = g;
126
131
  return B;
127
- }), s = F.debounce((t) => {
132
+ }), s = T.debounce((t) => {
128
133
  o("update:modelValue", t);
129
134
  }, e.debounce), f = l(() => {
130
135
  switch (e.state) {
@@ -140,64 +145,64 @@ const K = C({
140
145
  }), h = l(() => f.value && !e.hideIcon && (e.state !== "ready" || e.icon || e.modelValue && !e.disabled && e.modelValue.length > 0)), b = l(() => {
141
146
  switch (e.state) {
142
147
  case n.Success:
143
- return c.Success;
148
+ return i.Success;
144
149
  case n.Error:
145
- return c.Error;
150
+ return i.Error;
146
151
  case n.Loading:
147
152
  return e.color;
148
153
  default:
149
- return c.LowContrast;
154
+ return i.LowContrast;
150
155
  }
151
156
  }), S = () => {
152
157
  var t;
153
- (t = i.value) == null || t.focus();
158
+ (t = a.value) == null || t.focus();
154
159
  }, N = () => {
155
160
  var t;
156
- (t = i.value) == null || t.click();
161
+ (t = a.value) == null || t.click();
157
162
  }, V = () => {
158
163
  r.value = !0, o("focus");
159
164
  }, v = () => {
160
165
  r.value = !1, o("blur");
161
- }, I = (t) => {
166
+ }, x = (t) => {
162
167
  e.disabled || (e.icon ? o("icon-click") : s(""), t.preventDefault(), t.stopPropagation());
163
- }, k = (t) => {
164
- const a = t.target.value, d = e.maxlength && a.length > e.maxlength ? a.substring(0, e.maxlength) : a;
168
+ }, I = (t) => {
169
+ const u = t.target.value, d = e.maxlength && u.length > e.maxlength ? u.substring(0, e.maxlength) : u;
165
170
  e.modelValue !== d && s(d);
166
- }, w = (t) => {
171
+ }, k = (t) => {
167
172
  t.key !== "Backspace" && e.maxlength && e.modelValue && e.modelValue.length >= e.maxlength && t.preventDefault();
168
- }, x = l(() => {
173
+ }, w = l(() => {
169
174
  if (e.placeholder)
170
175
  return e.placeholder;
171
176
  switch (e.type) {
172
- case u.Email:
177
+ case c.Email:
173
178
  return "gbelson@hooli.com";
174
- case u.Tel:
179
+ case c.Tel:
175
180
  return "+41785551234";
176
- case u.Url:
181
+ case c.Url:
177
182
  return "http://www.getskeleton.com";
178
183
  default:
179
184
  return "";
180
185
  }
181
186
  });
182
- return {
183
- neonInput: i,
187
+ return z({ neonInput: a }), {
188
+ neonInput: a,
184
189
  focused: r,
185
190
  sanitizedAttributes: y,
186
191
  iconVisible: h,
187
192
  iconName: f,
188
193
  iconColor: b,
189
- computedPlaceholder: x,
194
+ computedPlaceholder: w,
190
195
  focus: S,
191
196
  click: N,
192
197
  onFocus: V,
193
198
  onBlur: v,
194
- iconClicked: I,
195
- changeValue: k,
196
- onKeyDown: w
199
+ iconClicked: x,
200
+ changeValue: I,
201
+ onKeyDown: k
197
202
  };
198
203
  }
199
204
  });
200
205
  export {
201
- K as default
206
+ j as default
202
207
  };
203
208
  //# sourceMappingURL=NeonInput.es.js.map