nuance-ui 0.1.38 → 0.1.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 (274) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/action-icon/action-icon-group.d.vue.ts +2 -2
  3. package/dist/runtime/components/action-icon/action-icon-group.vue.d.ts +2 -2
  4. package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +2 -2
  5. package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +2 -2
  6. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +2 -2
  7. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +2 -2
  8. package/dist/runtime/components/alert.d.vue.ts +3 -3
  9. package/dist/runtime/components/alert.vue.d.ts +3 -3
  10. package/dist/runtime/components/app-shell/app-shell-aside.d.vue.ts +2 -2
  11. package/dist/runtime/components/app-shell/app-shell-aside.vue.d.ts +2 -2
  12. package/dist/runtime/components/app-shell/app-shell-footer.d.vue.ts +2 -2
  13. package/dist/runtime/components/app-shell/app-shell-footer.vue.d.ts +2 -2
  14. package/dist/runtime/components/app-shell/app-shell-header.d.vue.ts +2 -2
  15. package/dist/runtime/components/app-shell/app-shell-header.vue.d.ts +2 -2
  16. package/dist/runtime/components/app-shell/app-shell-main.d.vue.ts +2 -2
  17. package/dist/runtime/components/app-shell/app-shell-main.vue.d.ts +2 -2
  18. package/dist/runtime/components/app-shell/app-shell-navbar.d.vue.ts +2 -2
  19. package/dist/runtime/components/app-shell/app-shell-navbar.vue.d.ts +2 -2
  20. package/dist/runtime/components/app-shell/app-shell-section.d.vue.ts +2 -2
  21. package/dist/runtime/components/app-shell/app-shell-section.vue.d.ts +2 -2
  22. package/dist/runtime/components/app-shell/app-shell.d.vue.ts +2 -2
  23. package/dist/runtime/components/app-shell/app-shell.vue.d.ts +2 -2
  24. package/dist/runtime/components/avatar/avatar-group.d.vue.ts +2 -2
  25. package/dist/runtime/components/avatar/avatar-group.vue.d.ts +2 -2
  26. package/dist/runtime/components/avatar/avatar.d.vue.ts +2 -2
  27. package/dist/runtime/components/avatar/avatar.vue.d.ts +2 -2
  28. package/dist/runtime/components/badge.d.vue.ts +4 -4
  29. package/dist/runtime/components/badge.vue +45 -24
  30. package/dist/runtime/components/badge.vue.d.ts +4 -4
  31. package/dist/runtime/components/box.d.vue.ts +2 -2
  32. package/dist/runtime/components/box.vue.d.ts +2 -2
  33. package/dist/runtime/components/breadcrumbs.d.vue.ts +4 -4
  34. package/dist/runtime/components/breadcrumbs.vue.d.ts +4 -4
  35. package/dist/runtime/components/button/button-group.d.vue.ts +2 -2
  36. package/dist/runtime/components/button/button-group.vue.d.ts +2 -2
  37. package/dist/runtime/components/button/button.d.vue.ts +8 -8
  38. package/dist/runtime/components/button/button.module.css +1 -1
  39. package/dist/runtime/components/button/button.vue.d.ts +8 -8
  40. package/dist/runtime/components/button/unstyled-button.d.vue.ts +2 -2
  41. package/dist/runtime/components/button/unstyled-button.vue +2 -2
  42. package/dist/runtime/components/button/unstyled-button.vue.d.ts +2 -2
  43. package/dist/runtime/components/calendar/calendar.d.vue.ts +20 -8
  44. package/dist/runtime/components/calendar/calendar.vue +1 -1
  45. package/dist/runtime/components/calendar/calendar.vue.d.ts +20 -8
  46. package/dist/runtime/components/calendar/lib/context.d.ts +1 -1
  47. package/dist/runtime/components/calendar/lib/use-calendar-selection.js +5 -4
  48. package/dist/runtime/components/calendar/model.d.ts +3 -2
  49. package/dist/runtime/components/calendar/ui/core/calendar-cell.d.vue.ts +2 -2
  50. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +22 -13
  51. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue.d.ts +2 -2
  52. package/dist/runtime/components/calendar/ui/core/calendar-header.d.vue.ts +2 -2
  53. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +22 -17
  54. package/dist/runtime/components/calendar/ui/core/calendar-header.vue.d.ts +2 -2
  55. package/dist/runtime/components/calendar/ui/core/calendar-root.d.vue.ts +19 -9
  56. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +6 -7
  57. package/dist/runtime/components/calendar/ui/core/calendar-root.vue.d.ts +19 -9
  58. package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +1 -1
  59. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +1 -1
  60. package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +3 -3
  61. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +9 -16
  62. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +3 -3
  63. package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +1 -1
  64. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +9 -5
  65. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +1 -1
  66. package/dist/runtime/components/card/card-section.d.vue.ts +2 -2
  67. package/dist/runtime/components/card/card-section.vue.d.ts +2 -2
  68. package/dist/runtime/components/card/card.d.vue.ts +2 -2
  69. package/dist/runtime/components/card/card.vue.d.ts +2 -2
  70. package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +2 -2
  71. package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +2 -2
  72. package/dist/runtime/components/checkbox/checkbox-group.d.vue.ts +5 -5
  73. package/dist/runtime/components/checkbox/checkbox-group.vue.d.ts +5 -5
  74. package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +2 -2
  75. package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +2 -2
  76. package/dist/runtime/components/checkbox/checkbox.d.vue.ts +2 -2
  77. package/dist/runtime/components/checkbox/checkbox.vue.d.ts +2 -2
  78. package/dist/runtime/components/chip/chip-group.d.vue.ts +10 -6
  79. package/dist/runtime/components/chip/chip-group.vue.d.ts +10 -6
  80. package/dist/runtime/components/chip/chip.d.vue.ts +2 -2
  81. package/dist/runtime/components/chip/chip.vue.d.ts +2 -2
  82. package/dist/runtime/components/combobox/combobox-dropdown.d.vue.ts +2 -2
  83. package/dist/runtime/components/combobox/combobox-dropdown.vue.d.ts +2 -2
  84. package/dist/runtime/components/combobox/combobox-empty.d.vue.ts +2 -2
  85. package/dist/runtime/components/combobox/combobox-empty.vue.d.ts +2 -2
  86. package/dist/runtime/components/combobox/combobox-group.d.vue.ts +10 -6
  87. package/dist/runtime/components/combobox/combobox-group.vue.d.ts +10 -6
  88. package/dist/runtime/components/combobox/combobox-option-list.d.vue.ts +2 -2
  89. package/dist/runtime/components/combobox/combobox-option-list.vue.d.ts +2 -2
  90. package/dist/runtime/components/combobox/combobox-option.d.vue.ts +8 -4
  91. package/dist/runtime/components/combobox/combobox-option.vue.d.ts +8 -4
  92. package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +10 -7
  93. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +1 -3
  94. package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +10 -7
  95. package/dist/runtime/components/combobox/combobox-root.d.vue.ts +2 -2
  96. package/dist/runtime/components/combobox/combobox-root.vue +2 -2
  97. package/dist/runtime/components/combobox/combobox-root.vue.d.ts +2 -2
  98. package/dist/runtime/components/combobox/combobox-target.d.vue.ts +2 -2
  99. package/dist/runtime/components/combobox/combobox-target.vue +1 -1
  100. package/dist/runtime/components/combobox/combobox-target.vue.d.ts +2 -2
  101. package/dist/runtime/components/container.d.vue.ts +2 -2
  102. package/dist/runtime/components/container.vue.d.ts +2 -2
  103. package/dist/runtime/components/date-time-picker.d.vue.ts +47 -0
  104. package/dist/runtime/components/date-time-picker.vue +151 -0
  105. package/dist/runtime/components/date-time-picker.vue.d.ts +47 -0
  106. package/dist/runtime/components/dialog/index.d.ts +4 -4
  107. package/dist/runtime/components/dialog/{dialog-close-button.d.vue.ts → ui/dialog-close-button.d.vue.ts} +3 -3
  108. package/dist/runtime/components/dialog/{dialog-close-button.vue → ui/dialog-close-button.vue} +2 -2
  109. package/dist/runtime/components/dialog/{dialog-close-button.vue.d.ts → ui/dialog-close-button.vue.d.ts} +3 -3
  110. package/dist/runtime/components/dialog/{dialog-header.d.vue.ts → ui/dialog-header.d.vue.ts} +3 -3
  111. package/dist/runtime/components/dialog/{dialog-header.vue → ui/dialog-header.vue} +1 -1
  112. package/dist/runtime/components/dialog/{dialog-header.vue.d.ts → ui/dialog-header.vue.d.ts} +3 -3
  113. package/dist/runtime/components/dialog/{dialog-root.d.vue.ts → ui/dialog-root.d.vue.ts} +5 -5
  114. package/dist/runtime/components/dialog/{dialog-root.vue → ui/dialog-root.vue} +5 -5
  115. package/dist/runtime/components/dialog/{dialog-root.vue.d.ts → ui/dialog-root.vue.d.ts} +5 -5
  116. package/dist/runtime/components/dialog/{dialog-title.d.vue.ts → ui/dialog-title.d.vue.ts} +3 -3
  117. package/dist/runtime/components/dialog/{dialog-title.vue → ui/dialog-title.vue} +2 -2
  118. package/dist/runtime/components/dialog/{dialog-title.vue.d.ts → ui/dialog-title.vue.d.ts} +3 -3
  119. package/dist/runtime/components/dialog/ui/dialog.module.css +1 -0
  120. package/dist/runtime/components/drawer/drawer-close-button.d.vue.ts +2 -2
  121. package/dist/runtime/components/drawer/drawer-close-button.vue +1 -1
  122. package/dist/runtime/components/drawer/drawer-close-button.vue.d.ts +2 -2
  123. package/dist/runtime/components/drawer/drawer-header.d.vue.ts +2 -2
  124. package/dist/runtime/components/drawer/drawer-header.vue +1 -1
  125. package/dist/runtime/components/drawer/drawer-header.vue.d.ts +2 -2
  126. package/dist/runtime/components/drawer/drawer-root.d.vue.ts +2 -2
  127. package/dist/runtime/components/drawer/drawer-root.vue +3 -3
  128. package/dist/runtime/components/drawer/drawer-root.vue.d.ts +2 -2
  129. package/dist/runtime/components/drawer/drawer-title.d.vue.ts +2 -2
  130. package/dist/runtime/components/drawer/drawer-title.vue +2 -2
  131. package/dist/runtime/components/drawer/drawer-title.vue.d.ts +2 -2
  132. package/dist/runtime/components/drawer/drawer.module.css +1 -1
  133. package/dist/runtime/components/file-upload.d.vue.ts +9 -5
  134. package/dist/runtime/components/file-upload.vue.d.ts +9 -5
  135. package/dist/runtime/components/index.d.ts +1 -0
  136. package/dist/runtime/components/input/date-picker.d.vue.ts +44 -0
  137. package/dist/runtime/components/input/date-picker.vue +174 -0
  138. package/dist/runtime/components/input/date-picker.vue.d.ts +44 -0
  139. package/dist/runtime/components/input/email-input.d.vue.ts +6 -6
  140. package/dist/runtime/components/input/email-input.vue +9 -5
  141. package/dist/runtime/components/input/email-input.vue.d.ts +6 -6
  142. package/dist/runtime/components/input/index.d.ts +2 -1
  143. package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +2 -2
  144. package/dist/runtime/components/input/lib/input-wrapper.context.js +1 -2
  145. package/dist/runtime/components/input/number-input.d.vue.ts +5 -5
  146. package/dist/runtime/components/input/number-input.vue +19 -18
  147. package/dist/runtime/components/input/number-input.vue.d.ts +5 -5
  148. package/dist/runtime/components/input/password-input.d.vue.ts +6 -6
  149. package/dist/runtime/components/input/password-input.vue +8 -1
  150. package/dist/runtime/components/input/password-input.vue.d.ts +6 -6
  151. package/dist/runtime/components/input/text-input.d.vue.ts +21 -11
  152. package/dist/runtime/components/input/text-input.vue +34 -15
  153. package/dist/runtime/components/input/text-input.vue.d.ts +21 -11
  154. package/dist/runtime/components/input/types/index.d.ts +2 -0
  155. package/dist/runtime/components/input/ui/button-input.d.vue.ts +42 -0
  156. package/dist/runtime/components/input/ui/button-input.vue +103 -0
  157. package/dist/runtime/components/input/ui/button-input.vue.d.ts +42 -0
  158. package/dist/runtime/components/input/ui/input-base.d.vue.ts +11 -63
  159. package/dist/runtime/components/input/ui/input-base.vue +55 -78
  160. package/dist/runtime/components/input/ui/input-base.vue.d.ts +11 -63
  161. package/dist/runtime/components/input/ui/input-inline.d.vue.ts +5 -5
  162. package/dist/runtime/components/input/ui/input-inline.vue +2 -6
  163. package/dist/runtime/components/input/ui/input-inline.vue.d.ts +5 -5
  164. package/dist/runtime/components/input/ui/input-label.vue +2 -5
  165. package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +5 -5
  166. package/dist/runtime/components/input/ui/input-wrapper.vue +11 -5
  167. package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +5 -5
  168. package/dist/runtime/components/input/ui/spin-input.d.vue.ts +25 -0
  169. package/dist/runtime/components/input/ui/spin-input.vue +155 -0
  170. package/dist/runtime/components/input/ui/spin-input.vue.d.ts +25 -0
  171. package/dist/runtime/components/link/link-button.d.vue.ts +4 -4
  172. package/dist/runtime/components/link/link-button.vue.d.ts +4 -4
  173. package/dist/runtime/components/link/link.d.vue.ts +2 -2
  174. package/dist/runtime/components/link/link.vue +1 -1
  175. package/dist/runtime/components/link/link.vue.d.ts +2 -2
  176. package/dist/runtime/components/modal/modal-close-button.d.vue.ts +2 -2
  177. package/dist/runtime/components/modal/modal-close-button.vue +1 -1
  178. package/dist/runtime/components/modal/modal-close-button.vue.d.ts +2 -2
  179. package/dist/runtime/components/modal/modal-header.d.vue.ts +2 -2
  180. package/dist/runtime/components/modal/modal-header.vue +1 -1
  181. package/dist/runtime/components/modal/modal-header.vue.d.ts +2 -2
  182. package/dist/runtime/components/modal/modal-root.d.vue.ts +2 -2
  183. package/dist/runtime/components/modal/modal-root.vue +3 -3
  184. package/dist/runtime/components/modal/modal-root.vue.d.ts +2 -2
  185. package/dist/runtime/components/modal/modal-title.d.vue.ts +2 -2
  186. package/dist/runtime/components/modal/modal-title.vue +2 -2
  187. package/dist/runtime/components/modal/modal-title.vue.d.ts +2 -2
  188. package/dist/runtime/components/nav-link/nav-icon-link.d.vue.ts +2 -2
  189. package/dist/runtime/components/nav-link/nav-icon-link.vue.d.ts +2 -2
  190. package/dist/runtime/components/nav-link/nav-link.d.vue.ts +5 -5
  191. package/dist/runtime/components/nav-link/nav-link.vue.d.ts +5 -5
  192. package/dist/runtime/components/paper.d.vue.ts +2 -2
  193. package/dist/runtime/components/paper.vue.d.ts +2 -2
  194. package/dist/runtime/components/popover/lib/use-popover.d.ts +1 -0
  195. package/dist/runtime/components/popover/lib/use-popover.js +2 -1
  196. package/dist/runtime/components/popover/popover-dropdown.vue +2 -0
  197. package/dist/runtime/components/popover/popover-target.d.vue.ts +7 -3
  198. package/dist/runtime/components/popover/popover-target.vue +10 -2
  199. package/dist/runtime/components/popover/popover-target.vue.d.ts +7 -3
  200. package/dist/runtime/components/popover/popover.vue +1 -1
  201. package/dist/runtime/components/progress/progress-label.d.vue.ts +2 -2
  202. package/dist/runtime/components/progress/progress-label.vue.d.ts +2 -2
  203. package/dist/runtime/components/progress/progress-root.d.vue.ts +2 -2
  204. package/dist/runtime/components/progress/progress-root.vue.d.ts +2 -2
  205. package/dist/runtime/components/progress/progress-section.d.vue.ts +2 -2
  206. package/dist/runtime/components/progress/progress-section.vue.d.ts +2 -2
  207. package/dist/runtime/components/renderless/renderless.d.vue.ts +2 -2
  208. package/dist/runtime/components/renderless/renderless.vue.d.ts +2 -2
  209. package/dist/runtime/components/roving-focus/roving-focus-item.d.vue.ts +2 -2
  210. package/dist/runtime/components/roving-focus/roving-focus-item.vue.d.ts +2 -2
  211. package/dist/runtime/components/roving-focus/roving-focus.d.vue.ts +2 -2
  212. package/dist/runtime/components/roving-focus/roving-focus.vue.d.ts +2 -2
  213. package/dist/runtime/components/select/select.d.vue.ts +12 -8
  214. package/dist/runtime/components/select/select.vue +9 -11
  215. package/dist/runtime/components/select/select.vue.d.ts +12 -8
  216. package/dist/runtime/components/table/table.d.vue.ts +10 -6
  217. package/dist/runtime/components/table/table.vue +1 -1
  218. package/dist/runtime/components/table/table.vue.d.ts +10 -6
  219. package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -2
  220. package/dist/runtime/components/tabs/tabs-list.vue +1 -1
  221. package/dist/runtime/components/tabs/tabs-list.vue.d.ts +2 -2
  222. package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +2 -2
  223. package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +2 -2
  224. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +2 -2
  225. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +2 -2
  226. package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +4 -4
  227. package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +4 -4
  228. package/dist/runtime/components/text.d.vue.ts +2 -2
  229. package/dist/runtime/components/text.vue +1 -1
  230. package/dist/runtime/components/text.vue.d.ts +2 -2
  231. package/dist/runtime/components/textarea.d.vue.ts +11 -9
  232. package/dist/runtime/components/textarea.vue +42 -30
  233. package/dist/runtime/components/textarea.vue.d.ts +11 -9
  234. package/dist/runtime/components/time-picker/index.d.ts +6 -0
  235. package/dist/runtime/components/time-picker/index.js +5 -0
  236. package/dist/runtime/components/time-picker/lib/clamp-time.d.ts +13 -0
  237. package/dist/runtime/components/time-picker/lib/clamp-time.js +23 -0
  238. package/dist/runtime/components/time-picker/lib/get-parsed-time.d.ts +16 -0
  239. package/dist/runtime/components/time-picker/lib/get-parsed-time.js +26 -0
  240. package/dist/runtime/components/time-picker/lib/get-time-string.d.ts +13 -0
  241. package/dist/runtime/components/time-picker/lib/get-time-string.js +41 -0
  242. package/dist/runtime/components/time-picker/lib/pad-time.d.ts +1 -0
  243. package/dist/runtime/components/time-picker/lib/pad-time.js +3 -0
  244. package/dist/runtime/components/time-picker/lib/split-time-string.d.ts +5 -0
  245. package/dist/runtime/components/time-picker/lib/split-time-string.js +4 -0
  246. package/dist/runtime/components/time-picker/lib/use-time-picker.d.ts +29 -0
  247. package/dist/runtime/components/time-picker/lib/use-time-picker.js +103 -0
  248. package/dist/runtime/components/time-picker/model.d.ts +17 -0
  249. package/dist/runtime/components/time-picker/model.js +0 -0
  250. package/dist/runtime/components/time-picker/time-picker.d.vue.ts +88 -0
  251. package/dist/runtime/components/time-picker/time-picker.vue +313 -0
  252. package/dist/runtime/components/time-picker/time-picker.vue.d.ts +88 -0
  253. package/dist/runtime/components/title.d.vue.ts +2 -2
  254. package/dist/runtime/components/title.vue +1 -1
  255. package/dist/runtime/components/title.vue.d.ts +2 -2
  256. package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +2 -2
  257. package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +2 -2
  258. package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +10 -6
  259. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +10 -6
  260. package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +2 -2
  261. package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +2 -2
  262. package/dist/runtime/composals/use-date-config.d.ts +11 -1
  263. package/dist/runtime/composals/use-date-config.js +8 -5
  264. package/dist/runtime/helpers/date/create-months.d.ts +1 -7
  265. package/dist/runtime/helpers/date/create-months.js +1 -1
  266. package/dist/runtime/helpers/date/get-days-between.js +4 -1
  267. package/dist/runtime/types/index.d.ts +1 -1
  268. package/package.json +18 -18
  269. package/dist/runtime/components/dialog/dialog.module.css +0 -1
  270. package/dist/runtime/components/input/input.d.vue.ts +0 -38
  271. package/dist/runtime/components/input/input.vue +0 -47
  272. package/dist/runtime/components/input/input.vue.d.ts +0 -38
  273. /package/dist/runtime/components/dialog/{types/index.d.ts → model.d.ts} +0 -0
  274. /package/dist/runtime/components/dialog/{types/index.js → model.js} +0 -0
