overflow-btn.go 11 KB

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