1 module uim.bootstrap.bs4.components.forms.inputgroups.group; 2 3 import uim.bootstrap; 4 5 class DBS4InputGroup : DBS4Obj { 6 mixin(H5This!("DIV", ["input-group"])); 7 8 mixin(MyContent!("prepend", "BS4InputGroupPrepend")); 9 unittest { 10 assert(Assert(BS4InputGroup.prepend, `<div class="input-group"><div class="input-group-prepend"></div></div>`)); 11 } 12 13 mixin(MyContent!("append", "BS4InputGroupAppend")); 14 unittest { 15 assert(Assert(BS4InputGroup.append, `<div class="input-group"><div class="input-group-append"></div></div>`)); 16 } 17 18 // Setting size of group 19 O size(this O)(string sizeName) { return this.classes("input-group-"~sizeName); } 20 O small(this O)() { return this.classes("input-group-sm"); } 21 O large(this O)() { return this.classes("input-group-lg"); } 22 unittest { 23 assert(Assert(BS4InputGroup.size("sm"), `<div class="input-group input-group-sm"></div>`)); 24 assert(Assert(BS4InputGroup.small, `<div class="input-group input-group-sm"></div>`)); 25 assert(Assert(BS4InputGroup.large, `<div class="input-group input-group-lg"></div>`)); 26 } 27 28 mixin(MyContent!("button", "BS4InputButton")); 29 mixin(MyContent!("checkbox", "BS4Checkbox")); 30 mixin(MyContent!("color", "BS4InputColor")); 31 mixin(MyContent!("inputDate", "BS4InputDate")); 32 mixin(MyContent!("inputDateTime", "BS4InputDateTime")); 33 mixin(MyContent!("email", "BS4InputEmail")); 34 mixin(MyContent!("file", "BS4InputFile")); 35 mixin(MyContent!("group", "BS4InputGroup")); 36 mixin(MyContent!("inputHidden", "BS4InputHidden")); 37 mixin(MyContent!("image", "BS4InputImage")); 38 mixin(MyContent!("month", "BS4InputMonth")); 39 mixin(MyContent!("number", "BS4InputNumber")); 40 mixin(MyContent!("password", "BS4Password")); 41 mixin(MyContent!("radio", "BS4Radio")); 42 mixin(MyContent!("inputRange", "BS4InputRange")); 43 mixin(MyContent!("inputReset", "BS4InputReset")); 44 mixin(MyContent!("search", "BS4InputSearch")); 45 mixin(MyContent!("select", "BS4InputSelect")); 46 mixin(MyContent!("submit", "BS4InputSubmit")); 47 mixin(MyContent!("telephone", "BS4InputTelephone")); 48 mixin(MyContent!("text", "BS4InputText")); 49 mixin(MyContent!("textarea", "BS4InputTextarea")); 50 mixin(MyContent!("inputTime", "BS4InputTime")); 51 mixin(MyContent!("url", "BS4InputUrl")); 52 mixin(MyContent!("week", "BS4InputWeek")); 53 } 54 mixin(H5Calls!"BS4InputGroup"); 55 56 unittest { 57 assert(Assert(BS4InputGroup, `<div class="input-group"></div>`)); 58 }