luda 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +5 -0
  4. data/assets/javascripts/luda-degradation.js +131 -0
  5. data/assets/javascripts/luda-degradation.js.map +1 -0
  6. data/assets/javascripts/luda-degradation.min.js +7 -0
  7. data/assets/javascripts/luda-degradation.min.js.map +1 -0
  8. data/assets/javascripts/luda-sprockets.js +11 -0
  9. data/assets/javascripts/luda.js +2024 -0
  10. data/assets/javascripts/luda.js.map +1 -0
  11. data/assets/javascripts/luda.min.js +7 -0
  12. data/assets/javascripts/luda.min.js.map +1 -0
  13. data/assets/javascripts/luda/behaviours/enter-click.js +38 -0
  14. data/assets/javascripts/luda/behaviours/focus.js +103 -0
  15. data/assets/javascripts/luda/behaviours/radio-tab.js +69 -0
  16. data/assets/javascripts/luda/behaviours/readonly.js +57 -0
  17. data/assets/javascripts/luda/behaviours/toggle.js +104 -0
  18. data/assets/javascripts/luda/collections/carousel.js +314 -0
  19. data/assets/javascripts/luda/collections/dropdown.js +269 -0
  20. data/assets/javascripts/luda/collections/form-dropdown.js +112 -0
  21. data/assets/javascripts/luda/collections/tab.js +117 -0
  22. data/assets/javascripts/luda/component.js +240 -0
  23. data/assets/javascripts/luda/constants.js +18 -0
  24. data/assets/javascripts/luda/degradation.js +125 -0
  25. data/assets/javascripts/luda/dom.js +81 -0
  26. data/assets/javascripts/luda/elements/form-file.js +104 -0
  27. data/assets/javascripts/luda/elements/form-select.js +212 -0
  28. data/assets/javascripts/luda/event.js +193 -0
  29. data/assets/javascripts/luda/index.js +20 -0
  30. data/assets/javascripts/luda/install.js +75 -0
  31. data/assets/javascripts/luda/singleton.js +77 -0
  32. data/assets/javascripts/luda/utilities.js +16 -0
  33. data/assets/stylesheets/luda/_core/_base.sass +430 -0
  34. data/assets/stylesheets/luda/_core/_functions.sass +240 -0
  35. data/assets/stylesheets/luda/_core/_variables.sass +710 -0
  36. data/assets/stylesheets/luda/_core/behaviours/_disabled.sass +12 -0
  37. data/assets/stylesheets/luda/_core/behaviours/_focus.sass +7 -0
  38. data/assets/stylesheets/luda/_core/behaviours/_readonly.sass +16 -0
  39. data/assets/stylesheets/luda/_core/behaviours/_toggle.sass +4 -0
  40. data/assets/stylesheets/luda/_core/collections/_alert.sass +24 -0
  41. data/assets/stylesheets/luda/_core/collections/_avatar.sass +117 -0
  42. data/assets/stylesheets/luda/_core/collections/_breadcrumb.sass +21 -0
  43. data/assets/stylesheets/luda/_core/collections/_button-group.sass +67 -0
  44. data/assets/stylesheets/luda/_core/collections/_button-icon.sass +46 -0
  45. data/assets/stylesheets/luda/_core/collections/_carousel.sass +132 -0
  46. data/assets/stylesheets/luda/_core/collections/_dropdown.sass +60 -0
  47. data/assets/stylesheets/luda/_core/collections/_form-button.sass +23 -0
  48. data/assets/stylesheets/luda/_core/collections/_form-dropdown.sass +21 -0
  49. data/assets/stylesheets/luda/_core/collections/_form-group.sass +48 -0
  50. data/assets/stylesheets/luda/_core/collections/_form-icon.sass +71 -0
  51. data/assets/stylesheets/luda/_core/collections/_media.sass +55 -0
  52. data/assets/stylesheets/luda/_core/collections/_modal.sass +12 -0
  53. data/assets/stylesheets/luda/_core/collections/_nav.sass +162 -0
  54. data/assets/stylesheets/luda/_core/collections/_tab.sass +18 -0
  55. data/assets/stylesheets/luda/_core/elements/_badge.sass +19 -0
  56. data/assets/stylesheets/luda/_core/elements/_baseline.sass +22 -0
  57. data/assets/stylesheets/luda/_core/elements/_button.sass +136 -0
  58. data/assets/stylesheets/luda/_core/elements/_container.sass +8 -0
  59. data/assets/stylesheets/luda/_core/elements/_grid.sass +55 -0
  60. data/assets/stylesheets/luda/_core/elements/_icon.sass +110 -0
  61. data/assets/stylesheets/luda/_core/elements/_overlay.sass +11 -0
  62. data/assets/stylesheets/luda/_core/elements/_progress.sass +31 -0
  63. data/assets/stylesheets/luda/_core/elements/_scrollbar.sass +21 -0
  64. data/assets/stylesheets/luda/_core/elements/_table.sass +102 -0
  65. data/assets/stylesheets/luda/_core/elements/_turbolinks-progress-bar.sass +5 -0
  66. data/assets/stylesheets/luda/_core/elements/form/_form-check-radio.sass +105 -0
  67. data/assets/stylesheets/luda/_core/elements/form/_form-element.sass +83 -0
  68. data/assets/stylesheets/luda/_core/elements/form/_form-helper.sass +66 -0
  69. data/assets/stylesheets/luda/_core/elements/form/_form-label.sass +20 -0
  70. data/assets/stylesheets/luda/_core/elements/form/_form-range.sass +92 -0
  71. data/assets/stylesheets/luda/_core/elements/form/_form-row.sass +214 -0
  72. data/assets/stylesheets/luda/_core/elements/typography/_code.sass +27 -0
  73. data/assets/stylesheets/luda/_core/elements/typography/_link.sass +15 -0
  74. data/assets/stylesheets/luda/_core/elements/typography/_list.sass +14 -0
  75. data/assets/stylesheets/luda/_core/elements/typography/_mark.sass +7 -0
  76. data/assets/stylesheets/luda/_core/elements/typography/_quote.sass +68 -0
  77. data/assets/stylesheets/luda/_core/elements/typography/_sub-sup.sass +16 -0
  78. data/assets/stylesheets/luda/_core/elements/typography/_typography.sass +52 -0
  79. data/assets/stylesheets/luda/_core/mixins/_browser.sass +15 -0
  80. data/assets/stylesheets/luda/_core/mixins/_button.sass +90 -0
  81. data/assets/stylesheets/luda/_core/mixins/_dropdown.sass +40 -0
  82. data/assets/stylesheets/luda/_core/mixins/_focus.sass +3 -0
  83. data/assets/stylesheets/luda/_core/mixins/_form.sass +27 -0
  84. data/assets/stylesheets/luda/_core/mixins/_install.sass +7 -0
  85. data/assets/stylesheets/luda/_core/mixins/_media-query.sass +66 -0
  86. data/assets/stylesheets/luda/_core/mixins/_overlay.sass +14 -0
  87. data/assets/stylesheets/luda/_core/mixins/_sass-lint-fix.sass +3 -0
  88. data/assets/stylesheets/luda/_core/mixins/_typography.sass +40 -0
  89. data/assets/stylesheets/luda/_core/utilities/_align.sass +19 -0
  90. data/assets/stylesheets/luda/_core/utilities/_background.sass +88 -0
  91. data/assets/stylesheets/luda/_core/utilities/_color.sass +36 -0
  92. data/assets/stylesheets/luda/_core/utilities/_display.sass +40 -0
  93. data/assets/stylesheets/luda/_core/utilities/_flex.sass +114 -0
  94. data/assets/stylesheets/luda/_core/utilities/_float.sass +21 -0
  95. data/assets/stylesheets/luda/_core/utilities/_opacity.sass +19 -0
  96. data/assets/stylesheets/luda/_core/utilities/_overflow.sass +18 -0
  97. data/assets/stylesheets/luda/_core/utilities/_position.sass +48 -0
  98. data/assets/stylesheets/luda/_core/utilities/_shape.sass +62 -0
  99. data/assets/stylesheets/luda/_core/utilities/_size.sass +67 -0
  100. data/assets/stylesheets/luda/_core/utilities/_space.sass +227 -0
  101. data/assets/stylesheets/luda/_core/utilities/_text.sass +85 -0
  102. data/assets/stylesheets/luda/_core/utilities/_visibility.sass +11 -0
  103. data/assets/stylesheets/luda/_core/utilities/_z-index.sass +19 -0
  104. data/assets/stylesheets/luda/_default.sass +51 -0
  105. data/assets/stylesheets/luda/core/_base.sass +430 -0
  106. data/assets/stylesheets/luda/core/_functions.sass +240 -0
  107. data/assets/stylesheets/luda/core/_variables.sass +710 -0
  108. data/assets/stylesheets/luda/core/behaviours/_disabled.sass +12 -0
  109. data/assets/stylesheets/luda/core/behaviours/_focus.sass +7 -0
  110. data/assets/stylesheets/luda/core/behaviours/_readonly.sass +16 -0
  111. data/assets/stylesheets/luda/core/behaviours/_toggle.sass +4 -0
  112. data/assets/stylesheets/luda/core/collections/_alert.sass +24 -0
  113. data/assets/stylesheets/luda/core/collections/_avatar.sass +117 -0
  114. data/assets/stylesheets/luda/core/collections/_breadcrumb.sass +21 -0
  115. data/assets/stylesheets/luda/core/collections/_button-group.sass +67 -0
  116. data/assets/stylesheets/luda/core/collections/_button-icon.sass +46 -0
  117. data/assets/stylesheets/luda/core/collections/_carousel.sass +132 -0
  118. data/assets/stylesheets/luda/core/collections/_dropdown.sass +60 -0
  119. data/assets/stylesheets/luda/core/collections/_form-button.sass +23 -0
  120. data/assets/stylesheets/luda/core/collections/_form-dropdown.sass +21 -0
  121. data/assets/stylesheets/luda/core/collections/_form-group.sass +48 -0
  122. data/assets/stylesheets/luda/core/collections/_form-icon.sass +71 -0
  123. data/assets/stylesheets/luda/core/collections/_media.sass +55 -0
  124. data/assets/stylesheets/luda/core/collections/_modal.sass +12 -0
  125. data/assets/stylesheets/luda/core/collections/_nav.sass +162 -0
  126. data/assets/stylesheets/luda/core/collections/_tab.sass +18 -0
  127. data/assets/stylesheets/luda/core/elements/_badge.sass +19 -0
  128. data/assets/stylesheets/luda/core/elements/_baseline.sass +22 -0
  129. data/assets/stylesheets/luda/core/elements/_button.sass +136 -0
  130. data/assets/stylesheets/luda/core/elements/_container.sass +8 -0
  131. data/assets/stylesheets/luda/core/elements/_grid.sass +55 -0
  132. data/assets/stylesheets/luda/core/elements/_icon.sass +110 -0
  133. data/assets/stylesheets/luda/core/elements/_overlay.sass +11 -0
  134. data/assets/stylesheets/luda/core/elements/_progress.sass +31 -0
  135. data/assets/stylesheets/luda/core/elements/_scrollbar.sass +21 -0
  136. data/assets/stylesheets/luda/core/elements/_table.sass +102 -0
  137. data/assets/stylesheets/luda/core/elements/_turbolinks-progress-bar.sass +5 -0
  138. data/assets/stylesheets/luda/core/elements/form/_form-check-radio.sass +105 -0
  139. data/assets/stylesheets/luda/core/elements/form/_form-element.sass +83 -0
  140. data/assets/stylesheets/luda/core/elements/form/_form-helper.sass +66 -0
  141. data/assets/stylesheets/luda/core/elements/form/_form-label.sass +20 -0
  142. data/assets/stylesheets/luda/core/elements/form/_form-range.sass +92 -0
  143. data/assets/stylesheets/luda/core/elements/form/_form-row.sass +214 -0
  144. data/assets/stylesheets/luda/core/elements/typography/_code.sass +27 -0
  145. data/assets/stylesheets/luda/core/elements/typography/_link.sass +15 -0
  146. data/assets/stylesheets/luda/core/elements/typography/_list.sass +14 -0
  147. data/assets/stylesheets/luda/core/elements/typography/_mark.sass +7 -0
  148. data/assets/stylesheets/luda/core/elements/typography/_quote.sass +68 -0
  149. data/assets/stylesheets/luda/core/elements/typography/_sub-sup.sass +16 -0
  150. data/assets/stylesheets/luda/core/elements/typography/_typography.sass +52 -0
  151. data/assets/stylesheets/luda/core/mixins/_browser.sass +15 -0
  152. data/assets/stylesheets/luda/core/mixins/_button.sass +90 -0
  153. data/assets/stylesheets/luda/core/mixins/_dropdown.sass +40 -0
  154. data/assets/stylesheets/luda/core/mixins/_focus.sass +3 -0
  155. data/assets/stylesheets/luda/core/mixins/_form.sass +27 -0
  156. data/assets/stylesheets/luda/core/mixins/_install.sass +7 -0
  157. data/assets/stylesheets/luda/core/mixins/_media-query.sass +66 -0
  158. data/assets/stylesheets/luda/core/mixins/_overlay.sass +14 -0
  159. data/assets/stylesheets/luda/core/mixins/_sass-lint-fix.sass +3 -0
  160. data/assets/stylesheets/luda/core/mixins/_typography.sass +40 -0
  161. data/assets/stylesheets/luda/core/utilities/_align.sass +19 -0
  162. data/assets/stylesheets/luda/core/utilities/_background.sass +88 -0
  163. data/assets/stylesheets/luda/core/utilities/_color.sass +36 -0
  164. data/assets/stylesheets/luda/core/utilities/_display.sass +40 -0
  165. data/assets/stylesheets/luda/core/utilities/_flex.sass +114 -0
  166. data/assets/stylesheets/luda/core/utilities/_float.sass +21 -0
  167. data/assets/stylesheets/luda/core/utilities/_opacity.sass +19 -0
  168. data/assets/stylesheets/luda/core/utilities/_overflow.sass +18 -0
  169. data/assets/stylesheets/luda/core/utilities/_position.sass +48 -0
  170. data/assets/stylesheets/luda/core/utilities/_shape.sass +62 -0
  171. data/assets/stylesheets/luda/core/utilities/_size.sass +67 -0
  172. data/assets/stylesheets/luda/core/utilities/_space.sass +227 -0
  173. data/assets/stylesheets/luda/core/utilities/_text.sass +85 -0
  174. data/assets/stylesheets/luda/core/utilities/_visibility.sass +11 -0
  175. data/assets/stylesheets/luda/core/utilities/_z-index.sass +19 -0
  176. data/assets/stylesheets/luda/default/_banner.sass +7 -0
  177. data/assets/stylesheets/luda/default/_base.sass +6 -0
  178. data/assets/stylesheets/luda/default/_functions.sass +1 -0
  179. data/assets/stylesheets/luda/default/_mixins.sass +10 -0
  180. data/assets/stylesheets/luda/default/_variables.sass +1 -0
  181. data/assets/stylesheets/luda/default/behaviours/_disabled.sass +5 -0
  182. data/assets/stylesheets/luda/default/behaviours/_focus.sass +5 -0
  183. data/assets/stylesheets/luda/default/behaviours/_readonly.sass +5 -0
  184. data/assets/stylesheets/luda/default/behaviours/_toggle.sass +5 -0
  185. data/assets/stylesheets/luda/default/collections/_alert.sass +6 -0
  186. data/assets/stylesheets/luda/default/collections/_avatar.sass +7 -0
  187. data/assets/stylesheets/luda/default/collections/_breadcrumb.sass +6 -0
  188. data/assets/stylesheets/luda/default/collections/_button-group.sass +7 -0
  189. data/assets/stylesheets/luda/default/collections/_button-icon.sass +8 -0
  190. data/assets/stylesheets/luda/default/collections/_carousel.sass +7 -0
  191. data/assets/stylesheets/luda/default/collections/_dropdown.sass +8 -0
  192. data/assets/stylesheets/luda/default/collections/_form-button.sass +9 -0
  193. data/assets/stylesheets/luda/default/collections/_form-dropdown.sass +8 -0
  194. data/assets/stylesheets/luda/default/collections/_form-group.sass +11 -0
  195. data/assets/stylesheets/luda/default/collections/_form-icon.sass +8 -0
  196. data/assets/stylesheets/luda/default/collections/_media.sass +7 -0
  197. data/assets/stylesheets/luda/default/collections/_modal.sass +7 -0
  198. data/assets/stylesheets/luda/default/collections/_nav.sass +10 -0
  199. data/assets/stylesheets/luda/default/collections/_tab.sass +9 -0
  200. data/assets/stylesheets/luda/default/elements/_badge.sass +6 -0
  201. data/assets/stylesheets/luda/default/elements/_baseline.sass +6 -0
  202. data/assets/stylesheets/luda/default/elements/_button.sass +7 -0
  203. data/assets/stylesheets/luda/default/elements/_container.sass +6 -0
  204. data/assets/stylesheets/luda/default/elements/_form.sass +13 -0
  205. data/assets/stylesheets/luda/default/elements/_grid.sass +6 -0
  206. data/assets/stylesheets/luda/default/elements/_icon.sass +6 -0
  207. data/assets/stylesheets/luda/default/elements/_overlay.sass +6 -0
  208. data/assets/stylesheets/luda/default/elements/_progress.sass +6 -0
  209. data/assets/stylesheets/luda/default/elements/_scrollbar.sass +6 -0
  210. data/assets/stylesheets/luda/default/elements/_table.sass +6 -0
  211. data/assets/stylesheets/luda/default/elements/_turbolinks-progress-bar.sass +6 -0
  212. data/assets/stylesheets/luda/default/elements/_typography.sass +12 -0
  213. data/assets/stylesheets/luda/default/elements/form/_form-check-radio.sass +5 -0
  214. data/assets/stylesheets/luda/default/elements/form/_form-element.sass +5 -0
  215. data/assets/stylesheets/luda/default/elements/form/_form-helper.sass +5 -0
  216. data/assets/stylesheets/luda/default/elements/form/_form-label.sass +5 -0
  217. data/assets/stylesheets/luda/default/elements/form/_form-range.sass +5 -0
  218. data/assets/stylesheets/luda/default/elements/form/_form-row.sass +5 -0
  219. data/assets/stylesheets/luda/default/elements/typography/_code.sass +5 -0
  220. data/assets/stylesheets/luda/default/elements/typography/_link.sass +5 -0
  221. data/assets/stylesheets/luda/default/elements/typography/_list.sass +4 -0
  222. data/assets/stylesheets/luda/default/elements/typography/_mark.sass +5 -0
  223. data/assets/stylesheets/luda/default/elements/typography/_quote.sass +5 -0
  224. data/assets/stylesheets/luda/default/elements/typography/_sub-sup.sass +5 -0
  225. data/assets/stylesheets/luda/default/elements/typography/_typography.sass +5 -0
  226. data/assets/stylesheets/luda/default/index.sass +56 -0
  227. data/assets/stylesheets/luda/default/utilities/_align.sass +5 -0
  228. data/assets/stylesheets/luda/default/utilities/_background.sass +5 -0
  229. data/assets/stylesheets/luda/default/utilities/_color.sass +5 -0
  230. data/assets/stylesheets/luda/default/utilities/_display.sass +5 -0
  231. data/assets/stylesheets/luda/default/utilities/_flex.sass +5 -0
  232. data/assets/stylesheets/luda/default/utilities/_float.sass +5 -0
  233. data/assets/stylesheets/luda/default/utilities/_opacity.sass +5 -0
  234. data/assets/stylesheets/luda/default/utilities/_overflow.sass +5 -0
  235. data/assets/stylesheets/luda/default/utilities/_position.sass +5 -0
  236. data/assets/stylesheets/luda/default/utilities/_shape.sass +5 -0
  237. data/assets/stylesheets/luda/default/utilities/_size.sass +5 -0
  238. data/assets/stylesheets/luda/default/utilities/_space.sass +5 -0
  239. data/assets/stylesheets/luda/default/utilities/_text.sass +5 -0
  240. data/assets/stylesheets/luda/default/utilities/_visibility.sass +5 -0
  241. data/assets/stylesheets/luda/default/utilities/_z-index.sass +5 -0
  242. data/lib/luda.rb +72 -0
  243. data/lib/luda/config.rb +3 -0
  244. data/lib/luda/engine.rb +11 -0
  245. data/lib/luda/version.rb +3 -0
  246. metadata +302 -0
