matestack-ui-core 1.0.0.rc.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/app/concepts/matestack/ui/core/abbr/abbr.haml +1 -1
  4. data/app/concepts/matestack/ui/core/abbr/abbr.rb +0 -8
  5. data/app/concepts/matestack/ui/core/action/action.haml +1 -1
  6. data/app/concepts/matestack/ui/core/actionview/dynamic.haml +4 -4
  7. data/app/concepts/matestack/ui/core/address/address.haml +2 -2
  8. data/app/concepts/matestack/ui/core/area/area.haml +1 -1
  9. data/app/concepts/matestack/ui/core/area/area.rb +2 -16
  10. data/app/concepts/matestack/ui/core/article/article.haml +3 -3
  11. data/app/concepts/matestack/ui/core/article/article.rb +1 -1
  12. data/app/concepts/matestack/ui/core/aside/aside.haml +1 -1
  13. data/app/concepts/matestack/ui/core/aside/aside.rb +0 -1
  14. data/app/concepts/matestack/ui/core/async/async.rb +4 -1
  15. data/app/concepts/matestack/ui/core/async/children_wrapper.haml +1 -1
  16. data/app/concepts/matestack/ui/core/b/b.haml +3 -3
  17. data/app/concepts/matestack/ui/core/b/b.rb +1 -1
  18. data/app/concepts/matestack/ui/core/bdi/bdi.haml +3 -3
  19. data/app/concepts/matestack/ui/core/bdi/bdi.rb +1 -0
  20. data/app/concepts/matestack/ui/core/bdo/bdo.haml +3 -3
  21. data/app/concepts/matestack/ui/core/bdo/bdo.rb +2 -7
  22. data/app/concepts/matestack/ui/core/blockquote/blockquote.haml +3 -3
  23. data/app/concepts/matestack/ui/core/blockquote/blockquote.rb +2 -7
  24. data/app/concepts/matestack/ui/core/br/br.haml +4 -4
  25. data/app/concepts/matestack/ui/core/br/br.rb +1 -1
  26. data/app/concepts/matestack/ui/core/button/button.haml +3 -3
  27. data/app/concepts/matestack/ui/core/button/button.rb +3 -7
  28. data/app/concepts/matestack/ui/core/caption/caption.haml +3 -3
  29. data/app/concepts/matestack/ui/core/caption/caption.rb +1 -1
  30. data/app/concepts/matestack/ui/core/cite/cite.haml +3 -3
  31. data/app/concepts/matestack/ui/core/cite/cite.rb +1 -1
  32. data/app/concepts/matestack/ui/core/code/code.haml +3 -3
  33. data/app/concepts/matestack/ui/core/code/code.rb +1 -1
  34. data/app/concepts/matestack/ui/core/collection/content/content.rb +3 -5
  35. data/app/concepts/matestack/ui/core/collection/content/next/next.haml +1 -1
  36. data/app/concepts/matestack/ui/core/collection/content/page/link/link.haml +1 -1
  37. data/app/concepts/matestack/ui/core/collection/content/page/link/link.rb +1 -1
  38. data/app/concepts/matestack/ui/core/collection/content/previous/previous.haml +1 -1
  39. data/app/concepts/matestack/ui/core/collection/filter/filter.rb +1 -1
  40. data/app/concepts/matestack/ui/core/collection/filter/input/input.rb +11 -8
  41. data/app/concepts/matestack/ui/core/collection/filter/reset/reset.haml +1 -1
  42. data/app/concepts/matestack/ui/core/collection/filter/select/select.haml +6 -6
  43. data/app/concepts/matestack/ui/core/collection/filter/select/select.rb +10 -9
  44. data/app/concepts/matestack/ui/core/collection/filter/submit/submit.haml +1 -1
  45. data/app/concepts/matestack/ui/core/collection/order/order.rb +1 -1
  46. data/app/concepts/matestack/ui/core/collection/order/toggle/indicator/indicator.rb +5 -2
  47. data/app/concepts/matestack/ui/core/collection/order/toggle/toggle.haml +1 -1
  48. data/app/concepts/matestack/ui/core/collection/order/toggle/toggle.rb +0 -1
  49. data/app/concepts/matestack/ui/core/component/dynamic.rb +1 -0
  50. data/app/concepts/matestack/ui/core/data/data.haml +3 -3
  51. data/app/concepts/matestack/ui/core/data/data.rb +2 -5
  52. data/app/concepts/matestack/ui/core/datalist/datalist.haml +2 -2
  53. data/app/concepts/matestack/ui/core/datalist/datalist.rb +1 -2
  54. data/app/concepts/matestack/ui/core/dd/dd.haml +3 -3
  55. data/app/concepts/matestack/ui/core/dd/dd.rb +1 -1
  56. data/app/concepts/matestack/ui/core/del/del.haml +3 -3
  57. data/app/concepts/matestack/ui/core/del/del.rb +2 -0
  58. data/app/concepts/matestack/ui/core/details/details.haml +1 -1
  59. data/app/concepts/matestack/ui/core/details/details.rb +1 -1
  60. data/app/concepts/matestack/ui/core/dfn/dfn.haml +3 -3
  61. data/app/concepts/matestack/ui/core/dfn/dfn.rb +1 -1
  62. data/app/concepts/matestack/ui/core/dialog/dialog.haml +3 -3
  63. data/app/concepts/matestack/ui/core/dialog/dialog.rb +2 -5
  64. data/app/concepts/matestack/ui/core/div/div.haml +1 -1
  65. data/app/concepts/matestack/ui/core/div/div.rb +0 -1
  66. data/app/concepts/matestack/ui/core/dl/dl.haml +3 -3
  67. data/app/concepts/matestack/ui/core/dl/dl.rb +2 -2
  68. data/app/concepts/matestack/ui/core/dt/dt.haml +3 -3
  69. data/app/concepts/matestack/ui/core/dt/dt.rb +1 -1
  70. data/app/concepts/matestack/ui/core/em/em.haml +3 -3
  71. data/app/concepts/matestack/ui/core/em/em.rb +1 -1
  72. data/app/concepts/matestack/ui/core/fieldset/fieldset.haml +4 -4
  73. data/app/concepts/matestack/ui/core/fieldset/fieldset.rb +3 -6
  74. data/app/concepts/matestack/ui/core/figure/figure.haml +1 -1
  75. data/app/concepts/matestack/ui/core/figure/figure.rb +0 -1
  76. data/app/concepts/matestack/ui/core/footer/footer.haml +1 -1
  77. data/app/concepts/matestack/ui/core/footer/footer.rb +0 -1
  78. data/app/concepts/matestack/ui/core/form/form.haml +1 -1
  79. data/app/concepts/matestack/ui/core/form/form.rb +34 -28
  80. data/app/concepts/matestack/ui/core/form/select/select.haml +1 -1
  81. data/app/concepts/matestack/ui/core/form/select/select.rb +0 -20
  82. data/app/concepts/matestack/ui/core/form/submit/submit.haml +1 -1
  83. data/app/concepts/matestack/ui/core/form/submit/submit.rb +3 -3
  84. data/app/concepts/matestack/ui/core/header/header.haml +1 -1
  85. data/app/concepts/matestack/ui/core/header/header.rb +0 -1
  86. data/app/concepts/matestack/ui/core/heading/heading.haml +4 -49
  87. data/app/concepts/matestack/ui/core/heading/heading.rb +1 -3
  88. data/app/concepts/matestack/ui/core/hr/hr.haml +1 -1
  89. data/app/concepts/matestack/ui/core/hr/hr.rb +0 -1
  90. data/app/concepts/matestack/ui/core/icon/icon.haml +3 -3
  91. data/app/concepts/matestack/ui/core/icon/icon.rb +1 -1
  92. data/app/concepts/matestack/ui/core/iframe/iframe.haml +3 -3
  93. data/app/concepts/matestack/ui/core/iframe/iframe.rb +3 -10
  94. data/app/concepts/matestack/ui/core/img/img.haml +1 -1
  95. data/app/concepts/matestack/ui/core/img/img.rb +8 -8
  96. data/app/concepts/matestack/ui/core/input/input.rb +0 -4
  97. data/app/concepts/matestack/ui/core/ins/ins.haml +3 -3
  98. data/app/concepts/matestack/ui/core/ins/ins.rb +2 -6
  99. data/app/concepts/matestack/ui/core/isolated/children_wrapper.haml +1 -1
  100. data/app/concepts/matestack/ui/core/isolated/isolated.rb +1 -1
  101. data/app/concepts/matestack/ui/core/kbd/kbd.haml +3 -3
  102. data/app/concepts/matestack/ui/core/kbd/kbd.rb +1 -0
  103. data/app/concepts/matestack/ui/core/label/label.haml +3 -3
  104. data/app/concepts/matestack/ui/core/label/label.rb +2 -6
  105. data/app/concepts/matestack/ui/core/legend/legend.haml +3 -3
  106. data/app/concepts/matestack/ui/core/legend/legend.rb +1 -1
  107. data/app/concepts/matestack/ui/core/li/li.haml +3 -3
  108. data/app/concepts/matestack/ui/core/li/li.rb +2 -1
  109. data/app/concepts/matestack/ui/core/link/link.haml +3 -3
  110. data/app/concepts/matestack/ui/core/link/link.rb +10 -14
  111. data/app/concepts/matestack/ui/core/main/main.haml +1 -1
  112. data/app/concepts/matestack/ui/core/main/main.rb +0 -1
  113. data/app/concepts/matestack/ui/core/map/map.haml +1 -1
  114. data/app/concepts/matestack/ui/core/map/map.rb +1 -7
  115. data/app/concepts/matestack/ui/core/mark/mark.haml +3 -3
  116. data/app/concepts/matestack/ui/core/mark/mark.rb +1 -0
  117. data/app/concepts/matestack/ui/core/meter/meter.haml +1 -1
  118. data/app/concepts/matestack/ui/core/meter/meter.rb +1 -10
  119. data/app/concepts/matestack/ui/core/nav/nav.haml +1 -1
  120. data/app/concepts/matestack/ui/core/nav/nav.rb +0 -1
  121. data/app/concepts/matestack/ui/core/noscript/noscript.haml +3 -3
  122. data/app/concepts/matestack/ui/core/noscript/noscript.rb +1 -1
  123. data/app/concepts/matestack/ui/core/object/object.haml +1 -1
  124. data/app/concepts/matestack/ui/core/object/object.rb +1 -11
  125. data/app/concepts/matestack/ui/core/ol/ol.haml +1 -1
  126. data/app/concepts/matestack/ui/core/ol/ol.rb +1 -1
  127. data/app/concepts/matestack/ui/core/onclick/onclick.haml +1 -1
  128. data/app/concepts/matestack/ui/core/optgroup/optgroup.haml +1 -1
  129. data/app/concepts/matestack/ui/core/optgroup/optgroup.rb +1 -6
  130. data/app/concepts/matestack/ui/core/option/option.haml +3 -3
  131. data/app/concepts/matestack/ui/core/option/option.rb +2 -8
  132. data/app/concepts/matestack/ui/core/output/output.haml +3 -3
  133. data/app/concepts/matestack/ui/core/output/output.rb +2 -7
  134. data/app/concepts/matestack/ui/core/page/content/content.rb +0 -1
  135. data/app/concepts/matestack/ui/core/page/page.haml +1 -1
  136. data/app/concepts/matestack/ui/core/paragraph/paragraph.haml +3 -3
  137. data/app/concepts/matestack/ui/core/paragraph/paragraph.rb +1 -1
  138. data/app/concepts/matestack/ui/core/param/param.haml +1 -1
  139. data/app/concepts/matestack/ui/core/param/param.rb +1 -6
  140. data/app/concepts/matestack/ui/core/partial/partial.rb +0 -1
  141. data/app/concepts/matestack/ui/core/picture/picture.haml +1 -1
  142. data/app/concepts/matestack/ui/core/pre/pre.haml +3 -3
  143. data/app/concepts/matestack/ui/core/pre/pre.rb +1 -1
  144. data/app/concepts/matestack/ui/core/progress/progress.haml +1 -1
  145. data/app/concepts/matestack/ui/core/progress/progress.rb +1 -10
  146. data/app/concepts/matestack/ui/core/q/q.haml +3 -3
  147. data/app/concepts/matestack/ui/core/q/q.rb +2 -7
  148. data/app/concepts/matestack/ui/core/rp/rp.haml +3 -3
  149. data/app/concepts/matestack/ui/core/rp/rp.rb +1 -1
  150. data/app/concepts/matestack/ui/core/rt/rt.haml +3 -3
  151. data/app/concepts/matestack/ui/core/rt/rt.rb +1 -1
  152. data/app/concepts/matestack/ui/core/ruby/ruby.haml +3 -3
  153. data/app/concepts/matestack/ui/core/ruby/ruby.rb +1 -1
  154. data/app/concepts/matestack/ui/core/s/s.haml +3 -3
  155. data/app/concepts/matestack/ui/core/s/s.rb +1 -1
  156. data/app/concepts/matestack/ui/core/samp/samp.haml +3 -3
  157. data/app/concepts/matestack/ui/core/samp/samp.rb +1 -0
  158. data/app/concepts/matestack/ui/core/section/section.haml +1 -1
  159. data/app/concepts/matestack/ui/core/section/section.rb +0 -1
  160. data/app/concepts/matestack/ui/core/slot/slot.rb +0 -1
  161. data/app/concepts/matestack/ui/core/small/small.haml +3 -3
  162. data/app/concepts/matestack/ui/core/small/small.rb +1 -1
  163. data/app/concepts/matestack/ui/core/span/span.haml +3 -3
  164. data/app/concepts/matestack/ui/core/span/span.rb +1 -1
  165. data/app/concepts/matestack/ui/core/strong/strong.haml +3 -3
  166. data/app/concepts/matestack/ui/core/strong/strong.rb +1 -1
  167. data/app/concepts/matestack/ui/core/sub/sub.haml +3 -3
  168. data/app/concepts/matestack/ui/core/sub/sub.rb +1 -1
  169. data/app/concepts/matestack/ui/core/summary/summary.haml +3 -3
  170. data/app/concepts/matestack/ui/core/summary/summary.rb +1 -1
  171. data/app/concepts/matestack/ui/core/sup/sup.haml +3 -3
  172. data/app/concepts/matestack/ui/core/sup/sup.rb +1 -1
  173. data/app/concepts/matestack/ui/core/table/table.haml +1 -1
  174. data/app/concepts/matestack/ui/core/table/table.rb +0 -1
  175. data/app/concepts/matestack/ui/core/tbody/tbody.haml +1 -1
  176. data/app/concepts/matestack/ui/core/tbody/tbody.rb +0 -1
  177. data/app/concepts/matestack/ui/core/td/td.haml +3 -3
  178. data/app/concepts/matestack/ui/core/td/td.rb +2 -1
  179. data/app/concepts/matestack/ui/core/template/template.haml +1 -1
  180. data/app/concepts/matestack/ui/core/textarea/textarea.haml +4 -1
  181. data/app/concepts/matestack/ui/core/tfoot/tfoot.haml +1 -1
  182. data/app/concepts/matestack/ui/core/tfoot/tfoot.rb +0 -1
  183. data/app/concepts/matestack/ui/core/th/th.haml +3 -3
  184. data/app/concepts/matestack/ui/core/th/th.rb +2 -1
  185. data/app/concepts/matestack/ui/core/thead/thead.haml +1 -1
  186. data/app/concepts/matestack/ui/core/thead/thead.rb +0 -1
  187. data/app/concepts/matestack/ui/core/time/time.haml +1 -1
  188. data/app/concepts/matestack/ui/core/time/time.rb +1 -7
  189. data/app/concepts/matestack/ui/core/toggle/toggle.haml +1 -1
  190. data/app/concepts/matestack/ui/core/toggle/toggle.rb +4 -5
  191. data/app/concepts/matestack/ui/core/tr/tr.haml +1 -1
  192. data/app/concepts/matestack/ui/core/tr/tr.rb +0 -1
  193. data/app/concepts/matestack/ui/core/transition/transition.haml +3 -3
  194. data/app/concepts/matestack/ui/core/transition/transition.rb +13 -7
  195. data/app/concepts/matestack/ui/core/u/u.haml +3 -3
  196. data/app/concepts/matestack/ui/core/u/u.rb +1 -1
  197. data/app/concepts/matestack/ui/core/ul/ul.haml +1 -1
  198. data/app/concepts/matestack/ui/core/ul/ul.rb +0 -1
  199. data/app/concepts/matestack/ui/core/unescaped/unescaped.rb +2 -0
  200. data/app/concepts/matestack/ui/core/var/var.haml +3 -3
  201. data/app/concepts/matestack/ui/core/var/var.rb +1 -0
  202. data/app/concepts/matestack/ui/core/video/video.haml +2 -2
  203. data/app/concepts/matestack/ui/core/video/video.rb +3 -13
  204. data/app/concepts/matestack/ui/core/wbr/wbr.haml +5 -1
  205. data/app/concepts/matestack/ui/core/wbr/wbr.rb +1 -0
  206. data/app/concepts/matestack/ui/core/youtube/youtube.haml +1 -1
  207. data/app/concepts/matestack/ui/core/youtube/youtube.rb +18 -16
  208. data/app/helpers/matestack/ui/core/application_helper.rb +1 -0
  209. data/app/lib/matestack/ui/core/html_attributes.rb +1 -1
  210. data/app/lib/matestack/ui/core/properties.rb +95 -22
  211. data/lib/matestack/ui/core/components.rb +2 -1
  212. data/lib/matestack/ui/core/version.rb +1 -1
  213. data/vendor/assets/javascripts/dist/manifest.json +10 -6
  214. metadata +4 -6
  215. data/app/concepts/matestack/ui/core/collection/filter/input/input.haml +0 -2
  216. data/vendor/assets/javascripts/dist/manifest.json.br +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 137c2f647ff054f09a0579d87a69a8db93ee92b084f7d0c20c8113ed7d995345
