@aotearoan/neon 9.2.9 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/components/navigation/link/NeonLink.cjs.js +1 -1
  2. package/dist/components/navigation/link/NeonLink.es.js +15 -6
  3. package/dist/components/navigation/link/NeonLink.es.js.map +1 -1
  4. package/dist/components/navigation/link/{NeonLink.ts_vue_type_script_src_037ccc85_lang.cjs.js → NeonLink.ts_vue_type_script_src_5a48e750_lang.cjs.js} +1 -1
  5. package/dist/components/navigation/link/{NeonLink.ts_vue_type_script_src_037ccc85_lang.cjs.js.map → NeonLink.ts_vue_type_script_src_5a48e750_lang.cjs.js.map} +1 -1
  6. package/dist/components/navigation/link/{NeonLink.ts_vue_type_script_src_037ccc85_lang.es.js → NeonLink.ts_vue_type_script_src_5a48e750_lang.es.js} +1 -1
  7. package/dist/components/navigation/link/{NeonLink.ts_vue_type_script_src_037ccc85_lang.es.js.map → NeonLink.ts_vue_type_script_src_5a48e750_lang.es.js.map} +1 -1
  8. package/dist/components/presentation/icon/NeonIcon.cjs.js +1 -1
  9. package/dist/components/presentation/icon/NeonIcon.es.js +6 -2
  10. package/dist/components/presentation/icon/NeonIcon.es.js.map +1 -1
  11. package/dist/components/presentation/icon/{NeonIcon.ts_vue_type_script_src_3580e0c3_lang.cjs.js → NeonIcon.ts_vue_type_script_src_d3713f20_lang.cjs.js} +1 -1
  12. package/dist/components/presentation/icon/{NeonIcon.ts_vue_type_script_src_3580e0c3_lang.cjs.js.map → NeonIcon.ts_vue_type_script_src_d3713f20_lang.cjs.js.map} +1 -1
  13. package/dist/components/presentation/icon/{NeonIcon.ts_vue_type_script_src_3580e0c3_lang.es.js → NeonIcon.ts_vue_type_script_src_d3713f20_lang.es.js} +1 -1
  14. package/dist/components/presentation/icon/{NeonIcon.ts_vue_type_script_src_3580e0c3_lang.es.js.map → NeonIcon.ts_vue_type_script_src_d3713f20_lang.es.js.map} +1 -1
  15. package/dist/components/user-input/button/NeonButton.cjs.js +1 -1
  16. package/dist/components/user-input/button/NeonButton.es.js +3 -7
  17. package/dist/components/user-input/button/NeonButton.es.js.map +1 -1
  18. package/dist/components/user-input/button/NeonButton.ts_vue_type_script_src_7c4eb572_lang.cjs.js +2 -0
  19. package/dist/components/user-input/button/NeonButton.ts_vue_type_script_src_7c4eb572_lang.cjs.js.map +1 -0
  20. package/dist/components/user-input/button/{NeonButton.ts_vue_type_script_src_32308d32_lang.es.js → NeonButton.ts_vue_type_script_src_7c4eb572_lang.es.js} +5 -2
  21. package/dist/components/user-input/button/NeonButton.ts_vue_type_script_src_7c4eb572_lang.es.js.map +1 -0
  22. package/dist/components/user-input/date-picker/NeonDatePicker.cjs.js +1 -1
  23. package/dist/components/user-input/date-picker/NeonDatePicker.es.js +2 -1
  24. package/dist/components/user-input/date-picker/NeonDatePicker.es.js.map +1 -1
  25. package/dist/components/user-input/date-picker/{NeonDatePicker.ts_vue_type_script_src_01c3f912_lang.cjs.js → NeonDatePicker.ts_vue_type_script_src_56e4ee8a_lang.cjs.js} +1 -1
  26. package/dist/components/user-input/date-picker/{NeonDatePicker.ts_vue_type_script_src_01c3f912_lang.cjs.js.map → NeonDatePicker.ts_vue_type_script_src_56e4ee8a_lang.cjs.js.map} +1 -1
  27. package/dist/components/user-input/date-picker/{NeonDatePicker.ts_vue_type_script_src_01c3f912_lang.es.js → NeonDatePicker.ts_vue_type_script_src_56e4ee8a_lang.es.js} +1 -1
  28. package/dist/components/user-input/date-picker/{NeonDatePicker.ts_vue_type_script_src_01c3f912_lang.es.js.map → NeonDatePicker.ts_vue_type_script_src_56e4ee8a_lang.es.js.map} +1 -1
  29. package/dist/components/user-input/input/NeonInput.cjs.js +1 -1
  30. package/dist/components/user-input/input/NeonInput.es.js +3 -2
  31. package/dist/components/user-input/input/NeonInput.es.js.map +1 -1
  32. package/dist/components/user-input/input/{NeonInput.ts_vue_type_script_src_62c5c4a9_lang.cjs.js → NeonInput.ts_vue_type_script_src_2bebb33c_lang.cjs.js} +1 -1
  33. package/dist/components/user-input/input/{NeonInput.ts_vue_type_script_src_62c5c4a9_lang.cjs.js.map → NeonInput.ts_vue_type_script_src_2bebb33c_lang.cjs.js.map} +1 -1
  34. package/dist/components/user-input/input/{NeonInput.ts_vue_type_script_src_62c5c4a9_lang.es.js → NeonInput.ts_vue_type_script_src_2bebb33c_lang.es.js} +1 -1
  35. package/dist/components/user-input/input/{NeonInput.ts_vue_type_script_src_62c5c4a9_lang.es.js.map → NeonInput.ts_vue_type_script_src_2bebb33c_lang.es.js.map} +1 -1
  36. package/dist/src/common/enums/NeonAlertLevel.d.ts +6 -0
  37. package/dist/src/common/enums/NeonAlertPlacement.d.ts +6 -0
  38. package/dist/src/common/enums/NeonButtonSize.d.ts +6 -0
  39. package/dist/src/common/enums/NeonButtonStyle.d.ts +5 -0
  40. package/dist/src/common/enums/NeonChipAction.d.ts +4 -0
  41. package/dist/src/common/enums/NeonDropdownPlacement.d.ts +10 -0
  42. package/dist/src/common/enums/NeonDropdownStyle.d.ts +6 -0
  43. package/dist/src/common/enums/NeonFunctionalColor.d.ts +11 -0
  44. package/dist/src/common/enums/NeonHorizontalPosition.d.ts +4 -0
  45. package/dist/src/common/enums/NeonInputMode.d.ts +10 -0
  46. package/dist/src/common/enums/NeonInputType.d.ts +14 -0
  47. package/dist/src/common/enums/NeonLabelSize.d.ts +4 -0
  48. package/dist/src/common/enums/NeonMode.d.ts +4 -0
  49. package/dist/src/common/enums/NeonOrientation.d.ts +4 -0
  50. package/dist/src/common/enums/NeonOutlineStyle.d.ts +7 -0
  51. package/dist/src/common/enums/NeonPlacement.d.ts +6 -0
  52. package/dist/src/common/enums/NeonPosition.d.ts +6 -0
  53. package/dist/src/common/enums/NeonResponsive.d.ts +11 -0
  54. package/dist/src/common/enums/NeonSize.d.ts +5 -0
  55. package/dist/src/common/enums/NeonSplashLoaderSize.d.ts +6 -0
  56. package/dist/src/common/enums/NeonState.d.ts +6 -0
  57. package/dist/src/common/enums/NeonSwitchStyle.d.ts +4 -0
  58. package/dist/src/common/enums/NeonToggleStyle.d.ts +4 -0
  59. package/dist/src/common/enums/NeonTooltipStyle.d.ts +4 -0
  60. package/dist/src/common/enums/NeonVerticalPosition.d.ts +4 -0
  61. package/dist/src/common/models/NeonActionMenuModel.d.ts +7 -0
  62. package/dist/src/common/models/NeonAlertAction.d.ts +13 -0
  63. package/dist/src/common/models/NeonAlertMessage.d.ts +38 -0
  64. package/dist/src/common/models/NeonAvailableSpace.d.ts +9 -0
  65. package/dist/src/common/models/NeonCalendarConfig.d.ts +13 -0
  66. package/dist/src/common/models/NeonContrastAccessibility.d.ts +7 -0
  67. package/dist/src/common/models/NeonDate.d.ts +10 -0
  68. package/dist/src/common/models/NeonDropdownMenuItem.d.ts +10 -0
  69. package/dist/src/common/models/NeonDropdownPlacementObject.d.ts +23 -0
  70. package/dist/src/common/models/NeonFilterListItem.d.ts +9 -0
  71. package/dist/src/common/models/NeonGridModel.d.ts +19 -0
  72. package/dist/src/common/models/NeonListItem.d.ts +7 -0
  73. package/dist/src/common/models/NeonMenuItem.d.ts +7 -0
  74. package/dist/src/common/models/NeonMenuModel.d.ts +4 -0
  75. package/dist/src/common/models/NeonNumberFormatOptions.d.ts +6 -0
  76. package/dist/src/common/models/NeonSearchOption.d.ts +11 -0
  77. package/dist/src/common/models/NeonSelectGroup.d.ts +8 -0
  78. package/dist/src/common/models/NeonSelectOption.d.ts +10 -0
  79. package/dist/src/common/models/NeonTabModel.d.ts +5 -0
  80. package/dist/src/common/models/NeonToastMessage.d.ts +23 -0
  81. package/dist/src/common/models/NeonToggleModel.d.ts +6 -0
  82. package/dist/src/common/models/NeonTreeMenuLinkModel.d.ts +6 -0
  83. package/dist/src/common/models/NeonTreeMenuSectionModel.d.ts +8 -0
  84. package/dist/src/common/utils/NeonAlertService.d.ts +29 -0
  85. package/dist/src/common/utils/NeonClipboardService.d.ts +6 -0
  86. package/dist/src/common/utils/NeonClosableUtils.d.ts +11 -0
  87. package/dist/src/common/utils/NeonColorUtils.d.ts +43 -0
  88. package/dist/src/common/utils/NeonDateUtils.d.ts +16 -0
  89. package/dist/src/common/utils/NeonDebounceUtils.d.ts +5 -0
  90. package/dist/src/common/utils/NeonDropdownPlacementUtils.d.ts +6 -0
  91. package/dist/src/common/utils/NeonEventBus.d.ts +27 -0
  92. package/dist/src/common/utils/NeonIconRegistry.d.ts +8 -0
  93. package/dist/src/common/utils/NeonModeUtils.d.ts +15 -0
  94. package/dist/src/common/utils/NeonNumberUtils.d.ts +10 -0
  95. package/dist/src/common/utils/NeonPlacementUtils.d.ts +8 -0
  96. package/dist/src/common/utils/NeonResponsiveUtils.d.ts +4 -0
  97. package/dist/src/common/utils/NeonScrollUtils.d.ts +3 -0
  98. package/dist/src/common/utils/NeonToastService.d.ts +29 -0
  99. package/dist/src/common/utils/NeonTooltipPlacementUtils.d.ts +7 -0
  100. package/dist/src/common/utils/RegisterIcons.d.ts +3 -0
  101. package/dist/src/components/feedback/alert/NeonAlert.d.ts +129 -0
  102. package/dist/src/components/feedback/alert/NeonAlert.vue.d.ts +2 -0
  103. package/dist/src/components/feedback/alert/NeonAlertModel.d.ts +6 -0
  104. package/dist/src/components/feedback/alert/NeonToastModel.d.ts +6 -0
  105. package/dist/src/components/feedback/alert/container/NeonAlertContainer.d.ts +29 -0
  106. package/dist/src/components/feedback/alert/container/NeonAlertContainer.vue.d.ts +2 -0
  107. package/dist/src/components/feedback/alert/container/NeonToastContainer.d.ts +27 -0
  108. package/dist/src/components/feedback/alert/container/NeonToastContainer.vue.d.ts +2 -0
  109. package/dist/src/components/feedback/dialog/NeonDialog.d.ts +135 -0
  110. package/dist/src/components/feedback/dialog/NeonDialog.vue.d.ts +2 -0
  111. package/dist/src/components/feedback/linear-progress/NeonLinearProgress.d.ts +183 -0
  112. package/dist/src/components/feedback/linear-progress/NeonLinearProgress.vue.d.ts +2 -0
  113. package/dist/src/components/feedback/note/NeonNote.d.ts +74 -0
  114. package/dist/src/components/feedback/note/NeonNote.vue.d.ts +2 -0
  115. package/dist/src/components/feedback/notification-counter/NeonNotificationCounter.d.ts +54 -0
  116. package/dist/src/components/feedback/notification-counter/NeonNotificationCounter.vue.d.ts +2 -0
  117. package/dist/src/components/feedback/skeleton-loader/NeonSkeletonLoader.d.ts +26 -0
  118. package/dist/src/components/feedback/skeleton-loader/NeonSkeletonLoader.vue.d.ts +2 -0
  119. package/dist/src/components/feedback/splash-loader/NeonSplashLoader.d.ts +74 -0
  120. package/dist/src/components/feedback/splash-loader/NeonSplashLoader.vue.d.ts +2 -0
  121. package/dist/src/components/feedback/tooltip/NeonTooltip.d.ts +118 -0
  122. package/dist/src/components/feedback/tooltip/NeonTooltip.vue.d.ts +2 -0
  123. package/dist/src/components/layout/card/NeonCard.d.ts +97 -0
  124. package/dist/src/components/layout/card/NeonCard.vue.d.ts +2 -0
  125. package/dist/src/components/layout/card/body/NeonCardBody.d.ts +23 -0
  126. package/dist/src/components/layout/card/body/NeonCardBody.vue.d.ts +2 -0
  127. package/dist/src/components/layout/card/footer/NeonCardFooter.d.ts +5 -0
  128. package/dist/src/components/layout/card/footer/NeonCardFooter.vue.d.ts +2 -0
  129. package/dist/src/components/layout/card/header/NeonCardHeader.d.ts +6 -0
  130. package/dist/src/components/layout/card/header/NeonCardHeader.vue.d.ts +2 -0
  131. package/dist/src/components/layout/drawer/NeonDrawer.d.ts +89 -0
  132. package/dist/src/components/layout/drawer/NeonDrawer.vue.d.ts +2 -0
  133. package/dist/src/components/layout/footer/NeonFooter.d.ts +5 -0
  134. package/dist/src/components/layout/footer/NeonFooter.vue.d.ts +2 -0
  135. package/dist/src/components/layout/grid/NeonGrid.d.ts +41 -0
  136. package/dist/src/components/layout/grid/NeonGrid.vue.d.ts +2 -0
  137. package/dist/src/components/layout/grid/grid-area/NeonGridArea.d.ts +21 -0
  138. package/dist/src/components/layout/grid/grid-area/NeonGridArea.vue.d.ts +2 -0
  139. package/dist/src/components/layout/modal/NeonModal.d.ts +72 -0
  140. package/dist/src/components/layout/modal/NeonModal.vue.d.ts +2 -0
  141. package/dist/src/components/layout/page/NeonPage.d.ts +6 -0
  142. package/dist/src/components/layout/page/NeonPage.vue.d.ts +2 -0
  143. package/dist/src/components/layout/side-nav/NeonSideNav.d.ts +26 -0
  144. package/dist/src/components/layout/side-nav/NeonSideNav.vue.d.ts +2 -0
  145. package/dist/src/components/layout/top-nav/NeonTopNav.d.ts +6 -0
  146. package/dist/src/components/layout/top-nav/NeonTopNav.vue.d.ts +2 -0
  147. package/dist/src/components/navigation/action-menu/NeonActionMenu.d.ts +57 -0
  148. package/dist/src/components/navigation/action-menu/NeonActionMenu.vue.d.ts +2 -0
  149. package/dist/src/components/navigation/anchor/NeonAnchor.d.ts +23 -0
  150. package/dist/src/components/navigation/anchor/NeonAnchor.vue.d.ts +2 -0
  151. package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.d.ts +109 -0
  152. package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.vue.d.ts +2 -0
  153. package/dist/src/components/navigation/link/NeonLink.d.ts +81 -0
  154. package/dist/src/components/navigation/link/NeonLink.vue.d.ts +2 -0
  155. package/dist/src/components/navigation/menu/NeonMenu.d.ts +107 -0
  156. package/dist/src/components/navigation/menu/NeonMenu.vue.d.ts +2 -0
  157. package/dist/src/components/navigation/menu/NeonPriorityMenuItem.d.ts +5 -0
  158. package/dist/src/components/navigation/stepper/NeonStepper.d.ts +74 -0
  159. package/dist/src/components/navigation/stepper/NeonStepper.vue.d.ts +2 -0
  160. package/dist/src/components/navigation/tree-menu/NeonTreeMenu.d.ts +47 -0
  161. package/dist/src/components/navigation/tree-menu/NeonTreeMenu.vue.d.ts +2 -0
  162. package/dist/src/components/presentation/badge/NeonBadge.d.ts +145 -0
  163. package/dist/src/components/presentation/badge/NeonBadge.vue.d.ts +2 -0
  164. package/dist/src/components/presentation/dropdown/NeonDropdown.d.ts +260 -0
  165. package/dist/src/components/presentation/dropdown/NeonDropdown.vue.d.ts +2 -0
  166. package/dist/src/components/presentation/expansion-indicator/NeonExpansionIndicator.d.ts +70 -0
  167. package/dist/src/components/presentation/expansion-indicator/NeonExpansionIndicator.vue.d.ts +2 -0
  168. package/dist/src/components/presentation/expansion-panel/NeonExpansionPanel.d.ts +153 -0
  169. package/dist/src/components/presentation/expansion-panel/NeonExpansionPanel.vue.d.ts +2 -0
  170. package/dist/src/components/presentation/icon/NeonIcon.d.ts +86 -0
  171. package/dist/src/components/presentation/icon/NeonIcon.vue.d.ts +2 -0
  172. package/dist/src/components/presentation/label/NeonLabel.d.ts +100 -0
  173. package/dist/src/components/presentation/label/NeonLabel.vue.d.ts +2 -0
  174. package/dist/src/components/presentation/tabs/NeonTabs.d.ts +88 -0
  175. package/dist/src/components/presentation/tabs/NeonTabs.vue.d.ts +2 -0
  176. package/dist/src/components/presentation/tabs/tab/NeonTab.d.ts +54 -0
  177. package/dist/src/components/presentation/tabs/tab/NeonTab.vue.d.ts +2 -0
  178. package/dist/src/components/user-input/button/NeonButton.d.ts +293 -0
  179. package/dist/src/components/user-input/button/NeonButton.vue.d.ts +2 -0
  180. package/dist/src/components/user-input/chip/NeonChip.d.ts +123 -0
  181. package/dist/src/components/user-input/chip/NeonChip.vue.d.ts +2 -0
  182. package/dist/src/components/user-input/color/NeonColor.d.ts +112 -0
  183. package/dist/src/components/user-input/color/NeonColor.vue.d.ts +2 -0
  184. package/dist/src/components/user-input/date-picker/NeonDatePicker.d.ts +378 -0
  185. package/dist/src/components/user-input/date-picker/NeonDatePicker.vue.d.ts +2 -0
  186. package/dist/src/components/user-input/drop-zone/NeonDropZone.d.ts +59 -0
  187. package/dist/src/components/user-input/drop-zone/NeonDropZone.vue.d.ts +2 -0
  188. package/dist/src/components/user-input/field/NeonField.d.ts +114 -0
  189. package/dist/src/components/user-input/field/NeonField.vue.d.ts +2 -0
  190. package/dist/src/components/user-input/field-group/NeonFieldGroup.d.ts +5 -0
  191. package/dist/src/components/user-input/field-group/NeonFieldGroup.vue.d.ts +2 -0
  192. package/dist/src/components/user-input/file/NeonFile.d.ts +190 -0
  193. package/dist/src/components/user-input/file/NeonFile.vue.d.ts +2 -0
  194. package/dist/src/components/user-input/filter-list/NeonFilterList.d.ts +145 -0
  195. package/dist/src/components/user-input/filter-list/NeonFilterList.vue.d.ts +2 -0
  196. package/dist/src/components/user-input/input/NeonInput.d.ts +296 -0
  197. package/dist/src/components/user-input/input/NeonInput.vue.d.ts +2 -0
  198. package/dist/src/components/user-input/input-indicator/NeonInputIndicator.d.ts +55 -0
  199. package/dist/src/components/user-input/input-indicator/NeonInputIndicator.vue.d.ts +2 -0
  200. package/dist/src/components/user-input/list/NeonList.d.ts +76 -0
  201. package/dist/src/components/user-input/list/NeonList.vue.d.ts +2 -0
  202. package/dist/src/components/user-input/number/NeonNumber.d.ts +285 -0
  203. package/dist/src/components/user-input/number/NeonNumber.vue.d.ts +2 -0
  204. package/dist/src/components/user-input/password/NeonPassword.d.ts +17 -0
  205. package/dist/src/components/user-input/password/NeonPassword.vue.d.ts +2 -0
  206. package/dist/src/components/user-input/range-slider/NeonRangeSlider.d.ts +269 -0
  207. package/dist/src/components/user-input/range-slider/NeonRangeSlider.vue.d.ts +2 -0
  208. package/dist/src/components/user-input/search/NeonSearch.d.ts +139 -0
  209. package/dist/src/components/user-input/search/NeonSearch.vue.d.ts +2 -0
  210. package/dist/src/components/user-input/select/NeonSelect.d.ts +207 -0
  211. package/dist/src/components/user-input/select/NeonSelect.vue.d.ts +2 -0
  212. package/dist/src/components/user-input/selectable-card/NeonSelectableCard.d.ts +79 -0
  213. package/dist/src/components/user-input/selectable-card/NeonSelectableCard.vue.d.ts +2 -0
  214. package/dist/src/components/user-input/slider/NeonSlider.d.ts +281 -0
  215. package/dist/src/components/user-input/slider/NeonSlider.vue.d.ts +2 -0
  216. package/dist/src/components/user-input/switch/NeonSwitch.d.ts +143 -0
  217. package/dist/src/components/user-input/switch/NeonSwitch.vue.d.ts +2 -0
  218. package/dist/src/components/user-input/toggle/NeonToggle.d.ts +138 -0
  219. package/dist/src/components/user-input/toggle/NeonToggle.vue.d.ts +2 -0
  220. package/dist/src/components/user-input/toggle-chip/NeonToggleChip.d.ts +110 -0
  221. package/dist/src/components/user-input/toggle-chip/NeonToggleChip.vue.d.ts +2 -0
  222. package/dist/src/neon.d.ts +124 -0
  223. package/package.json +7 -4
  224. package/src/sass/components/_button.scss +4 -8
  225. package/src/sass/components/_top-nav.scss +0 -1
  226. package/src/sass/variables.scss +2 -2
  227. package/dist/components/user-input/button/NeonButton.ts_vue_type_script_src_32308d32_lang.cjs.js +0 -2
  228. package/dist/components/user-input/button/NeonButton.ts_vue_type_script_src_32308d32_lang.cjs.js.map +0 -1
  229. package/dist/components/user-input/button/NeonButton.ts_vue_type_script_src_32308d32_lang.es.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NeonDatePicker.ts_vue_type_script_src_01c3f912_lang.es.js","sources":["../../../../src/components/user-input/date-picker/NeonDatePicker.ts?vue&type=script&src=01c3f912&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonDropdown from '@/components/presentation/dropdown/NeonDropdown.vue';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport { NeonDateUtils } from '@/common/utils/NeonDateUtils';\nimport { NeonDropdownPlacement } from '@/common/enums/NeonDropdownPlacement';\n\n/**\n * <strong>NeonDatePicker</strong> is the equivalent of the native\n * <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date\" target=\"_blank\">HTML Date Input</a>.\n * It accepts an <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> date string &\n * allows the user to select a date. Dates are formatted with the provided locale, if none is provided the browser\n * locale is used as a default. On touch devices the native date picker is presented to the user.\n *\n * The input date is displayed to the user WITHOUT any adjustment for their timezone, however 'Today' on the calendar is\n * highlighted for the user's timezone.\n *\n * This component interaction was inspired by this <a href=\"https://icehaunter.github.io/vue3-datepicker\" target=\"_blank\">vue-datepicker</a>\n */\nexport default defineComponent({\n name: 'NeonDatePicker',\n components: {\n NeonButton,\n NeonDropdown,\n NeonInput,\n },\n props: {\n /**\n * The selected date. A date string in the\n * <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format.\n */\n modelValue: { type: String, default: null },\n /**\n * The locale used for display purposes. This defaults to the browser's locale if none is provided.\n */\n locale: { type: String, default: null },\n /**\n * Disable date picker\n */\n disabled: { type: Boolean, default: false },\n /**\n * The size of the date picker, one of NeonSize.Small | NeonSize.Medium | NeonSize.Large.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * Color of the date picker\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Minimum allowed date value in the <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format.\n */\n min: { type: String, default: null },\n /**\n * Maximum allowed date value in the <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format.\n */\n max: { type: String, default: null },\n /**\n * The placement of the dropdown calendar popup.\n */\n placement: { type: String as () => NeonDropdownPlacement, default: NeonDropdownPlacement.BottomLeft },\n /**\n * Disabled dates, a list of <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format\n * dates for which to disable selection.\n */\n disabledDates: { type: Array as () => Array<string>, default: () => [] },\n /**\n * This is the placeholder for the text input when no value is provided.\n */\n placeholder: { type: String, required: false },\n /**\n * This is the label of the input field which opens the calendar. This is technically a button.\n */\n openCalendarLabel: { type: String, default: 'Open calendar' },\n /**\n * This is the label of the 'Done' button in the calendar popup.\n */\n doneLabel: { type: String, default: 'Done' },\n /**\n * This is the label of the 'Clear' button in the calendar popup.\n */\n clearLabel: { type: String, default: 'Clear' },\n /**\n * This is the ARIA label of the 'Change month' button in the calendar popup.\n */\n changeMonthLabel: { type: String, default: 'Change month' },\n /**\n * This is the ARIA label of the 'Previous month' button in the calendar popup.\n */\n previousMonthLabel: { type: String, default: 'Previous month' },\n /**\n * This is the ARIA label of the 'Next month' button in the calendar popup.\n */\n nextMonthLabel: { type: String, default: 'Next month' },\n /**\n * This is the ARIA label of the 'Change year' button in the calendar popup.\n */\n changeYearLabel: { type: String, default: 'Change year' },\n /**\n * This is the ARIA label of the 'Previous year' button in the calendar popup.\n */\n previousYearLabel: { type: String, default: 'Previous year' },\n /**\n * This is the ARIA label of the 'Next year' button in the calendar popup.\n */\n nextYearLabel: { type: String, default: 'Next year' },\n /**\n * This is the ARIA label of the 'Previous decade' button in the calendar popup.\n */\n previousDecadeLabel: { type: String, default: 'Previous decade' },\n /**\n * This is the ARIA label of the 'Next decade' button in the calendar popup.\n */\n nextDecadeLabel: { type: String, default: 'Next decade' },\n },\n setup(props, { emit }) {\n const attrs = useAttrs();\n const optional = !attrs.required;\n\n const dropdown = ref<HTMLElement | null>(null);\n const calendarRef = ref<HTMLElement | null>(null);\n const calendarOpen = ref<boolean>(false);\n const monthSelectionOpen = ref<boolean>(false);\n const yearSelectionOpen = ref<boolean>(false);\n\n const formattedValue = computed(() => {\n if (props.modelValue) {\n const formattedDate = NeonDateUtils.stringToNeonDate(props.modelValue, props.locale, true);\n if (formattedDate) {\n const { dayFormatted, monthShortName, yearFormatted } = formattedDate;\n return `${dayFormatted} ${monthShortName} ${yearFormatted}`;\n }\n }\n\n return '';\n });\n\n const isoDate = (day: number, month: number, year: number) => NeonDateUtils.dmyToIso(day, month, year);\n\n const todayDate = new Date();\n const locale = props.locale || navigator.language;\n\n const pageMonth = ref(\n props.modelValue ? +props.modelValue.substring(5, 7) : +todayDate.toLocaleString(locale, { month: 'numeric' }),\n );\n const pageYear = ref(\n props.modelValue ? +props.modelValue.substring(0, 4) : +todayDate.toLocaleString(locale, { year: 'numeric' }),\n );\n const pageDecadeStart = ref(Math.floor(pageYear.value / 10) * 10);\n\n const calendar = computed(() =>\n NeonDateUtils.toCalendarConfiguration(\n props.modelValue,\n pageMonth.value,\n pageYear.value,\n pageDecadeStart.value,\n props.locale,\n ),\n );\n\n const today = computed(() => {\n const { day, month, year } = calendar.value.today;\n return NeonDateUtils.dmyToIso(day, month, year);\n });\n\n const openCalendar = () => {\n if (!props.disabled) {\n calendarOpen.value = true;\n if (calendarRef.value) {\n const selected = calendarRef.value.querySelector('.neon-date-picker__calendar-date--selected') as HTMLElement;\n if (selected) {\n setTimeout(() => selected.focus());\n }\n }\n }\n };\n\n const emitDate = (newDate: string) => {\n emit('update:modelValue', newDate);\n };\n\n const onPrevious = () => {\n if (pageMonth.value === 1) {\n pageMonth.value = 12;\n pageYear.value = pageYear.value - 1;\n } else {\n pageMonth.value = pageMonth.value - 1;\n }\n };\n\n const onNext = () => {\n if (pageMonth.value === 12) {\n pageMonth.value = 1;\n pageYear.value = pageYear.value + 1;\n } else {\n pageMonth.value = pageMonth.value + 1;\n }\n };\n\n const changeMonth = () => {\n monthSelectionOpen.value = true;\n };\n\n const isPreviousDisabled = computed(\n () => props.min && props.min >= NeonDateUtils.dmyToIso(1, calendar.value.pageMonth, calendar.value.pageYear),\n );\n const isNextDisabled = computed(() => {\n const { pageYear, pageMonth, lastDayOfMonth } = calendar.value;\n return props.max && props.max <= NeonDateUtils.dmyToIso(lastDayOfMonth, pageMonth, pageYear);\n });\n const isChangeDateDisabled = computed(() => isPreviousDisabled.value && isNextDisabled.value);\n\n const onPreviousYear = () => {\n pageYear.value = pageYear.value - 1;\n };\n\n const onNextYear = () => {\n pageYear.value = pageYear.value + 1;\n };\n\n const changeYear = () => {\n yearSelectionOpen.value = true;\n };\n\n const isPreviousYearDisabled = computed(\n () => props.min && props.min >= NeonDateUtils.dmyToIso(1, 1, calendar.value.pageYear),\n );\n const isNextYearDisabled = computed(\n () => props.max && props.max <= NeonDateUtils.dmyToIso(31, 12, calendar.value.pageYear),\n );\n const isChangeYearDisabled = computed(() => isPreviousYearDisabled.value && isNextYearDisabled.value);\n\n const onPreviousDecade = () => {\n pageDecadeStart.value = pageDecadeStart.value - 10;\n };\n\n const onNextDecade = () => {\n pageDecadeStart.value = pageDecadeStart.value + 10;\n };\n\n const isPreviousDecadeDisabled = computed(\n () => props.min && props.min >= NeonDateUtils.dmyToIso(1, 1, Math.floor(calendar.value.pageYear / 10) * 10),\n );\n const isNextDecadeDisabled = computed(\n () => props.max && props.max <= NeonDateUtils.dmyToIso(31, 12, Math.floor(calendar.value.pageYear / 10) * 10 + 9),\n );\n\n const resetToCalendar = () => {\n monthSelectionOpen.value = false;\n yearSelectionOpen.value = false;\n };\n\n const done = () => {\n calendarOpen.value = false;\n resetToCalendar();\n };\n\n const clear = () => {\n emit('update:modelValue', null);\n calendarOpen.value = false;\n resetToCalendar();\n };\n\n const selectMonth = (month: number) => {\n pageMonth.value = month;\n monthSelectionOpen.value = false;\n };\n\n const selectYear = (year: number) => {\n pageYear.value = year;\n yearSelectionOpen.value = false;\n };\n\n const isDisabled = (isoDate: string) => {\n return (\n props.disabledDates?.indexOf(isoDate) >= 0 ||\n (props.min && props.min > isoDate) ||\n (props.max && props.max < isoDate)\n );\n };\n\n const isMonthDisabled = (year: number, month: number) => {\n const dateStr = `${year}-${month < 10 ? '0' + month : month}`;\n return (\n (minYearMonth.value && minYearMonth.value > dateStr) || (maxYearMonth.value && maxYearMonth.value < dateStr)\n );\n };\n\n const minYear = computed<number | null>(() => (props.min ? +props.min.substring(0, 4) : null));\n const minYearMonth = computed<string | null>(() => (props.min ? props.min.substring(0, 7) : null));\n const maxYear = computed<number | null>(() => (props.max ? +props.max.substring(0, 4) : null));\n const maxYearMonth = computed<string | null>(() => (props.max ? props.max.substring(0, 7) : null));\n\n const isYearDisabled = (year: number) => {\n return (minYear.value && minYear.value > year) || (maxYear.value && maxYear.value < year);\n };\n\n return {\n attrs,\n calendar,\n calendarOpen,\n dropdown,\n formattedValue,\n isChangeDateDisabled,\n isChangeYearDisabled,\n isNextDisabled,\n isNextDecadeDisabled,\n isNextYearDisabled,\n isPreviousDisabled,\n isPreviousDecadeDisabled,\n isPreviousYearDisabled,\n monthSelectionOpen,\n optional,\n today,\n calendarRef,\n yearSelectionOpen,\n changeMonth,\n changeYear,\n clear,\n done,\n emitDate,\n isDisabled,\n isoDate,\n isMonthDisabled,\n isYearDisabled,\n openCalendar,\n onNext,\n onNextDecade,\n onNextYear,\n onPrevious,\n onPreviousDecade,\n onPreviousYear,\n resetToCalendar,\n selectMonth,\n selectYear,\n };\n },\n});\n"],"names":["pageYear","pageMonth","isoDate"],"mappings":";;;;;;;;AAqBA,IAAA,YAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IAKL,YAAY,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAI1C,QAAQ,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAItC,UAAU,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,IAI1C,MAAM,EAAE,MAAM,QAA0B,SAAS,SAAS,OAAO;AAAA,IAIjE,OAAO,EAAE,MAAM,QAAqC,SAAS,oBAAoB,QAAQ;AAAA,IAIzF,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAInC,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAInC,WAAW,EAAE,MAAM,QAAuC,SAAS,sBAAsB,WAAW;AAAA,IAKpG,eAAe,EAAE,MAAM,OAA8B,SAAS,MAAM,CAAA,EAAG;AAAA,IAIvE,aAAa,EAAE,MAAM,QAAQ,UAAU,MAAM;AAAA,IAI7C,mBAAmB,EAAE,MAAM,QAAQ,SAAS,gBAAgB;AAAA,IAI5D,WAAW,EAAE,MAAM,QAAQ,SAAS,OAAO;AAAA,IAI3C,YAAY,EAAE,MAA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AE3F,UAAA,iBAAiB,CAAC,SAAiB;AAC/B,aAAA,QAAQ,SAAS,QAAQ,QAAQ,QAAU,QAAQ,SAAS,QAAQ,QAAQ;AAAA,IAAA;AAG/E,WAAA;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;;"}