@@ -0,0 +1,102 @@
1
+ +install(shared-element-table)
2
+
3
+ .table,
4
+ .table-border
5
+ word-break: normal
6
+ overflow: auto
7
+ -webkit-overflow-scrolling: touch
8
+ border-radius: $table-border-radius
9
+
10
+ .table table,
11
+ .table-border table
12
+ min-width: 100%
13
+
14
+ .table thead,
15
+ .table-border thead
16
+ background: $table-head-background
17
+
18
+ .table tbody tr:nth-child(even),
19
+ .table-border tbody tr:nth-child(even)
20
+ background: $table-row-even-background
21
+
22
+ .table tbody tr:nth-child(odd),
23
+ .table-border tbody tr:nth-child(odd)
24
+ background: $table-row-odd-background
25
+
26
+ .table th,
27
+ .table td,
28
+ .table-border th,
29
+ .table-border td
30
+ vertical-align: top
31
+ text-align: left
32
+
33
+ .table th,
34
+ .table-border th
35
+ color: $table-head-color
36
+ font-weight: 700
37
+
38
+ .table td,
39
+ .table-border td
40
+ color: $table-body-color
41
+
42
+ .table th,
43
+ .table td
44
+ padding: $table-cell-padding-rem
45
+
46
+ $_table-border-cell-padding-top: null
47
+ $_table-border-top-width-is-rem: _is-rem(nth($table-border-width, 1))
48
+ $_table-cell-padding-top: nth($table-cell-padding-rem, 1)
49
+ $_table-border-top-width: nth($table-border-width, 1)
50
+ @if $_table-border-top-width-is-rem
51
+ $_table-border-cell-padding-top: $_table-cell-padding-top - $_table-border-top-width
52
+ @else
53
+ $_table-border-cell-padding-top: calc(#{$_table-cell-padding-top} - #{$_table-border-top-width})
54
+ +_sass-lint-fix-if-else
55
+
56
+ .table-border
57
+ border: $table-border-style $table-border-width $table-border-color
58
+
59
+ .table-border th,
60
+ .table-border td
61
+ $padding-right: mirror-nth($table-cell-padding-rem, 2)
62
+ $padding-bottom: mirror-nth($table-cell-padding-rem, 3)
63
+ $padding-left: mirror-nth($table-cell-padding-rem, 4)
64
+ padding: $_table-border-cell-padding-top $padding-right $padding-bottom $padding-left
65
+
66
+ .table-border td
67
+ border-top: $table-border-style $table-border-width $table-border-color
68
+
69
+ .table-border tbody tr:last-child td
70
+ $padding-right: mirror-nth($table-cell-padding-rem, 2)
71
+ $padding-bottom: null
72
+ $padding-left: mirror-nth($table-cell-padding-rem, 4)
73
+ $table-cell-padding-bottom: mirror-nth($table-cell-padding-rem, 3)
74
+ $table-border-bottom-width: mirror-nth($table-border-width, 3)
75
+ $table-border-bottom-width-is-rem: _is-rem(mirror-nth($table-border-width, 3))
76
+ @if $table-border-bottom-width-is-rem
77
+ $padding-bottom: $table-cell-padding-bottom - $table-border-bottom-width
78
+ @else
79
+ $padding-bottom: calc(#{$table-cell-padding-bottom} - #{$table-border-bottom-width})
80
+ padding: $_table-border-cell-padding-top $padding-right $padding-bottom $padding-left
81
+
82
+
83
+
84
+ .table-nowrap.table th,
85
+ .table-nowrap.table td,
86
+ .table-nowrap.table-border th,
87
+ .table-nowrap.table-border td
88
+ vertical-align: middle
89
+ white-space: nowrap
90
+
91
+ .table-stripless.table thead,
92
+ .table-stripless.table-border thead
93
+ background: none
94
+
95
+ .table-stripless.table table tbody tr,
96
+ .table-stripless.table-border table tbody tr
97
+ background: none
98
+
99
+ .table-hover.table tbody tr:hover,
100
+ .table-hover.table-border tbody tr:hover
101
+ color: $table-row-hover-color
102
+ background: $table-row-hover-background
@@ -0,0 +1,5 @@
1
+ +install(shared-element-turbolinks-progress-bar)
2
+
3
+ .turbolinks-progress-bar
4
+ height: $turbolinks-progress-bar-height-px
5
+ background: $turbolinks-progress-bar-background
@@ -0,0 +1,105 @@
1
+ +install(shared-element-form-check-radio)
2
+
3
+ .fm-check label,
4
+ .fm-radio label
5
+ padding-left: $form-element-checkfield-height-em + 0.4em
6
+ line-height: typo-line-height($form-element-typography-size-level)
7
+ overflow: hidden
8
+ -webkit-user-select: none
9
+ -moz-user-select: none
10
+ -ms-user-select: none
11
+ user-select: none
12
+
13
+ .fm-check label:not(:last-child),
14
+ .fm-radio label:not(:last-child)
15
+ margin-right: 1.2em
16
+
17
+ .fm-check label input,
18
+ .fm-radio label input
19
+ $line-height-rem: typo-line-height($form-element-typography-size-level)
20
+ $font-size-rem: typo-size($form-element-typography-size-level)
21
+ $line-height-em: $line-height-rem / $font-size-rem * 1em
22
+ $margin-top: ($line-height-em - $form-element-checkfield-height-em) / 2
23
+ $margin-left: - $form-element-checkfield-height-em - 0.4em
24
+ float: left
25
+ margin: $margin-top 0.4em 0 $margin-left
26
+
27
+ .fm-check input,
28
+ .fm-radio input
29
+ width: $form-element-checkfield-height-em
30
+ height: $form-element-checkfield-height-em
31
+ border: $form-element-border-style $form-element-border-width $form-element-border-color
32
+ background: $form-element-background
33
+ box-shadow: $form-element-box-shadow
34
+
35
+ .fm-check input
36
+ border-radius: $form-element-border-radius
37
+ transform: scale(0.9)
38
+
39
+ .fm-radio input
40
+ border-radius: 100%
41
+
42
+ .fm-check[data-error] input,
43
+ .fm-radio[data-error] input
44
+ background: $form-element-error-background
45
+ border-color: $form-element-error-border-color
46
+ box-shadow: $form-element-error-box-shadow
47
+
48
+ .fm.fm-check .focus,
49
+ .fm.fm-radio .focus
50
+ background: $form-element-focus-background
51
+ border-color: $form-element-focus-border-color
52
+ box-shadow: $form-element-focus-box-shadow
53
+
54
+ .fm.fm-check input:checked,
55
+ .fm.fm-radio input:checked
56
+ +form-checkbox-or-radio-background-icon($form-element-checked-icon, $form-element-checked-icon-color, $form-element-background)
57
+
58
+ @if $form-element-error-background or $form-element-error-checked-icon-color
59
+ .fm.fm-check[data-error] input:checked,
60
+ .fm.fm-radio[data-error] input:checked
61
+ $icon-color: existing($form-element-error-checked-icon-color, $form-element-checked-icon-color)
62
+ $background: form-error-background
63
+ +form-checkbox-or-radio-background-icon($form-element-checked-icon, $icon-color, $background)
64
+
65
+ @if $form-element-focus-background or $form-element-focus-checked-icon-color
66
+ .fm.fm-check input.focus:checked,
67
+ .fm.fm-radio input.focus:checked
68
+ $icon-color: existing($form-element-focus-checked-icon-color, $form-element-checked-icon-color)
69
+ $background: form-focus-background
70
+ +form-checkbox-or-radio-background-icon($form-element-checked-icon, $icon-color, $background)
71
+
72
+ @if $form-element-error-background or $form-element-error-checked-icon-color
73
+ .fm.fm-check[data-error] input.focus:checked,
74
+ .fm.fm-radio[data-error] input.focus:checked
75
+ $icon-color: existing($form-element-focus-checked-icon-color, $form-element-error-checked-icon-color)
76
+ $background: form-error-focus-background
77
+ +form-checkbox-or-radio-background-icon($form-element-checked-icon, $icon-color, $background)
78
+
79
+
80
+
81
+ .fm-small.fm-check label,
82
+ .fm-small.fm-radio label
83
+ line-height: typo-line-height($form-element-small-typography-size-level)
84
+
85
+ .fm-large.fm-check label,
86
+ .fm-large.fm-radio label
87
+ line-height: typo-line-height($form-element-large-typography-size-level)
88
+
89
+ @if $form-element-small-typography-size-level
90
+ .fm-small.fm-check label input,
91
+ .fm-small.fm-radio label input
92
+ $line-height-rem: typo-line-height($form-element-small-typography-size-level)
93
+ $typo-size-rem: typo-size($form-element-small-typography-size-level)
94
+ $line-height-em: $line-height-rem / $typo-size-rem * 1em
95
+ $margin-top: ($line-height-em - $form-element-checkfield-height-em) / 2
96
+ margin-top: $margin-top
97
+
98
+ @if $form-element-large-typography-size-level
99
+ .fm-large.fm-check label input,
100
+ .fm-large.fm-radio label input
101
+ $line-height-rem: typo-line-height($form-element-large-typography-size-level)
102
+ $typo-size-rem: typo-size($form-element-large-typography-size-level)
103
+ $line-height-em: $line-height-rem / $typo-size-rem * 1em
104
+ $margin-top: ($line-height-em - $form-element-checkfield-height-em) / 2
105
+ margin-top: $margin-top
@@ -0,0 +1,83 @@
1
+ +install(shared-element-form-element)
2
+
3
+ .fm
4
+ display: flex
5
+ flex-wrap: wrap
6
+ font-size: typo-size($form-element-typography-size-level)
7
+ color: $form-element-color
8
+
9
+ .fm > *
10
+ flex: 0 0 auto
11
+
12
+ .fm input,
13
+ .fm select,
14
+ .fm textarea
15
+ -webkit-appearance: none
16
+ -moz-appearance: none
17
+ appearance: none
18
+ display: block
19
+
20
+ .fm .focus
21
+ outline: none
22
+
23
+ // remove webkit number input buttons
24
+ .fm ::-webkit-inner-spin-button,
25
+ .fm ::-webkit-outer-spin-button
26
+ display: none
27
+
28
+ // remove firefox number input buttons
29
+ .fm [type=number]
30
+ -moz-appearance: textfield
31
+
32
+ // remove firefox range input focus dotted outline
33
+ .fm [type=range]::-moz-focus-outer
34
+ border: none
35
+
36
+ // remove firefox invalid box shadow
37
+ .fm :invalid
38
+ box-shadow: none
39
+
40
+ // remove ie select icon
41
+ .fm select::-ms-expand
42
+ display: none
43
+
44
+ //remove search input cancel button
45
+ .fm ::-webkit-search-cancel-button
46
+ -webkit-appearance: none
47
+
48
+ // remove datalist icon
49
+ .fm ::-webkit-calendar-picker-indicator
50
+ display: none
51
+
52
+ // remove safari contact icon
53
+ .fm ::-webkit-contacts-auto-fill-button
54
+ display: none !important
55
+
56
+ // remove safari password icon
57
+ .fm ::-webkit-credentials-auto-fill-button
58
+ display: none !important
59
+
60
+ // remove safari caps icon
61
+ .fm ::-webkit-caps-lock-indicator
62
+ display: none !important
63
+
64
+
65
+
66
+ .fm-inline.fm
67
+ display: inline-flex
68
+ vertical-align: top
69
+
70
+ .fm-small.fm
71
+ font-size: typo-size($form-element-small-typography-size-level)
72
+
73
+ .fm-large.fm
74
+ font-size: typo-size($form-element-large-typography-size-level)
75
+
76
+ .fm-inline.fm:not(.fm-check):not(.fm-radio)
77
+ width: $form-element-inline-width-rem
78
+
79
+ .fm-small.fm-inline.fm:not(.fm-check):not(.fm-radio)
80
+ width: $form-element-small-inline-width-rem
81
+
82
+ .fm-large.fm-inline.fm:not(.fm-check):not(.fm-radio)
83
+ width: $form-element-large-inline-width-rem
@@ -0,0 +1,66 @@
1
+ +install(shared-element-form-helper)
2
+
3
+ .fm ::-webkit-input-placeholder
4
+ color: $form-element-placeholder-color
5
+
6
+ .fm ::-moz-placeholder
7
+ color: $form-element-placeholder-color
8
+
9
+ .fm :-ms-input-placeholder
10
+ color: $form-element-placeholder-color
11
+
12
+ .fm[data-error] ::-webkit-input-placeholder
13
+ color: $form-element-error-placeholder-color
14
+
15
+ .fm[data-error] ::-moz-placeholder
16
+ color: $form-element-error-placeholder-color
17
+
18
+ .fm[data-error] :-ms-input-placeholder
19
+ color: $form-element-error-placeholder-color
20
+
21
+ .fm input.focus::-webkit-input-placeholder,
22
+ .fm textarea.focus::-webkit-input-placeholder,
23
+ .fm .focus ~ input::-webkit-input-placeholder
24
+ color: $form-element-focus-placeholder-color
25
+
26
+ .fm input.focus::-moz-placeholder,
27
+ .fm textarea.focus::-moz-placeholder,
28
+ .fm .focus ~ input::-moz-placeholder
29
+ color: $form-element-focus-placeholder-color
30
+
31
+ .fm input.focus:-ms-input-placeholder,
32
+ .fm textarea.focus:-ms-input-placeholder,
33
+ .fm .focus ~ input:-ms-input-placeholder
34
+ color: $form-element-focus-placeholder-color
35
+
36
+
37
+
38
+ .fm[data-error]::after,
39
+ .fm[data-hint]::after
40
+ display: block
41
+ width: 100%
42
+ font-size: typo-size($form-element-helper-typography-size-level)
43
+ line-height: typo-line-height($form-element-helper-typography-size-level)
44
+
45
+ .fm[data-hint]::after
46
+ content: attr(data-hint)
47
+ color: $form-element-hint-message-color
48
+
49
+ .fm[data-error]::after,
50
+ .fm[data-hint][data-error]::after
51
+ content: attr(data-error)
52
+ color: $form-element-error-message-color
53
+
54
+
55
+
56
+ @if $form-element-small-helper-typography-size-level
57
+ .fm-small.fm[data-hint]::after,
58
+ .fm-small.fm[data-error]::after
59
+ font-size: typo-size($form-element-small-helper-typography-size-level)
60
+ line-height: typo-line-height($form-element-small-helper-typography-size-level)
61
+
62
+ @if $form-element-large-helper-typography-size-level
63
+ .fm-large.fm[data-hint]::after,
64
+ .fm-large.fm[data-error]::after
65
+ font-size: typo-size($form-element-large-helper-typography-size-level)
66
+ line-height: typo-line-height($form-element-large-helper-typography-size-level)
@@ -0,0 +1,20 @@
1
+ +install(shared-element-form-label)
2
+
3
+ .fm-label
4
+ +typo-level($form-label-typography-size-level, $typography-main-baseline-offset-ratio)
5
+ display: block
6
+ color: $form-label-color
7
+
8
+
9
+
10
+ .fm-label-required.fm-label::after
11
+ content: $form-label-required-content
12
+ color: $form-label-required-color
13
+
14
+ @if $form-label-small-typography-size-level
15
+ .fm-label-small.fm-label
16
+ +typo-level($form-label-small-typography-size-level, $typography-main-baseline-offset-ratio)
17
+
18
+ @if $form-label-large-typography-size-level
19
+ .fm-label-large.fm-label
20
+ +typo-level($form-label-large-typography-size-level, $typography-main-baseline-offset-ratio)
@@ -0,0 +1,92 @@
1
+ +install(shared-element-form-range)
2
+
3
+ .fm-range input
4
+ width: 100%
5
+ height: $form-element-textfield-height-rem
6
+ background: none
7
+
8
+ .fm-range ::-webkit-slider-runnable-track
9
+ +_form-range-track-skin
10
+ height: $form-element-track-height-em
11
+
12
+ .fm-range ::-moz-range-track
13
+ +_form-range-track-skin
14
+ height: $form-element-track-height-em
15
+
16
+ .fm-range ::-ms-track
17
+ height: $form-element-track-height-em
18
+ color: transparent
19
+ background: transparent
20
+
21
+ .fm-range ::-ms-fill-lower
22
+ +_form-range-track-skin
23
+
24
+ .fm-range ::-ms-fill-upper
25
+ +_form-range-track-skin
26
+
27
+ .fm-range ::-webkit-slider-thumb
28
+ +_form-range-thumb-styles
29
+ -webkit-appearance: none
30
+ -moz-appearance: none
31
+ appearance: none
32
+ margin-top: $form-element-track-height-em / 2 - $form-element-thumb-height-em / 2
33
+
34
+ +browser-edge
35
+ .fm-range ::-webkit-slider-thumb
36
+ margin-top: 0
37
+
38
+ .fm-range ::-moz-range-thumb
39
+ +_form-range-thumb-styles
40
+
41
+ .fm-range ::-ms-thumb
42
+ +_form-range-thumb-styles
43
+
44
+ .fm-range ::-ms-tooltip
45
+ display: none
46
+
47
+ .fm-range[data-error] ::-webkit-slider-runnable-track
48
+ background: $form-element-error-track-background
49
+
50
+ .fm-range[data-error] ::-moz-range-track
51
+ background: $form-element-error-track-background
52
+
53
+ .fm-range[data-error] ::-ms-fill-lower
54
+ background: $form-element-error-track-background
55
+
56
+ .fm-range[data-error] ::-ms-fill-upper
57
+ background: $form-element-error-track-background
58
+
59
+ .fm-range[data-error] ::-webkit-slider-thumb
60
+ +_form-range-error-thumb-skin
61
+
62
+ .fm-range[data-error] ::-moz-range-thumb
63
+ +_form-range-error-thumb-skin
64
+
65
+ .fm-range[data-error] ::-ms-thumb
66
+ +_form-range-error-thumb-skin
67
+
68
+ .fm-range input.focus::-webkit-slider-runnable-track
69
+ background: $form-element-focus-track-background
70
+
71
+ .fm-range input.focus::-moz-range-track
72
+ background: $form-element-focus-track-background
73
+
74
+ .fm-range input.focus::-ms-track
75
+ background: $form-element-focus-track-background
76
+
77
+ .fm-range input.focus::-webkit-slider-thumb
78
+ +_form-range-focus-thumb-skin
79
+
80
+ .fm-range input.focus::-moz-range-thumb
81
+ +_form-range-focus-thumb-skin
82
+
83
+ .fm-range input.focus::-ms-thumb
84
+ +_form-range-focus-thumb-skin
85
+
86
+
87
+
88
+ .fm-small.fm-range input
89
+ height: $form-element-small-textfield-height-rem
90
+
91
+ .fm-large.fm-range input
92
+ height: $form-element-large-textfield-height-rem