@nmorph/nmorph-ui-kit 2.2.37 → 2.2.39

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 (239) hide show
  1. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +4 -4
  2. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +12 -10
  3. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +19 -16
  4. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  5. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +30 -26
  6. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +42 -40
  7. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +16 -13
  8. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +24 -21
  9. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +23 -21
  10. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +43 -42
  11. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +47 -45
  12. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +18 -14
  13. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +15 -11
  14. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +15 -12
  15. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +44 -40
  16. package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue2.js +1 -1
  17. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +21 -19
  18. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +27 -24
  19. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +19 -15
  20. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +10 -8
  21. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +25 -23
  22. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +66 -64
  23. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
  24. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +28 -26
  25. package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +25 -20
  26. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue.js +18 -22
  27. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +52 -42
  28. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +52 -40
  29. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
  30. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +20 -16
  31. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +96 -98
  32. package/dist/components/form/nmorph-form/NmorphForm.vue2.js +9 -9
  33. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.css +1 -1
  34. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +33 -24
  35. package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +4 -4
  36. package/dist/components/form/nmorph-form/use-form-item-input.js +29 -8
  37. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +41 -35
  38. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +65 -61
  39. package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
  40. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
  41. package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +24 -22
  42. package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
  43. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +90 -78
  44. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +21 -18
  45. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +31 -25
  46. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +50 -49
  47. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +35 -32
  48. package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -1
  49. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +17 -17
  50. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +41 -35
  51. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +13 -13
  52. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +38 -32
  53. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +17 -17
  54. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +79 -71
  55. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +25 -23
  56. package/dist/hooks/use-field-validation.js +56 -43
  57. package/dist/hooks/use-focusable-input.js +27 -0
  58. package/dist/hooks/use-form-validation.js +62 -24
  59. package/dist/hooks/use-nmorph-translation.js +4 -4
  60. package/dist/index.es.js +842 -837
  61. package/dist/index.umd.js +36 -36
  62. package/dist/package.json.js +1 -1
  63. package/dist/plugin.js +47 -42
  64. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +4 -17
  65. package/dist/src/components/basic/nmorph-button/types.d.ts +13 -0
  66. package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +3 -9
  67. package/dist/src/components/basic/nmorph-icon/types.d.ts +6 -0
  68. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +2 -9
  69. package/dist/src/components/basic/nmorph-layout/types.d.ts +8 -0
  70. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +2 -13
  71. package/dist/src/components/basic/nmorph-link/types.d.ts +11 -0
  72. package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +2 -2
  73. package/dist/src/components/basic/nmorph-scroll/types.d.ts +5 -0
  74. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +2 -15
  75. package/dist/src/components/basic/nmorph-space/types.d.ts +14 -0
  76. package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +6 -21
  77. package/dist/src/components/data/nmorph-avatar/types.d.ts +21 -0
  78. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +4 -39
  79. package/dist/src/components/data/nmorph-badge/types.d.ts +34 -0
  80. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +4 -12
  81. package/dist/src/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/NmorphCalendarHeader.vue.d.ts +3 -9
  82. package/dist/src/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/types.d.ts +12 -0
  83. package/dist/src/components/data/nmorph-calendar/types.d.ts +13 -0
  84. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +2 -10
  85. package/dist/src/components/data/nmorph-card/types.d.ts +9 -0
  86. package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +3 -5
  87. package/dist/src/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue.d.ts +2 -4
  88. package/dist/src/components/data/nmorph-carousel/components/nmorph-carousel-item/types.d.ts +3 -0
  89. package/dist/src/components/data/nmorph-carousel/types.d.ts +6 -0
  90. package/dist/src/components/data/nmorph-collapse/NmorphCollapse.vue.d.ts +3 -7
  91. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +4 -10
  92. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/types.d.ts +13 -0
  93. package/dist/src/components/data/nmorph-collapse/types.d.ts +7 -0
  94. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +4 -13
  95. package/dist/src/components/data/nmorph-empty/types.d.ts +11 -0
  96. package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +3 -8
  97. package/dist/src/components/data/nmorph-image/types.d.ts +10 -0
  98. package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +3 -18
  99. package/dist/src/components/data/nmorph-image-preview/types.d.ts +19 -0
  100. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -13
  101. package/dist/src/components/data/nmorph-pagination/types.d.ts +14 -0
  102. package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +2 -14
  103. package/dist/src/components/data/nmorph-progress/types.d.ts +12 -0
  104. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +5 -15
  105. package/dist/src/components/data/nmorph-qr-code/types.d.ts +12 -0
  106. package/dist/src/components/data/nmorph-skeleton/NmorphSkeleton.vue.d.ts +2 -7
  107. package/dist/src/components/data/nmorph-skeleton/components/NmorphSkeletonItem.vue.d.ts +3 -9
  108. package/dist/src/components/data/nmorph-skeleton/components/types.d.ts +8 -0
  109. package/dist/src/components/data/nmorph-skeleton/types.d.ts +6 -0
  110. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +3 -17
  111. package/dist/src/components/data/nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue.d.ts +2 -4
  112. package/dist/src/components/data/nmorph-table/components/nmorph-table-cell/types.d.ts +3 -0
  113. package/dist/src/components/data/nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue.d.ts +4 -5
  114. package/dist/src/components/data/nmorph-table/components/nmorph-table-column/types.d.ts +3 -0
  115. package/dist/src/components/data/nmorph-table/inner-components/nmorph-sort-button/NmorphSortButton.vue.d.ts +4 -6
  116. package/dist/src/components/data/nmorph-table/inner-components/nmorph-sort-button/types.d.ts +7 -0
  117. package/dist/src/components/data/nmorph-table/types.d.ts +15 -0
  118. package/dist/src/components/data/nmorph-tag-list/NmorphTagList.vue.d.ts +5 -8
  119. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +3 -5
  120. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/types.d.ts +6 -0
  121. package/dist/src/components/data/nmorph-tag-list/types.d.ts +7 -0
  122. package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +3 -14
  123. package/dist/src/components/data/nmorph-virtual-list/types.d.ts +15 -0
  124. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +5 -7
  125. package/dist/src/components/feedback/nmorph-alert/types.d.ts +5 -0
  126. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +3 -15
  127. package/dist/src/components/feedback/nmorph-callout/types.d.ts +12 -0
  128. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -19
  129. package/dist/src/components/feedback/nmorph-dialog/types.d.ts +20 -0
  130. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +4 -17
  131. package/dist/src/components/feedback/nmorph-drawer/types.d.ts +18 -0
  132. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +5 -14
  133. package/dist/src/components/feedback/nmorph-tooltip/types.d.ts +11 -0
  134. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +6 -19
  135. package/dist/src/components/form/nmorph-autocomplete/types.d.ts +18 -0
  136. package/dist/src/components/form/nmorph-checkbox/NmorphCheckbox.vue.d.ts +1 -1
  137. package/dist/src/components/form/nmorph-checkbox/types.d.ts +3 -0
  138. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +5 -11
  139. package/dist/src/components/form/nmorph-checkbox-group/types.d.ts +11 -0
  140. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +6 -11
  141. package/dist/src/components/form/nmorph-color-picker/types.d.ts +11 -0
  142. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +5 -21
  143. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-clear-button/types.d.ts +3 -0
  144. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +3 -8
  145. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/types.d.ts +10 -0
  146. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/NmorphDatePickerHeader.vue.d.ts +3 -6
  147. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/types.d.ts +12 -0
  148. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.d.ts +3 -6
  149. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/types.d.ts +9 -0
  150. package/dist/src/components/form/nmorph-date-picker/types.d.ts +21 -0
  151. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +7 -12
  152. package/dist/src/components/form/nmorph-file-upload/types.d.ts +21 -0
  153. package/dist/src/components/form/nmorph-form/NmorphForm.vue.d.ts +4 -8
  154. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +3 -12
  155. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +3 -8
  156. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/types.d.ts +7 -0
  157. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/NmorphValidationIcon.vue.d.ts +3 -6
  158. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/types.d.ts +5 -0
  159. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/types.d.ts +10 -0
  160. package/dist/src/components/form/nmorph-form/types.d.ts +21 -6
  161. package/dist/src/components/form/nmorph-form/use-form-item-input.d.ts +10 -0
  162. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +3 -10
  163. package/dist/src/components/form/nmorph-number-input/types.d.ts +11 -0
  164. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +5 -13
  165. package/dist/src/components/form/nmorph-otp-input/types.d.ts +21 -0
  166. package/dist/src/components/form/nmorph-radio/NmorphRadio.vue.d.ts +4 -9
  167. package/dist/src/components/form/nmorph-radio/types.d.ts +6 -0
  168. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +4 -12
  169. package/dist/src/components/form/nmorph-radio-group/types.d.ts +12 -0
  170. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +3 -21
  171. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +1 -1
  172. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/types.d.ts +3 -0
  173. package/dist/src/components/form/nmorph-select/types.d.ts +21 -0
  174. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +4 -12
  175. package/dist/src/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue.d.ts +3 -6
  176. package/dist/src/components/form/nmorph-select-button/components/nmorph-select-button-item/types.d.ts +4 -0
  177. package/dist/src/components/form/nmorph-select-button/types.d.ts +12 -0
  178. package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +111 -0
  179. package/dist/src/components/form/nmorph-slider/types.d.ts +3 -0
  180. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +3 -14
  181. package/dist/src/components/form/nmorph-switch/types.d.ts +15 -0
  182. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +6 -14
  183. package/dist/src/components/form/nmorph-text-input/types.d.ts +16 -0
  184. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +6 -18
  185. package/dist/src/components/form/nmorph-textarea/types.d.ts +20 -0
  186. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +6 -20
  187. package/dist/src/components/form/nmorph-time-picker/types.d.ts +24 -0
  188. package/dist/src/components/navigation/index.d.ts +1 -1
  189. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +4 -12
  190. package/dist/src/components/navigation/nmorph-backtop/types.d.ts +14 -0
  191. package/dist/src/components/navigation/nmorph-breadcrumb/NmorphBreadcrumb.vue.d.ts +2 -4
  192. package/dist/src/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/NmorphBreadcrumbItem.vue.d.ts +2 -4
  193. package/dist/src/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/types.d.ts +3 -0
  194. package/dist/src/components/navigation/nmorph-breadcrumb/types.d.ts +3 -0
  195. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +10 -31
  196. package/dist/src/components/navigation/nmorph-context-menu/types.d.ts +42 -0
  197. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +6 -24
  198. package/dist/src/components/navigation/nmorph-dropdown/types.d.ts +24 -0
  199. package/dist/src/components/navigation/nmorph-tabs/NmorphTabs.vue.d.ts +4 -8
  200. package/dist/src/components/navigation/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue.d.ts +4 -5
  201. package/dist/src/components/navigation/nmorph-tabs/components/nmorph-tab-pane/types.d.ts +3 -0
  202. package/dist/src/components/navigation/nmorph-tabs/{type.d.ts → types.d.ts} +9 -0
  203. package/dist/src/components/navigation/nmorph-tabs/utils.d.ts +1 -1
  204. package/dist/src/components/others/nmorph-divider/NmorphDivider.vue.d.ts +2 -5
  205. package/dist/src/components/others/nmorph-divider/types.d.ts +3 -0
  206. package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +3 -12
  207. package/dist/src/components/others/nmorph-overlay/types.d.ts +14 -0
  208. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +2 -8
  209. package/dist/src/components/providers/nmorph-notification-provider/types.d.ts +9 -0
  210. package/dist/src/hooks/use-field-validation.d.ts +15 -0
  211. package/dist/src/hooks/use-focusable-input.d.ts +16 -0
  212. package/dist/src/hooks/use-form-validation.d.ts +4 -0
  213. package/dist/src/plugin.d.ts +4 -1
  214. package/dist/src/types/app.types.d.ts +21 -0
  215. package/dist/src/types/common.types.d.ts +62 -0
  216. package/dist/src/types/date.types.d.ts +7 -0
  217. package/dist/src/types/image.types.d.ts +17 -0
  218. package/dist/src/types/index.d.ts +8 -206
  219. package/dist/src/types/selection.types.d.ts +26 -0
  220. package/dist/src/types/table.types.d.ts +5 -0
  221. package/dist/src/types/theme.types.d.ts +55 -0
  222. package/dist/src/types/translation.types.d.ts +20 -0
  223. package/dist/src/utils/common.d.ts +3 -0
  224. package/dist/src/utils/file-types.d.ts +8 -0
  225. package/dist/src/utils/index.d.ts +1 -0
  226. package/dist/style.css +1 -1
  227. package/dist/types/common.types.js +14 -0
  228. package/dist/types/date.types.js +4 -0
  229. package/dist/types/image.types.js +5 -0
  230. package/dist/types/selection.types.js +4 -0
  231. package/dist/types/table.types.js +4 -0
  232. package/dist/types/translation.types.js +4 -0
  233. package/dist/utils/common.js +16 -7
  234. package/dist/utils/file-types.js +41 -0
  235. package/package.json +1 -1
  236. package/dist/src/components/data/nmorph-calendar/hooks/index.d.ts +0 -2
  237. package/dist/src/hooks/index.d.ts +0 -9
  238. package/dist/src/outside-hooks/index.d.ts +0 -5
  239. package/dist/types/index.js +0 -20