1
+ {"version":3,"file":"NeonDatePicker.ts_vue_type_script_src_56e4ee8a_lang.es.js","sources":["../../../../src/components/user-input/date-picker/NeonDatePicker.ts?vue&type=script&src=56e4ee8a&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonDropdown from '@/components/presentation/dropdown/NeonDropdown.vue';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport { NeonDateUtils } from '@/common/utils/NeonDateUtils';\nimport { NeonDropdownPlacement } from '@/common/enums/NeonDropdownPlacement';\n\n/**\n * <strong>NeonDatePicker</strong> is the equivalent of the native\n * <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date\" target=\"_blank\">HTML Date Input</a>.\n * It accepts an <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> date string &\n * allows the user to select a date. Dates are formatted with the provided locale, if none is provided the browser\n * locale is used as a default. On touch devices the native date picker is presented to the user.\n *\n * The input date is displayed to the user WITHOUT any adjustment for their timezone, however 'Today' on the calendar is\n * highlighted for the user's timezone.\n *\n * This component interaction was inspired by this <a href=\"https://icehaunter.github.io/vue3-datepicker\" target=\"_blank\">vue-datepicker</a>\n */\nexport default defineComponent({\n name: 'NeonDatePicker',\n components: {\n NeonButton,\n NeonDropdown,\n NeonInput,\n },\n props: {\n /**\n * The selected date. A date string in the\n * <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format.\n */\n modelValue: { type: String, default: null },\n /**\n * The locale used for display purposes. This defaults to the browser's locale if none is provided.\n */\n locale: { type: String, default: null },\n /**\n * Disable date picker\n */\n disabled: { type: Boolean, default: false },\n /**\n * The size of the date picker, one of NeonSize.Small | NeonSize.Medium | NeonSize.Large.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * Color of the date picker\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Minimum allowed date value in the <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format.\n */\n min: { type: String, default: null },\n /**\n * Maximum allowed date value in the <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format.\n */\n max: { type: String, default: null },\n /**\n * The placement of the dropdown calendar popup.\n */\n placement: { type: String as () => NeonDropdownPlacement, default: NeonDropdownPlacement.BottomLeft },\n /**\n * Disabled dates, a list of <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601</a> format\n * dates for which to disable selection.\n */\n disabledDates: { type: Array as () => Array<string>, default: () => [] },\n /**\n * This is the placeholder for the text input when no value is provided.\n */\n placeholder: { type: String, required: false },\n /**\n * This is the label of the input field which opens the calendar. This is technically a button.\n */\n openCalendarLabel: { type: String, default: 'Open calendar' },\n /**\n * This is the label of the 'Done' button in the calendar popup.\n */\n doneLabel: { type: String, default: 'Done' },\n /**\n * This is the label of the 'Clear' button in the calendar popup.\n */\n clearLabel: { type: String, default: 'Clear' },\n /**\n * This is the ARIA label of the 'Change month' button in the calendar popup.\n */\n changeMonthLabel: { type: String, default: 'Change month' },\n /**\n * This is the ARIA label of the 'Previous month' button in the calendar popup.\n */\n previousMonthLabel: { type: String, default: 'Previous month' },\n /**\n * This is the ARIA label of the 'Next month' button in the calendar popup.\n */\n nextMonthLabel: { type: String, default: 'Next month' },\n /**\n * This is the ARIA label of the 'Change year' button in the calendar popup.\n */\n changeYearLabel: { type: String, default: 'Change year' },\n /**\n * This is the ARIA label of the 'Previous year' button in the calendar popup.\n */\n previousYearLabel: { type: String, default: 'Previous year' },\n /**\n * This is the ARIA label of the 'Next year' button in the calendar popup.\n */\n nextYearLabel: { type: String, default: 'Next year' },\n /**\n * This is the ARIA label of the 'Previous decade' button in the calendar popup.\n */\n previousDecadeLabel: { type: String, default: 'Previous decade' },\n /**\n * This is the ARIA label of the 'Next decade' button in the calendar popup.\n */\n nextDecadeLabel: { type: String, default: 'Next decade' },\n },\n setup(props, { emit }) {\n const attrs = useAttrs();\n const optional = !attrs.required;\n\n const dropdown = ref<HTMLElement | null>(null);\n const calendarRef = ref<HTMLElement | null>(null);\n const calendarOpen = ref<boolean>(false);\n const monthSelectionOpen = ref<boolean>(false);\n const yearSelectionOpen = ref<boolean>(false);\n\n const formattedValue = computed(() => {\n if (props.modelValue) {\n const formattedDate = NeonDateUtils.stringToNeonDate(props.modelValue, props.locale, true);\n if (formattedDate) {\n const { dayFormatted, monthShortName, yearFormatted } = formattedDate;\n return `${dayFormatted} ${monthShortName} ${yearFormatted}`;\n }\n }\n\n return '';\n });\n\n const isoDate = (day: number, month: number, year: number) => NeonDateUtils.dmyToIso(day, month, year);\n\n const todayDate = new Date();\n const locale = props.locale || navigator.language;\n\n const pageMonth = ref(\n props.modelValue ? +props.modelValue.substring(5, 7) : +todayDate.toLocaleString(locale, { month: 'numeric' }),\n );\n const pageYear = ref(\n props.modelValue ? +props.modelValue.substring(0, 4) : +todayDate.toLocaleString(locale, { year: 'numeric' }),\n );\n const pageDecadeStart = ref(Math.floor(pageYear.value / 10) * 10);\n\n const calendar = computed(() =>\n NeonDateUtils.toCalendarConfiguration(\n props.modelValue,\n pageMonth.value,\n pageYear.value,\n pageDecadeStart.value,\n props.locale,\n ),\n );\n\n const today = computed(() => {\n const { day, month, year } = calendar.value.today;\n return NeonDateUtils.dmyToIso(day, month, year);\n });\n\n const openCalendar = () => {\n if (!props.disabled) {\n calendarOpen.value = true;\n if (calendarRef.value) {\n const selected = calendarRef.value.querySelector('.neon-date-picker__calendar-date--selected') as HTMLElement;\n if (selected) {\n setTimeout(() => selected.focus());\n }\n }\n }\n };\n\n const emitDate = (newDate: string) => {\n emit('update:modelValue', newDate);\n };\n\n const onPrevious = () => {\n if (pageMonth.value === 1) {\n pageMonth.value = 12;\n pageYear.value = pageYear.value - 1;\n } else {\n pageMonth.value = pageMonth.value - 1;\n }\n };\n\n const onNext = () => {\n if (pageMonth.value === 12) {\n pageMonth.value = 1;\n pageYear.value = pageYear.value + 1;\n } else {\n pageMonth.value = pageMonth.value + 1;\n }\n };\n\n const changeMonth = () => {\n monthSelectionOpen.value = true;\n };\n\n const isPreviousDisabled = computed(\n () => props.min && props.min >= NeonDateUtils.dmyToIso(1, calendar.value.pageMonth, calendar.value.pageYear),\n );\n const isNextDisabled = computed(() => {\n const { pageYear, pageMonth, lastDayOfMonth } = calendar.value;\n return props.max && props.max <= NeonDateUtils.dmyToIso(lastDayOfMonth, pageMonth, pageYear);\n });\n const isChangeDateDisabled = computed(() => isPreviousDisabled.value && isNextDisabled.value);\n\n const onPreviousYear = () => {\n pageYear.value = pageYear.value - 1;\n };\n\n const onNextYear = () => {\n pageYear.value = pageYear.value + 1;\n };\n\n const changeYear = () => {\n yearSelectionOpen.value = true;\n };\n\n const isPreviousYearDisabled = computed(\n () => props.min && props.min >= NeonDateUtils.dmyToIso(1, 1, calendar.value.pageYear),\n );\n const isNextYearDisabled = computed(\n () => props.max && props.max <= NeonDateUtils.dmyToIso(31, 12, calendar.value.pageYear),\n );\n const isChangeYearDisabled = computed(() => isPreviousYearDisabled.value && isNextYearDisabled.value);\n\n const onPreviousDecade = () => {\n pageDecadeStart.value = pageDecadeStart.value - 10;\n };\n\n const onNextDecade = () => {\n pageDecadeStart.value = pageDecadeStart.value + 10;\n };\n\n const isPreviousDecadeDisabled = computed(\n () => props.min && props.min >= NeonDateUtils.dmyToIso(1, 1, Math.floor(calendar.value.pageYear / 10) * 10),\n );\n const isNextDecadeDisabled = computed(\n () => props.max && props.max <= NeonDateUtils.dmyToIso(31, 12, Math.floor(calendar.value.pageYear / 10) * 10 + 9),\n );\n\n const resetToCalendar = () => {\n monthSelectionOpen.value = false;\n yearSelectionOpen.value = false;\n };\n\n const done = () => {\n calendarOpen.value = false;\n resetToCalendar();\n };\n\n const clear = () => {\n emit('update:modelValue', null);\n calendarOpen.value = false;\n resetToCalendar();\n };\n\n const selectMonth = (month: number) => {\n pageMonth.value = month;\n monthSelectionOpen.value = false;\n };\n\n const selectYear = (year: number) => {\n pageYear.value = year;\n yearSelectionOpen.value = false;\n };\n\n const isDisabled = (isoDate: string) => {\n return (\n props.disabledDates?.indexOf(isoDate) >= 0 ||\n (props.min && props.min > isoDate) ||\n (props.max && props.max < isoDate)\n );\n };\n\n const isMonthDisabled = (year: number, month: number) => {\n const dateStr = `${year}-${month < 10 ? '0' + month : month}`;\n return (\n (minYearMonth.value && minYearMonth.value > dateStr) || (maxYearMonth.value && maxYearMonth.value < dateStr)\n );\n };\n\n const minYear = computed<number | null>(() => (props.min ? +props.min.substring(0, 4) : null));\n const minYearMonth = computed<string | null>(() => (props.min ? props.min.substring(0, 7) : null));\n const maxYear = computed<number | null>(() => (props.max ? +props.max.substring(0, 4) : null));\n const maxYearMonth = computed<string | null>(() => (props.max ? props.max.substring(0, 7) : null));\n\n const isYearDisabled = (year: number) => {\n return (minYear.value && minYear.value > year) || (maxYear.value && maxYear.value < year);\n };\n\n return {\n attrs,\n calendar,\n calendarOpen,\n dropdown,\n formattedValue,\n isChangeDateDisabled,\n isChangeYearDisabled,\n isNextDisabled,\n isNextDecadeDisabled,\n isNextYearDisabled,\n isPreviousDisabled,\n isPreviousDecadeDisabled,\n isPreviousYearDisabled,\n monthSelectionOpen,\n optional,\n today,\n calendarRef,\n yearSelectionOpen,\n changeMonth,\n changeYear,\n clear,\n done,\n emitDate,\n isDisabled,\n isoDate,\n isMonthDisabled,\n isYearDisabled,\n openCalendar,\n onNext,\n onNextDecade,\n onNextYear,\n onPrevious,\n onPreviousDecade,\n onPreviousYear,\n resetToCalendar,\n selectMonth,\n selectYear,\n };\n },\n});\n"],"names":["pageYear","pageMonth","isoDate"],"mappings":";;;;;;;;AAqBA,IAAA,YAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IAKL,YAAY,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAI1C,QAAQ,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAItC,UAAU,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,IAI1C,MAAM,EAAE,MAAM,QAA0B,SAAS,SAAS,OAAO;AAAA,IAIjE,OAAO,EAAE,MAAM,QAAqC,SAAS,oBAAoB,QAAQ;AAAA,IAIzF,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAInC,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAInC,WAAW,EAAE,MAAM,QAAuC,SAAS,sBAAsB,WAAW;AAAA,IAKpG,eAAe,EAAE,MAAM,OAA8B,SAAS,MAAM,CAAA,EAAG;AAAA,IAIvE,aAAa,EAAE,MAAM,QAAQ,UAAU,MAAM;AAAA,IAI7C,mBAAmB,EAAE,MAAM,QAAQ,SAAS,gBAAgB;AAAA,IAI5D,WAAW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MAAO,MAAM,MAAM,MAAM,IAAI,UAAU,GAAG,CAAC,IAAI,IAAK;AAE3F,UAAA,iBAAiB,CAAC,SAAiB;AAC/B,aAAA,QAAQ,SAAS,QAAQ,QAAQ,QAAU,QAAQ,SAAS,QAAQ,QAAQ;AAAA,IAAA;AAG/E,WAAA;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;;"}
@@ -1,2 +1,2 @@
1
- "use strict";var a=require("./NeonInput.ts_vue_type_script_src_62c5c4a9_lang.cjs.js"),n=require("vue"),d=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const r=["id","aria-placeholder","disabled","placeholder","tabindex","type","value"],s=["id","aria-placeholder","disabled","placeholder","rows","tabindex","value"],u={key:3,class:"neon-input__textarea-counter"};function t(e,o,m,b,h,g){const i=n.resolveComponent("neon-icon");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([[{"neon-input--with-icon":!e.hideIcon&&(e.icon||e.modelValue&&e.modelValue.length>0),"neon-input--disabled":e.disabled,"neon-input--focused":e.focused,"neon-input--placeholder-visible":e.placeholder&&(!e.modelValue||e.modelValue.length===0),"neon-input--with-state-highlight":e.stateHighlight,"neon-input--with-state-icon":e.stateIcon},`neon-input--${e.size}`,`neon-input--${e.color}`,`neon-input--state-${e.state}`],"neon-input"])},[e.rows?(n.openBlock(),n.createElementBlock("textarea",n.mergeProps({key:1,id:e.id,"aria-placeholder":e.computedPlaceholder,disabled:e.disabled,placeholder:e.computedPlaceholder,rows:e.rows,tabindex:e.tabindex,value:e.modelValue,class:"neon-input__textfield neon-input__textarea"},e.sanitizedAttributes,{onBlur:o[3]||(o[3]=(...l)=>e.onBlur&&e.onBlur(...l)),onFocus:o[4]||(o[4]=(...l)=>e.onFocus&&e.onFocus(...l)),onInput:o[5]||(o[5]=n.withModifiers((...l)=>e.changeValue&&e.changeValue(...l),["stop","prevent"]))}),null,16,s)):(n.openBlock(),n.createElementBlock("input",n.mergeProps({key:0,id:e.id,ref:"neonInput","aria-placeholder":e.computedPlaceholder,disabled:e.disabled,placeholder:e.computedPlaceholder,tabindex:e.tabindex,type:e.type,value:e.modelValue,class:"neon-input__textfield neon-input__text"},e.sanitizedAttributes,{onBlur:o[0]||(o[0]=(...l)=>e.onBlur&&e.onBlur(...l)),onFocus:o[1]||(o[1]=l=>!e.disabled&&e.onFocus()),onInput:o[2]||(o[2]=n.withModifiers(l=>!e.disabled&&e.changeValue(l),["stop","prevent"]))}),null,16,r)),e.iconVisible?(n.openBlock(),n.createBlock(i,{key:2,class:n.normalizeClass([{"neon-input__icon--read-only":e.iconReadonly},"neon-input__icon"]),color:e.iconColor,disabled:e.disabled,name:e.iconName,role:!e.iconReadonly&&"button",tabindex:e.disabled||!e.icon||e.iconReadonly?!1:0,onClick:o[6]||(o[6]=l=>!e.iconReadonly&&e.iconClicked(l)),onKeydown:[o[7]||(o[7]=n.withKeys(l=>!e.iconReadonly&&e.iconClicked(l),["enter"])),o[8]||(o[8]=n.withKeys(l=>!e.iconReadonly&&e.iconClicked(l),["space"]))]},null,8,["class","color","disabled","name","role","tabindex"])):n.createCommentVNode("",!0),e.maxlength&&e.maxlength>0?(n.openBlock(),n.createElementBlock("span",u,n.toDisplayString(`${e.modelValue.length}/${e.maxlength}`),1)):n.createCommentVNode("",!0)],2)}var p=d(a,[["render",t]]);module.exports=p;
1
+ "use strict";var a=require("./NeonInput.ts_vue_type_script_src_2bebb33c_lang.cjs.js"),n=require("vue"),d=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const r=["id","aria-placeholder","disabled","placeholder","tabindex","type","value"],s=["id","aria-placeholder","disabled","placeholder","rows","tabindex","value"],t={key:3,class:"neon-input__textarea-counter"};function u(e,o,b,m,h,g){const i=n.resolveComponent("neon-icon");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([[{"neon-input--with-icon":!e.hideIcon&&(e.icon||e.modelValue&&e.modelValue.length>0),"neon-input--disabled":e.disabled,"neon-input--focused":e.focused,"neon-input--placeholder-visible":e.placeholder&&(!e.modelValue||e.modelValue.length===0),"neon-input--with-state-highlight":e.stateHighlight,"neon-input--with-state-icon":e.stateIcon},`neon-input--${e.size}`,`neon-input--${e.color}`,`neon-input--state-${e.state}`],"neon-input"])},[e.rows?(n.openBlock(),n.createElementBlock("textarea",n.mergeProps({key:1,id:e.id,"aria-placeholder":e.computedPlaceholder,disabled:e.disabled,placeholder:e.computedPlaceholder,rows:e.rows,tabindex:e.tabindex,value:e.modelValue,class:"neon-input__textfield neon-input__textarea"},e.sanitizedAttributes,{onBlur:o[3]||(o[3]=(...l)=>e.onBlur&&e.onBlur(...l)),onFocus:o[4]||(o[4]=(...l)=>e.onFocus&&e.onFocus(...l)),onInput:o[5]||(o[5]=n.withModifiers((...l)=>e.changeValue&&e.changeValue(...l),["stop","prevent"]))}),null,16,s)):(n.openBlock(),n.createElementBlock("input",n.mergeProps({key:0,id:e.id,ref:"neonInput","aria-placeholder":e.computedPlaceholder,disabled:e.disabled,placeholder:e.computedPlaceholder,tabindex:e.tabindex,type:e.type,value:e.modelValue,class:"neon-input__textfield neon-input__text"},e.sanitizedAttributes,{onBlur:o[0]||(o[0]=(...l)=>e.onBlur&&e.onBlur(...l)),onFocus:o[1]||(o[1]=l=>!e.disabled&&e.onFocus()),onInput:o[2]||(o[2]=n.withModifiers(l=>!e.disabled&&e.changeValue(l),["stop","prevent"]))}),null,16,r)),e.iconVisible?(n.openBlock(),n.createBlock(i,{key:2,class:n.normalizeClass([{"neon-input__icon--read-only":e.iconReadonly},"neon-input__icon"]),color:e.iconColor,disabled:e.disabled,name:e.iconName,role:!e.iconReadonly&&"button",tabindex:e.disabled||e.iconReadonly?!1:0,transparent:!0,onClick:o[6]||(o[6]=l=>!e.iconReadonly&&e.iconClicked(l)),onKeydown:[o[7]||(o[7]=n.withKeys(l=>!e.iconReadonly&&e.iconClicked(l),["enter"])),o[8]||(o[8]=n.withKeys(l=>!e.iconReadonly&&e.iconClicked(l),["space"]))]},null,8,["class","color","disabled","name","role","tabindex"])):n.createCommentVNode("",!0),e.maxlength&&e.maxlength>0?(n.openBlock(),n.createElementBlock("span",t,n.toDisplayString(`${e.modelValue.length}/${e.maxlength}`),1)):n.createCommentVNode("",!0)],2)}var p=d(a,[["render",u]]);module.exports=p;
2
2
  //# sourceMappingURL=NeonInput.cjs.js.map
