webawesome-controls.xml 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Web Awesome Control Definitions for UI Layout Definition Format -->
  3. <!-- Version: 1.5 - Web Awesome Components (formerly Shoelace) -->
  4. <patterns xmlns="http://quadarax.com/ui-layout-webawesome-controls"
  5. schema-version="1.6"
  6. target-platform="web">
  7. <!-- Base Web Component -->
  8. <control name="WebAwesomeComponent" type="composite" category="web-specific">
  9. <description>Base Web Awesome component with common attributes and behaviors</description>
  10. <constraints>
  11. <allowed-parents>any</allowed-parents>
  12. <allowed-children>depends-on-implementation</allowed-children>
  13. <container>true</container>
  14. <platform-constraints>
  15. <platform-constraint platform="web" min-version="3.0" feature-required="custom-elements" />
  16. </platform-constraints>
  17. </constraints>
  18. <attributes>
  19. <attribute name="class" type="string" default="" category="styling" />
  20. <attribute name="style" type="string" default="" category="styling" />
  21. <attribute name="id" type="string" default="" category="identification" />
  22. <attribute name="data-*" type="string" default="" category="data" />
  23. <attribute name="aria-*" type="string" default="" category="accessibility" />
  24. <attribute name="dir" type="enum" values="ltr,rtl,auto" default="ltr" category="localization" />
  25. <attribute name="lang" type="string" default="" category="localization" />
  26. <attribute name="hidden" type="bool" default="false" category="display" />
  27. </attributes>
  28. <behavior>
  29. <event name="wa-load" description="Emitted when component is loaded" />
  30. <event name="wa-error" description="Emitted when an error occurs" />
  31. </behavior>
  32. <accessibility>
  33. <requirement standard="wcag" level="aa" description="ARIA support" required="true" />
  34. <requirement standard="wcag" level="aa" description="Keyboard navigation" required="true" />
  35. </accessibility>
  36. </control>
  37. <!-- ACTION CONTROLS -->
  38. <control name="wa-button" type="button" category="web-specific" inherits="WebAwesomeComponent">
  39. <description>Buttons represent actions that are available to the user</description>
  40. <constraints>
  41. <allowed-parents>any</allowed-parents>
  42. <allowed-children>any-content,wa-icon,wa-spinner</allowed-children>
  43. <container>true</container>
  44. <required-slots>label,start,end</required-slots>
  45. </constraints>
  46. <attributes>
  47. <attribute name="variant" type="enum" values="default,primary,brand,success,neutral,warning,danger" default="default" />
  48. <attribute name="appearance" type="enum" values="filled,outlined,text" default="filled" />
  49. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  50. <attribute name="caret" type="bool" default="false" />
  51. <attribute name="disabled" type="bool" default="false" />
  52. <attribute name="loading" type="bool" default="false" />
  53. <attribute name="pill" type="bool" default="false" />
  54. <attribute name="circle" type="bool" default="false" />
  55. <attribute name="type" type="enum" values="button,submit,reset" default="button" />
  56. <attribute name="name" type="string" default="" />
  57. <attribute name="value" type="string" default="" />
  58. <attribute name="href" type="string" default="" />
  59. <attribute name="target" type="enum" values="_self,_blank,_parent,_top" default="_self" />
  60. <attribute name="rel" type="string" default="noreferrer noopener" />
  61. <attribute name="download" type="string" default="" />
  62. <attribute name="form" type="string" default="" />
  63. <attribute name="formaction" type="string" default="" />
  64. <attribute name="formenctype" type="string" default="" />
  65. <attribute name="formmethod" type="enum" values="post,get" default="" />
  66. <attribute name="formnovalidate" type="bool" default="false" />
  67. <attribute name="formtarget" type="string" default="" />
  68. </attributes>
  69. <behavior>
  70. <event name="wa-click" description="Emitted when the button is clicked" />
  71. <event name="wa-focus" description="Emitted when the button gains focus" />
  72. <event name="wa-blur" description="Emitted when the button loses focus" />
  73. <command name="click" description="Simulates a click on the button" />
  74. <command name="focus" description="Sets focus on the button" />
  75. <command name="blur" description="Removes focus from the button" />
  76. </behavior>
  77. </control>
  78. <control name="wa-button-group" type="container" category="web-specific" inherits="WebAwesomeComponent">
  79. <description>Button groups arrange buttons into horizontal or vertical groups</description>
  80. <constraints>
  81. <allowed-parents>any</allowed-parents>
  82. <allowed-children>wa-button</allowed-children>
  83. <container>true</container>
  84. </constraints>
  85. <attributes>
  86. <attribute name="label" type="string" default="" />
  87. <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
  88. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  89. </attributes>
  90. </control>
  91. <control name="wa-copy-button" type="button" category="web-specific" inherits="WebAwesomeComponent">
  92. <description>Copies text data to the clipboard when clicked</description>
  93. <constraints>
  94. <allowed-parents>any</allowed-parents>
  95. <allowed-children>any-content</allowed-children>
  96. <container>true</container>
  97. </constraints>
  98. <attributes>
  99. <attribute name="value" type="string" default="" />
  100. <attribute name="from" type="string" default="" />
  101. <attribute name="disabled" type="bool" default="false" />
  102. <attribute name="copy-label" type="string" default="Copy" />
  103. <attribute name="success-label" type="string" default="Copied" />
  104. <attribute name="error-label" type="string" default="Error" />
  105. <attribute name="feedback-duration" type="int" default="1000" min="0" />
  106. <attribute name="tooltip-placement" type="enum" values="top,right,bottom,left" default="top" />
  107. <attribute name="hoist" type="bool" default="false" />
  108. </attributes>
  109. <behavior>
  110. <event name="wa-copy" description="Emitted when content is copied successfully" />
  111. <event name="wa-error" description="Emitted when copy fails" />
  112. </behavior>
  113. </control>
  114. <control name="wa-dropdown" type="container" category="web-specific" inherits="WebAwesomeComponent">
  115. <description>Dropdowns expose contextual overlays for displaying lists of links and more</description>
  116. <constraints>
  117. <allowed-parents>any</allowed-parents>
  118. <allowed-children>wa-button,wa-menu,wa-dropdown-item</allowed-children>
  119. <container>true</container>
  120. <required-slots>trigger</required-slots>
  121. </constraints>
  122. <attributes>
  123. <attribute name="open" type="bool" default="false" />
  124. <attribute name="placement" type="enum" values="top,top-start,top-end,bottom,bottom-start,bottom-end,right,right-start,right-end,left,left-start,left-end" default="bottom-start" />
  125. <attribute name="disabled" type="bool" default="false" />
  126. <attribute name="stay-open-on-select" type="bool" default="false" />
  127. <attribute name="containing-element" type="string" default="" />
  128. <attribute name="distance" type="int" default="0" />
  129. <attribute name="skidding" type="int" default="0" />
  130. <attribute name="hoist" type="bool" default="false" />
  131. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  132. </attributes>
  133. <behavior>
  134. <event name="wa-show" description="Emitted when the dropdown opens" />
  135. <event name="wa-after-show" description="Emitted after the dropdown opens and animations complete" />
  136. <event name="wa-hide" description="Emitted when the dropdown closes" />
  137. <event name="wa-after-hide" description="Emitted after the dropdown closes and animations complete" />
  138. <command name="show" description="Shows the dropdown" />
  139. <command name="hide" description="Hides the dropdown" />
  140. </behavior>
  141. </control>
  142. <control name="wa-dropdown-item" type="menu" category="web-specific" inherits="WebAwesomeComponent">
  143. <description>Individual item in a dropdown menu</description>
  144. <constraints>
  145. <allowed-parents>wa-dropdown,wa-menu</allowed-parents>
  146. <allowed-children>any-content,wa-icon</allowed-children>
  147. <container>true</container>
  148. </constraints>
  149. <attributes>
  150. <attribute name="type" type="enum" values="normal,checkbox,radio" default="normal" />
  151. <attribute name="checked" type="bool" default="false" />
  152. <attribute name="value" type="string" default="" />
  153. <attribute name="disabled" type="bool" default="false" />
  154. </attributes>
  155. <behavior>
  156. <event name="wa-select" description="Emitted when the item is selected" />
  157. </behavior>
  158. </control>
  159. <control name="wa-qr-code" type="display" category="web-specific" inherits="WebAwesomeComponent">
  160. <description>Generates QR codes dynamically</description>
  161. <constraints>
  162. <allowed-parents>any</allowed-parents>
  163. <allowed-children>none</allowed-children>
  164. <container>false</container>
  165. </constraints>
  166. <attributes>
  167. <attribute name="value" type="string" default="" required="true" />
  168. <attribute name="label" type="string" default="" />
  169. <attribute name="size" type="int" default="128" min="16" max="1024" />
  170. <attribute name="fill" type="color" default="black" />
  171. <attribute name="background" type="color" default="white" />
  172. <attribute name="radius" type="decimal" default="0" min="0" max="0.5" />
  173. <attribute name="error-correction" type="enum" values="L,M,Q,H" default="M" />
  174. </attributes>
  175. </control>
  176. <!-- FEEDBACK & STATUS CONTROLS -->
  177. <control name="wa-badge" type="display" category="web-specific" inherits="WebAwesomeComponent">
  178. <description>Badges are small status indicators</description>
  179. <constraints>
  180. <allowed-parents>any</allowed-parents>
  181. <allowed-children>any-content</allowed-children>
  182. <container>true</container>
  183. </constraints>
  184. <attributes>
  185. <attribute name="variant" type="enum" values="primary,success,neutral,warning,danger" default="primary" />
  186. <attribute name="pill" type="bool" default="false" />
  187. <attribute name="pulse" type="bool" default="false" />
  188. </attributes>
  189. </control>
  190. <control name="wa-callout" type="display" category="web-specific" inherits="WebAwesomeComponent">
  191. <description>Callouts display informative messages or alerts</description>
  192. <constraints>
  193. <allowed-parents>any</allowed-parents>
  194. <allowed-children>any-content,wa-icon</allowed-children>
  195. <container>true</container>
  196. <required-slots>icon</required-slots>
  197. </constraints>
  198. <attributes>
  199. <attribute name="variant" type="enum" values="primary,success,neutral,warning,danger" default="primary" />
  200. <attribute name="open" type="bool" default="false" />
  201. <attribute name="closable" type="bool" default="false" />
  202. <attribute name="duration" type="string" default="Infinity" />
  203. </attributes>
  204. <behavior>
  205. <event name="wa-show" description="Emitted when the callout opens" />
  206. <event name="wa-after-show" description="Emitted after the callout opens" />
  207. <event name="wa-hide" description="Emitted when the callout closes" />
  208. <event name="wa-after-hide" description="Emitted after the callout closes" />
  209. <command name="toast" description="Displays the callout as a toast notification" />
  210. <command name="show" description="Shows the callout" />
  211. <command name="hide" description="Hides the callout" />
  212. </behavior>
  213. </control>
  214. <control name="wa-progress-bar" type="display" category="web-specific" inherits="WebAwesomeComponent">
  215. <description>Progress bars show the progress of a determinate or indeterminate operation</description>
  216. <constraints>
  217. <allowed-parents>any</allowed-parents>
  218. <allowed-children>none</allowed-children>
  219. <container>false</container>
  220. </constraints>
  221. <attributes>
  222. <attribute name="value" type="int" default="0" min="0" max="100" />
  223. <attribute name="indeterminate" type="bool" default="false" />
  224. <attribute name="label" type="string" default="" />
  225. <attribute name="lang" type="string" default="" />
  226. </attributes>
  227. </control>
  228. <control name="wa-progress-ring" type="display" category="web-specific" inherits="WebAwesomeComponent">
  229. <description>Progress rings show the progress of an operation in a circular format</description>
  230. <constraints>
  231. <allowed-parents>any</allowed-parents>
  232. <allowed-children>any-content</allowed-children>
  233. <container>true</container>
  234. </constraints>
  235. <attributes>
  236. <attribute name="value" type="int" default="0" min="0" max="100" />
  237. <attribute name="label" type="string" default="" />
  238. </attributes>
  239. </control>
  240. <control name="wa-skeleton" type="display" category="web-specific" inherits="WebAwesomeComponent">
  241. <description>Skeletons indicate content is loading</description>
  242. <constraints>
  243. <allowed-parents>any</allowed-parents>
  244. <allowed-children>none</allowed-children>
  245. <container>false</container>
  246. </constraints>
  247. <attributes>
  248. <attribute name="effect" type="enum" values="none,sheen,pulse" default="none" />
  249. </attributes>
  250. </control>
  251. <control name="wa-spinner" type="display" category="web-specific" inherits="WebAwesomeComponent">
  252. <description>Spinners indicate an operation is in progress</description>
  253. <constraints>
  254. <allowed-parents>any</allowed-parents>
  255. <allowed-children>none</allowed-children>
  256. <container>false</container>
  257. </constraints>
  258. <attributes>
  259. <attribute name="style" type="string" default="" />
  260. </attributes>
  261. </control>
  262. <control name="wa-tag" type="display" category="web-specific" inherits="WebAwesomeComponent">
  263. <description>Tags are used to label items</description>
  264. <constraints>
  265. <allowed-parents>any</allowed-parents>
  266. <allowed-children>any-content,wa-icon</allowed-children>
  267. <container>true</container>
  268. </constraints>
  269. <attributes>
  270. <attribute name="variant" type="enum" values="primary,success,neutral,warning,danger,text" default="neutral" />
  271. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  272. <attribute name="pill" type="bool" default="false" />
  273. <attribute name="removable" type="bool" default="false" />
  274. </attributes>
  275. <behavior>
  276. <event name="wa-remove" description="Emitted when the tag is removed" />
  277. </behavior>
  278. </control>
  279. <control name="wa-tooltip" type="display" category="web-specific" inherits="WebAwesomeComponent">
  280. <description>Tooltips display additional information on hover</description>
  281. <constraints>
  282. <allowed-parents>any</allowed-parents>
  283. <allowed-children>any-content</allowed-children>
  284. <container>true</container>
  285. </constraints>
  286. <attributes>
  287. <attribute name="content" type="string" default="" />
  288. <attribute name="placement" type="enum" values="top,top-start,top-end,right,right-start,right-end,bottom,bottom-start,bottom-end,left,left-start,left-end" default="top" />
  289. <attribute name="disabled" type="bool" default="false" />
  290. <attribute name="distance" type="int" default="8" />
  291. <attribute name="open" type="bool" default="false" />
  292. <attribute name="skidding" type="int" default="0" />
  293. <attribute name="trigger" type="string" default="hover focus" />
  294. <attribute name="hoist" type="bool" default="false" />
  295. </attributes>
  296. <behavior>
  297. <event name="wa-show" description="Emitted when tooltip shows" />
  298. <event name="wa-after-show" description="Emitted after tooltip shows" />
  299. <event name="wa-hide" description="Emitted when tooltip hides" />
  300. <event name="wa-after-hide" description="Emitted after tooltip hides" />
  301. </behavior>
  302. </control>
  303. <!-- FORM CONTROLS -->
  304. <control name="wa-checkbox" type="input" category="web-specific" inherits="WebAwesomeComponent">
  305. <description>Checkboxes allow users to toggle between checked and unchecked states</description>
  306. <constraints>
  307. <allowed-parents>any</allowed-parents>
  308. <allowed-children>any-content</allowed-children>
  309. <container>true</container>
  310. </constraints>
  311. <attributes>
  312. <attribute name="name" type="string" default="" />
  313. <attribute name="value" type="string" default="on" />
  314. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  315. <attribute name="disabled" type="bool" default="false" />
  316. <attribute name="checked" type="bool" default="false" />
  317. <attribute name="indeterminate" type="bool" default="false" />
  318. <attribute name="required" type="bool" default="false" />
  319. <attribute name="help-text" type="string" default="" />
  320. </attributes>
  321. <behavior>
  322. <event name="wa-change" description="Emitted when checked state changes" />
  323. <event name="wa-input" description="Emitted when user interacts with checkbox" />
  324. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  325. <command name="focus" description="Sets focus on the checkbox" />
  326. <command name="blur" description="Removes focus from the checkbox" />
  327. <command name="click" description="Simulates a click on the checkbox" />
  328. </behavior>
  329. <validation>
  330. <rule name="required" type="required" message="This field is required" severity="error" />
  331. </validation>
  332. </control>
  333. <control name="wa-color-picker" type="input" category="web-specific" inherits="WebAwesomeComponent">
  334. <description>Color pickers allow users to select a color</description>
  335. <constraints>
  336. <allowed-parents>any</allowed-parents>
  337. <allowed-children>none</allowed-children>
  338. <container>false</container>
  339. </constraints>
  340. <attributes>
  341. <attribute name="value" type="string" default="#ffffff" />
  342. <attribute name="label" type="string" default="" />
  343. <attribute name="format" type="enum" values="hex,rgb,hsl,hsv" default="hex" />
  344. <attribute name="inline" type="bool" default="false" />
  345. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  346. <attribute name="noformat" type="bool" default="false" />
  347. <attribute name="name" type="string" default="" />
  348. <attribute name="disabled" type="bool" default="false" />
  349. <attribute name="hoist" type="bool" default="false" />
  350. <attribute name="opacity" type="bool" default="false" />
  351. <attribute name="uppercase" type="bool" default="false" />
  352. <attribute name="swatches" type="string" default="" />
  353. <attribute name="form" type="string" default="" />
  354. <attribute name="required" type="bool" default="false" />
  355. </attributes>
  356. <behavior>
  357. <event name="wa-blur" description="Emitted when color picker loses focus" />
  358. <event name="wa-change" description="Emitted when color value changes" />
  359. <event name="wa-focus" description="Emitted when color picker gains focus" />
  360. <event name="wa-input" description="Emitted when color value is being changed" />
  361. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  362. <command name="focus" description="Sets focus on the color picker" />
  363. <command name="blur" description="Removes focus from the color picker" />
  364. <command name="getFormattedValue" description="Returns the formatted color value" />
  365. </behavior>
  366. </control>
  367. <control name="wa-input" type="input" category="web-specific" inherits="WebAwesomeComponent">
  368. <description>Inputs allow users to enter text</description>
  369. <constraints>
  370. <allowed-parents>any</allowed-parents>
  371. <allowed-children>wa-icon</allowed-children>
  372. <container>true</container>
  373. <required-slots>label,prefix,suffix,clear-icon,show-password-icon,hide-password-icon,help-text</required-slots>
  374. </constraints>
  375. <attributes>
  376. <attribute name="type" type="enum" values="date,datetime-local,email,number,password,search,tel,text,time,url" default="text" />
  377. <attribute name="name" type="string" default="" />
  378. <attribute name="value" type="string" default="" />
  379. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  380. <attribute name="filled" type="bool" default="false" />
  381. <attribute name="pill" type="bool" default="false" />
  382. <attribute name="label" type="string" default="" />
  383. <attribute name="help-text" type="string" default="" />
  384. <attribute name="clearable" type="bool" default="false" />
  385. <attribute name="disabled" type="bool" default="false" />
  386. <attribute name="placeholder" type="string" default="" />
  387. <attribute name="readonly" type="bool" default="false" />
  388. <attribute name="password-toggle" type="bool" default="false" />
  389. <attribute name="password-visible" type="bool" default="false" />
  390. <attribute name="no-spin-buttons" type="bool" default="false" />
  391. <attribute name="form" type="string" default="" />
  392. <attribute name="pattern" type="string" default="" />
  393. <attribute name="required" type="bool" default="false" />
  394. <attribute name="autocapitalize" type="enum" values="off,none,on,sentences,words,characters" default="off" />
  395. <attribute name="autocorrect" type="string" default="" />
  396. <attribute name="autocomplete" type="string" default="" />
  397. <attribute name="autofocus" type="bool" default="false" />
  398. <attribute name="enterkeyhint" type="string" default="" />
  399. <attribute name="spellcheck" type="bool" default="true" />
  400. <attribute name="inputmode" type="string" default="" />
  401. <attribute name="min" type="string" default="" />
  402. <attribute name="max" type="string" default="" />
  403. <attribute name="minlength" type="int" default="" />
  404. <attribute name="maxlength" type="int" default="" />
  405. <attribute name="step" type="string" default="" />
  406. </attributes>
  407. <behavior>
  408. <event name="wa-blur" description="Emitted when input loses focus" />
  409. <event name="wa-change" description="Emitted when input value changes" />
  410. <event name="wa-clear" description="Emitted when input is cleared" />
  411. <event name="wa-focus" description="Emitted when input gains focus" />
  412. <event name="wa-input" description="Emitted when input value is being changed" />
  413. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  414. <command name="focus" description="Sets focus on the input" />
  415. <command name="blur" description="Removes focus from the input" />
  416. <command name="select" description="Selects all text in the input" />
  417. <command name="setSelectionRange" description="Sets the selection range" />
  418. <command name="setRangeText" description="Replaces a range of text" />
  419. <command name="showPicker" description="Shows the browser picker for date/time inputs" />
  420. <command name="stepUp" description="Increments the value by step" />
  421. <command name="stepDown" description="Decrements the value by step" />
  422. </behavior>
  423. <validation>
  424. <rule name="required" type="required" message="This field is required" severity="error" />
  425. <rule name="pattern" type="pattern" pattern="{pattern}" message="Invalid format" severity="error" />
  426. <rule name="minlength" type="length" message="Too short" severity="error" />
  427. <rule name="maxlength" type="length" message="Too long" severity="error" />
  428. </validation>
  429. </control>
  430. <control name="wa-option" type="input" category="web-specific" inherits="WebAwesomeComponent">
  431. <description>Options are used within wa-select</description>
  432. <constraints>
  433. <allowed-parents>wa-select</allowed-parents>
  434. <allowed-children>any-content,wa-icon</allowed-children>
  435. <container>true</container>
  436. </constraints>
  437. <attributes>
  438. <attribute name="value" type="string" default="" required="true" />
  439. <attribute name="disabled" type="bool" default="false" />
  440. </attributes>
  441. </control>
  442. <control name="wa-radio" type="input" category="web-specific" inherits="WebAwesomeComponent">
  443. <description>Radio buttons allow users to select a single option from a group</description>
  444. <constraints>
  445. <allowed-parents>wa-radio-group,any</allowed-parents>
  446. <allowed-children>any-content</allowed-children>
  447. <container>true</container>
  448. </constraints>
  449. <attributes>
  450. <attribute name="value" type="string" default="" />
  451. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  452. <attribute name="disabled" type="bool" default="false" />
  453. <attribute name="checked" type="bool" default="false" />
  454. </attributes>
  455. <behavior>
  456. <event name="wa-blur" description="Emitted when radio loses focus" />
  457. <event name="wa-focus" description="Emitted when radio gains focus" />
  458. </behavior>
  459. </control>
  460. <control name="wa-radio-group" type="input" category="web-specific" inherits="WebAwesomeComponent">
  461. <description>Radio groups organize radio buttons</description>
  462. <constraints>
  463. <allowed-parents>any</allowed-parents>
  464. <allowed-children>wa-radio,wa-radio-button</allowed-children>
  465. <container>true</container>
  466. </constraints>
  467. <attributes>
  468. <attribute name="label" type="string" default="" />
  469. <attribute name="help-text" type="string" default="" />
  470. <attribute name="name" type="string" default="option" />
  471. <attribute name="value" type="string" default="" />
  472. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  473. <attribute name="form" type="string" default="" />
  474. <attribute name="required" type="bool" default="false" />
  475. </attributes>
  476. <behavior>
  477. <event name="wa-change" description="Emitted when selection changes" />
  478. <event name="wa-input" description="Emitted when user interacts with radio group" />
  479. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  480. </behavior>
  481. <validation>
  482. <rule name="required" type="required" message="Please select an option" severity="error" />
  483. </validation>
  484. </control>
  485. <control name="wa-rating" type="input" category="web-specific" inherits="WebAwesomeComponent">
  486. <description>Ratings allow users to rate something</description>
  487. <constraints>
  488. <allowed-parents>any</allowed-parents>
  489. <allowed-children>none</allowed-children>
  490. <container>false</container>
  491. </constraints>
  492. <attributes>
  493. <attribute name="label" type="string" default="" />
  494. <attribute name="value" type="decimal" default="0" min="0" />
  495. <attribute name="max" type="int" default="5" min="1" />
  496. <attribute name="precision" type="decimal" default="1" min="0.1" />
  497. <attribute name="readonly" type="bool" default="false" />
  498. <attribute name="disabled" type="bool" default="false" />
  499. <attribute name="get-symbol" type="string" default="" />
  500. </attributes>
  501. <behavior>
  502. <event name="wa-change" description="Emitted when rating changes" />
  503. <event name="wa-hover" description="Emitted when hovering over rating" />
  504. <command name="focus" description="Sets focus on the rating" />
  505. <command name="blur" description="Removes focus from the rating" />
  506. </behavior>
  507. </control>
  508. <control name="wa-select" type="input" category="web-specific" inherits="WebAwesomeComponent">
  509. <description>Selects allow users to choose one or more items from a dropdown</description>
  510. <constraints>
  511. <allowed-parents>any</allowed-parents>
  512. <allowed-children>wa-option,wa-divider</allowed-children>
  513. <container>true</container>
  514. <required-slots>label,prefix,clear-icon,expand-icon,tag,help-text</required-slots>
  515. </constraints>
  516. <attributes>
  517. <attribute name="multiple" type="bool" default="false" />
  518. <attribute name="max-options-visible" type="int" default="3" min="0" />
  519. <attribute name="disabled" type="bool" default="false" />
  520. <attribute name="name" type="string" default="" />
  521. <attribute name="placeholder" type="string" default="" />
  522. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  523. <attribute name="hoist" type="bool" default="false" />
  524. <attribute name="value" type="string" default="" />
  525. <attribute name="filled" type="bool" default="false" />
  526. <attribute name="pill" type="bool" default="false" />
  527. <attribute name="label" type="string" default="" />
  528. <attribute name="placement" type="enum" values="top,bottom" default="bottom" />
  529. <attribute name="help-text" type="string" default="" />
  530. <attribute name="form" type="string" default="" />
  531. <attribute name="required" type="bool" default="false" />
  532. <attribute name="clearable" type="bool" default="false" />
  533. <attribute name="open" type="bool" default="false" />
  534. </attributes>
  535. <behavior>
  536. <event name="wa-change" description="Emitted when selection changes" />
  537. <event name="wa-clear" description="Emitted when selection is cleared" />
  538. <event name="wa-input" description="Emitted when user interacts with select" />
  539. <event name="wa-focus" description="Emitted when select gains focus" />
  540. <event name="wa-blur" description="Emitted when select loses focus" />
  541. <event name="wa-show" description="Emitted when dropdown opens" />
  542. <event name="wa-after-show" description="Emitted after dropdown opens" />
  543. <event name="wa-hide" description="Emitted when dropdown closes" />
  544. <event name="wa-after-hide" description="Emitted after dropdown closes" />
  545. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  546. <command name="show" description="Shows the dropdown" />
  547. <command name="hide" description="Hides the dropdown" />
  548. <command name="focus" description="Sets focus on the select" />
  549. <command name="blur" description="Removes focus from the select" />
  550. </behavior>
  551. <validation>
  552. <rule name="required" type="required" message="Please select an option" severity="error" />
  553. </validation>
  554. </control>
  555. <control name="wa-slider" type="input" category="web-specific" inherits="WebAwesomeComponent">
  556. <description>Sliders allow users to select a value from a range</description>
  557. <constraints>
  558. <allowed-parents>any</allowed-parents>
  559. <allowed-children>none</allowed-children>
  560. <container>false</container>
  561. </constraints>
  562. <attributes>
  563. <attribute name="name" type="string" default="" />
  564. <attribute name="value" type="decimal" default="0" />
  565. <attribute name="label" type="string" default="" />
  566. <attribute name="help-text" type="string" default="" />
  567. <attribute name="disabled" type="bool" default="false" />
  568. <attribute name="min" type="decimal" default="0" />
  569. <attribute name="max" type="decimal" default="100" />
  570. <attribute name="step" type="decimal" default="1" />
  571. <attribute name="tooltip" type="enum" values="top,bottom,none" default="top" />
  572. <attribute name="tooltip-formatter" type="string" default="" />
  573. <attribute name="form" type="string" default="" />
  574. </attributes>
  575. <behavior>
  576. <event name="wa-blur" description="Emitted when slider loses focus" />
  577. <event name="wa-change" description="Emitted when slider value changes" />
  578. <event name="wa-focus" description="Emitted when slider gains focus" />
  579. <event name="wa-input" description="Emitted when slider is being dragged" />
  580. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  581. <command name="focus" description="Sets focus on the slider" />
  582. <command name="blur" description="Removes focus from the slider" />
  583. <command name="stepUp" description="Increments the value by step" />
  584. <command name="stepDown" description="Decrements the value by step" />
  585. </behavior>
  586. </control>
  587. <control name="wa-switch" type="input" category="web-specific" inherits="WebAwesomeComponent">
  588. <description>Switches allow users to toggle between two states</description>
  589. <constraints>
  590. <allowed-parents>any</allowed-parents>
  591. <allowed-children>any-content</allowed-children>
  592. <container>true</container>
  593. </constraints>
  594. <attributes>
  595. <attribute name="name" type="string" default="" />
  596. <attribute name="value" type="string" default="on" />
  597. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  598. <attribute name="disabled" type="bool" default="false" />
  599. <attribute name="checked" type="bool" default="false" />
  600. <attribute name="required" type="bool" default="false" />
  601. <attribute name="form" type="string" default="" />
  602. <attribute name="help-text" type="string" default="" />
  603. </attributes>
  604. <behavior>
  605. <event name="wa-blur" description="Emitted when switch loses focus" />
  606. <event name="wa-change" description="Emitted when switch state changes" />
  607. <event name="wa-input" description="Emitted when user interacts with switch" />
  608. <event name="wa-focus" description="Emitted when switch gains focus" />
  609. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  610. <command name="click" description="Simulates a click on the switch" />
  611. <command name="focus" description="Sets focus on the switch" />
  612. <command name="blur" description="Removes focus from the switch" />
  613. </behavior>
  614. </control>
  615. <control name="wa-textarea" type="input" category="web-specific" inherits="WebAwesomeComponent">
  616. <description>Textareas allow users to enter multiple lines of text</description>
  617. <constraints>
  618. <allowed-parents>any</allowed-parents>
  619. <allowed-children>none</allowed-children>
  620. <container>false</container>
  621. </constraints>
  622. <attributes>
  623. <attribute name="name" type="string" default="" />
  624. <attribute name="value" type="string" default="" />
  625. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  626. <attribute name="filled" type="bool" default="false" />
  627. <attribute name="label" type="string" default="" />
  628. <attribute name="help-text" type="string" default="" />
  629. <attribute name="placeholder" type="string" default="" />
  630. <attribute name="rows" type="int" default="4" min="1" />
  631. <attribute name="resize" type="enum" values="none,vertical,horizontal,both" default="vertical" />
  632. <attribute name="disabled" type="bool" default="false" />
  633. <attribute name="readonly" type="bool" default="false" />
  634. <attribute name="form" type="string" default="" />
  635. <attribute name="required" type="bool" default="false" />
  636. <attribute name="minlength" type="int" default="" />
  637. <attribute name="maxlength" type="int" default="" />
  638. <attribute name="autocapitalize" type="string" default="" />
  639. <attribute name="autocorrect" type="string" default="" />
  640. <attribute name="autocomplete" type="string" default="" />
  641. <attribute name="autofocus" type="bool" default="false" />
  642. <attribute name="enterkeyhint" type="string" default="" />
  643. <attribute name="spellcheck" type="bool" default="true" />
  644. <attribute name="inputmode" type="string" default="" />
  645. </attributes>
  646. <behavior>
  647. <event name="wa-blur" description="Emitted when textarea loses focus" />
  648. <event name="wa-change" description="Emitted when textarea value changes" />
  649. <event name="wa-focus" description="Emitted when textarea gains focus" />
  650. <event name="wa-input" description="Emitted when textarea value is being changed" />
  651. <event name="wa-invalid" description="Emitted when validity changes to invalid" />
  652. <command name="focus" description="Sets focus on the textarea" />
  653. <command name="blur" description="Removes focus from the textarea" />
  654. <command name="select" description="Selects all text in the textarea" />
  655. <command name="setSelectionRange" description="Sets the selection range" />
  656. <command name="setRangeText" description="Replaces a range of text" />
  657. </behavior>
  658. <validation>
  659. <rule name="required" type="required" message="This field is required" severity="error" />
  660. <rule name="minlength" type="length" message="Too short" severity="error" />
  661. <rule name="maxlength" type="length" message="Too long" severity="error" />
  662. </validation>
  663. </control>
  664. <!-- IMAGERY CONTROLS -->
  665. <control name="wa-animated-image" type="display" category="web-specific" inherits="WebAwesomeComponent">
  666. <description>Displays animated GIFs and WEBPs that play on hover</description>
  667. <constraints>
  668. <allowed-parents>any</allowed-parents>
  669. <allowed-children>wa-icon</allowed-children>
  670. <container>true</container>
  671. </constraints>
  672. <attributes>
  673. <attribute name="src" type="string" default="" required="true" />
  674. <attribute name="alt" type="string" default="" />
  675. <attribute name="play" type="bool" default="false" />
  676. </attributes>
  677. <behavior>
  678. <event name="wa-load" description="Emitted when image loads successfully" />
  679. <event name="wa-error" description="Emitted when image fails to load" />
  680. </behavior>
  681. </control>
  682. <control name="wa-avatar" type="display" category="web-specific" inherits="WebAwesomeComponent">
  683. <description>Avatars display user profile pictures</description>
  684. <constraints>
  685. <allowed-parents>any</allowed-parents>
  686. <allowed-children>wa-icon</allowed-children>
  687. <container>true</container>
  688. </constraints>
  689. <attributes>
  690. <attribute name="image" type="string" default="" />
  691. <attribute name="label" type="string" default="" />
  692. <attribute name="initials" type="string" default="" />
  693. <attribute name="loading" type="enum" values="eager,lazy" default="eager" />
  694. <attribute name="shape" type="enum" values="circle,square,rounded" default="circle" />
  695. </attributes>
  696. </control>
  697. <control name="wa-carousel" type="container" category="web-specific" inherits="WebAwesomeComponent">
  698. <description>Carousels display a collection of items</description>
  699. <constraints>
  700. <allowed-parents>any</allowed-parents>
  701. <allowed-children>wa-carousel-item</allowed-children>
  702. <container>true</container>
  703. </constraints>
  704. <attributes>
  705. <attribute name="loop" type="bool" default="false" />
  706. <attribute name="navigation" type="bool" default="false" />
  707. <attribute name="pagination" type="bool" default="false" />
  708. <attribute name="autoplay" type="bool" default="false" />
  709. <attribute name="autoplay-interval" type="int" default="3000" min="0" />
  710. <attribute name="slides-per-page" type="int" default="1" min="1" />
  711. <attribute name="slides-per-move" type="int" default="1" min="1" />
  712. <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
  713. <attribute name="mouse-dragging" type="bool" default="false" />
  714. </attributes>
  715. <behavior>
  716. <event name="wa-slide-change" description="Emitted when active slide changes" />
  717. <command name="previous" description="Goes to previous slide" />
  718. <command name="next" description="Goes to next slide" />
  719. <command name="goToSlide" description="Goes to specific slide" />
  720. </behavior>
  721. </control>
  722. <control name="wa-carousel-item" type="container" category="web-specific" inherits="WebAwesomeComponent">
  723. <description>Individual item within a carousel</description>
  724. <constraints>
  725. <allowed-parents>wa-carousel</allowed-parents>
  726. <allowed-children>any-content</allowed-children>
  727. <container>true</container>
  728. </constraints>
  729. </control>
  730. <control name="wa-comparison" type="display" category="web-specific" inherits="WebAwesomeComponent">
  731. <description>Compare two items side by side</description>
  732. <constraints>
  733. <allowed-parents>any</allowed-parents>
  734. <allowed-children>any-content</allowed-children>
  735. <container>true</container>
  736. <required-slots>before,after</required-slots>
  737. </constraints>
  738. <attributes>
  739. <attribute name="position" type="int" default="50" min="0" max="100" />
  740. </attributes>
  741. <behavior>
  742. <event name="wa-change" description="Emitted when position changes" />
  743. </behavior>
  744. </control>
  745. <control name="wa-icon" type="display" category="web-specific" inherits="WebAwesomeComponent">
  746. <description>Icons are symbols that represent an object, concept, or action</description>
  747. <constraints>
  748. <allowed-parents>any</allowed-parents>
  749. <allowed-children>none</allowed-children>
  750. <container>false</container>
  751. </constraints>
  752. <attributes>
  753. <attribute name="name" type="string" default="" />
  754. <attribute name="variant" type="enum" values="solid,regular,light,thin,duotone" default="regular" />
  755. <attribute name="src" type="string" default="" />
  756. <attribute name="label" type="string" default="" />
  757. <attribute name="library" type="string" default="default" />
  758. </attributes>
  759. <behavior>
  760. <event name="wa-load" description="Emitted when icon loads" />
  761. <event name="wa-error" description="Emitted when icon fails to load" />
  762. </behavior>
  763. </control>
  764. <control name="wa-zoomable-frame" type="display" category="web-specific" inherits="WebAwesomeComponent">
  765. <description>Frame that allows zooming and panning of content</description>
  766. <constraints>
  767. <allowed-parents>any</allowed-parents>
  768. <allowed-children>any-content</allowed-children>
  769. <container>true</container>
  770. </constraints>
  771. <attributes>
  772. <attribute name="min-zoom" type="decimal" default="0.5" min="0.1" />
  773. <attribute name="max-zoom" type="decimal" default="3" />
  774. <attribute name="zoom" type="decimal" default="1" />
  775. </attributes>
  776. <behavior>
  777. <event name="wa-zoom" description="Emitted when zoom level changes" />
  778. <command name="zoomIn" description="Increases zoom level" />
  779. <command name="zoomOut" description="Decreases zoom level" />
  780. <command name="reset" description="Resets zoom to default" />
  781. </behavior>
  782. </control>
  783. <!-- NAVIGATION CONTROLS -->
  784. <control name="wa-breadcrumb" type="navigation" category="web-specific" inherits="WebAwesomeComponent">
  785. <description>Breadcrumbs show hierarchy and navigational context</description>
  786. <constraints>
  787. <allowed-parents>any</allowed-parents>
  788. <allowed-children>wa-breadcrumb-item</allowed-children>
  789. <container>true</container>
  790. </constraints>
  791. <attributes>
  792. <attribute name="label" type="string" default="" />
  793. </attributes>
  794. </control>
  795. <control name="wa-breadcrumb-item" type="navigation" category="web-specific" inherits="WebAwesomeComponent">
  796. <description>Individual item in a breadcrumb trail</description>
  797. <constraints>
  798. <allowed-parents>wa-breadcrumb</allowed-parents>
  799. <allowed-children>any-content,wa-icon</allowed-children>
  800. <container>true</container>
  801. </constraints>
  802. <attributes>
  803. <attribute name="href" type="string" default="" />
  804. <attribute name="target" type="enum" values="_self,_blank,_parent,_top" default="_self" />
  805. <attribute name="rel" type="string" default="noreferrer noopener" />
  806. </attributes>
  807. </control>
  808. <control name="wa-tab" type="navigation" category="web-specific" inherits="WebAwesomeComponent">
  809. <description>Individual tab within a tab group</description>
  810. <constraints>
  811. <allowed-parents>wa-tab-group</allowed-parents>
  812. <allowed-children>any-content,wa-icon</allowed-children>
  813. <container>true</container>
  814. </constraints>
  815. <attributes>
  816. <attribute name="panel" type="string" default="" required="true" />
  817. <attribute name="active" type="bool" default="false" />
  818. <attribute name="closable" type="bool" default="false" />
  819. <attribute name="disabled" type="bool" default="false" />
  820. </attributes>
  821. <behavior>
  822. <event name="wa-close" description="Emitted when tab close button is clicked" />
  823. </behavior>
  824. </control>
  825. <control name="wa-tab-group" type="navigation" category="web-specific" inherits="WebAwesomeComponent">
  826. <description>Tab groups organize content into tabs</description>
  827. <constraints>
  828. <allowed-parents>any</allowed-parents>
  829. <allowed-children>wa-tab,wa-tab-panel</allowed-children>
  830. <container>true</container>
  831. </constraints>
  832. <attributes>
  833. <attribute name="placement" type="enum" values="top,bottom,start,end" default="top" />
  834. <attribute name="activation" type="enum" values="auto,manual" default="auto" />
  835. <attribute name="no-scroll-controls" type="bool" default="false" />
  836. </attributes>
  837. <behavior>
  838. <event name="wa-tab-show" description="Emitted when a tab is shown" />
  839. <event name="wa-tab-hide" description="Emitted when a tab is hidden" />
  840. <command name="show" description="Shows a specific tab by name" />
  841. </behavior>
  842. </control>
  843. <control name="wa-tab-panel" type="container" category="web-specific" inherits="WebAwesomeComponent">
  844. <description>Panel content for a tab</description>
  845. <constraints>
  846. <allowed-parents>wa-tab-group</allowed-parents>
  847. <allowed-children>any-content</allowed-children>
  848. <container>true</container>
  849. </constraints>
  850. <attributes>
  851. <attribute name="name" type="string" default="" required="true" />
  852. <attribute name="active" type="bool" default="false" />
  853. </attributes>
  854. </control>
  855. <control name="wa-tree" type="navigation" category="web-specific" inherits="WebAwesomeComponent">
  856. <description>Trees display hierarchical data</description>
  857. <constraints>
  858. <allowed-parents>any</allowed-parents>
  859. <allowed-children>wa-tree-item</allowed-children>
  860. <container>true</container>
  861. </constraints>
  862. <attributes>
  863. <attribute name="selection" type="enum" values="single,multiple,leaf" default="single" />
  864. </attributes>
  865. <behavior>
  866. <event name="wa-selection-change" description="Emitted when selection changes" />
  867. </behavior>
  868. </control>
  869. <control name="wa-tree-item" type="navigation" category="web-specific" inherits="WebAwesomeComponent">
  870. <description>Individual item within a tree</description>
  871. <constraints>
  872. <allowed-parents>wa-tree,wa-tree-item</allowed-parents>
  873. <allowed-children>wa-tree-item,any-content,wa-icon</allowed-children>
  874. <container>true</container>
  875. </constraints>
  876. <attributes>
  877. <attribute name="expanded" type="bool" default="false" />
  878. <attribute name="selected" type="bool" default="false" />
  879. <attribute name="disabled" type="bool" default="false" />
  880. <attribute name="lazy" type="bool" default="false" />
  881. </attributes>
  882. <behavior>
  883. <event name="wa-expand" description="Emitted when item expands" />
  884. <event name="wa-after-expand" description="Emitted after item expands" />
  885. <event name="wa-collapse" description="Emitted when item collapses" />
  886. <event name="wa-after-collapse" description="Emitted after item collapses" />
  887. <event name="wa-lazy-change" description="Emitted when lazy load is triggered" />
  888. <event name="wa-lazy-load" description="Emitted when lazy load completes" />
  889. <command name="getChildrenItems" description="Gets child tree items" />
  890. </behavior>
  891. </control>
  892. <!-- ORGANIZATION CONTROLS -->
  893. <control name="wa-card" type="container" category="web-specific" inherits="WebAwesomeComponent">
  894. <description>Cards contain content and actions about a single subject</description>
  895. <constraints>
  896. <allowed-parents>any</allowed-parents>
  897. <allowed-children>any-content</allowed-children>
  898. <container>true</container>
  899. <required-slots>header,body,footer,image</required-slots>
  900. </constraints>
  901. <attributes>
  902. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  903. </attributes>
  904. </control>
  905. <control name="wa-details" type="container" category="web-specific" inherits="WebAwesomeComponent">
  906. <description>Details show a summary and expand to show content</description>
  907. <constraints>
  908. <allowed-parents>any</allowed-parents>
  909. <allowed-children>any-content,wa-icon</allowed-children>
  910. <container>true</container>
  911. <required-slots>summary,expand-icon,collapse-icon</required-slots>
  912. </constraints>
  913. <attributes>
  914. <attribute name="summary" type="string" default="" />
  915. <attribute name="disabled" type="bool" default="false" />
  916. <attribute name="open" type="bool" default="false" />
  917. </attributes>
  918. <behavior>
  919. <event name="wa-show" description="Emitted when details opens" />
  920. <event name="wa-after-show" description="Emitted after details opens" />
  921. <event name="wa-hide" description="Emitted when details closes" />
  922. <event name="wa-after-hide" description="Emitted after details closes" />
  923. <command name="show" description="Shows the details" />
  924. <command name="hide" description="Hides the details" />
  925. </behavior>
  926. </control>
  927. <control name="wa-dialog" type="container" category="web-specific" inherits="WebAwesomeComponent">
  928. <description>Dialogs display content in a layer above the page</description>
  929. <constraints>
  930. <allowed-parents>any</allowed-parents>
  931. <allowed-children>any-content</allowed-children>
  932. <container>true</container>
  933. <required-slots>label,header,body,footer</required-slots>
  934. </constraints>
  935. <attributes>
  936. <attribute name="modal" type="bool" default="false" />
  937. <attribute name="label" type="string" default="" />
  938. <attribute name="no-header" type="bool" default="false" />
  939. <attribute name="open" type="bool" default="false" />
  940. </attributes>
  941. <behavior>
  942. <event name="wa-show" description="Emitted when dialog opens" />
  943. <event name="wa-after-show" description="Emitted after dialog opens" />
  944. <event name="wa-hide" description="Emitted when dialog closes" />
  945. <event name="wa-after-hide" description="Emitted after dialog closes" />
  946. <event name="wa-initial-focus" description="Emitted when setting initial focus" />
  947. <event name="wa-request-close" description="Emitted when close is requested" />
  948. <command name="show" description="Shows the dialog" />
  949. <command name="hide" description="Hides the dialog" />
  950. </behavior>
  951. </control>
  952. <control name="wa-divider" type="display" category="web-specific" inherits="WebAwesomeComponent">
  953. <description>Dividers visually separate content</description>
  954. <constraints>
  955. <allowed-parents>any</allowed-parents>
  956. <allowed-children>none</allowed-children>
  957. <container>false</container>
  958. </constraints>
  959. <attributes>
  960. <attribute name="vertical" type="bool" default="false" />
  961. </attributes>
  962. </control>
  963. <control name="wa-drawer" type="container" category="web-specific" inherits="WebAwesomeComponent">
  964. <description>Drawers slide in from the side of the screen</description>
  965. <constraints>
  966. <allowed-parents>any</allowed-parents>
  967. <allowed-children>any-content</allowed-children>
  968. <container>true</container>
  969. <required-slots>label,header,body,footer</required-slots>
  970. </constraints>
  971. <attributes>
  972. <attribute name="open" type="bool" default="false" />
  973. <attribute name="label" type="string" default="" />
  974. <attribute name="placement" type="enum" values="top,end,bottom,start" default="end" />
  975. <attribute name="contained" type="bool" default="false" />
  976. <attribute name="no-header" type="bool" default="false" />
  977. </attributes>
  978. <behavior>
  979. <event name="wa-show" description="Emitted when drawer opens" />
  980. <event name="wa-after-show" description="Emitted after drawer opens" />
  981. <event name="wa-hide" description="Emitted when drawer closes" />
  982. <event name="wa-after-hide" description="Emitted after drawer closes" />
  983. <event name="wa-initial-focus" description="Emitted when setting initial focus" />
  984. <event name="wa-request-close" description="Emitted when close is requested" />
  985. <command name="show" description="Shows the drawer" />
  986. <command name="hide" description="Hides the drawer" />
  987. </behavior>
  988. </control>
  989. <control name="wa-page" type="container" category="web-specific" inherits="WebAwesomeComponent">
  990. <description>PRO: Page layout component with responsive behavior</description>
  991. <constraints>
  992. <allowed-parents>any</allowed-parents>
  993. <allowed-children>any-content</allowed-children>
  994. <container>true</container>
  995. <required-slots>header,navigation,content,sidebar,footer</required-slots>
  996. </constraints>
  997. <attributes>
  998. <attribute name="layout" type="enum" values="default,sidebar-left,sidebar-right,full-width" default="default" />
  999. <attribute name="responsive" type="bool" default="true" />
  1000. </attributes>
  1001. </control>
  1002. <control name="wa-scroller" type="container" category="web-specific" inherits="WebAwesomeComponent">
  1003. <description>Custom scrollable container</description>
  1004. <constraints>
  1005. <allowed-parents>any</allowed-parents>
  1006. <allowed-children>any-content</allowed-children>
  1007. <container>true</container>
  1008. </constraints>
  1009. <attributes>
  1010. <attribute name="horizontal" type="bool" default="false" />
  1011. <attribute name="vertical" type="bool" default="true" />
  1012. <attribute name="speed" type="decimal" default="1" min="0.1" />
  1013. </attributes>
  1014. <behavior>
  1015. <event name="wa-scroll" description="Emitted when scroll position changes" />
  1016. <command name="scrollTo" description="Scrolls to specific position" />
  1017. <command name="scrollToTop" description="Scrolls to top" />
  1018. <command name="scrollToBottom" description="Scrolls to bottom" />
  1019. </behavior>
  1020. </control>
  1021. <control name="wa-split-panel" type="container" category="web-specific" inherits="WebAwesomeComponent">
  1022. <description>Split panels divide content into resizable sections</description>
  1023. <constraints>
  1024. <allowed-parents>any</allowed-parents>
  1025. <allowed-children>any-content</allowed-children>
  1026. <container>true</container>
  1027. <required-slots>start,end</required-slots>
  1028. </constraints>
  1029. <attributes>
  1030. <attribute name="position" type="int" default="50" min="0" max="100" />
  1031. <attribute name="position-in-pixels" type="int" default="" />
  1032. <attribute name="vertical" type="bool" default="false" />
  1033. <attribute name="disabled" type="bool" default="false" />
  1034. <attribute name="primary" type="enum" values="start,end" default="" />
  1035. <attribute name="snap" type="string" default="" />
  1036. <attribute name="snap-threshold" type="int" default="12" />
  1037. </attributes>
  1038. <behavior>
  1039. <event name="wa-reposition" description="Emitted when position changes" />
  1040. </behavior>
  1041. </control>
  1042. <!-- UTILITY CONTROLS -->
  1043. <control name="wa-animation" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1044. <description>Animates elements declaratively</description>
  1045. <constraints>
  1046. <allowed-parents>any</allowed-parents>
  1047. <allowed-children>any-content</allowed-children>
  1048. <container>true</container>
  1049. </constraints>
  1050. <attributes>
  1051. <attribute name="name" type="string" default="none" />
  1052. <attribute name="play" type="bool" default="false" />
  1053. <attribute name="delay" type="int" default="0" />
  1054. <attribute name="direction" type="enum" values="normal,reverse,alternate,alternate-reverse" default="normal" />
  1055. <attribute name="duration" type="int" default="1000" />
  1056. <attribute name="easing" type="string" default="linear" />
  1057. <attribute name="end-delay" type="int" default="0" />
  1058. <attribute name="fill" type="enum" values="auto,none,forwards,backwards,both" default="auto" />
  1059. <attribute name="iterations" type="string" default="Infinity" />
  1060. <attribute name="iteration-start" type="decimal" default="0" />
  1061. <attribute name="playback-rate" type="decimal" default="1" />
  1062. </attributes>
  1063. <behavior>
  1064. <event name="wa-cancel" description="Emitted when animation is cancelled" />
  1065. <event name="wa-finish" description="Emitted when animation finishes" />
  1066. <event name="wa-start" description="Emitted when animation starts" />
  1067. <command name="cancel" description="Cancels the animation" />
  1068. <command name="finish" description="Finishes the animation" />
  1069. </behavior>
  1070. </control>
  1071. <control name="wa-format-bytes" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1072. <description>Formats bytes as human readable text</description>
  1073. <constraints>
  1074. <allowed-parents>any</allowed-parents>
  1075. <allowed-children>none</allowed-children>
  1076. <container>false</container>
  1077. </constraints>
  1078. <attributes>
  1079. <attribute name="value" type="int" default="0" />
  1080. <attribute name="unit" type="enum" values="byte,bit" default="byte" />
  1081. <attribute name="display" type="enum" values="short,long,narrow" default="short" />
  1082. <attribute name="lang" type="string" default="" />
  1083. </attributes>
  1084. </control>
  1085. <control name="wa-format-date" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1086. <description>Formats dates in a localized manner</description>
  1087. <constraints>
  1088. <allowed-parents>any</allowed-parents>
  1089. <allowed-children>none</allowed-children>
  1090. <container>false</container>
  1091. </constraints>
  1092. <attributes>
  1093. <attribute name="date" type="string" default="" required="true" />
  1094. <attribute name="lang" type="string" default="" />
  1095. <attribute name="weekday" type="enum" values="narrow,short,long" default="" />
  1096. <attribute name="era" type="enum" values="narrow,short,long" default="" />
  1097. <attribute name="year" type="enum" values="numeric,2-digit" default="" />
  1098. <attribute name="month" type="enum" values="numeric,2-digit,narrow,short,long" default="" />
  1099. <attribute name="day" type="enum" values="numeric,2-digit" default="" />
  1100. <attribute name="hour" type="enum" values="numeric,2-digit" default="" />
  1101. <attribute name="minute" type="enum" values="numeric,2-digit" default="" />
  1102. <attribute name="second" type="enum" values="numeric,2-digit" default="" />
  1103. <attribute name="time-zone-name" type="enum" values="short,long" default="" />
  1104. <attribute name="time-zone" type="string" default="" />
  1105. <attribute name="hour-format" type="enum" values="auto,12,24" default="auto" />
  1106. </attributes>
  1107. </control>
  1108. <control name="wa-format-number" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1109. <description>Formats numbers in a localized manner</description>
  1110. <constraints>
  1111. <allowed-parents>any</allowed-parents>
  1112. <allowed-children>none</allowed-children>
  1113. <container>false</container>
  1114. </constraints>
  1115. <attributes>
  1116. <attribute name="value" type="decimal" default="0" required="true" />
  1117. <attribute name="lang" type="string" default="" />
  1118. <attribute name="type" type="enum" values="currency,decimal,percent" default="decimal" />
  1119. <attribute name="no-grouping" type="bool" default="false" />
  1120. <attribute name="currency" type="string" default="USD" />
  1121. <attribute name="currency-display" type="enum" values="symbol,narrowSymbol,code,name" default="symbol" />
  1122. <attribute name="minimum-integer-digits" type="int" default="" min="1" max="21" />
  1123. <attribute name="minimum-fraction-digits" type="int" default="" min="0" max="20" />
  1124. <attribute name="maximum-fraction-digits" type="int" default="" min="0" max="20" />
  1125. <attribute name="minimum-significant-digits" type="int" default="" min="1" max="21" />
  1126. <attribute name="maximum-significant-digits" type="int" default="" min="1" max="21" />
  1127. </attributes>
  1128. </control>
  1129. <control name="wa-include" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1130. <description>Includes external HTML files into the page</description>
  1131. <constraints>
  1132. <allowed-parents>any</allowed-parents>
  1133. <allowed-children>none</allowed-children>
  1134. <container>false</container>
  1135. </constraints>
  1136. <attributes>
  1137. <attribute name="src" type="string" default="" required="true" />
  1138. <attribute name="mode" type="enum" values="cors,no-cors,same-origin" default="cors" />
  1139. <attribute name="allow-scripts" type="bool" default="false" />
  1140. </attributes>
  1141. <behavior>
  1142. <event name="wa-load" description="Emitted when content loads successfully" />
  1143. <event name="wa-error" description="Emitted when content fails to load" />
  1144. </behavior>
  1145. </control>
  1146. <control name="wa-mutation-observer" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1147. <description>Declarative interface to the MutationObserver API</description>
  1148. <constraints>
  1149. <allowed-parents>any</allowed-parents>
  1150. <allowed-children>any-content</allowed-children>
  1151. <container>true</container>
  1152. </constraints>
  1153. <attributes>
  1154. <attribute name="attr" type="string" default="" />
  1155. <attribute name="attr-old-value" type="bool" default="false" />
  1156. <attribute name="char-data" type="bool" default="false" />
  1157. <attribute name="char-data-old-value" type="bool" default="false" />
  1158. <attribute name="child-list" type="bool" default="false" />
  1159. <attribute name="disabled" type="bool" default="false" />
  1160. </attributes>
  1161. <behavior>
  1162. <event name="wa-mutation" description="Emitted when a mutation occurs" />
  1163. </behavior>
  1164. </control>
  1165. <control name="wa-popover" type="container" category="web-specific" inherits="WebAwesomeComponent">
  1166. <description>Contextual overlays that display additional content</description>
  1167. <constraints>
  1168. <allowed-parents>any</allowed-parents>
  1169. <allowed-children>any-content</allowed-children>
  1170. <container>true</container>
  1171. <required-slots>trigger,content</required-slots>
  1172. </constraints>
  1173. <attributes>
  1174. <attribute name="placement" type="enum" values="top,top-start,top-end,bottom,bottom-start,bottom-end,right,right-start,right-end,left,left-start,left-end" default="top" />
  1175. <attribute name="active" type="bool" default="false" />
  1176. <attribute name="distance" type="int" default="8" />
  1177. <attribute name="skidding" type="int" default="0" />
  1178. <attribute name="strategy" type="enum" values="absolute,fixed" default="absolute" />
  1179. <attribute name="flip" type="bool" default="false" />
  1180. <attribute name="flip-fallback-placements" type="string" default="" />
  1181. <attribute name="flip-fallback-strategy" type="enum" values="best-fit,initial" default="best-fit" />
  1182. <attribute name="flip-padding" type="int" default="0" />
  1183. <attribute name="shift" type="bool" default="false" />
  1184. <attribute name="shift-padding" type="int" default="0" />
  1185. <attribute name="arrow" type="bool" default="false" />
  1186. <attribute name="arrow-placement" type="enum" values="start,end,center,anchor" default="anchor" />
  1187. <attribute name="arrow-padding" type="int" default="10" />
  1188. <attribute name="auto-size" type="enum" values="horizontal,vertical,both" default="" />
  1189. <attribute name="sync" type="enum" values="width,height,both" default="" />
  1190. <attribute name="auto-size-padding" type="int" default="0" />
  1191. </attributes>
  1192. <behavior>
  1193. <event name="wa-reposition" description="Emitted when the popover is repositioned" />
  1194. </behavior>
  1195. </control>
  1196. <control name="wa-popup" type="container" category="web-specific" inherits="WebAwesomeComponent">
  1197. <description>Popup containers for tooltips, popovers, etc.</description>
  1198. <constraints>
  1199. <allowed-parents>any</allowed-parents>
  1200. <allowed-children>any-content</allowed-children>
  1201. <container>true</container>
  1202. </constraints>
  1203. <attributes>
  1204. <attribute name="anchor" type="string" default="" />
  1205. <attribute name="active" type="bool" default="false" />
  1206. <attribute name="placement" type="enum" values="top,top-start,top-end,bottom,bottom-start,bottom-end,right,right-start,right-end,left,left-start,left-end" default="top" />
  1207. <attribute name="strategy" type="enum" values="absolute,fixed" default="absolute" />
  1208. <attribute name="distance" type="int" default="0" />
  1209. <attribute name="skidding" type="int" default="0" />
  1210. <attribute name="arrow" type="bool" default="false" />
  1211. <attribute name="arrow-placement" type="enum" values="start,end,center,anchor" default="anchor" />
  1212. <attribute name="arrow-padding" type="int" default="10" />
  1213. <attribute name="flip" type="bool" default="false" />
  1214. <attribute name="flip-fallback-placements" type="string" default="" />
  1215. <attribute name="flip-fallback-strategy" type="enum" values="best-fit,initial" default="best-fit" />
  1216. <attribute name="flip-boundary" type="string" default="" />
  1217. <attribute name="flip-padding" type="int" default="0" />
  1218. <attribute name="shift" type="bool" default="false" />
  1219. <attribute name="shift-boundary" type="string" default="" />
  1220. <attribute name="shift-padding" type="int" default="0" />
  1221. <attribute name="auto-size" type="enum" values="horizontal,vertical,both" default="" />
  1222. <attribute name="sync" type="enum" values="width,height,both" default="" />
  1223. <attribute name="auto-size-boundary" type="string" default="" />
  1224. <attribute name="auto-size-padding" type="int" default="0" />
  1225. </attributes>
  1226. <behavior>
  1227. <event name="wa-reposition" description="Emitted when the popup is repositioned" />
  1228. <command name="reposition" description="Forces the popup to reposition" />
  1229. </behavior>
  1230. </control>
  1231. <control name="wa-relative-time" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1232. <description>Displays relative time in a human-readable format</description>
  1233. <constraints>
  1234. <allowed-parents>any</allowed-parents>
  1235. <allowed-children>none</allowed-children>
  1236. <container>false</container>
  1237. </constraints>
  1238. <attributes>
  1239. <attribute name="date" type="string" default="" required="true" />
  1240. <attribute name="lang" type="string" default="" />
  1241. <attribute name="format" type="enum" values="long,short,narrow" default="long" />
  1242. <attribute name="numeric" type="enum" values="always,auto" default="auto" />
  1243. <attribute name="sync" type="bool" default="true" />
  1244. </attributes>
  1245. </control>
  1246. <control name="wa-resize-observer" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1247. <description>Declarative interface to the ResizeObserver API</description>
  1248. <constraints>
  1249. <allowed-parents>any</allowed-parents>
  1250. <allowed-children>any-content</allowed-children>
  1251. <container>true</container>
  1252. </constraints>
  1253. <attributes>
  1254. <attribute name="disabled" type="bool" default="false" />
  1255. </attributes>
  1256. <behavior>
  1257. <event name="wa-resize" description="Emitted when a resize occurs" />
  1258. </behavior>
  1259. </control>
  1260. <!-- ADDITIONAL UTILITY COMPONENTS -->
  1261. <control name="wa-visually-hidden" type="utility" category="web-specific" inherits="WebAwesomeComponent">
  1262. <description>Visually hides content while keeping it accessible to screen readers</description>
  1263. <constraints>
  1264. <allowed-parents>any</allowed-parents>
  1265. <allowed-children>any-content</allowed-children>
  1266. <container>true</container>
  1267. </constraints>
  1268. </control>
  1269. <!-- COMPOSITE STRUCTURES -->
  1270. <structure name="wa-menu" type="composite" category="web-specific">
  1271. <description>Menu structure for dropdowns and context menus</description>
  1272. <constraints>
  1273. <allowed-parents>wa-dropdown,wa-popover</allowed-parents>
  1274. <allowed-children>wa-dropdown-item,wa-divider</allowed-children>
  1275. <container>true</container>
  1276. </constraints>
  1277. <attributes>
  1278. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  1279. </attributes>
  1280. <template>
  1281. <slot name="menu-items" allowed-controls="wa-dropdown-item,wa-divider" />
  1282. </template>
  1283. </structure>
  1284. <structure name="wa-form-field" type="composite" category="web-specific">
  1285. <description>Form field wrapper with label and help text</description>
  1286. <constraints>
  1287. <allowed-parents>any</allowed-parents>
  1288. <allowed-children>wa-input,wa-select,wa-textarea,wa-checkbox,wa-radio-group,wa-switch</allowed-children>
  1289. <container>true</container>
  1290. <required-slots>input</required-slots>
  1291. </constraints>
  1292. <attributes>
  1293. <attribute name="label" type="string" default="" required="true" />
  1294. <attribute name="help-text" type="string" default="" />
  1295. <attribute name="required" type="bool" default="false" />
  1296. </attributes>
  1297. <template>
  1298. <wa-label text="{label}" required="{required}" />
  1299. <slot name="input" allowed-controls="wa-input,wa-select,wa-textarea,wa-checkbox,wa-radio-group,wa-switch" required="true" />
  1300. <wa-help-text text="{help-text}" visible="{help-text != ''}" />
  1301. </template>
  1302. </structure>
  1303. <!-- PATTERN WIREFRAMES -->
  1304. <wireframe name="wa-application-layout" type="base-layout" platform="web">
  1305. <description>Standard Web Awesome application layout with header, navigation, and content areas</description>
  1306. <template>
  1307. <wa-page layout="sidebar-left">
  1308. <slot name="header">
  1309. <header>
  1310. <slot name="logo" />
  1311. <slot name="navigation" />
  1312. <slot name="user-menu" />
  1313. </header>
  1314. </slot>
  1315. <slot name="sidebar">
  1316. <wa-tree selection="single">
  1317. <slot name="menu-items" />
  1318. </wa-tree>
  1319. </slot>
  1320. <slot name="content" required="true">
  1321. <slot name="page-header" />
  1322. <slot name="page-content" required="true" />
  1323. </slot>
  1324. <slot name="footer">
  1325. <footer>
  1326. <slot name="footer-content" />
  1327. </footer>
  1328. </slot>
  1329. </wa-page>
  1330. </template>
  1331. </wireframe>
  1332. <wireframe name="wa-form-layout" type="form-layout" platform="web">
  1333. <description>Standard form layout with validation and submit buttons</description>
  1334. <template>
  1335. <form>
  1336. <slot name="form-fields" required="true">
  1337. <wa-form-field label="Example Field">
  1338. <wa-input name="example" />
  1339. </wa-form-field>
  1340. </slot>
  1341. <slot name="form-actions">
  1342. <wa-button-group>
  1343. <wa-button type="submit" variant="brand">Submit</wa-button>
  1344. <wa-button type="reset" variant="neutral">Reset</wa-button>
  1345. </wa-button-group>
  1346. </slot>
  1347. </form>
  1348. </template>
  1349. </wireframe>
  1350. <wireframe name="wa-dialog-layout" type="dialog-layout" platform="web">
  1351. <description>Standard dialog layout with header, body, and footer</description>
  1352. <template>
  1353. <wa-dialog label="{title}">
  1354. <slot name="dialog-header" slot="header">
  1355. <h2>{title}</h2>
  1356. </slot>
  1357. <slot name="dialog-content" slot="body" required="true">
  1358. <!-- Dialog content goes here -->
  1359. </slot>
  1360. <slot name="dialog-actions" slot="footer">
  1361. <wa-button-group>
  1362. <wa-button variant="neutral" onclick="this.closest('wa-dialog').hide()">Cancel</wa-button>
  1363. <wa-button variant="brand">Confirm</wa-button>
  1364. </wa-button-group>
  1365. </slot>
  1366. </wa-dialog>
  1367. </template>
  1368. </wireframe>
  1369. <wireframe name="wa-card-grid" type="content-layout" platform="web">
  1370. <description>Grid layout for cards</description>
  1371. <template>
  1372. <div class="card-grid">
  1373. <slot name="cards" required="true">
  1374. <wa-card>
  1375. <slot name="card-header" slot="header" />
  1376. <slot name="card-body" slot="body" />
  1377. <slot name="card-footer" slot="footer" />
  1378. </wa-card>
  1379. </slot>
  1380. </div>
  1381. <style>
  1382. .card-grid {
  1383. display: grid;
  1384. grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  1385. gap: var(--wa-space-l);
  1386. }
  1387. </style>
  1388. </template>
  1389. </wireframe>
  1390. </patterns>