@@ -1,9 +1,10 @@
1
1
  import './NmorphSelectButton.css';
2
- import { defineComponent as c, ref as S, watch as g, computed as d, provide as o } from "vue";
2
+ import { defineComponent as S, ref as b, watch as g, computed as s, provide as u } from "vue";
3
3
  import { useModifiers as y } from "../../../utils/create-modifiers.js";
4
- import { toCssSize as u } from "../../../utils/common.js";
5
- import b from "./components/nmorph-select-button-item/NmorphSelectButtonItem.vue.js";
6
- const z = /* @__PURE__ */ c({
4
+ import { createCssVariables as h, createCssSizeVariables as q } from "../../../utils/common.js";
5
+ import { useFormItemModel as v } from "../nmorph-form/use-form-item-input.js";
6
+ import _ from "./components/nmorph-select-button-item/NmorphSelectButtonItem.vue.js";
7
+ const x = /* @__PURE__ */ S({
7
8
  __name: "NmorphSelectButton",
8
9
  props: {
9
10
  modelValue: { type: String, required: !1, default: "" },
@@ -20,33 +21,38 @@ const z = /* @__PURE__ */ c({
20
21
  tabindex: { type: Number, required: !1 }
21
22
  },
22
23
  emits: ["update:model-value"],
23
- setup(n, { expose: s, emit: m }) {
24
- s();
25
- const e = n, r = m, t = S(e.modelValue);
26
- g(
27
- () => e.modelValue,
28
- (i) => {
29
- t.value = i;
30
- }
31
- );
32
- const f = d(
24
+ setup(n, { expose: m, emit: f }) {
25
+ m();
26
+ const e = n, a = f, { modelValue: i, updateModelValue: l } = v(
27
+ e,
28
+ (t) => a("update:model-value", t),
29
+ ""
30
+ ), r = b(i.value);
31
+ g(i, (t) => {
32
+ r.value = t;
33
+ });
34
+ const p = s(
33
35
  () => y({
34
36
  "nmorph-select-button": [e.disabled && "disabled", e.fill && "fill", e.height]
35
37
  })
36
- ), p = d(() => ({
37
- ...e.trackPadding !== void 0 && { "--track-padding": u(e.trackPadding) },
38
- ...e.itemSize !== void 0 && { "--item-size": u(e.itemSize) },
39
- ...e.itemFontSize !== void 0 && { "--item-font-size": e.itemFontSize }
40
- })), l = (i) => {
41
- e.disabled || (t.value = i, r("update:model-value", i));
38
+ ), c = s(() => ({
39
+ ...q({
40
+ "--track-padding": e.trackPadding,
41
+ "--item-size": e.itemSize
42
+ }),
43
+ ...h({
44
+ "--item-font-size": e.itemFontSize
45
+ })
46
+ })), o = (t) => {
47
+ e.disabled || (r.value = t, l(t));
42
48
  };
43
- o("select-button-selected-value", t), o("select-button-change-handler", l);
44
- const a = { props: e, emit: r, initialValue: t, modifiers: f, styles: p, changeHandler: l, get NmorphSelectButtonItem() {
45
- return b;
49
+ u("select-button-selected-value", r), u("select-button-change-handler", o);
50
+ const d = { props: e, emit: a, modelValue: i, updateModelValue: l, initialValue: r, modifiers: p, styles: c, changeHandler: o, get NmorphSelectButtonItem() {
51
+ return _;
46
52
  } };
47
- return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
53
+ return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
48
54
  }
49
55
  });
50
56
  export {
51
- z as default
57
+ x as default
52
58
  };
@@ -1,10 +1,10 @@
1
1
  import './NmorphSlider.css';
2
- import { defineComponent as k, computed as m, ref as o, watch as E, onMounted as A, onUnmounted as G } from "vue";
3
- import { useModifiers as J } from "../../../utils/create-modifiers.js";
4
- import { toCssSize as I } from "../../../utils/common.js";
5
- import { useFormItemInput as K } from "../nmorph-form/use-form-item-input.js";
6
- import Q from "../../feedback/nmorph-tooltip/NmorphTooltip.vue.js";
7
- const se = /* @__PURE__ */ k({
2
+ import { defineComponent as A, computed as m, ref as o, watch as E, onMounted as G, onUnmounted as J } from "vue";
3
+ import { useModifiers as K } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as Q } from "../../../utils/common.js";
5
+ import { useFormItemInput as Y, useFormItemModel as Z } from "../nmorph-form/use-form-item-input.js";
6
+ import ee from "../../feedback/nmorph-tooltip/NmorphTooltip.vue.js";
7
+ const de = /* @__PURE__ */ A({
8
8
  __name: "NmorphSlider",
9
9
  props: {
10
10
  modelValue: { type: Number, required: !1, default: 0 },
@@ -23,72 +23,73 @@ const se = /* @__PURE__ */ k({
23
23
  tabindex: { type: Number, required: !1 }
24
24
  },
25
25
  emits: ["update:model-value"],
26
- setup(H, { expose: L, emit: M }) {
27
- L();
28
- const e = H, { id: N, name: T, tabindex: S } = K(e), _ = m(
29
- () => J({
26
+ setup(L, { expose: N, emit: T }) {
27
+ N();
28
+ const e = L, { id: S, name: H, tabindex: _ } = Y(e), C = m(
29
+ () => K({
30
30
  nmorph: [],
31
31
  "nmorph-slider": [e.disabled && "disabled"]
32
32
  })
33
- ), w = m(() => `${e.thumbWidth}px`), p = o(e.showTooltip), g = M, n = o(e.modelValue), c = o(null);
33
+ ), g = m(() => `${e.thumbWidth}px`), p = o(e.showTooltip), x = T, { modelValue: c, updateModelValue: y } = Z(
34
+ e,
35
+ (t) => x("update:model-value", t),
36
+ 0
37
+ ), n = o(c.value), f = o(null);
34
38
  E(n, () => {
35
- g("update:model-value", n.value);
36
- }), E(
37
- () => e.modelValue,
38
- (t) => {
39
- n.value = t;
40
- }
41
- );
42
- const x = o(null), C = m(() => {
43
- const t = l.value - l.value, r = e.max - e.min + t, u = (n.value - e.min) / r * 100, a = c.value?.clientWidth || 0, d = e.thumbWidth / a * 100, D = d / 2;
44
- let X = u - D;
45
- const P = `${Math.max(0, Math.min(100 - d, X))}%`, W = a / 100, $ = e.thumbWidth / 2 / W, q = (x.value?.tooltipBody.clientWidth ?? 24) / 2 / W, j = q === 1 / 0 ? 1.714 : q, U = `${parseFloat(P) + $ - j}%`;
39
+ y(n.value);
40
+ }), E(c, (t) => {
41
+ n.value = t;
42
+ });
43
+ const P = o(null), V = m(() => {
44
+ const t = s.value - s.value, r = e.max - e.min + t, u = (n.value - e.min) / r * 100, a = f.value?.clientWidth || 0, d = e.thumbWidth / a * 100, X = d / 2;
45
+ let $ = u - X;
46
+ const q = `${Math.max(0, Math.min(100 - d, $))}%`, I = a / 100, j = e.thumbWidth / 2 / I, M = (P.value?.tooltipBody.clientWidth ?? 24) / 2 / I, U = M === 1 / 0 ? 1.714 : M, k = `${parseFloat(q) + j - U}%`;
46
47
  return {
47
- thumb: P,
48
- tooltip: U
48
+ thumb: q,
49
+ tooltip: k
49
50
  };
50
- }), l = o(0), f = o(0), h = () => {
51
- l.value = window.innerWidth, f.value = window.innerHeight;
51
+ }), s = o(0), h = o(0), v = () => {
52
+ s.value = window.innerWidth, h.value = window.innerHeight;
52
53
  };
53
- A(() => {
54
- typeof window < "u" && (l.value = window.innerWidth, f.value = window.innerHeight, window.addEventListener("resize", h));
55
- }), G(() => {
56
- typeof window < "u" && (document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), window.removeEventListener("resize", h));
54
+ G(() => {
55
+ typeof window < "u" && (s.value = window.innerWidth, h.value = window.innerHeight, window.addEventListener("resize", v));
56
+ }), J(() => {
57
+ typeof window < "u" && (document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), window.removeEventListener("resize", v));
57
58
  });
58
- const v = (t) => {
59
- b.value = !1;
60
- const r = c.value?.getBoundingClientRect();
59
+ const b = (t) => {
60
+ w.value = !1;
61
+ const r = f.value?.getBoundingClientRect();
61
62
  let u = 0;
62
63
  if (r) {
63
64
  const a = t - r.left, d = r.width;
64
65
  u = Math.max(0, Math.min(1, a / d)), n.value = e.min + u * (e.max - e.min);
65
66
  }
66
67
  n.value = Math.round(n.value / e.step) * e.step, n.value = Math.max(e.min, Math.min(e.max, n.value));
67
- }, s = (t) => {
68
- t.preventDefault(), v(t.clientX);
68
+ }, l = (t) => {
69
+ t.preventDefault(), b(t.clientX);
69
70
  }, i = () => {
70
- document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), b.value = !0;
71
+ document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), w.value = !0;
71
72
  }, z = (t) => {
72
- e.disabled || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), v(t.clientX), document.addEventListener("pointermove", s), document.addEventListener("pointerup", i), document.addEventListener("pointercancel", i));
73
+ e.disabled || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), b(t.clientX), document.addEventListener("pointermove", l), document.addEventListener("pointerup", i), document.addEventListener("pointercancel", i));
73
74
  }, F = o(null), O = () => {
74
75
  e.showTooltip && (p.value = !0);
75
- }, V = () => {
76
+ }, B = () => {
76
77
  e.showTooltip && (p.value = !1);
77
- }, B = (t) => {
78
+ }, R = (t) => {
78
79
  const r = t.target;
79
80
  n.value = Number(r.value);
80
- }, b = o(!0), R = m(() => ({
81
- "--nmorph-slider-thumb-width": w.value,
82
- ...e.sliderHeight !== void 0 && { "--slider-height": I(e.sliderHeight) },
83
- ...e.valueFixedContainerHeight !== void 0 && {
84
- "--value-fixed-container-height": I(e.valueFixedContainerHeight)
85
- }
86
- })), y = { props: e, id: N, name: T, tabindex: S, modifiers: _, thumbWidthCss: w, tooltipVisible: p, emit: g, thumbValue: n, sliderContainer: c, tooltipRootRef: x, thumbXPercentPosition: C, windowWidth: l, windowHeight: f, resizeWindowHandler: h, updateThumbValue: v, pointerMove: s, pointerUp: i, pointerDownHandler: z, sliderFirst: F, handleMouseEnter: O, handleMouseLeave: V, nativeInputHandler: B, transitionEnabled: b, styles: R, get NmorphTooltip() {
87
- return Q;
81
+ }, w = o(!0), D = m(() => ({
82
+ "--nmorph-slider-thumb-width": g.value,
83
+ ...Q({
84
+ "--slider-height": e.sliderHeight,
85
+ "--value-fixed-container-height": e.valueFixedContainerHeight
86
+ })
87
+ })), W = { props: e, id: S, name: H, tabindex: _, modifiers: C, thumbWidthCss: g, tooltipVisible: p, emit: x, modelValue: c, updateModelValue: y, thumbValue: n, sliderContainer: f, tooltipRootRef: P, thumbXPercentPosition: V, windowWidth: s, windowHeight: h, resizeWindowHandler: v, updateThumbValue: b, pointerMove: l, pointerUp: i, pointerDownHandler: z, sliderFirst: F, handleMouseEnter: O, handleMouseLeave: B, nativeInputHandler: R, transitionEnabled: w, styles: D, get NmorphTooltip() {
88
+ return ee;
88
89
  } };
89
- return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
90
+ return Object.defineProperty(W, "__isScriptSetup", { enumerable: !1, value: !0 }), W;
90
91
  }
91
92
  });
92
93
  export {
93
- se as default
94
+ de as default
94
95
  };
@@ -1,11 +1,11 @@
1
1
  import './NmorphSwitch.css';
2
- import { defineComponent as q, ref as i, computed as n, watch as N } from "vue";
3
- import { useModifiers as V } from "../../../utils/create-modifiers.js";
4
- import { toCssSize as a } from "../../../utils/common.js";
5
- import { useFormItemInput as _ } from "../nmorph-form/use-form-item-input.js";
6
- import w from "../../basic/nmorph-icon/NmorphIcon.vue.js";
7
- import H from "../../../assets/icons/loader.svg.js";
8
- const M = /* @__PURE__ */ q({
2
+ import { defineComponent as N, ref as l, computed as n, watch as V } from "vue";
3
+ import { useModifiers as _ } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as I } from "../../../utils/common.js";
5
+ import { useFormItemInput as w, useFormItemModel as B } from "../nmorph-form/use-form-item-input.js";
6
+ import H from "../../basic/nmorph-icon/NmorphIcon.vue.js";
7
+ import x from "../../../assets/icons/loader.svg.js";
8
+ const j = /* @__PURE__ */ N({
9
9
  __name: "NmorphSwitch",
10
10
  props: {
11
11
  modelValue: { type: [Boolean, String, Number], required: !1, default: !1 },
@@ -23,13 +23,17 @@ const M = /* @__PURE__ */ q({
23
23
  tabindex: { type: Number, required: !1 }
24
24
  },
25
25
  emits: ["update:model-value"],
26
- setup(s, { expose: f, emit: m }) {
27
- const e = s, { id: p, name: c, tabindex: h } = _(e), u = m, r = i(!1), v = () => {
26
+ setup(f, { expose: m, emit: p }) {
27
+ const e = f, { id: c, name: h, tabindex: v } = w(e), u = p, { modelValue: o, updateModelValue: i } = B(
28
+ e,
29
+ (a) => u("update:model-value", a),
30
+ !1
31
+ ), r = l(!1), g = () => {
28
32
  r.value = !0;
29
- }, g = () => {
33
+ }, b = () => {
30
34
  r.value = !1;
31
- }, b = n(
32
- () => V({
35
+ }, y = n(
36
+ () => _({
33
37
  "nmorph-switch": [
34
38
  e.disabled && "disabled",
35
39
  t.value ? "on" : "off",
@@ -37,33 +41,32 @@ const M = /* @__PURE__ */ q({
37
41
  r.value && "focus"
38
42
  ]
39
43
  })
40
- ), t = i(e.modelValue === e.activeValue), y = () => {
44
+ ), t = l(o.value === e.activeValue), S = () => {
41
45
  if (e.disabled) return;
42
46
  t.value = !t.value;
43
- const o = t.value ? e.activeValue : e.inactiveValue;
44
- u("update:model-value", o);
45
- }, l = i(null);
46
- f({ inputDOMRef: l });
47
- const S = n(() => ({
48
- ...e.width !== void 0 && { "--width": a(e.width) },
49
- ...e.height !== void 0 && { "--height": a(e.height) },
50
- ...e.offset !== void 0 && { "--offset": a(e.offset) },
51
- ...e.thumbHeight !== void 0 && { "--thumb-height": a(e.thumbHeight) }
52
- }));
53
- N(
54
- () => e.modelValue,
55
- (o) => {
56
- t.value = o === e.activeValue;
57
- }
47
+ const a = t.value ? e.activeValue : e.inactiveValue;
48
+ i(a);
49
+ }, s = l(null);
50
+ m({ inputDOMRef: s });
51
+ const q = n(
52
+ () => I({
53
+ "--width": e.width,
54
+ "--height": e.height,
55
+ "--offset": e.offset,
56
+ "--thumb-height": e.thumbHeight
57
+ })
58
58
  );
59
- const d = { props: e, id: p, name: c, tabindex: h, emit: u, focus: r, focusHandler: v, blurHandler: g, modifiers: b, initialValue: t, changeHandler: y, inputDOMRef: l, styles: S, get NmorphIcon() {
60
- return w;
61
- }, get NmorphIconLoaderDots() {
59
+ V(o, (a) => {
60
+ t.value = a === e.activeValue;
61
+ });
62
+ const d = { props: e, id: c, name: h, tabindex: v, emit: u, modelValue: o, updateModelValue: i, focus: r, focusHandler: g, blurHandler: b, modifiers: y, initialValue: t, changeHandler: S, inputDOMRef: s, styles: q, get NmorphIcon() {
62
63
  return H;
64
+ }, get NmorphIconLoaderDots() {
65
+ return x;
63
66
  } };
64
67
  return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
65
68
  }
66
69
  });
67
70
  export {
68
- M as default
71
+ j as default
69
72
  };
@@ -1 +1 @@
1
- .nmorph-text-input{--prepend-icon-indent: 8px;--prepend-icon-size: 14px;display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start;min-width:0}.nmorph-text-input__input-side{position:relative;display:flex;justify-content:flex-end;align-items:center;width:100%}.nmorph-text-input__prepend-icon{position:absolute;left:0;z-index:1;display:flex;justify-content:center;align-items:center;width:var(--prepend-icon-size);min-width:var(--prepend-icon-size);height:var(--prepend-icon-size);min-height:var(--prepend-icon-size);margin-left:var(--prepend-icon-indent);pointer-events:none}.nmorph-text-input__prepend-icon svg,.nmorph-text-input__prepend-icon .nmorph-icon,.nmorph-text-input__prepend-icon .nmorph-icon__content{width:100%;min-width:100%;height:100%;min-height:100%}.nmorph-text-input__prepend-icon svg{fill:var(--nmorph-text-color);stroke-width:0}.nmorph-text-input__prepend-icon path{stroke:var(--nmorph-text-color)}.nmorph-text-input input{width:100%;height:var(--height);text-indent:var(--nmorph-text-input-indentation);border:none;border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-text-input--with-action input{padding-right:calc(var(--height) + var(--indentation-03))}.nmorph-text-input input:focus{background:var(--nmorph-accent-color);outline:none;box-shadow:var(--nmorph-shadow-outset)}.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon svg{fill:var(--nmorph-focus-text-color)}.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon path{stroke:var(--nmorph-focus-text-color)}.nmorph-text-input input:-webkit-autofill,.nmorph-text-input input:-webkit-autofill:hover,.nmorph-text-input input:-webkit-autofill:active{caret-color:var(--nmorph-text-color);box-shadow:var(--nmorph-shadow-inset),inset 0 0 0 1000px var(--nmorph-main-color);-webkit-text-fill-color:var(--nmorph-text-color)}.nmorph-text-input input:-webkit-autofill:focus{caret-color:var(--nmorph-focus-text-color);outline:none;box-shadow:var(--nmorph-shadow-outset),inset 0 0 0 1000px var(--nmorph-accent-color);-webkit-text-fill-color:var(--nmorph-focus-text-color)}.nmorph-text-input input:disabled{cursor:not-allowed;opacity:.6}.nmorph-text-input__password-btn{position:absolute;right:0;height:100%}.nmorph-text-input__password-btn .nmorph-button__content{padding:var(--indentation-03)}.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn{margin-top:var(--indentation-00)}.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn .nmorph-button{--height: var(--thin-component)}.nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-icon{--color: var(--nmorph-white-color)}.nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-button:not(:disabled,[loading=true]):hover .nmorph-icon{--color: var(--nmorph-white-color)}
1
+ .nmorph-text-input{--prepend-icon-indent: 8px;--prepend-icon-size: 14px;display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start;min-width:0}.nmorph-text-input__input-side{position:relative;display:flex;justify-content:flex-end;align-items:center;width:100%}.nmorph-text-input__prepend-icon{position:absolute;left:0;z-index:1;display:flex;justify-content:center;align-items:center;width:var(--prepend-icon-size);min-width:var(--prepend-icon-size);height:var(--prepend-icon-size);min-height:var(--prepend-icon-size);margin-left:var(--prepend-icon-indent);pointer-events:none}.nmorph-text-input__prepend-icon svg,.nmorph-text-input__prepend-icon .nmorph-icon,.nmorph-text-input__prepend-icon .nmorph-icon__content{width:100%;min-width:100%;height:100%;min-height:100%}.nmorph-text-input__prepend-icon svg{fill:var(--nmorph-text-color);stroke-width:0}.nmorph-text-input__prepend-icon path{stroke:var(--nmorph-text-color)}.nmorph-text-input input{width:100%;height:var(--height);text-indent:var(--nmorph-text-input-indentation);background:var(--nmorph-main-color);border:none;border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-text-input--with-action input{padding-right:calc(var(--height) + var(--indentation-03))}.nmorph-text-input input:focus{background:var(--nmorph-accent-color);outline:none;box-shadow:var(--nmorph-shadow-outset)}.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon svg{fill:var(--nmorph-focus-text-color)}.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon path{stroke:var(--nmorph-focus-text-color)}.nmorph-text-input input:-webkit-autofill,.nmorph-text-input input:-webkit-autofill:hover,.nmorph-text-input input:-webkit-autofill:active{caret-color:var(--nmorph-text-color);box-shadow:var(--nmorph-shadow-inset),inset 0 0 0 1000px var(--nmorph-main-color);-webkit-text-fill-color:var(--nmorph-text-color)}.nmorph-text-input input:-webkit-autofill:focus{caret-color:var(--nmorph-focus-text-color);outline:none;box-shadow:var(--nmorph-shadow-outset),inset 0 0 0 1000px var(--nmorph-accent-color);-webkit-text-fill-color:var(--nmorph-focus-text-color)}.nmorph-text-input input:disabled{cursor:not-allowed;opacity:.6}.nmorph-text-input__password-btn{position:absolute;right:0;height:100%}.nmorph-text-input__password-btn .nmorph-button__content{padding:var(--indentation-03)}.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn{margin-top:var(--indentation-00)}.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn .nmorph-button{--height: var(--thin-component)}.nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-icon{--color: var(--nmorph-white-color)}.nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-button:not(:disabled,[loading=true]):hover .nmorph-icon{--color: var(--nmorph-white-color)}
@@ -1,22 +1,22 @@
1
1
  import './NmorphTextInput.css';
2
- import s from "./NmorphTextInput.vue2.js";
3
- import { openBlock as n, createElementBlock as r, normalizeStyle as m, normalizeClass as c, createElementVNode as i, renderSlot as h, createCommentVNode as l, mergeProps as f, withKeys as y, createBlock as d, withModifiers as _, withCtx as a, createVNode as u, resolveDynamicComponent as b } from "vue";
2
+ import m from "./NmorphTextInput.vue2.js";
3
+ import { openBlock as t, createElementBlock as r, normalizeStyle as s, normalizeClass as c, createElementVNode as i, renderSlot as h, createCommentVNode as l, mergeProps as f, withKeys as y, createBlock as d, withModifiers as u, withCtx as a, createVNode as b, resolveDynamicComponent as x } from "vue";
4
4
  /* empty css */
5
- import x from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ import _ from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const v = { class: "nmorph-text-input__input-side" }, k = {
7
7
  key: 0,
8
8
  class: "nmorph-text-input__prepend-icon"
9
9
  }, w = ["id", "name", "autocomplete", "tabindex", "type", "placeholder", "disabled", "value"];
10
10
  function B(p, o, N, e, C, I) {
11
- return n(), r(
11
+ return t(), r(
12
12
  "div",
13
13
  {
14
14
  class: c(e.modifiers),
15
- style: m(e.styles)
15
+ style: s(e.styles)
16
16
  },
17
17
  [
18
18
  i("div", v, [
19
- e.slots["prepend-icon"] ? (n(), r("div", k, [
19
+ e.slots["prepend-icon"] ? (t(), r("div", k, [
20
20
  h(p.$slots, "prepend-icon")
21
21
  ])) : l("v-if", !0),
22
22
  i("input", f({
@@ -29,29 +29,29 @@ function B(p, o, N, e, C, I) {
29
29
  type: e.type,
30
30
  placeholder: e.props.placeholder,
31
31
  disabled: e.props.disabled,
32
- value: e.props.modelValue
32
+ value: e.modelValue
33
33
  }, e.props.inputAttrs, {
34
34
  onInput: e.handleInput,
35
- onFocus: e.handleFocus,
36
- onBlur: e.handleBlur,
37
- onKeydown: o[0] || (o[0] = (t) => e.emit("keydown", t)),
38
- onKeyup: o[1] || (o[1] = y((t) => e.emit("on-enter"), ["enter"]))
35
+ onFocus: o[0] || (o[0] = (...n) => e.handleFocus && e.handleFocus(...n)),
36
+ onBlur: o[1] || (o[1] = (...n) => e.handleBlur && e.handleBlur(...n)),
37
+ onKeydown: o[2] || (o[2] = (n) => e.emit("keydown", n)),
38
+ onKeyup: o[3] || (o[3] = y((n) => e.emit("on-enter"), ["enter"]))
39
39
  }), null, 16, w),
40
- e.props.typePassword || e.props.clearable ? (n(), d(e.NmorphButton, {
40
+ e.props.typePassword || e.props.clearable ? (t(), d(e.NmorphButton, {
41
41
  key: 1,
42
42
  disabled: e.props.disabled,
43
43
  class: "nmorph-text-input__password-btn",
44
44
  "style-type": "transparent",
45
45
  width: "32px",
46
46
  height: e.props.height,
47
- onMousedown: o[2] || (o[2] = _(() => {
47
+ onMousedown: o[4] || (o[4] = u(() => {
48
48
  }, ["prevent"])),
49
49
  onClick: e.actionButtonClickHandler
50
50
  }, {
51
51
  default: a(() => [
52
- u(e.NmorphIcon, null, {
52
+ b(e.NmorphIcon, null, {
53
53
  default: a(() => [
54
- (n(), d(b(e.actionIcon)))
54
+ (t(), d(x(e.actionIcon)))
55
55
  ]),
56
56
  _: 1
57
57
  /* STABLE */
@@ -66,7 +66,7 @@ function B(p, o, N, e, C, I) {
66
66
  /* CLASS, STYLE */
67
67
  );
68
68
  }
69
- const z = /* @__PURE__ */ x(s, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-text-input/NmorphTextInput.vue"]]);
69
+ const M = /* @__PURE__ */ _(m, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-text-input/NmorphTextInput.vue"]]);
70
70
  export {
71
- z as default
71
+ M as default
72
72
  };
@@ -1,14 +1,15 @@
1
1
  import './NmorphTextInput.css';
2
- import { defineComponent as C, useSlots as E, computed as n, ref as l } from "vue";
3
- import { NmorphComponentHeight as O } from "../../../types/index.js";
4
- import { useModifiers as j } from "../../../utils/create-modifiers.js";
5
- import { useFormItemInput as F } from "../nmorph-form/use-form-item-input.js";
6
- import H from "../../../assets/icons/eye-blocked.svg.js";
7
- import M from "../../../assets/icons/eye.svg.js";
8
- import A from "../../basic/nmorph-button/NmorphButton.vue.js";
9
- import D from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
- import R from "../../../assets/icons/error.svg.js";
11
- const W = /* @__PURE__ */ C({
2
+ import { defineComponent as k, useSlots as C, computed as o, ref as E } from "vue";
3
+ import { useModifiers as O } from "../../../utils/create-modifiers.js";
4
+ import { useFocusableInput as V } from "../../../hooks/use-focusable-input.js";
5
+ import { useFormItemInput as j, useFormItemModel as H } from "../nmorph-form/use-form-item-input.js";
6
+ import { NmorphComponentHeight as R } from "../../../types/common.types.js";
7
+ import A from "../../../assets/icons/eye-blocked.svg.js";
8
+ import D from "../../../assets/icons/eye.svg.js";
9
+ import T from "../../basic/nmorph-button/NmorphButton.vue.js";
10
+ import z from "../../basic/nmorph-icon/NmorphIcon.vue.js";
11
+ import G from "../../../assets/icons/error.svg.js";
12
+ const ee = /* @__PURE__ */ k({
12
13
  __name: "NmorphTextInput",
13
14
  props: {
14
15
  placeholder: { type: String, required: !1, default: "" },
@@ -25,37 +26,42 @@ const W = /* @__PURE__ */ C({
25
26
  tabindex: { type: Number, required: !1 }
26
27
  },
27
28
  emits: ["update:model-value", "focus", "blur", "on-enter", "keydown"],
28
- setup(f, { expose: m, emit: h }) {
29
- const s = E(), e = f, { id: y, name: b, autocomplete: v, tabindex: g } = F(e), q = n(
30
- () => j({
31
- nmorph: [O[e.height], a.value && "focused"],
29
+ setup(f, { expose: h, emit: y }) {
30
+ const l = C(), e = f, r = y, { id: b, name: g, autocomplete: q, tabindex: I } = j(e), { modelValue: v, updateModelValue: n } = H(
31
+ e,
32
+ (a) => r("update:model-value", a),
33
+ ""
34
+ ), w = o(
35
+ () => O({
36
+ nmorph: [R[e.height], u.value && "focused"],
32
37
  "nmorph-text-input": [e.typePassword && "password", (e.typePassword || e.clearable) && "with-action"]
33
38
  })
34
- ), w = (P) => {
35
- const k = P.target;
36
- r("update:model-value", k.value);
37
- }, t = l(!1), x = () => {
38
- e.clearable ? r("update:model-value", "") : t.value = !t.value;
39
- }, I = n(() => e.typePassword && !t.value && !e.clearable ? "password" : "text"), a = l(!1), N = () => {
40
- r("focus"), a.value = !0;
41
- }, _ = () => {
42
- r("blur"), a.value = !1;
43
- }, o = l(null), u = () => {
44
- o.value?.focus();
45
- }, p = () => {
46
- o.value?.blur();
47
- }, i = () => {
48
- o.value?.select();
49
- };
50
- m({ inputDOMRef: o, focus: u, blur: p, select: i });
51
- const r = h, S = n(() => e.clearable ? R : t.value ? H : M), d = n(() => e.indentation || (s["prepend-icon"] ? "28px" : "8px")), B = n(() => ({ "--nmorph-text-input-indentation": d.value })), c = { slots: s, props: e, id: y, name: b, autocomplete: v, tabindex: g, modifiers: q, handleInput: w, showPassword: t, actionButtonClickHandler: x, type: I, focused: a, handleFocus: N, handleBlur: _, inputDOMRef: o, focus: u, blur: p, select: i, emit: r, actionIcon: S, indentation: d, styles: B, get NmorphIcon() {
52
- return D;
39
+ ), x = (a) => {
40
+ const M = a.target;
41
+ n(M.value);
42
+ }, t = E(!1), N = () => {
43
+ e.clearable ? n("") : t.value = !t.value;
44
+ }, _ = o(() => e.typePassword && !t.value && !e.clearable ? "password" : "text"), {
45
+ elementRef: s,
46
+ focused: u,
47
+ handleFocus: B,
48
+ handleBlur: S,
49
+ focus: p,
50
+ blur: i,
51
+ select: d
52
+ } = V({
53
+ onFocus: () => r("focus"),
54
+ onBlur: () => r("blur")
55
+ });
56
+ h({ inputDOMRef: s, focus: p, blur: i, select: d });
57
+ const P = o(() => e.clearable ? G : t.value ? A : D), m = o(() => e.indentation || (l["prepend-icon"] ? "28px" : "8px")), F = o(() => ({ "--nmorph-text-input-indentation": m.value })), c = { slots: l, props: e, emit: r, id: b, name: g, autocomplete: q, tabindex: I, modelValue: v, updateModelValue: n, modifiers: w, handleInput: x, showPassword: t, actionButtonClickHandler: N, type: _, inputDOMRef: s, focused: u, handleFocus: B, handleBlur: S, focus: p, blur: i, select: d, actionIcon: P, indentation: m, styles: F, get NmorphIcon() {
58
+ return z;
53
59
  }, get NmorphButton() {
54
- return A;
60
+ return T;
55
61
  } };
56
62
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
57
63
  }
58
64
  });
59
65
  export {
60
- W as default
66
+ ee as default
61
67
  };
@@ -1,15 +1,15 @@
1
1
  import './NmorphTextarea.css';
2
- import a from "./NmorphTextarea.vue2.js";
3
- import { openBlock as n, createElementBlock as t, normalizeStyle as l, normalizeClass as d, createElementVNode as i, mergeProps as m, withKeys as s } from "vue";
2
+ import n from "./NmorphTextarea.vue2.js";
3
+ import { openBlock as a, createElementBlock as l, normalizeStyle as t, normalizeClass as d, createElementVNode as i, mergeProps as m, withKeys as s } from "vue";
4
4
  /* empty css */
5
5
  import p from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const c = ["id", "name", "autocomplete", "tabindex", "placeholder", "disabled", "value", "rows"];
7
- function f(x, o, h, e, b, y) {
8
- return n(), t(
6
+ const f = ["id", "name", "autocomplete", "tabindex", "placeholder", "disabled", "value", "rows"];
7
+ function x(c, o, b, e, h, y) {
8
+ return a(), l(
9
9
  "div",
10
10
  {
11
11
  class: d(e.modifiers),
12
- style: l(e.styles)
12
+ style: t(e.styles)
13
13
  },
14
14
  [
15
15
  i("textarea", m({
@@ -21,21 +21,21 @@ function f(x, o, h, e, b, y) {
21
21
  class: "nmorph-native-input",
22
22
  placeholder: e.props.placeholder,
23
23
  disabled: e.props.disabled,
24
- value: e.props.modelValue,
24
+ value: e.modelValue,
25
25
  rows: e.rows
26
26
  }, e.props.textareaAttrs, {
27
27
  onInput: e.handleInput,
28
- onFocus: e.handleFocus,
29
- onBlur: e.handleBlur,
30
- onKeydown: o[0] || (o[0] = (r) => e.emit("keydown", r)),
31
- onKeyup: o[1] || (o[1] = s((r) => e.emit("on-enter"), ["enter"]))
32
- }), null, 16, c)
28
+ onFocus: o[0] || (o[0] = (...r) => e.handleFocus && e.handleFocus(...r)),
29
+ onBlur: o[1] || (o[1] = (...r) => e.handleBlur && e.handleBlur(...r)),
30
+ onKeydown: o[2] || (o[2] = (r) => e.emit("keydown", r)),
31
+ onKeyup: o[3] || (o[3] = s((r) => e.emit("on-enter"), ["enter"]))
32
+ }), null, 16, f)
33
33
  ],
34
34
  6
35
35
  /* CLASS, STYLE */
36
36
  );
37
37
  }
38
- const k = /* @__PURE__ */ p(a, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-textarea/NmorphTextarea.vue"]]);
38
+ const k = /* @__PURE__ */ p(n, [["render", x], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-textarea/NmorphTextarea.vue"]]);
39
39
  export {
40
40
  k as default
41
41
  };