@@ -1,4 +1,4 @@
1
- import _sfc_main from "./NeonInput.ts_vue_type_script_src_62c5c4a9_lang.es.js";
1
+ import _sfc_main from "./NeonInput.ts_vue_type_script_src_2bebb33c_lang.es.js";
2
2
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, mergeProps, withModifiers, createBlock, withKeys, createCommentVNode, toDisplayString } from "vue";
3
3
  import _export_sfc from "../../../_virtual/plugin-vue_export-helper.es.js";
4
4
  const _hoisted_1 = ["id", "aria-placeholder", "disabled", "placeholder", "tabindex", "type", "value"];
@@ -61,7 +61,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
61
61
  disabled: _ctx.disabled,
62
62
  name: _ctx.iconName,
63
63
  role: !_ctx.iconReadonly && "button",
64
- tabindex: _ctx.disabled || !_ctx.icon || _ctx.iconReadonly ? false : 0,
64
+ tabindex: _ctx.disabled || _ctx.iconReadonly ? false : 0,
65
+ transparent: true,
65
66
  onClick: _cache[6] || (_cache[6] = ($event) => !_ctx.iconReadonly && _ctx.iconClicked($event)),
66
67
  onKeydown: [
67
68
  _cache[7] || (_cache[7] = withKeys(($event) => !_ctx.iconReadonly && _ctx.iconClicked($event), ["enter"])),
@@ -1 +1 @@
1
- {"version":3,"file":"NeonInput.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NeonInput.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
1
  "use strict";var n=require("vue"),a=require("../../../common/enums/NeonInputType.cjs.js"),o=require("../../../common/enums/NeonState.cjs.js"),w=require("../../../common/enums/NeonSize.cjs.js"),c=require("../../../common/enums/NeonFunctionalColor.cjs.js"),F=require("../../presentation/icon/NeonIcon.cjs.js"),k=require("../../../common/utils/NeonDebounceUtils.cjs.js"),B=n.defineComponent({name:"NeonInput",components:{NeonIcon:F},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:w.NeonSize.Medium},color:{type:String,default:c.NeonFunctionalColor.LowContrast},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:300}},emits:["focus","blur","icon-click","update:modelValue"],setup(e,{emit:u}){const f=n.useAttrs(),r=n.ref(null),i=n.ref(!1),N=n.computed(()=>{const{onBlur:t,onFocus:l,onIconClick:s,...V}=f;return V}),d=k.NeonDebounceUtils.debounce(t=>{u("update:modelValue",t)},e.debounce),m=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}}),y=n.computed(()=>m.value&&!e.hideIcon&&(e.state!=="ready"||e.icon||e.modelValue&&!e.disabled&&e.modelValue.length>0)),g=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}}),S=()=>{var t;(t=r.value)==null||t.focus()},h=()=>{var t;(t=r.value)==null||t.click()},v=()=>{i.value=!0,u("focus")},b=()=>{i.value=!1,u("blur")},I=t=>{e.disabled||(e.icon?u("icon-click"):d(""),t.preventDefault(),t.stopPropagation())},j=t=>{const l=t.target.value,s=e.maxlength&&l.length>e.maxlength?l.substring(0,e.maxlength):l;e.modelValue!==s&&d(s)},C=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:r,focused:i,sanitizedAttributes:N,iconVisible:y,iconName:m,iconColor:g,computedPlaceholder:C,focus:S,click:h,onFocus:v,onBlur:b,iconClicked:I,changeValue:j}}});module.exports=B;
