@nmorph/nmorph-ui-kit 2.2.38 → 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 (226) 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 +6 -6
  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 +8 -8
  23. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +4 -4
  24. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue.js +18 -22
  25. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +42 -33
  26. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +32 -32
  27. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
  28. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +77 -106
  29. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.css +1 -1
  30. package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +4 -4
  31. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +7 -7
  32. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +6 -6
  33. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
  34. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +51 -49
  35. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +21 -18
  36. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +28 -24
  37. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +30 -30
  38. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +34 -32
  39. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +16 -16
  40. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +37 -35
  41. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +12 -12
  42. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +34 -32
  43. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +16 -16
  44. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +64 -57
  45. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +25 -23
  46. package/dist/hooks/use-field-validation.js +50 -66
  47. package/dist/hooks/use-focusable-input.js +27 -0
  48. package/dist/hooks/use-nmorph-translation.js +4 -4
  49. package/dist/index.es.js +842 -837
  50. package/dist/index.umd.js +32 -32
  51. package/dist/package.json.js +1 -1
  52. package/dist/plugin.js +47 -42
  53. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +4 -17
  54. package/dist/src/components/basic/nmorph-button/types.d.ts +13 -0
  55. package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +3 -9
  56. package/dist/src/components/basic/nmorph-icon/types.d.ts +6 -0
  57. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +2 -9
  58. package/dist/src/components/basic/nmorph-layout/types.d.ts +8 -0
  59. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +3 -14
  60. package/dist/src/components/basic/nmorph-link/types.d.ts +11 -0
  61. package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +2 -2
  62. package/dist/src/components/basic/nmorph-scroll/types.d.ts +5 -0
  63. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +2 -15
  64. package/dist/src/components/basic/nmorph-space/types.d.ts +14 -0
  65. package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +5 -20
  66. package/dist/src/components/data/nmorph-avatar/types.d.ts +21 -0
  67. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +5 -40
  68. package/dist/src/components/data/nmorph-badge/types.d.ts +34 -0
  69. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +4 -12
  70. package/dist/src/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/NmorphCalendarHeader.vue.d.ts +3 -9
  71. package/dist/src/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/types.d.ts +12 -0
  72. package/dist/src/components/data/nmorph-calendar/types.d.ts +13 -0
  73. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +2 -10
  74. package/dist/src/components/data/nmorph-card/types.d.ts +9 -0
  75. package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +3 -5
  76. package/dist/src/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue.d.ts +2 -4
  77. package/dist/src/components/data/nmorph-carousel/components/nmorph-carousel-item/types.d.ts +3 -0
  78. package/dist/src/components/data/nmorph-carousel/types.d.ts +6 -0
  79. package/dist/src/components/data/nmorph-collapse/NmorphCollapse.vue.d.ts +3 -7
  80. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +4 -10
  81. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/types.d.ts +13 -0
  82. package/dist/src/components/data/nmorph-collapse/types.d.ts +7 -0
  83. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +3 -12
  84. package/dist/src/components/data/nmorph-empty/types.d.ts +11 -0
  85. package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +3 -8
  86. package/dist/src/components/data/nmorph-image/types.d.ts +10 -0
  87. package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +3 -18
  88. package/dist/src/components/data/nmorph-image-preview/types.d.ts +19 -0
  89. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -13
  90. package/dist/src/components/data/nmorph-pagination/types.d.ts +14 -0
  91. package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +3 -15
  92. package/dist/src/components/data/nmorph-progress/types.d.ts +12 -0
  93. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +5 -15
  94. package/dist/src/components/data/nmorph-qr-code/types.d.ts +12 -0
  95. package/dist/src/components/data/nmorph-skeleton/NmorphSkeleton.vue.d.ts +2 -7
  96. package/dist/src/components/data/nmorph-skeleton/components/NmorphSkeletonItem.vue.d.ts +3 -9
  97. package/dist/src/components/data/nmorph-skeleton/components/types.d.ts +8 -0
  98. package/dist/src/components/data/nmorph-skeleton/types.d.ts +6 -0
  99. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +4 -18
  100. package/dist/src/components/data/nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue.d.ts +2 -4
  101. package/dist/src/components/data/nmorph-table/components/nmorph-table-cell/types.d.ts +3 -0
  102. package/dist/src/components/data/nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue.d.ts +4 -5
  103. package/dist/src/components/data/nmorph-table/components/nmorph-table-column/types.d.ts +3 -0
  104. package/dist/src/components/data/nmorph-table/inner-components/nmorph-sort-button/NmorphSortButton.vue.d.ts +4 -6
  105. package/dist/src/components/data/nmorph-table/inner-components/nmorph-sort-button/types.d.ts +7 -0
  106. package/dist/src/components/data/nmorph-table/types.d.ts +15 -0
  107. package/dist/src/components/data/nmorph-tag-list/NmorphTagList.vue.d.ts +5 -8
  108. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +3 -5
  109. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/types.d.ts +6 -0
  110. package/dist/src/components/data/nmorph-tag-list/types.d.ts +7 -0
  111. package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +3 -14
  112. package/dist/src/components/data/nmorph-virtual-list/types.d.ts +15 -0
  113. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +5 -7
  114. package/dist/src/components/feedback/nmorph-alert/types.d.ts +5 -0
  115. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +4 -16
  116. package/dist/src/components/feedback/nmorph-callout/types.d.ts +12 -0
  117. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -19
  118. package/dist/src/components/feedback/nmorph-dialog/types.d.ts +20 -0
  119. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +4 -17
  120. package/dist/src/components/feedback/nmorph-drawer/types.d.ts +18 -0
  121. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +5 -14
  122. package/dist/src/components/feedback/nmorph-tooltip/types.d.ts +11 -0
  123. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +6 -19
  124. package/dist/src/components/form/nmorph-autocomplete/types.d.ts +18 -0
  125. package/dist/src/components/form/nmorph-checkbox/NmorphCheckbox.vue.d.ts +1 -1
  126. package/dist/src/components/form/nmorph-checkbox/types.d.ts +3 -0
  127. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +4 -10
  128. package/dist/src/components/form/nmorph-checkbox-group/types.d.ts +11 -0
  129. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +6 -11
  130. package/dist/src/components/form/nmorph-color-picker/types.d.ts +11 -0
  131. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +4 -20
  132. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-clear-button/types.d.ts +3 -0
  133. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +3 -8
  134. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/types.d.ts +10 -0
  135. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/NmorphDatePickerHeader.vue.d.ts +3 -6
  136. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/types.d.ts +12 -0
  137. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.d.ts +3 -6
  138. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/types.d.ts +9 -0
  139. package/dist/src/components/form/nmorph-date-picker/types.d.ts +21 -0
  140. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +5 -13
  141. package/dist/src/components/form/nmorph-file-upload/types.d.ts +17 -0
  142. package/dist/src/components/form/nmorph-form/NmorphForm.vue.d.ts +4 -8
  143. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +3 -12
  144. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +3 -8
  145. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/types.d.ts +7 -0
  146. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/NmorphValidationIcon.vue.d.ts +3 -6
  147. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/types.d.ts +5 -0
  148. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/types.d.ts +10 -0
  149. package/dist/src/components/form/nmorph-form/types.d.ts +6 -1
  150. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +3 -10
  151. package/dist/src/components/form/nmorph-number-input/types.d.ts +11 -0
  152. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +5 -13
  153. package/dist/src/components/form/nmorph-otp-input/types.d.ts +21 -0
  154. package/dist/src/components/form/nmorph-radio/NmorphRadio.vue.d.ts +4 -9
  155. package/dist/src/components/form/nmorph-radio/types.d.ts +6 -0
  156. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +3 -11
  157. package/dist/src/components/form/nmorph-radio-group/types.d.ts +12 -0
  158. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +3 -21
  159. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +1 -1
  160. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/types.d.ts +3 -0
  161. package/dist/src/components/form/nmorph-select/types.d.ts +21 -0
  162. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +4 -12
  163. package/dist/src/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue.d.ts +3 -6
  164. package/dist/src/components/form/nmorph-select-button/components/nmorph-select-button-item/types.d.ts +4 -0
  165. package/dist/src/components/form/nmorph-select-button/types.d.ts +12 -0
  166. package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +111 -0
  167. package/dist/src/components/form/nmorph-slider/types.d.ts +3 -0
  168. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +3 -14
  169. package/dist/src/components/form/nmorph-switch/types.d.ts +15 -0
  170. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +6 -14
  171. package/dist/src/components/form/nmorph-text-input/types.d.ts +16 -0
  172. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +6 -18
  173. package/dist/src/components/form/nmorph-textarea/types.d.ts +20 -0
  174. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +6 -20
  175. package/dist/src/components/form/nmorph-time-picker/types.d.ts +24 -0
  176. package/dist/src/components/navigation/index.d.ts +1 -1
  177. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +4 -12
  178. package/dist/src/components/navigation/nmorph-backtop/types.d.ts +14 -0
  179. package/dist/src/components/navigation/nmorph-breadcrumb/NmorphBreadcrumb.vue.d.ts +2 -4
  180. package/dist/src/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/NmorphBreadcrumbItem.vue.d.ts +2 -4
  181. package/dist/src/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/types.d.ts +3 -0
  182. package/dist/src/components/navigation/nmorph-breadcrumb/types.d.ts +3 -0
  183. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +10 -31
  184. package/dist/src/components/navigation/nmorph-context-menu/types.d.ts +42 -0
  185. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +6 -24
  186. package/dist/src/components/navigation/nmorph-dropdown/types.d.ts +24 -0
  187. package/dist/src/components/navigation/nmorph-tabs/NmorphTabs.vue.d.ts +4 -8
  188. package/dist/src/components/navigation/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue.d.ts +4 -5
  189. package/dist/src/components/navigation/nmorph-tabs/components/nmorph-tab-pane/types.d.ts +3 -0
  190. package/dist/src/components/navigation/nmorph-tabs/{type.d.ts → types.d.ts} +9 -0
  191. package/dist/src/components/navigation/nmorph-tabs/utils.d.ts +1 -1
  192. package/dist/src/components/others/nmorph-divider/NmorphDivider.vue.d.ts +2 -5
  193. package/dist/src/components/others/nmorph-divider/types.d.ts +3 -0
  194. package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +3 -12
  195. package/dist/src/components/others/nmorph-overlay/types.d.ts +14 -0
  196. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +2 -8
  197. package/dist/src/components/providers/nmorph-notification-provider/types.d.ts +9 -0
  198. package/dist/src/hooks/use-focusable-input.d.ts +16 -0
  199. package/dist/src/hooks/use-form-validation.d.ts +1 -2
  200. package/dist/src/plugin.d.ts +4 -1
  201. package/dist/src/types/app.types.d.ts +21 -0
  202. package/dist/src/types/common.types.d.ts +62 -0
  203. package/dist/src/types/date.types.d.ts +7 -0
  204. package/dist/src/types/image.types.d.ts +17 -0
  205. package/dist/src/types/index.d.ts +8 -206
  206. package/dist/src/types/selection.types.d.ts +26 -0
  207. package/dist/src/types/table.types.d.ts +5 -0
  208. package/dist/src/types/theme.types.d.ts +55 -0
  209. package/dist/src/types/translation.types.d.ts +20 -0
  210. package/dist/src/utils/common.d.ts +3 -0
  211. package/dist/src/utils/file-types.d.ts +8 -0
  212. package/dist/src/utils/index.d.ts +1 -0
  213. package/dist/style.css +1 -1
  214. package/dist/types/common.types.js +14 -0
  215. package/dist/types/date.types.js +4 -0
  216. package/dist/types/image.types.js +5 -0
  217. package/dist/types/selection.types.js +4 -0
  218. package/dist/types/table.types.js +4 -0
  219. package/dist/types/translation.types.js +4 -0
  220. package/dist/utils/common.js +16 -6
  221. package/dist/utils/file-types.js +41 -0
  222. package/package.json +1 -1
  223. package/dist/src/components/data/nmorph-calendar/hooks/index.d.ts +0 -2
  224. package/dist/src/hooks/index.d.ts +0 -9
  225. package/dist/src/outside-hooks/index.d.ts +0 -5
  226. package/dist/types/index.js +0 -20