4
- data.tar.gz: de53377ab8eabb7e0b4600cbb08e5f9545b95c38d4880feb3626da5a8a5c6440
3
+ metadata.gz: 1bbd88f77c5019a6699a9a82333d487e93b9227830979c83fbe5a97578b562a2
4
+ data.tar.gz: accec85e48b4aa52911ed79228769d1ba334cd3130abd814e7d64881b4843863
5
5
  SHA512:
6
- metadata.gz: ca823a70552dc8f98f04517236ad16f9cc40ab1074f3a363f5b9276ca8fa706919b031c084da1d782bf6d2c4717cc67765f084a40c9f22ff79af53fc2b12f7cb
7
- data.tar.gz: e4cd65cd6a80535193cd17a7249562c2c196929a0b9ba84684ecf9242bac3db49dc605fce3809596d27ca8870ee703d72aef4da8f69961d70f973de1a7870207
6
+ metadata.gz: ee4361ea62af4c518280cbcbd5c42a61a792e0661a9d8105a65c4fde7ea4f7806d1decc2fb2fb51eef151b9814b167d4d1558de23b9bdac3bcf0751d58fb4bda
7
+ data.tar.gz: 61dafe375a166c367264a4b29604f584d1d5514441c434e59245a6b54d73c4028b709aafc74b9111473c6a9e5854b57c4ead9930a5bbe4e713b833e63abc6aaa
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
- ![](https://github.com/matestack/matestack-ui-core/workflows/specs/badge.svg)
1
+ [![Specs](https://github.com/matestack/matestack-ui-core/workflows/specs/badge.svg)](https://github.com/matestack/matestack-ui-core/actions)
2
2
  [![Gitter](https://badges.gitter.im/basemate/community.svg)](https://gitter.im/basemate/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
3
3
  [![Gem Version](https://badge.fury.io/rb/matestack-ui-core.svg)](https://badge.fury.io/rb/matestack-ui-core)
4
- [![Docs](https://img.shields.io/badge/docs-matestack-blue.svg)](https://docs.matestack.io/docs/guides/install)
4
+ [![Docs](https://img.shields.io/badge/docs-matestack-blue.svg)](https://docs.matestack.io/docs/guides/1-installation/README.md)
5
+ [![Twitter Follow](https://img.shields.io/twitter/follow/matestack.svg?style=social)](https://twitter.com/matestack)
5
6
 
6
7
  ![matestack logo](./logo.png)
7
8
 
@@ -33,20 +34,19 @@ Please have a look at our [landingpage](https://www.matestack.io), presenting th
33
34
 
34
35
  ## Documentation/Installation
35
36
 
36
- Documentation can be found [here](https://docs.matestack.io/docs/guides/install)
37
+ Documentation can be found [here](https://docs.matestack.io/docs/guides/1-installation/README.md)
37
38
 
38
39
  ## Changelog
39
40
 
40
41
  Changelog can be found [here](./CHANGELOG.md)
41
42
 
42
-
43
43
  ## Community
44
44
 
45
45
  As a low-barrier feedback channel for our early users, we have set up a Gitter chat that can be found [here](https://gitter.im/basemate/community). You are very welcome to ask questions and send us feedback there!
46
46
 
47
47
  ## Contribution
48
48
 
49
- We are happy to accept contributors of any kind. Please refer to the [Contribution Guide](https://docs.matestack.io/docs/guides/contribute)
49
+ We are happy to accept contributors of any kind. Please refer to the [Contribution Guide](https://docs.matestack.io/docs/guides/13-contribute/README.md)
50
50
 
51
51
  ## License
52
52
  matestack-ui-core is an Open Source project licensed under the terms of the [LGPLv3 license](./LICENSE)
@@ -1,4 +1,4 @@
1
- %abbr{@tag_attributes}
1
+ %abbr{ html_attributes }
2
2
  - if text.blank? && block_given?
3
3
  = yield
4
4
  - else
@@ -1,13 +1,5 @@
1
1
  module Matestack::Ui::Core::Abbr
2
2
  class Abbr < Matestack::Ui::Core::Component::Static
3
- requires :title
4
3
  optional :text
5
-
6
- def setup
7
- @tag_attributes.merge!({
8
- "title": title
9
- })
10
- end
11
-
12
4
  end
13
5
  end
@@ -1,3 +1,3 @@
1
- %a{@tag_attributes, "@click.prevent": "perform", "href": action_path}
1
+ %a{ html_attributes, "@click.prevent": "perform", "href": action_path }
2
2
  - if block_given?
3
3
  = yield
@@ -1,6 +1,6 @@
1
- %component{dynamic_tag_attributes}
1
+ %component{ dynamic_tag_attributes }
2
2
  %div
3
- %div{"v-if": "asyncTemplate == null"}
3
+ %div{ "v-if": "asyncTemplate == null" }
4
4
  = render_content
5
- %div{"v-if": "asyncTemplate != null"}
6
- %v-runtime-template{":template":"asyncTemplate"}
5
+ %div{ "v-if": "asyncTemplate != null" }
6
+ %v-runtime-template{ ":template":"asyncTemplate" }
@@ -1,5 +1,5 @@
1
- %address{@tag_attributes}
2
- - if text.nil? && block_given?
1
+ %address{ html_attributes }
2
+ - if text.blank? && block_given?
3
3
  = yield
4
4
  - else
5
5
  = text
@@ -1 +1 @@
1
- %area{@tag_attributes}
1
+ %area{ html_attributes, "coords": coords.join(',') }
@@ -1,20 +1,6 @@
1
1
  module Matestack::Ui::Core::Area
2
2
  class Area < Matestack::Ui::Core::Component::Static
3
- optional :alt, :coords, :download, :href, :hreflang, :media, :rel, :shape, :target, :type
4
-
5
- def setup
6
- @tag_attributes.merge!({
7
- alt: alt,
8
- coords: coords.join(','),
9
- download: download,
10
- href: href,
11
- hreflang: hreflang,
12
- media: media,
13
- rel: rel,
14
- shape: shape,
15
- target: target,
16
- type: type
17
- })
18
- end
3
+ html_attributes :alt, :download, :href, :hreflang, :media, :rel, :shape, :target, :type
4
+ optional :coords
19
5
  end
20
6
  end
@@ -1,5 +1,5 @@
1
- %article{@tag_attributes}
2
- - if options[:text].nil? && block_given?
1
+ %article{ html_attributes }
2
+ - if text.nil? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,5 +1,5 @@
1
1
  module Matestack::Ui::Core::Article
2
2
  class Article < Matestack::Ui::Core::Component::Static
3
-
3
+ optional :text
4
4
  end
5
5
  end
@@ -1,3 +1,3 @@
1
- %aside{@tag_attributes}
1
+ %aside{ html_attributes }
2
2
  - if block_given?
3
3
  = yield
@@ -1,5 +1,4 @@
1
1
  module Matestack::Ui::Core::Aside
2
2
  class Aside < Matestack::Ui::Core::Component::Static
3
-
4
3
  end
5
4
  end
@@ -13,7 +13,10 @@ module Matestack::Ui::Core::Async
13
13
  if @included_config.present? && @included_config[:isolated_parent_class].present?
14
14
  @component_config[:parent_class] = @included_config[:isolated_parent_class]
15
15
  end
16
- @tag_attributes.merge!({
16
+ end
17
+
18
+ def children_wrapper_attributes
19
+ html_attributes.merge({
17
20
  "v-if": "showing",
18
21
  id: @component_config[:component_key]
19
22
  })
@@ -1,2 +1,2 @@
1
- %div{@tag_attributes.merge(class: "matestack-async-component-root")}
1
+ %div{ children_wrapper_attributes.merge(class: "matestack-async-component-root") }
2
2
  =yield
@@ -1,5 +1,5 @@
1
- %b{@tag_attributes}
2
- - if options[:text].nil? && block_given?
1
+ %b{ html_attributes }
2
+ - if text.nil? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,5 +1,5 @@
1
1
  module Matestack::Ui::Core::B
2
2
  class B < Matestack::Ui::Core::Component::Static
3
-
3
+ optional :text
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
- %bdi{@tag_attributes}
2
- - if options[:text].blank? && block_given?
1
+ %bdi{ html_attributes }
2
+ - if text.blank? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,4 +1,5 @@
1
1
  module Matestack::Ui::Core::Bdi
2
2
  class Bdi < Matestack::Ui::Core::Component::Static
3
+ optional :text
3
4
  end
4
5
  end
@@ -1,5 +1,5 @@
1
- %bdo{@tag_attributes}
2
- - if options[:text].blank? && block_given?
1
+ %bdo{ html_attributes }
2
+ - if text.blank? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,11 +1,6 @@
1
1
  module Matestack::Ui::Core::Bdo
2
2
  class Bdo < Matestack::Ui::Core::Component::Static
3
- requires :dir
4
-
5
- def setup
6
- @tag_attributes.merge!({
7
- "dir": options[:dir]
8
- })
9
- end
3
+ html_attributes :dir
4
+ optional :text
10
5
  end
11
6
  end
@@ -1,5 +1,5 @@
1
- %blockquote{@tag_attributes}
2
- - if options[:text].nil? && block_given?
1
+ %blockquote{ html_attributes }
2
+ - if text.nil? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,11 +1,6 @@
1
1
  module Matestack::Ui::Core::Blockquote
2
2
  class Blockquote < Matestack::Ui::Core::Component::Static
3
-
4
- def setup
5
- @tag_attributes.merge!({
6
- "cite": options[:cite]
7
- })
8
- end
9
-
3
+ html_attributes :cite
4
+ optional :text
10
5
  end
11
6
  end
@@ -1,5 +1,5 @@
1
- - unless options[:times].nil?
2
- - options[:times].times do
3
- %br{@tag_attributes}
1
+ - unless times.nil?
2
+ - times.times do
3
+ %br{ html_attributes }
4
4
  - else
5
- %br{@tag_attributes}
5
+ %br{ html_attributes }
@@ -1,5 +1,5 @@
1
1
  module Matestack::Ui::Core::Br
2
2
  class Br < Matestack::Ui::Core::Component::Static
3
-
3
+ optional :times
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
- %button{@tag_attributes}
2
- - if options[:text].nil? && block_given?
1
+ %button{ html_attributes }
2
+ - if text.nil? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,11 +1,7 @@
1
1
  module Matestack::Ui::Core::Button
2
2
  class Button < Matestack::Ui::Core::Component::Static
3
-
4
- def setup
5
- @tag_attributes.merge!({
6
- "disabled": options[:disabled] ||= nil
7
- })
8
- end
9
-
3
+ html_attributes :autofocus, :disabled, :form, :formaction, :formenctype, :formmethod,
4
+ :formnovalidate, :formtarget, :name, :type, :value
5
+ optional :text
10
6
  end
11
7
  end
@@ -1,5 +1,5 @@
1
- %caption{@tag_attributes}
2
- - if options[:text].nil? && block_given?
1
+ %caption{ html_attributes }
2
+ - if text.nil? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,5 +1,5 @@
1
1
  module Matestack::Ui::Core::Caption
2
2
  class Caption < Matestack::Ui::Core::Component::Static
3
-
3
+ optional :text
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
- %cite{@tag_attributes}
2
- - if options[:text].nil? && block_given?
1
+ %cite{ html_attributes }
2
+ - if text.nil? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,5 +1,5 @@
1
1
  module Matestack::Ui::Core::Cite
2
2
  class Cite < Matestack::Ui::Core::Component::Static
3
-
3
+ optional :text
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
- %code{@tag_attributes}
2
- - if options[:text].nil? && block_given?
1
+ %code{ html_attributes }
2
+ - if text.nil? && block_given?
3
3
  = yield
4
4
  - else
5
- = options[:text]
5
+ = text
@@ -1,5 +1,5 @@
1
1
  module Matestack::Ui::Core::Code
2
2
  class Code < Matestack::Ui::Core::Component::Static
3
-
3
+ optional :text
4
4
  end
5
5
  end
@@ -7,11 +7,9 @@ module Matestack::Ui::Core::Collection::Content
7
7
  end
8
8
 
9
9
  def response
10
- components {
11
- div @tag_attributes do
12
- yield_components
13
- end
14
- }
10
+ div @tag_attributes do
11
+ yield_components
12
+ end
15
13
  end
16
14
 
17
15
  end
@@ -1,3 +1,3 @@
1
- %a{@tag_attributes, "@click": "next()"}
1
+ %a{ html_attributes , "@click": "next()" }
2
2
  - if block_given?
3
3
  = yield
@@ -1,3 +1,3 @@
1
- %a{@tag_attributes, "@click": "goToPage(#{@options[:page]})"}
1
+ %a{ html_attributes, "@click": "goToPage(#{page})" }
2
2
  - if block_given?
3
3
  = yield
@@ -1,7 +1,7 @@
1
1
  module Matestack::Ui::Core::Collection::Content::Page
2
2
  module Link
3
3
  class Link::Link < Matestack::Ui::Core::Component::Static
4
-
4
+ requires :page
5
5
  end
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
- %a{@tag_attributes, "@click": "previous()"}
1
+ %a{ html_attributes, "@click": "previous()" }
2
2
  - if block_given?
3
3
  = yield
@@ -7,7 +7,7 @@ module Matestack::Ui::Core::Collection::Filter
7
7
  end
8
8
 
9
9
  def response
10
- div @tag_attributes do
10
+ div html_attributes do
11
11
  yield_components
12
12
  end
13
13
  end
@@ -1,24 +1,27 @@
1
1
  module Matestack::Ui::Core::Collection::Filter::Input
2
2
  class Input < Matestack::Ui::Core::Component::Static
3
+ include Matestack::Ui::Core::Form::HasInputHtmlAttributes
3
4
 
4
- def setup
5
- @tag_attributes.merge!({
6
- "v-model#{'.number' if options[:type] == :number}": input_key,
7
- type: options[:type],
8
- class: options[:class],
5
+ requires :key, :type
6
+ optional :placeholder, class: { as: :klass }
7
+
8
+ def response
9
+ input html_attributes.merge(attributes: {
10
+ "v-model#{'.number' if type == :number}": input_key,
11
+ type: type,
9
12
  id: component_id,
10
13
  "@keyup.enter": "submitFilter()",
11
14
  ref: "filter.#{attr_key}",
12
- placeholder: options[:placeholder]
15
+ placeholder: placeholder
13
16
  })
14
17
  end
15
18
 
16
19
  def input_key
17
- 'filter["' + options[:key].to_s + '"]'
20
+ 'filter["' + key.to_s + '"]'
18
21
  end
19
22
 
20
23
  def attr_key
21
- return options[:key].to_s
24
+ key.to_s
22
25
  end
23
26
 
24
27
  end
@@ -1,3 +1,3 @@
1
- %a{@tag_attributes, "@click": "resetFilter()"}
1
+ %a{ html_attributes , "@click": "resetFilter()"}
2
2
  - if block_given?
3
3
  = yield