2
- //# sourceMappingURL=NeonInput.ts_vue_type_script_src_62c5c4a9_lang.cjs.js.map
2
+ //# sourceMappingURL=NeonInput.ts_vue_type_script_src_2bebb33c_lang.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonInput.ts_vue_type_script_src_62c5c4a9_lang.cjs.js","sources":["../../../../src/components/user-input/input/NeonInput.ts?vue&type=script&src=62c5c4a9&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';\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 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, set to 0 to disable.\n */\n debounce: { type: Number, default: 300 },\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: InputEvent) => {\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 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 };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonInputType","NeonSize","NeonFunctionalColor","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","computedPlaceholder"],"mappings":"gXAWAA,EAAeC,kBAAgB,CAC7B,KAAM,YACN,WAAY,CACV,SAAAC,CACF,EACA,MAAO,CAIL,GAAI,CAAE,KAAM,OAAQ,QAAS,IAAK,EAIlC,WAAY,CAAE,KAAM,OAAQ,QAAS,IAAK,EAM1C,KAAM,CAAE,KAAM,OAA+B,QAASC,EAAAA,cAAc,IAAK,EAIzE,YAAa,CAAE,KAAM,OAAQ,QAAS,IAAK,EAI3C,KAAM,CAAE,KAAM,OAA0B,QAASC,EAAAA,SAAS,MAAO,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AQ,EACA,QAAAE,EACA,oBAAAC,EACA,YAAAU,EACA,SAAAD,EACA,UAAAE,EACA,oBAAAU,EACA,MAAAT,EACA,MAAAE,EACA,QAAAX,EACA,OAAAD,EACA,YAAAa,EACA,YAAAE,CAAA,CAEJ,CACF,CAAC"}
1
+ {"version":3,"file":"NeonInput.ts_vue_type_script_src_2bebb33c_lang.cjs.js","sources":["../../../../src/components/user-input/input/NeonInput.ts?vue&type=script&src=2bebb33c&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';\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 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, set to 0 to disable.\n */\n debounce: { type: Number, default: 300 },\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: InputEvent) => {\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 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 };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonInputType","NeonSize","NeonFunctionalColor","NeonState","props","emit","attrs","useAttrs","neonInput","ref","focused","sanitizedAttributes","computed","onBlur","onFocus","onIconClick","sanitized","emitModelValue","NeonDebounceUtils","value","iconName","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EAAM,OAA4B,MACzCE,EAAI3B,EAAM,WAAa0B,EAAI,OAAS1B,EAAM,UAAY0B,EAAI,UAAU,EAAG1B,EAAM,SAAS,EAAI0B,EAC5F1B,EAAM,aAAe2B,GACvBd,EAAec,CAAC,CAClB,EAGIC,EAAsBpB,EAAAA,SAAS,IAAM,CACzC,GAAIR,EAAM,YACR,OAAOA,EAAM,YAEb,OAAQA,EAAM,WACPJ,EAAc,cAAA,MACV,MAAA,yBACJA,EAAc,cAAA,IACV,MAAA,oBACJA,EAAc,cAAA,IACV,MAAA,qCAEA,MAAA,GAEb,CACD,EAEM,MAAA,CACL,UAAAQ,EACA,QAAAE,EACA,oBAAAC,EACA,YAAAU,EACA,SAAAD,EACA,UAAAE,EACA,oBAAAU,EACA,MAAAT,EACA,MAAAE,EACA,QAAAX,EACA,OAAAD,EACA,YAAAa,EACA,YAAAE,CAAA,CAEJ,CACF,CAAC"}
@@ -151,4 +151,4 @@ var _sfc_main = defineComponent({
151
151
  }
152
152
  });