@@ -1,18 +1,18 @@
1
1
  import './NmorphSelect.css';
2
- import { defineComponent as oe, computed as a, ref as d, watch as c, nextTick as R, onMounted as ie, onUnmounted as se, provide as w, toRef as de } from "vue";
3
- import { NmorphComponentHeight as ve } from "../../../types/index.js";
4
- import { useModifiers as ce } from "../../../utils/create-modifiers.js";
5
- import { toCssSize as C, getNmorphOptionHeight as fe, resolveDomElement as pe } from "../../../utils/common.js";
6
- import { useI18n as me } from "vue-i18n";
7
- import { useFormItemModel as he, useFormItemInput as ge } from "../nmorph-form/use-form-item-input.js";
8
- import { useVirtualList as ye } from "../../../hooks/use-virtual-list.js";
9
- import He from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
10
- import be from "./components/nmorph-select-option/NmorphSelectOption.vue.js";
11
- import qe from "../../basic/nmorph-icon/NmorphIcon.vue.js";
12
- import Ie from "../../data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js";
13
- import xe from "../../../assets/icons/chevron-down.svg.js";
14
- import Ne from "../../../assets/icons/loader.svg.js";
15
- const je = /* @__PURE__ */ oe({
2
+ import { defineComponent as ue, computed as a, ref as d, watch as c, nextTick as R, onMounted as oe, onUnmounted as ie, provide as w, toRef as se } from "vue";
3
+ import { useModifiers as de } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as ve, getNmorphOptionHeight as ce, toCssSize as fe, resolveDomElement as pe } from "../../../utils/common.js";
5
+ import { useVirtualList as me } from "../../../hooks/use-virtual-list.js";
6
+ import { useI18n as he } from "vue-i18n";
7
+ import { useFormItemModel as ge, useFormItemInput as ye } from "../nmorph-form/use-form-item-input.js";
8
+ import { NmorphComponentHeight as He } from "../../../types/common.types.js";
9
+ import be from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
10
+ import qe from "./components/nmorph-select-option/NmorphSelectOption.vue.js";
11
+ import Ie from "../../basic/nmorph-icon/NmorphIcon.vue.js";
12
+ import xe from "../../data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js";
13
+ import Ne from "../../../assets/icons/chevron-down.svg.js";
14
+ import Se from "../../../assets/icons/loader.svg.js";
15
+ const Ge = /* @__PURE__ */ ue({
16
16
  __name: "NmorphSelect",
17
17
  props: {
18
18
  noElementPlaceholder: { type: String, required: !1, default: "" },
@@ -39,30 +39,30 @@ const je = /* @__PURE__ */ oe({
39
39
  tabindex: { type: Number, required: !1 }
40
40
  },
41
41
  emits: ["update:model-value"],
42
- setup(P, { expose: T, emit: W }) {
43
- T();
44
- const { t: M } = me(), l = P, D = a(
42
+ setup(C, { expose: P, emit: T }) {
43
+ P();
44
+ const { t: M } = he(), l = C, D = a(
45
45
  () => l.noElementPlaceholder ? l.noElementPlaceholder : M("noElementPlaceholder")
46
- ), A = W, { modelValue: p, updateModelValue: h } = he(
46
+ ), A = T, { modelValue: p, updateModelValue: h } = ge(
47
47
  l,
48
48
  (e) => A("update:model-value", e),
49
49
  ""
50
- ), t = d(p.value), r = d(l.open), v = a(() => l.disabled || l.loading), g = a(() => l.optionsWidth === "auto"), y = d(!0), { id: H, name: k, autocomplete: $, tabindex: F } = ge(l), b = (e) => {
50
+ ), t = d(p.value), r = d(l.open), v = a(() => l.disabled || l.loading), g = a(() => l.optionsWidth === "auto"), y = d(!0), { id: H, name: W, autocomplete: k, tabindex: $ } = ye(l), b = (e) => {
51
51
  if (!v.value) {
52
52
  if (r.value = !1, typeof t.value == "string" && (!l.valueRequired && t.value === e ? t.value = "" : t.value = e, h(t.value)), Array.isArray(t.value)) {
53
- const n = t.value.includes(e), ne = t.value.length === 1 && n;
54
- if (l.valueRequired && ne) return;
55
- n ? t.value = t.value.filter((ue) => ue !== e) : t.value = [...t.value, e];
53
+ const n = t.value.includes(e), re = t.value.length === 1 && n;
54
+ if (l.valueRequired && re) return;
55
+ n ? t.value = t.value.filter((ne) => ne !== e) : t.value = [...t.value, e];
56
56
  }
57
57
  h(t.value);
58
58
  }
59
- }, m = d(!1), U = () => {
59
+ }, m = d(!1), z = () => {
60
60
  m.value = !0;
61
- }, z = () => {
61
+ }, F = () => {
62
62
  m.value = !1;
63
- }, j = a(
64
- () => ce({
65
- nmorph: [ve[l.height]],
63
+ }, U = a(
64
+ () => de({
65
+ nmorph: [He[l.height]],
66
66
  "nmorph-select": [
67
67
  l.disabled && "disabled",
68
68
  p.value ? "on" : "off",
@@ -74,9 +74,11 @@ const je = /* @__PURE__ */ oe({
74
74
  m.value && "focus"
75
75
  ]
76
76
  })
77
- ), G = a(() => ({
78
- ...l.width !== void 0 && { "--base-width": C(l.width) }
79
- })), J = () => {
77
+ ), j = a(
78
+ () => ve({
79
+ "--base-width": l.width
80
+ })
81
+ ), G = () => {
80
82
  v.value || (r.value = !r.value);
81
83
  };
82
84
  c(
@@ -101,16 +103,16 @@ const je = /* @__PURE__ */ oe({
101
103
  },
102
104
  { deep: !0 }
103
105
  );
104
- const i = a(() => l.options.length > 0 ? l.options : l.optionsMap), I = d(null), x = d([]), N = a(() => l.options), f = a(() => l.virtual && N.value.length > 0), E = a(() => l.virtualItemHeight || fe(l.height)), V = a(() => l.virtualOverscan), _ = a(() => l.virtualDynamicHeight), s = ye(N, {
106
+ const i = a(() => l.options.length > 0 ? l.options : l.optionsMap), I = d(null), x = d([]), N = a(() => l.options), f = a(() => l.virtual && N.value.length > 0), E = a(() => l.virtualItemHeight || ce(l.height)), V = a(() => l.virtualOverscan), _ = a(() => l.virtualDynamicHeight), s = me(N, {
105
107
  enabled: f,
106
108
  itemHeight: E,
107
109
  overscan: V,
108
110
  dynamic: _
109
- }), K = a(() => s.virtualItems.value), Q = s.spacerStyle, X = s.contentStyle, Y = a(() => C(l.virtualMaxHeight)), O = () => {
111
+ }), J = a(() => s.virtualItems.value), K = s.spacerStyle, Q = s.contentStyle, X = a(() => fe(l.virtualMaxHeight)), S = () => {
110
112
  i.value.length > 0 || !I.value || (x.value = Array.from(I.value.querySelectorAll(".nmorph-select-option")).map((e) => e.getAttribute("value")).filter((e) => !!e));
111
113
  }, o = a(
112
114
  () => i.value.length > 0 ? i.value.map((e) => e.value) : x.value
113
- ), Z = a(() => f.value ? Array.isArray(t.value) ? t.value : t.value ? [t.value] : [] : o.value), u = d(0), S = a(() => o.value[u.value] || ""), ee = a(() => `${H.value}-listbox`), te = (e) => `${H.value}-option-${e.replace(/\s+/g, "-")}`;
115
+ ), Y = a(() => f.value ? Array.isArray(t.value) ? t.value : t.value ? [t.value] : [] : o.value), u = d(0), O = a(() => o.value[u.value] || ""), Z = a(() => `${H.value}-listbox`), ee = (e) => `${H.value}-option-${e.replace(/\s+/g, "-")}`;
114
116
  c(u, (e) => {
115
117
  r.value && f.value && s.scrollToIndex(e);
116
118
  }), c(
@@ -121,29 +123,29 @@ const je = /* @__PURE__ */ oe({
121
123
  { immediate: !0 }
122
124
  ), c(r, async (e) => {
123
125
  if (e) {
124
- if (await R(), O(), typeof t.value == "string") {
126
+ if (await R(), S(), typeof t.value == "string") {
125
127
  const n = o.value.indexOf(t.value);
126
128
  n !== -1 && (u.value = n);
127
129
  }
128
130
  s.refresh(), f.value && s.scrollToIndex(u.value);
129
131
  }
130
- }), ie(async () => {
131
- await R(), O(), document.addEventListener("click", q);
132
- }), se(() => {
132
+ }), oe(async () => {
133
+ await R(), S(), document.addEventListener("click", q);
134
+ }), ie(() => {
133
135
  document.removeEventListener("click", q);
134
136
  });
135
- const le = a(() => typeof t.value == "string" ? t.value === "" ? D.value : i.value.find((e) => e.value === t.value)?.label : i.value.find((e) => e.value === t.value)?.label), ae = a(() => i.value.length > 0 ? i.value.filter((n) => t.value.includes(n.value)).map((n) => ({ text: n.label, value: n.value })) : Array.isArray(t.value) ? t.value.map((n) => ({ text: n, value: n })) : [{ text: t.value, value: t.value }]);
136
- w("select-selected-value", t), w("select-change-selected-value", b), w("select-height", de(l, "height"));
137
- const B = d(null), re = a(
137
+ const te = a(() => typeof t.value == "string" ? t.value === "" ? D.value : i.value.find((e) => e.value === t.value)?.label : i.value.find((e) => e.value === t.value)?.label), le = a(() => i.value.length > 0 ? i.value.filter((n) => t.value.includes(n.value)).map((n) => ({ text: n.label, value: n.value })) : Array.isArray(t.value) ? t.value.map((n) => ({ text: n, value: n })) : [{ text: t.value, value: t.value }]);
138
+ w("select-selected-value", t), w("select-change-selected-value", b), w("select-height", se(l, "height"));
139
+ const B = d(null), ae = a(
138
140
  () => g.value ? `${B.value?.clientWidth || 0}px` : void 0
139
- ), L = { t: M, props: l, computedNoElementPlaceholder: D, emit: A, modelValue: p, updateModelValue: h, initialValue: t, open: r, disabledInput: v, autoOptionsWidth: g, selectedLineOutset: y, id: H, name: k, autocomplete: $, tabindex: F, changeHandler: b, focus: m, focusHandler: U, blurHandler: z, modifiers: j, styles: G, clickHandler: J, closeHandler: q, optionsMap: i, optionsDOMRef: I, slotDomOptions: x, renderedOptions: N, virtualEnabled: f, virtualItemHeight: E, virtualOverscan: V, virtualDynamicHeight: _, virtualList: s, virtualOptions: K, virtualSpacerStyle: Q, virtualContentStyle: X, virtualMaxHeight: Y, refreshDomOptions: O, domOptions: o, nativeOptions: Z, currentIndex: u, currentFocusedEl: S, listboxId: ee, getOptionId: te, selectedValueTitle: le, tags: ae, nmorphSelectDOMRef: B, optionsMinWidth: re, spaceHandler: () => {
141
+ ), L = { t: M, props: l, computedNoElementPlaceholder: D, emit: A, modelValue: p, updateModelValue: h, initialValue: t, open: r, disabledInput: v, autoOptionsWidth: g, selectedLineOutset: y, id: H, name: W, autocomplete: k, tabindex: $, changeHandler: b, focus: m, focusHandler: z, blurHandler: F, modifiers: U, styles: j, clickHandler: G, closeHandler: q, optionsMap: i, optionsDOMRef: I, slotDomOptions: x, renderedOptions: N, virtualEnabled: f, virtualItemHeight: E, virtualOverscan: V, virtualDynamicHeight: _, virtualList: s, virtualOptions: J, virtualSpacerStyle: K, virtualContentStyle: Q, virtualMaxHeight: X, refreshDomOptions: S, domOptions: o, nativeOptions: Y, currentIndex: u, currentFocusedEl: O, listboxId: Z, getOptionId: ee, selectedValueTitle: te, tags: le, nmorphSelectDOMRef: B, optionsMinWidth: ae, spaceHandler: () => {
140
142
  v.value || (r.value = !r.value);
141
143
  }, arrowDownHandler: () => {
142
144
  v.value || o.value.length !== 0 && (r.value || (r.value = !0), u.value = (u.value + 1) % o.value.length);
143
145
  }, arrowUpHandler: () => {
144
146
  v.value || o.value.length !== 0 && (r.value || (r.value = !0), u.value = (u.value - 1 + o.value.length) % o.value.length);
145
147
  }, enterHandler: () => {
146
- r.value && S.value && b(S.value);
148
+ r.value && O.value && b(O.value);
147
149
  }, setVirtualOptionRef: (e, n) => {
148
150
  s.measureElement(n, pe(e));
149
151
  }, escapeHandler: () => {
@@ -153,21 +155,21 @@ const je = /* @__PURE__ */ oe({
153
155
  }, endHandler: () => {
154
156
  u.value = Math.max(o.value.length - 1, 0);
155
157
  }, get NmorphTagItem() {
156
- return Ie;
158
+ return xe;
157
159
  }, get NmorphIcon() {
158
- return qe;
160
+ return Ie;
159
161
  }, get NmorphSelectOption() {
160
- return be;
162
+ return qe;
161
163
  }, get NmorphDropdown() {
162
- return He;
164
+ return be;
163
165
  }, get NmorphIconLoaderDots() {
164
- return Ne;
166
+ return Se;
165
167
  }, get NmorphIconChevronDown() {
166
- return xe;
168
+ return Ne;
167
169
  } };
168
170
  return Object.defineProperty(L, "__isScriptSetup", { enumerable: !1, value: !0 }), L;
169
171
  }
170
172
  });
171
173
  export {
172
- je as default
174
+ Ge as default
173
175
  };
@@ -1,10 +1,11 @@
1
1
  import './NmorphSelectOption.css';
2
2
  import { defineComponent as g, inject as l, computed as t } from "vue";
3
- import { NmorphComponentHeight as y } from "../../../../../types/index.js";
4
- import { useModifiers as S } from "../../../../../utils/create-modifiers.js";
5
- import b from "../../../../basic/nmorph-icon/NmorphIcon.vue.js";
6
- import q from "../../../../../assets/icons/success.svg.js";
7
- const I = /* @__PURE__ */ g({
3
+ import { useModifiers as y } from "../../../../../utils/create-modifiers.js";
4
+ import { createCssVariables as b } from "../../../../../utils/common.js";
5
+ import { NmorphComponentHeight as S } from "../../../../../types/common.types.js";
6
+ import q from "../../../../basic/nmorph-icon/NmorphIcon.vue.js";
7
+ import _ from "../../../../../assets/icons/success.svg.js";
8
+ const H = /* @__PURE__ */ g({
8
9
  __name: "NmorphSelectOption",
9
10
  props: {
10
11
  value: { type: String, required: !0 },
@@ -25,29 +26,31 @@ const I = /* @__PURE__ */ g({
25
26
  const r = l("select-selected-value"), o = l("select-change-selected-value"), a = l(
26
27
  "select-height",
27
28
  void 0
28
- ), e = c, i = p, f = () => {
29
- e.disabled || (i("change-value", e.value), o && o(e.value));
30
- }, u = t(() => typeof r?.value == "string" ? r.value === e.value : Array.isArray(r?.value) ? r.value.some((v) => v === e.value) : !1), s = t(() => e.height || a?.value || "basic"), h = t(
31
- () => S({
32
- nmorph: [y[s.value]],
29
+ ), e = c, s = p, f = () => {
30
+ e.disabled || (s("change-value", e.value), o && o(e.value));
31
+ }, i = t(() => typeof r?.value == "string" ? r.value === e.value : Array.isArray(r?.value) ? r.value.some((v) => v === e.value) : !1), u = t(() => e.height || a?.value || "basic"), m = t(
32
+ () => y({
33
+ nmorph: [S[u.value]],
33
34
  "nmorph-select-option": [
34
35
  e.disabled && "disabled",
35
36
  e.label && "with-label",
36
- u.value && "checked",
37
+ i.value && "checked",
37
38
  e.focused && "focused"
38
39
  ]
39
40
  })
40
- ), m = t(() => ({
41
- ...e.hoverBackground !== void 0 && { "--hover-bg": e.hoverBackground },
42
- ...e.hoverColor !== void 0 && { "--hover-color": e.hoverColor }
43
- })), n = { selectSelectedValue: r, selectChangeSelectedValue: o, selectHeight: a, props: e, emit: i, clickHandler: f, checked: u, height: s, modifiers: h, styles: m, get NmorphIcon() {
44
- return b;
45
- }, get NmorphIconSuccess() {
41
+ ), h = t(
42
+ () => b({
43
+ "--hover-bg": e.hoverBackground,
44
+ "--hover-color": e.hoverColor
45
+ })
46
+ ), n = { selectSelectedValue: r, selectChangeSelectedValue: o, selectHeight: a, props: e, emit: s, clickHandler: f, checked: i, height: u, modifiers: m, styles: h, get NmorphIcon() {
46
47
  return q;
48
+ }, get NmorphIconSuccess() {
49
+ return _;
47
50
  } };
48
51
  return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
49
52
  }
50
53
  });
51
54
  export {
52
- I as default
55
+ H as default
53
56
  };
@@ -1,10 +1,10 @@
1
1
  import './NmorphSelectButton.css';
2
- import { defineComponent as g, ref as y, watch as b, computed as u, provide as n } from "vue";
3
- import { useModifiers as v } from "../../../utils/create-modifiers.js";
4
- import { toCssSize as s } from "../../../utils/common.js";
5
- import { useFormItemModel as h } from "../nmorph-form/use-form-item-input.js";
6
- import q from "./components/nmorph-select-button-item/NmorphSelectButtonItem.vue.js";
7
- const F = /* @__PURE__ */ g({
2
+ import { defineComponent as S, ref as b, watch as g, computed as s, provide as u } from "vue";
3
+ import { useModifiers as y } from "../../../utils/create-modifiers.js";
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({
8
8
  __name: "NmorphSelectButton",
9
9
  props: {
10
10
  modelValue: { type: String, required: !1, default: "" },
@@ -21,34 +21,38 @@ const F = /* @__PURE__ */ g({
21
21
  tabindex: { type: Number, required: !1 }
22
22
  },
23
23
  emits: ["update:model-value"],
24
- setup(m, { expose: f, emit: p }) {
25
- f();
26
- const e = m, l = p, { modelValue: r, updateModelValue: a } = h(
24
+ setup(n, { expose: m, emit: f }) {
25
+ m();
26
+ const e = n, a = f, { modelValue: i, updateModelValue: l } = v(
27
27
  e,
28
- (t) => l("update:model-value", t),
28
+ (t) => a("update:model-value", t),
29
29
  ""
30
- ), i = y(r.value);
31
- b(r, (t) => {
32
- i.value = t;
30
+ ), r = b(i.value);
31
+ g(i, (t) => {
32
+ r.value = t;
33
33
  });
34
- const c = u(
35
- () => v({
34
+ const p = s(
35
+ () => y({
36
36
  "nmorph-select-button": [e.disabled && "disabled", e.fill && "fill", e.height]
37
37
  })
38
- ), S = u(() => ({
39
- ...e.trackPadding !== void 0 && { "--track-padding": s(e.trackPadding) },
40
- ...e.itemSize !== void 0 && { "--item-size": s(e.itemSize) },
41
- ...e.itemFontSize !== void 0 && { "--item-font-size": e.itemFontSize }
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
+ })
42
46
  })), o = (t) => {
43
- e.disabled || (i.value = t, a(t));
47
+ e.disabled || (r.value = t, l(t));
44
48
  };
45
- n("select-button-selected-value", i), n("select-button-change-handler", o);
46
- const d = { props: e, emit: l, modelValue: r, updateModelValue: a, initialValue: i, modifiers: c, styles: S, changeHandler: o, get NmorphSelectButtonItem() {
47
- return q;
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 _;
48
52
  } };
49
53
  return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
50
54
  }
51
55
  });
52
56
  export {
53
- F as default
57
+ x as default
54
58
  };
@@ -1,10 +1,10 @@
1
1
  import './NmorphSlider.css';
2
- import { defineComponent as G, computed as m, ref as o, watch as E, onMounted as J, onUnmounted as K } from "vue";
3
- import { useModifiers as Q } from "../../../utils/create-modifiers.js";
4
- import { toCssSize as H } from "../../../utils/common.js";
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
5
  import { useFormItemInput as Y, useFormItemModel as Z } from "../nmorph-form/use-form-item-input.js";
6
6
  import ee from "../../feedback/nmorph-tooltip/NmorphTooltip.vue.js";
7
- const de = /* @__PURE__ */ G({
7
+ const de = /* @__PURE__ */ A({
8
8
  __name: "NmorphSlider",
9
9
  props: {
10
10
  modelValue: { type: Number, required: !1, default: 0 },
@@ -25,8 +25,8 @@ const de = /* @__PURE__ */ G({
25
25
  emits: ["update:model-value"],
26
26
  setup(L, { expose: N, emit: T }) {
27
27
  N();
28
- const e = L, { id: S, name: _, tabindex: C } = Y(e), F = m(
29
- () => Q({
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
  })
@@ -40,21 +40,21 @@ const de = /* @__PURE__ */ G({
40
40
  }), E(c, (t) => {
41
41
  n.value = t;
42
42
  });
43
- const P = o(null), z = m(() => {
44
- const t = l.value - l.value, r = e.max - e.min + t, u = (n.value - e.min) / r * 100, a = f.value?.clientWidth || 0, d = e.thumbWidth / a * 100, $ = d / 2;
45
- let j = u - $;
46
- const q = `${Math.max(0, Math.min(100 - d, j))}%`, I = a / 100, U = e.thumbWidth / 2 / I, M = (P.value?.tooltipBody.clientWidth ?? 24) / 2 / I, k = M === 1 / 0 ? 1.714 : M, A = `${parseFloat(q) + U - k}%`;
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}%`;
47
47
  return {
48
48
  thumb: q,
49
- tooltip: A
49
+ tooltip: k
50
50
  };
51
- }), l = o(0), h = o(0), v = () => {
52
- l.value = window.innerWidth, h.value = window.innerHeight;
51
+ }), s = o(0), h = o(0), v = () => {
52
+ s.value = window.innerWidth, h.value = window.innerHeight;
53
53
  };
54
- J(() => {
55
- typeof window < "u" && (l.value = window.innerWidth, h.value = window.innerHeight, window.addEventListener("resize", v));
56
- }), K(() => {
57
- typeof window < "u" && (document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), window.removeEventListener("resize", v));
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));
58
58
  });
59
59
  const b = (t) => {
60
60
  w.value = !1;
@@ -65,26 +65,26 @@ const de = /* @__PURE__ */ G({
65
65
  u = Math.max(0, Math.min(1, a / d)), n.value = e.min + u * (e.max - e.min);
66
66
  }
67
67
  n.value = Math.round(n.value / e.step) * e.step, n.value = Math.max(e.min, Math.min(e.max, n.value));
68
- }, s = (t) => {
68
+ }, l = (t) => {
69
69
  t.preventDefault(), b(t.clientX);
70
70
  }, i = () => {
71
- document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), w.value = !0;
72
- }, O = (t) => {
73
- e.disabled || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), b(t.clientX), document.addEventListener("pointermove", s), document.addEventListener("pointerup", i), document.addEventListener("pointercancel", i));
74
- }, V = o(null), B = () => {
71
+ document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), w.value = !0;
72
+ }, z = (t) => {
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));
74
+ }, F = o(null), O = () => {
75
75
  e.showTooltip && (p.value = !0);
76
- }, R = () => {
76
+ }, B = () => {
77
77
  e.showTooltip && (p.value = !1);
78
- }, D = (t) => {
78
+ }, R = (t) => {
79
79
  const r = t.target;
80
80
  n.value = Number(r.value);
81
- }, w = o(!0), X = m(() => ({
81
+ }, w = o(!0), D = m(() => ({
82
82
  "--nmorph-slider-thumb-width": g.value,
83
- ...e.sliderHeight !== void 0 && { "--slider-height": H(e.sliderHeight) },
84
- ...e.valueFixedContainerHeight !== void 0 && {
85
- "--value-fixed-container-height": H(e.valueFixedContainerHeight)
86
- }
87
- })), W = { props: e, id: S, name: _, tabindex: C, modifiers: F, thumbWidthCss: g, tooltipVisible: p, emit: x, modelValue: c, updateModelValue: y, thumbValue: n, sliderContainer: f, tooltipRootRef: P, thumbXPercentPosition: z, windowWidth: l, windowHeight: h, resizeWindowHandler: v, updateThumbValue: b, pointerMove: s, pointerUp: i, pointerDownHandler: O, sliderFirst: V, handleMouseEnter: B, handleMouseLeave: R, nativeInputHandler: D, transitionEnabled: w, styles: X, get NmorphTooltip() {
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
88
  return ee;
89
89
  } };
90
90
  return Object.defineProperty(W, "__isScriptSetup", { enumerable: !1, value: !0 }), W;
@@ -1,11 +1,11 @@
1
1
  import './NmorphSwitch.css';
2
- import { defineComponent as V, ref as u, computed as f, watch as _ } from "vue";
3
- import { useModifiers as w } from "../../../utils/create-modifiers.js";
4
- import { toCssSize as o } from "../../../utils/common.js";
5
- import { useFormItemInput as I, useFormItemModel as H } from "../nmorph-form/use-form-item-input.js";
6
- import B from "../../basic/nmorph-icon/NmorphIcon.vue.js";
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
7
  import x from "../../../assets/icons/loader.svg.js";
8
- const j = /* @__PURE__ */ V({
8
+ const j = /* @__PURE__ */ N({
9
9
  __name: "NmorphSwitch",
10
10
  props: {
11
11
  modelValue: { type: [Boolean, String, Number], required: !1, default: !1 },
@@ -23,46 +23,48 @@ const j = /* @__PURE__ */ V({
23
23
  tabindex: { type: Number, required: !1 }
24
24
  },
25
25
  emits: ["update:model-value"],
26
- setup(m, { expose: p, emit: c }) {
27
- const e = m, { id: h, name: v, tabindex: g } = I(e), l = c, { modelValue: i, updateModelValue: d } = H(
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
28
  e,
29
- (r) => l("update:model-value", r),
29
+ (a) => u("update:model-value", a),
30
30
  !1
31
- ), a = u(!1), b = () => {
32
- a.value = !0;
33
- }, y = () => {
34
- a.value = !1;
35
- }, S = f(
36
- () => w({
31
+ ), r = l(!1), g = () => {
32
+ r.value = !0;
33
+ }, b = () => {
34
+ r.value = !1;
35
+ }, y = n(
36
+ () => _({
37
37
  "nmorph-switch": [
38
38
  e.disabled && "disabled",
39
39
  t.value ? "on" : "off",
40
40
  e.loading && "loading",
41
- a.value && "focus"
41
+ r.value && "focus"
42
42
  ]
43
43
  })
44
- ), t = u(i.value === e.activeValue), q = () => {
44
+ ), t = l(o.value === e.activeValue), S = () => {
45
45
  if (e.disabled) return;
46
46
  t.value = !t.value;
47
- const r = t.value ? e.activeValue : e.inactiveValue;
48
- d(r);
49
- }, s = u(null);
50
- p({ inputDOMRef: s });
51
- const N = f(() => ({
52
- ...e.width !== void 0 && { "--width": o(e.width) },
53
- ...e.height !== void 0 && { "--height": o(e.height) },
54
- ...e.offset !== void 0 && { "--offset": o(e.offset) },
55
- ...e.thumbHeight !== void 0 && { "--thumb-height": o(e.thumbHeight) }
56
- }));
57
- _(i, (r) => {
58
- t.value = r === e.activeValue;
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
+ );
59
+ V(o, (a) => {
60
+ t.value = a === e.activeValue;
59
61
  });
60
- const n = { props: e, id: h, name: v, tabindex: g, emit: l, modelValue: i, updateModelValue: d, focus: a, focusHandler: b, blurHandler: y, modifiers: S, initialValue: t, changeHandler: q, inputDOMRef: s, styles: N, get NmorphIcon() {
61
- return B;
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() {
63
+ return H;
62
64
  }, get NmorphIconLoaderDots() {
63
65
  return x;
64
66
  } };
65
- return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
67
+ return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
66
68
  }
67
69
  });
68
70
  export {
@@ -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({
@@ -32,26 +32,26 @@ function B(p, o, N, e, C, I) {
32
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
  };