@@ -1,16 +1,22 @@
1
1
  <script setup>
2
- import ActionIcon from "../action-icon/action-icon.vue";
3
2
  import TextInput from "./text-input.vue";
4
3
  const props = defineProps({
4
+ multiline: { type: Boolean, required: false },
5
+ withAria: { type: Boolean, required: false },
6
+ classes: { type: Object, required: false },
5
7
  error: { type: String, required: false },
6
8
  description: { type: String, required: false },
7
9
  label: { type: String, required: false },
8
10
  required: { type: Boolean, required: false },
11
+ id: { type: [String, null], required: false },
9
12
  radius: { type: String, required: false },
10
13
  size: { type: String, required: false },
11
14
  variant: { type: String, required: false },
15
+ resize: { type: void 0, required: false },
12
16
  leftSectionPE: { type: null, required: false },
13
- rightSectionPE: { type: null, required: false }
17
+ rightSectionPE: { type: null, required: false },
18
+ readonly: { type: Boolean, required: false },
19
+ disabled: { type: Boolean, required: false }
14
20
  });
15
21
  </script>
16
22
 
@@ -18,9 +24,7 @@ const props = defineProps({
18
24
  <TextInput type='email' v-bind='props'>
19
25
  <template #leftSection>
20
26
  <slot name='leftSection'>
21
- <ActionIcon variant='subtle'>
22
- <Icon name='gravity-ui:at' />
23
- </ActionIcon>
27
+ <Icon name='gravity-ui:at' />
24
28
  </slot>
25
29
  </template>
26
30
 
@@ -1,15 +1,15 @@
1
1
  import type { TextInputProps } from './index.js';
2
- declare var __VLS_7: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
2
+ declare var __VLS_9: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {}, __VLS_26: {};
3
3
  type __VLS_Slots = {} & {
4
- leftSection?: (props: typeof __VLS_7) => any;
4
+ leftSection?: (props: typeof __VLS_9) => any;
5
5
  } & {
6
- rightSection?: (props: typeof __VLS_19) => any;
6
+ rightSection?: (props: typeof __VLS_17) => any;
7
7
  } & {
8
- label?: (props: typeof __VLS_22) => any;
8
+ label?: (props: typeof __VLS_20) => any;
9
9
  } & {
10
- error?: (props: typeof __VLS_25) => any;
10
+ error?: (props: typeof __VLS_23) => any;
11
11
  } & {
12
- description?: (props: typeof __VLS_28) => any;
12
+ description?: (props: typeof __VLS_26) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,10 +1,11 @@
1
- export type * from './input.vue';
2
1
  export { useInputWrapperState, type WrapperContext } from './lib/input-wrapper.context.js';
3
2
  export type * from './number-input.vue';
4
3
  export type * from './password-input.vue';
5
4
  export type * from './text-input.vue';
6
5
  export type * from './types';
6
+ export type * from './ui/button-input.vue';
7
7
  export type * from './ui/input-base.vue';
8
8
  export type * from './ui/input-inline.vue';
9
9
  export type * from './ui/input-label.vue';
10
10
  export type * from './ui/input-wrapper.vue';
11
+ export type * from './ui/spin-input.vue';
@@ -14,5 +14,5 @@ export interface WrapperContext {
14
14
  /** section pointer-events */
15
15
  rightSectionPE?: CSSStyleDeclaration['pointerEvents'];
16
16
  }
17
- export declare const useProvideInputWrapper: (init: any) => import("vue").ComputedRef<any>;
18
- export declare const useInputWrapperState: () => import("vue").ComputedRef<any> | undefined;
17
+ export declare const useProvideInputWrapper: (init: any) => any;
18
+ export declare const useInputWrapperState: () => any;
@@ -1,7 +1,6 @@
1
1
  import { createInjectionState } from "@vueuse/core";
2
- import { computed } from "vue";
3
2
  const injectionKey = Symbol("InputWrapper");
4
- const [useProvide, useState] = createInjectionState((init) => computed(() => init), {
3
+ const [useProvide, useState] = createInjectionState((init) => init, {
5
4
  injectionKey
6
5
  });
7
6
  export const useProvideInputWrapper = useProvide;
@@ -15,17 +15,17 @@ type __VLS_ModelProps = {
15
15
  modelValue?: number;
16
16
  };
17
17
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
- declare var __VLS_16: {}, __VLS_19: {}, __VLS_46: {}, __VLS_49: {}, __VLS_52: {};
18
+ declare var __VLS_15: {}, __VLS_19: {}, __VLS_48: {}, __VLS_51: {}, __VLS_54: {};
19
19
  type __VLS_Slots = {} & {
20
- leftSection?: (props: typeof __VLS_16) => any;
20
+ leftSection?: (props: typeof __VLS_15) => any;
21
21
  } & {
22
22
  rightSection?: (props: typeof __VLS_19) => any;
23
23
  } & {
24
- label?: (props: typeof __VLS_46) => any;
24
+ label?: (props: typeof __VLS_48) => any;
25
25
  } & {
26
- error?: (props: typeof __VLS_49) => any;
26
+ error?: (props: typeof __VLS_51) => any;
27
27
  } & {
28
- description?: (props: typeof __VLS_52) => any;
28
+ description?: (props: typeof __VLS_54) => any;
29
29
  };
30
30
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
31
  "update:modelValue": (value: number) => any;
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { clamp } from "@vueuse/core";
3
- import { shallowRef, useId } from "vue";
3
+ import { shallowRef } from "vue";
4
4
  import UnstyledButton from "../button/unstyled-button.vue";
5
5
  import BaseInput from "./ui/input-base.vue";
6
6
  import InputWrapper from "./ui/input-wrapper.vue";
@@ -9,8 +9,6 @@ const {
9
9
  max = Number.MAX_SAFE_INTEGER,
10
10
  step = 1,
11
11
  hideControls,
12
- disabled,
13
- readonly,
14
12
  rightSectionPE = "all",
15
13
  ...rest
16
14
  } = defineProps({
@@ -30,7 +28,6 @@ const {
30
28
  leftSectionPE: { type: null, required: false },
31
29
  rightSectionPE: { type: null, required: false }
32
30
  });
33
- const id = useId();
34
31
  const focused = shallowRef(false);
35
32
  const value = defineModel({ type: Number, ...{ default: 0 } });
36
33
  function handleWheel(event) {
@@ -50,23 +47,27 @@ function handleBlur() {
50
47
  </script>
51
48
 
52
49
  <template>
53
- <InputWrapper v-bind='rest' :id :class='$style.root' :right-section-p-e>
54
- <BaseInput
55
- :id
56
- v-model='value'
57
- :min
58
- :max
59
- :step
60
- :readonly
61
- :disabled
62
- type='number'
63
- @focus='focused = true'
64
- @blur='handleBlur()'
65
- @wheel.prevent='handleWheel'
66
- >
50
+ <InputWrapper v-bind='rest' :class='$style.root' :right-section-p-e>
51
+ <BaseInput>
67
52
  <template v-if='$slots.leftSection' #leftSection>
68
53
  <slot name='leftSection' />
69
54
  </template>
55
+
56
+ <template #default='{ id, css }'>
57
+ <input
58
+ :id
59
+ v-model='value'
60
+ :class='css'
61
+ :min
62
+ :max
63
+ :step
64
+ type='number'
65
+ @focus='focused = true'
66
+ @blur='handleBlur()'
67
+ @wheel.prevent='handleWheel'
68
+ >
69
+ </template>
70
+
70
71
  <template v-if='$slots.rightSection || !hideControls' #rightSection>
71
72
  <slot name='rightSection'>
72
73
  <div :class='$style.controls'>
@@ -15,17 +15,17 @@ type __VLS_ModelProps = {
15
15
  modelValue?: number;
16
16
  };
17
17
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
- declare var __VLS_16: {}, __VLS_19: {}, __VLS_46: {}, __VLS_49: {}, __VLS_52: {};
18
+ declare var __VLS_15: {}, __VLS_19: {}, __VLS_48: {}, __VLS_51: {}, __VLS_54: {};
19
19
  type __VLS_Slots = {} & {
20
- leftSection?: (props: typeof __VLS_16) => any;
20
+ leftSection?: (props: typeof __VLS_15) => any;
21
21
  } & {
22
22
  rightSection?: (props: typeof __VLS_19) => any;
23
23
  } & {
24
- label?: (props: typeof __VLS_46) => any;
24
+ label?: (props: typeof __VLS_48) => any;
25
25
  } & {
26
- error?: (props: typeof __VLS_49) => any;
26
+ error?: (props: typeof __VLS_51) => any;
27
27
  } & {
28
- description?: (props: typeof __VLS_52) => any;
28
+ description?: (props: typeof __VLS_54) => any;
29
29
  };
30
30
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
31
  "update:modelValue": (value: number) => any;
@@ -1,15 +1,15 @@
1
1
  import type { TextInputProps } from './index.js';
2
- declare var __VLS_7: {}, __VLS_27: {}, __VLS_30: {}, __VLS_33: {}, __VLS_36: {};
2
+ declare var __VLS_9: {}, __VLS_30: {}, __VLS_33: {}, __VLS_36: {}, __VLS_39: {};
3
3
  type __VLS_Slots = {} & {
4
- rightSection?: (props: typeof __VLS_7) => any;
4
+ rightSection?: (props: typeof __VLS_9) => any;
5
5
  } & {
6
- leftSection?: (props: typeof __VLS_27) => any;
6
+ leftSection?: (props: typeof __VLS_30) => any;
7
7
  } & {
8
- label?: (props: typeof __VLS_30) => any;
8
+ label?: (props: typeof __VLS_33) => any;
9
9
  } & {
10
- error?: (props: typeof __VLS_33) => any;
10
+ error?: (props: typeof __VLS_36) => any;
11
11
  } & {
12
- description?: (props: typeof __VLS_36) => any;
12
+ description?: (props: typeof __VLS_39) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -3,15 +3,22 @@ import { ref } from "vue";
3
3
  import ActionIcon from "../action-icon/action-icon.vue";
4
4
  import TextInput from "./text-input.vue";
5
5
  const props = defineProps({
6
+ multiline: { type: Boolean, required: false },
7
+ withAria: { type: Boolean, required: false },
8
+ classes: { type: Object, required: false },
6
9
  error: { type: String, required: false },
7
10
  description: { type: String, required: false },
8
11
  label: { type: String, required: false },
9
12
  required: { type: Boolean, required: false },
13
+ id: { type: [String, null], required: false },
10
14
  radius: { type: String, required: false },
11
15
  size: { type: String, required: false },
12
16
  variant: { type: String, required: false },
17
+ resize: { type: void 0, required: false },
13
18
  leftSectionPE: { type: null, required: false },
14
- rightSectionPE: { type: null, required: false }
19
+ rightSectionPE: { type: null, required: false },
20
+ readonly: { type: Boolean, required: false },
21
+ disabled: { type: Boolean, required: false }
15
22
  });
16
23
  const password = ref(true);
17
24
  </script>
@@ -1,15 +1,15 @@
1
1
  import type { TextInputProps } from './index.js';
2
- declare var __VLS_7: {}, __VLS_27: {}, __VLS_30: {}, __VLS_33: {}, __VLS_36: {};
2
+ declare var __VLS_9: {}, __VLS_30: {}, __VLS_33: {}, __VLS_36: {}, __VLS_39: {};
3
3
  type __VLS_Slots = {} & {
4
- rightSection?: (props: typeof __VLS_7) => any;
4
+ rightSection?: (props: typeof __VLS_9) => any;
5
5
  } & {
6
- leftSection?: (props: typeof __VLS_27) => any;
6
+ leftSection?: (props: typeof __VLS_30) => any;
7
7
  } & {
8
- label?: (props: typeof __VLS_30) => any;
8
+ label?: (props: typeof __VLS_33) => any;
9
9
  } & {
10
- error?: (props: typeof __VLS_33) => any;
10
+ error?: (props: typeof __VLS_36) => any;
11
11
  } & {
12
- description?: (props: typeof __VLS_36) => any;
12
+ description?: (props: typeof __VLS_39) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,26 +1,36 @@
1
+ import type { Classes } from '@nui/types';
2
+ import type { InputBaseProps } from './types/index.js';
1
3
  import type { InputWrapperProps } from './ui/input-wrapper.vue.js';
2
- export type TextInputProps = Omit<InputWrapperProps, 'id' | 'multiline' | 'resize'>;
4
+ export interface TextInputProps extends InputWrapperProps, InputBaseProps {
5
+ /** If set, the input can have multiple lines, for example when `component="textarea"` @default `false` */
6
+ multiline?: boolean;
7
+ /** If set, `aria-` and other accessibility attributes are added to the input @default `true` */
8
+ withAria?: boolean;
9
+ classes?: Classes<'wrapper' | 'input'>;
10
+ }
3
11
  type __VLS_Props = TextInputProps;
4
12
  type __VLS_ModelProps = {
5
- modelValue?: string | undefined;
13
+ modelValue?: string;
6
14
  };
7
15
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
- declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {};
16
+ declare var __VLS_15: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
9
17
  type __VLS_Slots = {} & {
10
- leftSection?: (props: typeof __VLS_11) => any;
18
+ leftSection?: (props: typeof __VLS_15) => any;
11
19
  } & {
12
- rightSection?: (props: typeof __VLS_14) => any;
20
+ rightSection?: (props: typeof __VLS_19) => any;
13
21
  } & {
14
- label?: (props: typeof __VLS_17) => any;
22
+ label?: (props: typeof __VLS_22) => any;
15
23
  } & {
16
- error?: (props: typeof __VLS_20) => any;
24
+ error?: (props: typeof __VLS_25) => any;
17
25
  } & {
18
- description?: (props: typeof __VLS_23) => any;
26
+ description?: (props: typeof __VLS_28) => any;
19
27
  };
20
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
- "update:modelValue": (value: string | undefined) => any;
28
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
29
+ readonly $el: HTMLElement | null | undefined;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ "update:modelValue": (value: string) => any;
22
32
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
- "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
33
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
24
34
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
35
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
36
  declare const _default: typeof __VLS_export;
@@ -1,40 +1,59 @@
1
1
  <script setup>
2
- import { useId } from "vue";
2
+ import { unrefElement } from "@vueuse/core";
3
+ import { useTemplateRef } from "vue";
3
4
  import BaseInput from "./ui/input-base.vue";
4
5
  import InputWrapper from "./ui/input-wrapper.vue";
5
- defineOptions({
6
- inheritAttrs: false
7
- });
8
- const { required, ...props } = defineProps({
6
+ const { classes, ...props } = defineProps({
7
+ multiline: { type: Boolean, required: false },
8
+ withAria: { type: Boolean, required: false },
9
+ classes: { type: Object, required: false },
9
10
  error: { type: String, required: false },
10
11
  description: { type: String, required: false },
11
12
  label: { type: String, required: false },
12
13
  required: { type: Boolean, required: false },
14
+ id: { type: [String, null], required: false },
13
15
  radius: { type: String, required: false },
14
16
  size: { type: String, required: false },
15
17
  variant: { type: String, required: false },
18
+ resize: { type: void 0, required: false },
16
19
  leftSectionPE: { type: null, required: false },
17
- rightSectionPE: { type: null, required: false }
20
+ rightSectionPE: { type: null, required: false },
21
+ readonly: { type: Boolean, required: false },
22
+ disabled: { type: Boolean, required: false }
23
+ });
24
+ const value = defineModel({ type: String, ...{ default: "" } });
25
+ const ref = useTemplateRef("input");
26
+ defineExpose({
27
+ get $el() {
28
+ return unrefElement(ref.value);
29
+ }
18
30
  });
19
- const model = defineModel({ type: null });
20
- const id = useId();
21
31
  </script>
22
32
 
23
33
  <template>
24
- <InputWrapper :id v-bind='props' :class='$attrs?.class'>
25
- <BaseInput
26
- :id
27
- v-model='model'
28
- v-bind='{ ...$attrs, class: void 0 }'
29
- :required
30
- >
34
+ <InputWrapper v-bind='props' :class='[$attrs.class, classes?.wrapper]'>
35
+ <BaseInput>
31
36
  <template v-if='$slots.leftSection' #leftSection>
32
37
  <slot name='leftSection' />
33
38
  </template>
39
+
40
+ <template #default='{ id, css }'>
41
+ <input
42
+ v-bind='{ ...$attrs, class: css }'
43
+ :id
44
+ ref='input'
45
+ v-model='value'
46
+ :required
47
+ :disabled
48
+ :readonly
49
+ >
50
+ </template>
51
+
34
52
  <template v-if='$slots.rightSection' #rightSection>
35
53
  <slot name='rightSection' />
36
54
  </template>
37
55
  </BaseInput>
56
+
38
57
  <template v-if='$slots.label' #label>
39
58
  <slot name='label' />
40
59
  </template>
@@ -1,26 +1,36 @@
1
+ import type { Classes } from '@nui/types';
2
+ import type { InputBaseProps } from './types/index.js';
1
3
  import type { InputWrapperProps } from './ui/input-wrapper.vue.js';
2
- export type TextInputProps = Omit<InputWrapperProps, 'id' | 'multiline' | 'resize'>;
4
+ export interface TextInputProps extends InputWrapperProps, InputBaseProps {
5
+ /** If set, the input can have multiple lines, for example when `component="textarea"` @default `false` */
6
+ multiline?: boolean;
7
+ /** If set, `aria-` and other accessibility attributes are added to the input @default `true` */
8
+ withAria?: boolean;
9
+ classes?: Classes<'wrapper' | 'input'>;
10
+ }
3
11
  type __VLS_Props = TextInputProps;
4
12
  type __VLS_ModelProps = {
5
- modelValue?: string | undefined;
13
+ modelValue?: string;
6
14
  };
7
15
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
- declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {};
16
+ declare var __VLS_15: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
9
17
  type __VLS_Slots = {} & {
10
- leftSection?: (props: typeof __VLS_11) => any;
18
+ leftSection?: (props: typeof __VLS_15) => any;
11
19
  } & {
12
- rightSection?: (props: typeof __VLS_14) => any;
20
+ rightSection?: (props: typeof __VLS_19) => any;
13
21
  } & {
14
- label?: (props: typeof __VLS_17) => any;
22
+ label?: (props: typeof __VLS_22) => any;
15
23
  } & {
16
- error?: (props: typeof __VLS_20) => any;
24
+ error?: (props: typeof __VLS_25) => any;
17
25
  } & {
18
- description?: (props: typeof __VLS_23) => any;
26
+ description?: (props: typeof __VLS_28) => any;
19
27
  };
20
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
- "update:modelValue": (value: string | undefined) => any;
28
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
29
+ readonly $el: HTMLElement | null | undefined;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ "update:modelValue": (value: string) => any;
22
32
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
- "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
33
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
24
34
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
35
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
36
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,7 @@
1
1
  export type InputVariant = 'default' | 'filled' | 'unstyled';
2
2
  export interface InputBaseProps {
3
+ /** If set, the value cannot be updated */
3
4
  readonly?: boolean;
5
+ /** If set, the component becomes disabled */
4
6
  disabled?: boolean;
5
7
  }
@@ -0,0 +1,42 @@
1
+ import type { InputBaseProps } from '../types/index.js';
2
+ import type { BaseInputProps } from './input-base.vue.js';
3
+ import type { InputWrapperProps } from './input-wrapper.vue.js';
4
+ export interface ButtonInputProps extends InputWrapperProps, BaseInputProps, InputBaseProps {
5
+ /** If set, the input can have multiple lines, for example when `component="textarea"` @default `false` */
6
+ multiline?: boolean;
7
+ name?: string;
8
+ }
9
+ type __VLS_Props = ButtonInputProps;
10
+ type __VLS_ModelProps = {
11
+ modelValue?: unknown;
12
+ };
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare var __VLS_15: {}, __VLS_26: {}, __VLS_29: {}, __VLS_32: {}, __VLS_35: {}, __VLS_38: {};
15
+ type __VLS_Slots = {} & {
16
+ leftSection?: (props: typeof __VLS_15) => any;
17
+ } & {
18
+ default?: (props: typeof __VLS_26) => any;
19
+ } & {
20
+ rightSection?: (props: typeof __VLS_29) => any;
21
+ } & {
22
+ label?: (props: typeof __VLS_32) => any;
23
+ } & {
24
+ error?: (props: typeof __VLS_35) => any;
25
+ } & {
26
+ description?: (props: typeof __VLS_38) => any;
27
+ };
28
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
29
+ readonly $el: HTMLElement | null | undefined;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ "update:modelValue": (value: unknown) => any;
32
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
33
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
34
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,103 @@
1
+ <script setup>
2
+ import { unrefElement } from "@vueuse/core";
3
+ import { useTemplateRef } from "vue";
4
+ import UnstyledButton from "../../button/unstyled-button.vue";
5
+ import InputBase from "./input-base.vue";
6
+ import InputWrapper from "./input-wrapper.vue";
7
+ defineOptions({ inheritAttrs: false });
8
+ const props = defineProps({
9
+ multiline: { type: Boolean, required: false },
10
+ name: { type: String, required: false },
11
+ error: { type: String, required: false },
12
+ description: { type: String, required: false },
13
+ label: { type: String, required: false },
14
+ required: { type: Boolean, required: false },
15
+ id: { type: [String, null], required: false },
16
+ radius: { type: String, required: false },
17
+ size: { type: String, required: false },
18
+ variant: { type: String, required: false },
19
+ resize: { type: void 0, required: false },
20
+ leftSectionPE: { type: null, required: false },
21
+ rightSectionPE: { type: null, required: false },
22
+ classes: { type: Object, required: false },
23
+ readonly: { type: Boolean, required: false },
24
+ disabled: { type: Boolean, required: false }
25
+ });
26
+ const model = defineModel({ type: null });
27
+ const ref = useTemplateRef("button");
28
+ defineExpose({
29
+ get $el() {
30
+ return unrefElement(ref.value);
31
+ }
32
+ });
33
+ </script>
34
+
35
+ <template>
36
+ <InputWrapper v-bind='props'>
37
+ <InputBase :class='$style.base'>
38
+ <template v-if='!!$slots.leftSection' #leftSection>
39
+ <slot name='leftSection' />
40
+ </template>
41
+
42
+ <template #default='{ id, css }'>
43
+ <UnstyledButton
44
+ :id
45
+ ref='button'
46
+ v-bind='{ ...$attrs, class: null }'
47
+ :disabled
48
+ :readonly
49
+ :class='[css, $style.button]'
50
+ :mod='{ multiline: props.multiline }'
51
+ >
52
+ <slot />
53
+ </UnstyledButton>
54
+ <input
55
+ :id
56
+ v-model='model'
57
+ :name
58
+ type='hidden'
59
+ :required
60
+ :disabled
61
+ :readonly
62
+ >
63
+ </template>
64
+
65
+ <template v-if='!!$slots.rightSection' #rightSection>
66
+ <slot name='rightSection' />
67
+ </template>
68
+ </InputBase>
69
+
70
+ <template v-if='!!$slots.label' #label>
71
+ <slot name='label' />
72
+ </template>
73
+ <template v-if='!!$slots.error' #error>
74
+ <slot name='error' />
75
+ </template>
76
+ <template v-if='!!$slots.description' #description>
77
+ <slot name='description' />
78
+ </template>
79
+ </InputWrapper>
80
+ </template>
81
+
82
+ <style lang="postcss" module>
83
+ .base {
84
+ --input-cursor: pointer;
85
+ }
86
+
87
+ .button {
88
+ width: 100%;
89
+ min-width: rem(150px);
90
+
91
+ font-weight: 400;
92
+
93
+ &:where([data-multiline]) {
94
+ height: auto;
95
+ padding-block: calc(var(--input-padding-inline-end) / 2);
96
+ }
97
+ }
98
+
99
+ .section {
100
+ font-size: var(--font-size-lg);
101
+ color: var(--color-dimmed);
102
+ }
103
+ </style>
@@ -0,0 +1,42 @@
1
+ import type { InputBaseProps } from '../types/index.js';
2
+ import type { BaseInputProps } from './input-base.vue.js';
3
+ import type { InputWrapperProps } from './input-wrapper.vue.js';
4
+ export interface ButtonInputProps extends InputWrapperProps, BaseInputProps, InputBaseProps {
5
+ /** If set, the input can have multiple lines, for example when `component="textarea"` @default `false` */
6
+ multiline?: boolean;
7
+ name?: string;
8
+ }
9
+ type __VLS_Props = ButtonInputProps;
10
+ type __VLS_ModelProps = {
11
+ modelValue?: unknown;
12
+ };
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare var __VLS_15: {}, __VLS_26: {}, __VLS_29: {}, __VLS_32: {}, __VLS_35: {}, __VLS_38: {};
15
+ type __VLS_Slots = {} & {
16
+ leftSection?: (props: typeof __VLS_15) => any;
17
+ } & {
18
+ default?: (props: typeof __VLS_26) => any;
19
+ } & {
20
+ rightSection?: (props: typeof __VLS_29) => any;
21
+ } & {
22
+ label?: (props: typeof __VLS_32) => any;
23
+ } & {
24
+ error?: (props: typeof __VLS_35) => any;
25
+ } & {
26
+ description?: (props: typeof __VLS_38) => any;
27
+ };
28
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
29
+ readonly $el: HTMLElement | null | undefined;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ "update:modelValue": (value: unknown) => any;
32
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
33
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
34
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };