autocomplete.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. package vuetifyx
  2. import (
  3. "fmt"
  4. h "github.com/theplant/htmlgo"
  5. )
  6. func (b *VXAutocompleteBuilder) AllowOverflow(v bool) (r *VXAutocompleteBuilder) {
  7. b.tag.Attr(":allow-overflow", fmt.Sprint(v))
  8. return b
  9. }
  10. func (b *VXAutocompleteBuilder) AppendIcon(v string) (r *VXAutocompleteBuilder) {
  11. b.tag.Attr("append-icon", v)
  12. return b
  13. }
  14. func (b *VXAutocompleteBuilder) AppendOuterIcon(v string) (r *VXAutocompleteBuilder) {
  15. b.tag.Attr("append-outer-icon", v)
  16. return b
  17. }
  18. func (b *VXAutocompleteBuilder) Attach(v interface{}) (r *VXAutocompleteBuilder) {
  19. b.tag.Attr(":attach", h.JSONString(v))
  20. return b
  21. }
  22. func (b *VXAutocompleteBuilder) AutoSelectFirst(v bool) (r *VXAutocompleteBuilder) {
  23. b.tag.Attr(":auto-select-first", fmt.Sprint(v))
  24. return b
  25. }
  26. func (b *VXAutocompleteBuilder) Autofocus(v bool) (r *VXAutocompleteBuilder) {
  27. b.tag.Attr(":autofocus", fmt.Sprint(v))
  28. return b
  29. }
  30. func (b *VXAutocompleteBuilder) BackgroundColor(v string) (r *VXAutocompleteBuilder) {
  31. b.tag.Attr("background-color", v)
  32. return b
  33. }
  34. func (b *VXAutocompleteBuilder) CacheItems(v bool) (r *VXAutocompleteBuilder) {
  35. b.tag.Attr(":cache-items", fmt.Sprint(v))
  36. return b
  37. }
  38. func (b *VXAutocompleteBuilder) Chips(v bool) (r *VXAutocompleteBuilder) {
  39. b.tag.Attr(":chips", fmt.Sprint(v))
  40. return b
  41. }
  42. func (b *VXAutocompleteBuilder) ClearIcon(v string) (r *VXAutocompleteBuilder) {
  43. b.tag.Attr("clear-icon", v)
  44. return b
  45. }
  46. func (b *VXAutocompleteBuilder) Clearable(v bool) (r *VXAutocompleteBuilder) {
  47. b.tag.Attr(":clearable", fmt.Sprint(v))
  48. return b
  49. }
  50. func (b *VXAutocompleteBuilder) Color(v string) (r *VXAutocompleteBuilder) {
  51. b.tag.Attr("color", v)
  52. return b
  53. }
  54. func (b *VXAutocompleteBuilder) Counter(v int) (r *VXAutocompleteBuilder) {
  55. b.tag.Attr(":counter", fmt.Sprint(v))
  56. return b
  57. }
  58. func (b *VXAutocompleteBuilder) CounterValue(v interface{}) (r *VXAutocompleteBuilder) {
  59. b.tag.Attr(":counter-value", h.JSONString(v))
  60. return b
  61. }
  62. func (b *VXAutocompleteBuilder) Dark(v bool) (r *VXAutocompleteBuilder) {
  63. b.tag.Attr(":dark", fmt.Sprint(v))
  64. return b
  65. }
  66. func (b *VXAutocompleteBuilder) DeletableChips(v bool) (r *VXAutocompleteBuilder) {
  67. b.tag.Attr(":deletable-chips", fmt.Sprint(v))
  68. return b
  69. }
  70. func (b *VXAutocompleteBuilder) Dense(v bool) (r *VXAutocompleteBuilder) {
  71. b.tag.Attr(":dense", fmt.Sprint(v))
  72. return b
  73. }
  74. func (b *VXAutocompleteBuilder) DisableLookup(v bool) (r *VXAutocompleteBuilder) {
  75. b.tag.Attr(":disable-lookup", fmt.Sprint(v))
  76. return b
  77. }
  78. func (b *VXAutocompleteBuilder) Disabled(v bool) (r *VXAutocompleteBuilder) {
  79. b.tag.Attr(":disabled", fmt.Sprint(v))
  80. return b
  81. }
  82. func (b *VXAutocompleteBuilder) Eager(v bool) (r *VXAutocompleteBuilder) {
  83. b.tag.Attr(":eager", fmt.Sprint(v))
  84. return b
  85. }
  86. func (b *VXAutocompleteBuilder) Error(v bool) (r *VXAutocompleteBuilder) {
  87. b.tag.Attr(":error", fmt.Sprint(v))
  88. return b
  89. }
  90. func (b *VXAutocompleteBuilder) ErrorCount(v int) (r *VXAutocompleteBuilder) {
  91. b.tag.Attr(":error-count", fmt.Sprint(v))
  92. return b
  93. }
  94. func (b *VXAutocompleteBuilder) Filled(v bool) (r *VXAutocompleteBuilder) {
  95. b.tag.Attr(":filled", fmt.Sprint(v))
  96. return b
  97. }
  98. func (b *VXAutocompleteBuilder) Filter(v interface{}) (r *VXAutocompleteBuilder) {
  99. b.tag.Attr(":filter", h.JSONString(v))
  100. return b
  101. }
  102. func (b *VXAutocompleteBuilder) Flat(v bool) (r *VXAutocompleteBuilder) {
  103. b.tag.Attr(":flat", fmt.Sprint(v))
  104. return b
  105. }
  106. func (b *VXAutocompleteBuilder) FullWidth(v bool) (r *VXAutocompleteBuilder) {
  107. b.tag.Attr(":full-width", fmt.Sprint(v))
  108. return b
  109. }
  110. func (b *VXAutocompleteBuilder) Height(v int) (r *VXAutocompleteBuilder) {
  111. b.tag.Attr(":height", fmt.Sprint(v))
  112. return b
  113. }
  114. func (b *VXAutocompleteBuilder) HideDetails(v bool) (r *VXAutocompleteBuilder) {
  115. b.tag.Attr(":hide-details", fmt.Sprint(v))
  116. return b
  117. }
  118. func (b *VXAutocompleteBuilder) HideNoData(v bool) (r *VXAutocompleteBuilder) {
  119. b.tag.Attr(":hide-no-data", fmt.Sprint(v))
  120. return b
  121. }
  122. func (b *VXAutocompleteBuilder) HideSelected(v bool) (r *VXAutocompleteBuilder) {
  123. b.tag.Attr(":hide-selected", fmt.Sprint(v))
  124. return b
  125. }
  126. func (b *VXAutocompleteBuilder) Hint(v string) (r *VXAutocompleteBuilder) {
  127. b.tag.Attr("hint", v)
  128. return b
  129. }
  130. func (b *VXAutocompleteBuilder) Id(v string) (r *VXAutocompleteBuilder) {
  131. b.tag.Attr("id", v)
  132. return b
  133. }
  134. func (b *VXAutocompleteBuilder) ItemColor(v string) (r *VXAutocompleteBuilder) {
  135. b.tag.Attr("item-color", v)
  136. return b
  137. }
  138. func (b *VXAutocompleteBuilder) ItemDisabled(v string) (r *VXAutocompleteBuilder) {
  139. b.tag.Attr("item-disabled", v)
  140. return b
  141. }
  142. func (b *VXAutocompleteBuilder) ItemText(v string) (r *VXAutocompleteBuilder) {
  143. b.tag.Attr("item-text", v)
  144. return b
  145. }
  146. func (b *VXAutocompleteBuilder) ItemValue(v string) (r *VXAutocompleteBuilder) {
  147. b.tag.Attr("item-value", v)
  148. return b
  149. }
  150. func (b *VXAutocompleteBuilder) Label(v string) (r *VXAutocompleteBuilder) {
  151. b.tag.Attr("label", v)
  152. return b
  153. }
  154. func (b *VXAutocompleteBuilder) Light(v bool) (r *VXAutocompleteBuilder) {
  155. b.tag.Attr(":light", fmt.Sprint(v))
  156. return b
  157. }
  158. func (b *VXAutocompleteBuilder) LoaderHeight(v int) (r *VXAutocompleteBuilder) {
  159. b.tag.Attr(":loader-height", fmt.Sprint(v))
  160. return b
  161. }
  162. func (b *VXAutocompleteBuilder) Loading(v bool) (r *VXAutocompleteBuilder) {
  163. b.tag.Attr(":loading", fmt.Sprint(v))
  164. return b
  165. }
  166. func (b *VXAutocompleteBuilder) MenuProps(v interface{}) (r *VXAutocompleteBuilder) {
  167. b.tag.Attr(":menu-props", h.JSONString(v))
  168. return b
  169. }
  170. func (b *VXAutocompleteBuilder) Messages(v string) (r *VXAutocompleteBuilder) {
  171. b.tag.Attr("messages", v)
  172. return b
  173. }
  174. func (b *VXAutocompleteBuilder) Multiple(v bool) (r *VXAutocompleteBuilder) {
  175. b.tag.Attr(":multiple", fmt.Sprint(v))
  176. return b
  177. }
  178. func (b *VXAutocompleteBuilder) NoDataText(v string) (r *VXAutocompleteBuilder) {
  179. b.tag.Attr("no-data-text", v)
  180. return b
  181. }
  182. func (b *VXAutocompleteBuilder) NoFilter(v bool) (r *VXAutocompleteBuilder) {
  183. b.tag.Attr(":no-filter", fmt.Sprint(v))
  184. return b
  185. }
  186. func (b *VXAutocompleteBuilder) OpenOnClear(v bool) (r *VXAutocompleteBuilder) {
  187. b.tag.Attr(":open-on-clear", fmt.Sprint(v))
  188. return b
  189. }
  190. func (b *VXAutocompleteBuilder) Outlined(v bool) (r *VXAutocompleteBuilder) {
  191. b.tag.Attr(":outlined", fmt.Sprint(v))
  192. return b
  193. }
  194. func (b *VXAutocompleteBuilder) PersistentHint(v bool) (r *VXAutocompleteBuilder) {
  195. b.tag.Attr(":persistent-hint", fmt.Sprint(v))
  196. return b
  197. }
  198. func (b *VXAutocompleteBuilder) PersistentPlaceholder(v bool) (r *VXAutocompleteBuilder) {
  199. b.tag.Attr(":persistent-placeholder", fmt.Sprint(v))
  200. return b
  201. }
  202. func (b *VXAutocompleteBuilder) Placeholder(v string) (r *VXAutocompleteBuilder) {
  203. b.tag.Attr("placeholder", v)
  204. return b
  205. }
  206. func (b *VXAutocompleteBuilder) Prefix(v string) (r *VXAutocompleteBuilder) {
  207. b.tag.Attr("prefix", v)
  208. return b
  209. }
  210. func (b *VXAutocompleteBuilder) PrependIcon(v string) (r *VXAutocompleteBuilder) {
  211. b.tag.Attr("prepend-icon", v)
  212. return b
  213. }
  214. func (b *VXAutocompleteBuilder) PrependInnerIcon(v string) (r *VXAutocompleteBuilder) {
  215. b.tag.Attr("prepend-inner-icon", v)
  216. return b
  217. }
  218. func (b *VXAutocompleteBuilder) Readonly(v bool) (r *VXAutocompleteBuilder) {
  219. b.tag.Attr(":readonly", fmt.Sprint(v))
  220. return b
  221. }
  222. func (b *VXAutocompleteBuilder) ReturnObject(v bool) (r *VXAutocompleteBuilder) {
  223. b.tag.Attr(":return-object", fmt.Sprint(v))
  224. return b
  225. }
  226. func (b *VXAutocompleteBuilder) Reverse(v bool) (r *VXAutocompleteBuilder) {
  227. b.tag.Attr(":reverse", fmt.Sprint(v))
  228. return b
  229. }
  230. func (b *VXAutocompleteBuilder) Rounded(v bool) (r *VXAutocompleteBuilder) {
  231. b.tag.Attr(":rounded", fmt.Sprint(v))
  232. return b
  233. }
  234. func (b *VXAutocompleteBuilder) Rules(v interface{}) (r *VXAutocompleteBuilder) {
  235. b.tag.Attr(":rules", h.JSONString(v))
  236. return b
  237. }
  238. func (b *VXAutocompleteBuilder) SearchInput(v string) (r *VXAutocompleteBuilder) {
  239. b.tag.Attr("search-input", v)
  240. return b
  241. }
  242. func (b *VXAutocompleteBuilder) Shaped(v bool) (r *VXAutocompleteBuilder) {
  243. b.tag.Attr(":shaped", fmt.Sprint(v))
  244. return b
  245. }
  246. func (b *VXAutocompleteBuilder) SingleLine(v bool) (r *VXAutocompleteBuilder) {
  247. b.tag.Attr(":single-line", fmt.Sprint(v))
  248. return b
  249. }
  250. func (b *VXAutocompleteBuilder) SmallChips(v bool) (r *VXAutocompleteBuilder) {
  251. b.tag.Attr(":small-chips", fmt.Sprint(v))
  252. return b
  253. }
  254. func (b *VXAutocompleteBuilder) Solo(v bool) (r *VXAutocompleteBuilder) {
  255. b.tag.Attr(":solo", fmt.Sprint(v))
  256. return b
  257. }
  258. func (b *VXAutocompleteBuilder) SoloInverted(v bool) (r *VXAutocompleteBuilder) {
  259. b.tag.Attr(":solo-inverted", fmt.Sprint(v))
  260. return b
  261. }
  262. func (b *VXAutocompleteBuilder) Success(v bool) (r *VXAutocompleteBuilder) {
  263. b.tag.Attr(":success", fmt.Sprint(v))
  264. return b
  265. }
  266. func (b *VXAutocompleteBuilder) SuccessMessages(v string) (r *VXAutocompleteBuilder) {
  267. b.tag.Attr("success-messages", v)
  268. return b
  269. }
  270. func (b *VXAutocompleteBuilder) Suffix(v string) (r *VXAutocompleteBuilder) {
  271. b.tag.Attr("suffix", v)
  272. return b
  273. }
  274. func (b *VXAutocompleteBuilder) Type(v string) (r *VXAutocompleteBuilder) {
  275. b.tag.Attr("type", v)
  276. return b
  277. }
  278. func (b *VXAutocompleteBuilder) ValidateOnBlur(v bool) (r *VXAutocompleteBuilder) {
  279. b.tag.Attr(":validate-on-blur", fmt.Sprint(v))
  280. return b
  281. }
  282. func (b *VXAutocompleteBuilder) Value(v interface{}) (r *VXAutocompleteBuilder) {
  283. b.tag.Attr(":value", h.JSONString(v))
  284. return b
  285. }
  286. func (b *VXAutocompleteBuilder) ValueComparator(v interface{}) (r *VXAutocompleteBuilder) {
  287. b.tag.Attr(":value-comparator", h.JSONString(v))
  288. return b
  289. }
  290. func (b *VXAutocompleteBuilder) SetAttr(k string, v interface{}) {
  291. b.tag.SetAttr(k, v)
  292. }
  293. func (b *VXAutocompleteBuilder) Attr(vs ...interface{}) (r *VXAutocompleteBuilder) {
  294. b.tag.Attr(vs...)
  295. return b
  296. }
  297. func (b *VXAutocompleteBuilder) Children(children ...h.HTMLComponent) (r *VXAutocompleteBuilder) {
  298. b.tag.Children(children...)
  299. return b
  300. }
  301. func (b *VXAutocompleteBuilder) AppendChildren(children ...h.HTMLComponent) (r *VXAutocompleteBuilder) {
  302. b.tag.AppendChildren(children...)
  303. return b
  304. }
  305. func (b *VXAutocompleteBuilder) PrependChildren(children ...h.HTMLComponent) (r *VXAutocompleteBuilder) {
  306. b.tag.PrependChildren(children...)
  307. return b
  308. }
  309. func (b *VXAutocompleteBuilder) Class(names ...string) (r *VXAutocompleteBuilder) {
  310. b.tag.Class(names...)
  311. return b
  312. }
  313. func (b *VXAutocompleteBuilder) ClassIf(name string, add bool) (r *VXAutocompleteBuilder) {
  314. b.tag.ClassIf(name, add)
  315. return b
  316. }
  317. func (b *VXAutocompleteBuilder) On(name string, value string) (r *VXAutocompleteBuilder) {
  318. b.tag.Attr(fmt.Sprintf("v-on:%s", name), value)
  319. return b
  320. }
  321. func (b *VXAutocompleteBuilder) Bind(name string, value string) (r *VXAutocompleteBuilder) {
  322. b.tag.Attr(fmt.Sprintf("v-bind:%s", name), value)
  323. return b
  324. }