153
153
  export { _sfc_main as default };
154
- //# sourceMappingURL=NeonInput.ts_vue_type_script_src_62c5c4a9_lang.es.js.map
154
+ //# sourceMappingURL=NeonInput.ts_vue_type_script_src_2bebb33c_lang.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonInput.ts_vue_type_script_src_62c5c4a9_lang.es.js","sources":["../../../../src/components/user-input/input/NeonInput.ts?vue&type=script&src=62c5c4a9&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';\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 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, set to 0 to disable.\n */\n debounce: { type: Number, default: 300 },\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: InputEvent) => {\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 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 };\n },\n});\n"],"names":["onBlur","onFocus"],"mappings":";;;;;;;AAWA,IAAA,YAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IAIL,IAAI,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAIlC,YAAY,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAM1C,MAAM,EAAE,MAAM,QAA+B,SAAS,cAAc,KAAK;AAAA,IAIzE,aAAa,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAI3C,MAAM,EAAE,MAAM,QAA0B,SAAS,SAAS,OAAO;AAAA,IAIjE,OAAO,EAAE,MAAM,QAAqC,SAAS,oBAAoB,YAAY;AAAA,IAI7F,OAAO,EAAE,MAAM,QAA2B,SAAS,UAAU,MAAM;AAAA,IAInE,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAKpC,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAIpC,cAAc,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,IAI9C,UAAU,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,IAI1C,UAAU,EAAE,MAAM,QAAQ,SAAS,EAAE;AAAA,IAIrC,UAAU,EAAE,MAAM,SAAS,SA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A;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;;"}
1
+ {"version":3,"file":"NeonInput.ts_vue_type_script_src_2bebb33c_lang.es.js","sources":["../../../../src/components/user-input/input/NeonInput.ts?vue&type=script&src=2bebb33c&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';\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 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, set to 0 to disable.\n */\n debounce: { type: Number, default: 300 },\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: InputEvent) => {\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 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 };\n },\n});\n"],"names":["onBlur","onFocus"],"mappings":";;;;;;;AAWA,IAAA,YAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IAIL,IAAI,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IAIlC,YAAY,EAAE,MAAM,QAAQ,SAAS,KAAK;AAA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,UAAA,cAAc,CAAC,UAAsB;AACnC,YAAA,MAAO,MAAM,OAA4B;AAC/C,YAAM,IAAI,MAAM,aAAa,IAAI,SAAS,MAAM,YAAY,IAAI,UAAU,GAAG,MAAM,SAAS,IAAI;AAC5F,UAAA,MAAM,eAAe,GAAG;AAC1B,uBAAe,CAAC;AAAA,MAClB;AAAA,IAAA;AAGI,UAAA,sBAAsB,SAAS,MAAM;AACzC,UAAI,MAAM,aAAa;AACrB,eAAO,MAAM;AAAA,MAAA,OACR;AACL,gBAAQ,MAAM;AAAA,eACP,cAAc;AACV,mBAAA;AAAA,eACJ,cAAc;AACV,mBAAA;AAAA,eACJ,cAAc;AACV,mBAAA;AAAA;AAEA,mBAAA;AAAA;AAAA,MAEb;AAAA,IAAA,CACD;AAEM,WAAA;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;;"}
@@ -0,0 +1,6 @@
1
+ export declare enum NeonAlertLevel {
2
+ Info = "info",
3
+ Success = "success",
4
+ Warn = "warn",
5
+ Error = "error"
6
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NeonAlertPlacement {
2
+ TopLeft = "top-left",
3
+ TopRight = "top-right",
4
+ BottomLeft = "bottom-left",
5
+ BottomRight = "bottom-right"
6
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NeonButtonSize {
2
+ Small = "s",
3
+ Medium = "m",
4
+ Large = "l",
5
+ ExtraLarge = "xl"
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum NeonButtonStyle {
2
+ Solid = "solid",
3
+ Outline = "outline",
4
+ Text = "text"
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonChipAction {
2
+ Click = "click",
3
+ Remove = "remove"
4
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum NeonDropdownPlacement {
2
+ TopLeft = "top-left",
3
+ TopRight = "top-right",
4
+ BottomLeft = "bottom-left",
5
+ BottomRight = "bottom-right",
6
+ LeftTop = "left-top",
7
+ LeftBottom = "left-bottom",
8
+ RightTop = "right-top",
9
+ RightBottom = "right-bottom"
10
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NeonDropdownStyle {
2
+ SolidButton = "solid-button",
3
+ Text = "text-button",
4
+ SquareBadge = "square-badge",
5
+ CircularBadge = "circular-badge"
6
+ }
@@ -0,0 +1,11 @@
1
+ export declare enum NeonFunctionalColor {
2
+ LowContrast = "low-contrast",
3
+ Neutral = "neutral",
4
+ HighContrast = "high-contrast",
5
+ Brand = "brand",
6
+ Primary = "primary",
7
+ Info = "info",
8
+ Success = "success",
9
+ Warn = "warn",
10
+ Error = "error"
11
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonHorizontalPosition {
2
+ Left = "left",
3
+ Right = "right"
4
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum NeonInputMode {
2
+ None = "none",
3
+ Text = "text",
4
+ Decimal = "decimal",
5
+ Numeric = "numeric",
6
+ Tel = "tel",
7
+ Search = "search",
8
+ Email = "email",
9
+ Url = "url"
10
+ }
@@ -0,0 +1,14 @@
1
+ export declare enum NeonInputType {
2
+ Date = "date",
3
+ DateTime = "datetime-local",
4
+ Email = "email",
5
+ File = "file",
6
+ Number = "number",
7
+ Password = "password",
8
+ Range = "range",
9
+ Search = "search",
10
+ Tel = "tel",
11
+ Text = "text",
12
+ Time = "time",
13
+ Url = "url"
14
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonLabelSize {
2
+ ExtraSmall = "xs",
3
+ Small = "s"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonMode {
2
+ Light = "light",
3
+ Dark = "dark"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonOrientation {
2
+ Vertical = "vertical",
3
+ Horizontal = "horizontal"
4
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum NeonOutlineStyle {
2
+ None = "none",
3
+ Text = "text",
4
+ Border = "border",
5
+ Background = "background",
6
+ Bullet = "bullet"
7
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NeonPlacement {
2
+ Top = "top",
3
+ Left = "left",
4
+ Bottom = "bottom",
5
+ Right = "right"
6
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NeonPosition {
2
+ Top = "top",
3
+ Left = "left",
4
+ Bottom = "bottom",
5
+ Right = "right"
6
+ }
@@ -0,0 +1,11 @@
1
+ export declare enum NeonResponsive {
2
+ All = "all",
3
+ Desktop = "desktop",
4
+ DesktopLarge = "desktop-l",
5
+ LargerThanTablet = "larger-than-tablet",
6
+ Tablet = "tablet",
7
+ LargerThanMobileLarge = "larger-than-mobile-l",
8
+ MobileLarge = "mobile-l",
9
+ LargerThanMobile = "larger-than-mobile",
10
+ Mobile = "mobile"
11
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum NeonSize {
2
+ Small = "s",
3
+ Medium = "m",
4
+ Large = "l"
5
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NeonSplashLoaderSize {
2
+ Small = "s",
3
+ Medium = "m",
4
+ Large = "l",
5
+ ExtraLarge = "xl"
6
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NeonState {
2
+ Ready = "ready",
3
+ Loading = "loading",
4
+ Success = "success",
5
+ Error = "error"
6
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonSwitchStyle {
2
+ Switch = "switch",
3
+ Checkbox = "checkbox"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonToggleStyle {
2
+ Toggle = "toggle",
3
+ RadioButtons = "radio-buttons"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonTooltipStyle {
2
+ Tooltip = "tooltip",
3
+ Popover = "popover"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NeonVerticalPosition {
2
+ Top = "top",
3
+ Bottom = "bottom"
4
+ }
@@ -0,0 +1,7 @@
1
+ export interface NeonActionMenuModel {
2
+ label: string;
3
+ key: string;
4
+ count?: number;
5
+ selected?: boolean;
6
+ disabled?: boolean;
7
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Provide actions for users to click in alerts.
3
+ */
4
+ export interface NeonAlertAction {
5
+ /**
6
+ * Label of the action. Keep it short! ~9 chars is the limit.
7
+ */
8
+ label: string;
9
+ /**
10
+ * Called when the user clicks on the action.
11
+ */
12
+ callback: () => void;
13
+ }
@@ -0,0 +1,38 @@
1
+ import type { NeonAlertPlacement } from '../enums/NeonAlertPlacement';
2
+ import type { NeonAlertAction } from './NeonAlertAction';
3
+ /**
4
+ * An alert message.
5
+ */
6
+ export interface NeonAlertMessage {
7
+ /**
8
+ * Optional title of the alert.
9
+ */
10
+ title?: string;
11
+ /**
12
+ * Optional body message.
13
+ */
14
+ message?: string;
15
+ /**
16
+ * Placement of the message. Default is top-right.
17
+ */
18
+ placement?: NeonAlertPlacement;
19
+ /**
20
+ * Duration to display the message (default = 2500ms). Set to 0 for the message to never expire (make sure it's
21
+ * dismissible).
22
+ */
23
+ duration?: number;
24
+ /**
25
+ * Whether the message can be dismissed by a user click. Default is true.
26
+ */
27
+ dismissible?: boolean;
28
+ /**
29
+ * Provide an action for the user to click on an alert. Actions consist of a label to display for the action and a
30
+ * callback which is invoked when the user clicks on the action. When a user clicks on an action the alert will also
31
+ * be dismissed.
32
+ */
33
+ primaryAction?: NeonAlertAction;
34
+ /**
35
+ * A second action can be provided to the user.
36
+ */
37
+ secondaryAction?: NeonAlertAction;
38
+ }
@@ -0,0 +1,9 @@
1
+ import type { NeonPosition } from '../enums/NeonPosition';
2
+ export declare type NeonAvailableSpace = {
3
+ [key in NeonPosition]: number;
4
+ } & {
5
+ top: number;
6
+ bottom: number;
7
+ left: number;
8
+ right: number;
9
+ };
@@ -0,0 +1,13 @@
1
+ import type { NeonDate } from '@/common/models/NeonDate';
2
+ export interface NeonCalendarConfig {
3
+ today: NeonDate;
4
+ selected?: NeonDate;
5
+ pageMonth: number;
6
+ pageMonthName: string;
7
+ pageYear: number;
8
+ pageDecadeStart: number;
9
+ dowNames: Array<string>;
10
+ dates: Array<Array<number | null>>;
11
+ lastDayOfMonth: number;
12
+ months: Array<string>;
13
+ }
@@ -0,0 +1,7 @@
1
+ export interface NeonContrastAccessibility {
2
+ normalAA: boolean;
3
+ normalAAA: boolean;
4
+ largeAA: boolean;
5
+ largeAAA: boolean;
6
+ ratio: number;
7
+ }
@@ -0,0 +1,10 @@
1
+ export interface NeonDate {
2
+ year: number;
3
+ yearFormatted: string;
4
+ month: number;
5
+ monthShortName: string;
6
+ monthLongName: string;
7
+ day: number;
8
+ dayFormatted: string;
9
+ time?: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ export interface NeonDropdownMenuItem {
2
+ key: string;
3
+ label: string;
4
+ href?: string;
5
+ icon?: string;
6
+ separatorBefore?: boolean;
7
+ disabled?: boolean;
8
+ isGroup?: boolean;
9
+ grouped?: boolean;
10
+ }
@@ -0,0 +1,23 @@
1
+ import { NeonPlacement } from '../enums/NeonPlacement';
2
+ import { NeonDropdownPlacement } from '../enums/NeonDropdownPlacement';
3
+ export declare class NeonDropdownPlacementObject {
4
+ static TopLeft: NeonDropdownPlacementObject;
5
+ static TopRight: NeonDropdownPlacementObject;
6
+ static BottomLeft: NeonDropdownPlacementObject;
7
+ static BottomRight: NeonDropdownPlacementObject;
8
+ static LeftTop: NeonDropdownPlacementObject;
9
+ static LeftBottom: NeonDropdownPlacementObject;
10
+ static RightTop: NeonDropdownPlacementObject;
11
+ static RightBottom: NeonDropdownPlacementObject;
12
+ private static PLACEMENTS;
13
+ private static FLIP_MAJOR;
14
+ private static FLIP_MINOR;
15
+ placement: NeonDropdownPlacement;
16
+ majorPlacement: NeonPlacement;
17
+ minorPlacement?: NeonPlacement;
18
+ private constructor();
19
+ static toNeonDropdownPlacementObject(placement: NeonDropdownPlacement): NeonDropdownPlacementObject;
20
+ static flipMajor(placement: NeonDropdownPlacementObject): NeonDropdownPlacementObject;
21
+ static flipMinor(placement: NeonDropdownPlacementObject): NeonDropdownPlacementObject;
22
+ static flip(placement: NeonDropdownPlacementObject): NeonDropdownPlacementObject;
23
+ }