luda 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,20 @@
1
+ //= require ./behaviours/enter-click
2
+ //= require ./behaviours/focus
3
+ //= require ./behaviours/radio-tab
4
+ //= require ./behaviours/readonly
5
+ //= require ./behaviours/toggle
6
+ //= require ./elements/form-file
7
+ //= require ./elements/form-select
8
+ //= require ./collections/carousel
9
+ //= require ./collections/dropdown
10
+ //= require ./collections/form-dropdown
11
+ //= require ./collections/tab
12
+ (function (global, factory) {
13
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./behaviours/enter-click.js'), require('./behaviours/focus.js'), require('./behaviours/radio-tab.js'), require('./behaviours/readonly.js'), require('./behaviours/toggle.js'), require('./elements/form-file.js'), require('./elements/form-select.js'), require('./collections/carousel.js'), require('./collections/dropdown.js'), require('./collections/form-dropdown.js'), require('./collections/tab.js')) :
14
+ typeof define === 'function' && define.amd ? define(['./behaviours/enter-click.js', './behaviours/focus.js', './behaviours/radio-tab.js', './behaviours/readonly.js', './behaviours/toggle.js', './elements/form-file.js', './elements/form-select.js', './collections/carousel.js', './collections/dropdown.js', './collections/form-dropdown.js', './collections/tab.js'], factory) :
15
+ (factory());
16
+ }(this, (function () { 'use strict';
17
+
18
+
19
+
20
+ })));
@@ -0,0 +1,75 @@
1
+ /*!
2
+ * Luda 0.1.5 | https://luda.dev
3
+ * Copyright 2018 oatw | https://oatw.blog
4
+ * MIT license | http://opensource.org/licenses/MIT
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
8
+ typeof define === 'function' && define.amd ? define(factory) :
9
+ (factory());
10
+ }(this, (function () { 'use strict';
11
+
12
+ var ENV;
13
+
14
+ ENV = (function() {
15
+ if (typeof document !== 'undefined') {
16
+ if (typeof window !== 'undefined') {
17
+ return window;
18
+ }
19
+ if (typeof global !== 'undefined') {
20
+ return global;
21
+ }
22
+ }
23
+ throw new Error('Unsupported runtime environment.');
24
+ })();
25
+
26
+ if (typeof ENV.luda !== 'function') {
27
+ ENV.luda = function(installer) {
28
+ var installed, name, property;
29
+ if (!installer) {
30
+ throw new Error('Installer cannot be detected.');
31
+ }
32
+ if (!['object', 'function'].includes(typeof installer)) {
33
+ throw new Error('Installer must be object, array or function.');
34
+ }
35
+ if (installer.hasOwnProperty('_SCOPE')) {
36
+ if (typeof installer._SCOPE !== 'string') {
37
+ throw new Error('_SCOPE must be string');
38
+ }
39
+ return ENV.luda._install(installer._SCOPE, installer);
40
+ }
41
+ if (installer instanceof Array || typeof installer === 'function') {
42
+ throw new Error('Unscoped installer must be object.');
43
+ }
44
+ installed = {};
45
+ for (name in installer) {
46
+ property = installer[name];
47
+ installed[name] = ENV.luda._install(name, property);
48
+ }
49
+ return installed;
50
+ };
51
+ ENV.luda._install = function(namespace, installer) {
52
+ var installedInstaller, installedName, ref;
53
+ if (ENV.luda[namespace]) {
54
+ console.warn(`Namespace ${namespace} is ocupied, sikp installation.`);
55
+ return ENV.luda[namespace];
56
+ }
57
+ ref = ENV.luda;
58
+ for (installedName in ref) {
59
+ installedInstaller = ref[installedName];
60
+ if (installer === installedInstaller) {
61
+ console.warn(`Installer is installed with name ${installedName}, skip installation.`);
62
+ return ENV.luda[installedName];
63
+ }
64
+ }
65
+ if (installer._install) {
66
+ if (typeof installer._install === 'function') {
67
+ return ENV.luda[namespace] = installer._install();
68
+ }
69
+ return ENV.luda[namespace] = installer._install;
70
+ }
71
+ return ENV.luda[namespace] = installer;
72
+ };
73
+ }
74
+
75
+ })));
@@ -0,0 +1,77 @@
1
+ //= require ./install
2
+ //= require ./utilities
3
+ (function (global, factory) {
4
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./install.js'), require('./utilities.js')) :
5
+ typeof define === 'function' && define.amd ? define(['./install.js', './utilities.js'], factory) :
6
+ (factory());
7
+ }(this, (function () { 'use strict';
8
+
9
+ var Singleton;
10
+
11
+ luda(Singleton = (function() {
12
+ class Singleton {
13
+ static active() {
14
+ return this._actived = true;
15
+ }
16
+
17
+ static deactive() {
18
+ return this._actived = false;
19
+ }
20
+
21
+ static _add(selector) {
22
+ if (typeof selector !== 'string') {
23
+ throw new Error(this._SELECTOR_INVALID_ERROR);
24
+ }
25
+ if (!this._SELECTORS.includes(selector)) {
26
+ this._SELECTORS.push(selector);
27
+ }
28
+ return this._mergeSelectors();
29
+ }
30
+
31
+ static _remove(selector) {
32
+ if (typeof selector !== 'string') {
33
+ throw new Error(this._SELECTOR_INVALID_ERROR);
34
+ }
35
+ luda.except(selector, this._SELECTORS);
36
+ return this._mergeSelectors();
37
+ }
38
+
39
+ static _mergeSelectors() {
40
+ return this._selector = this._SELECTORS.join(',');
41
+ }
42
+
43
+ static _install() {
44
+ var exposed;
45
+ if (this === Singleton) {
46
+ return this;
47
+ }
48
+ if (!this.hasOwnProperty('_SELECTORS')) {
49
+ this._SELECTORS = [];
50
+ }
51
+ this._mergeSelectors();
52
+ if (typeof this._init === 'function') {
53
+ exposed = this._init();
54
+ }
55
+ if (exposed) {
56
+ return exposed;
57
+ } else {
58
+ return this;
59
+ }
60
+ }
61
+
62
+ }
63
+ Singleton._SCOPE = 'Singleton';
64
+
65
+ Singleton._SELECTOR_INVALID_ERROR = '@param selector must be a css selector string';
66
+
67
+ Singleton._SELECTORS = [];
68
+
69
+ Singleton._selector = '';
70
+
71
+ Singleton._actived = true;
72
+
73
+ return Singleton;
74
+
75
+ }).call(this));
76
+
77
+ })));
@@ -0,0 +1,16 @@
1
+ //= require ./install
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./install.js')) :
4
+ typeof define === 'function' && define.amd ? define(['./install.js'], factory) :
5
+ (factory());
6
+ }(this, (function () { 'use strict';
7
+
8
+ luda({
9
+ except: function(element, arr) {
10
+ if (arr.includes(element)) {
11
+ return arr.splice(arr.indexOf(element), 1);
12
+ }
13
+ }
14
+ });
15
+
16
+ })));
@@ -0,0 +1,430 @@
1
+ +install(shared-base)
2
+ // sass-lint:disable max-file-line-count
3
+
4
+ // Based on sanitize.css v6.0.0 CC0 License
5
+ // github.com/csstools/sanitize.css
6
+
7
+
8
+
9
+ // Document
10
+ // ==========================================================================
11
+
12
+ // 1. Remove repeating backgrounds in all browsers (opinionated).
13
+ // 2. Add border box sizing in all browsers (opinionated).
14
+ *,
15
+ ::before,
16
+ ::after
17
+ box-sizing: border-box // 2
18
+ background-repeat: no-repeat // 1
19
+
20
+ // 1. Add text decoration inheritance in all browsers (opinionated).
21
+ // 2. Add vertical alignment inheritance in all browsers (opinionated).
22
+ ::before,
23
+ ::after
24
+ vertical-align: inherit // 2
25
+ text-decoration: inherit // 1
26
+
27
+ // change firefox tap highlight default gray background color
28
+ a:active,
29
+ label:active
30
+ background-color: $base-tap-highlight-color
31
+
32
+ // 1. Add the default cursor in all browsers (opinionated).
33
+ // 2. Breaks words to prevent prevent overflow in all browsers (opinionated).
34
+ // 3. Prevent adjustments of font size after orientation changes
35
+ // in IE on Windows Phone and in iOS.
36
+ html
37
+ font-size: _baseline-height-px(1)
38
+ word-break: $base-word-break // 2
39
+ cursor: $base-cursor // 1
40
+ font-family: $typography-main
41
+ text-rendering: $base-text-rendering
42
+ text-underline-position: $base-text-underline-position
43
+ background: $base-html-background
44
+ -ms-text-size-adjust: 100% // 3
45
+ -webkit-text-size-adjust: 100% // 3
46
+ -webkit-font-smoothing: $base-webkit-font-smoothing
47
+ -moz-osx-font-smoothing: $base-moz-font-smoothing
48
+ -webkit-tap-highlight-color: $base-tap-highlight-color
49
+ -webkit-touch-callout: $base-webkit-touch-callout
50
+
51
+ // fix ios safari not fire mouse event on some elements
52
+ +browser-ios-safari
53
+ html
54
+ cursor: pointer
55
+
56
+ +browser-firefox
57
+ html
58
+ color: transparent
59
+
60
+ body
61
+ color: if($typography-main-color, null, initial)
62
+
63
+
64
+
65
+ body
66
+ min-height: $base-body-min-height
67
+ margin: 0 // 1
68
+ font-size: px-to-rem($typography-main-size-px)
69
+ line-height: $typography-main-line-height-ratio // 2
70
+ color: $typography-main-color
71
+ background: $base-body-background
72
+
73
+ // Correct the font size and margin on `h1` elements
74
+ // within `section` and `article` contexts in Chrome, Firefox, and Safari.
75
+ h1
76
+ margin: 0
77
+ font-size: typo-size(1)
78
+
79
+ h2,
80
+ h3,
81
+ h4,
82
+ h5,
83
+ h6,
84
+ p,
85
+ blockquote,
86
+ figure
87
+ margin: 0
88
+
89
+
90
+
91
+ // Grouping content
92
+ // ==========================================================================
93
+
94
+ // 1. Add the correct box sizing in Firefox.
95
+ // 2. Show the overflow in Edge and IE.
96
+ hr
97
+ box-sizing: content-box // 1
98
+ flex-shrink: 0
99
+ width: 100%
100
+ height: 0 // 1
101
+ margin: 0
102
+ border: none
103
+ overflow: visible // 2
104
+
105
+ // Add the correct display in IE.
106
+ main
107
+ display: block
108
+
109
+ ul,
110
+ ol,
111
+ dl,
112
+ dd
113
+ margin: 0
114
+
115
+ ul,
116
+ ol
117
+ padding: 0
118
+
119
+ // Remove the list style on navigation lists in all browsers (opinionated).
120
+ nav ol,
121
+ nav ul
122
+ list-style: none
123
+
124
+ // 1. Correct the inheritance and scaling of font size in all browsers.
125
+ // 2. Correct the odd `em` font sizing in all browsers.
126
+ pre
127
+ margin: 0
128
+ font-size: 1em // 2
129
+ word-break: if($base-word-break, normal, null)
130
+ overflow: auto
131
+ -webkit-overflow-scrolling: touch
132
+ font-family: monospace, monospace // 1
133
+
134
+
135
+
136
+ // Text-level semantics
137
+ // ==========================================================================
138
+
139
+ // 1. Remove the gray background on active links in IE 10.
140
+ a
141
+ cursor: pointer
142
+ background-color: transparent // 1
143
+
144
+ // 1. Add the correct text decoration in Edge, IE, Opera, and Safari.
145
+ abbr[title]
146
+ cursor: help
147
+ text-decoration: underline dotted // 1
148
+
149
+ // Add the correct font weight in Chrome, Edge, and Safari.
150
+ b,
151
+ strong
152
+ font-weight: 700
153
+
154
+ // 1. Correct the inheritance and scaling of font size in all browsers.
155
+ // 2. Correct the odd `em` font sizing in all browsers.
156
+ code,
157
+ kbd,
158
+ samp
159
+ font-size: 1em // 2
160
+ font-family: monospace, monospace // 1
161
+
162
+ // Add the correct font size in all browsers.
163
+ small
164
+ font-size: 100% / $typography-size-scale-ratio
165
+
166
+ // Remove the text shadow on text selections in Firefox 61- (opinionated).
167
+ // 1. Restore the coloring undone by defining the text shadow
168
+ // in all browsers (opinionated).
169
+ ::-moz-selection
170
+ color: $base-selection-color // 1
171
+ text-shadow: none
172
+ background-color: $base-selection-background-color // 1
173
+
174
+ ::selection
175
+ color: $base-selection-color // 1
176
+ text-shadow: none
177
+ background-color: $base-selection-background-color // 1
178
+
179
+
180
+
181
+ // Embedded content
182
+ // ==========================================================================
183
+
184
+ // Change the alignment on media elements in all browers (opinionated).
185
+ audio,
186
+ canvas,
187
+ iframe,
188
+ img,
189
+ svg,
190
+ video
191
+ vertical-align: top
192
+
193
+ // Add the correct display in IE 9-.
194
+ audio,
195
+ video
196
+ display: inline-block
197
+
198
+ // Add the correct display in iOS 4-7.
199
+ audio:not([controls])
200
+ display: none
201
+ height: 0
202
+
203
+ // Remove the border on images inside links in IE 10-.
204
+ img
205
+ border-style: none
206
+
207
+ iframe
208
+ border: none
209
+
210
+ // Change the fill color to match the text color in all browsers (opinionated).
211
+ svg
212
+ fill: currentColor
213
+
214
+ // Hide the overflow in IE.
215
+ svg:not(:root)
216
+ overflow: hidden
217
+
218
+
219
+
220
+ // Tabular data
221
+ // ==========================================================================
222
+
223
+ // Collapse border spacing in all browsers (opinionated).
224
+ table
225
+ border-collapse: collapse
226
+
227
+ th,
228
+ td
229
+ padding: 0
230
+
231
+
232
+
233
+ // Forms
234
+ // ==========================================================================
235
+
236
+ // Remove the margin in Firefox and Safari.
237
+ button,
238
+ input,
239
+ optgroup,
240
+ select,
241
+ textarea
242
+ margin: 0
243
+
244
+ // Inherit styling in all browsers (opinionated).
245
+ button,
246
+ input,
247
+ select,
248
+ textarea
249
+ font-size: inherit
250
+ line-height: inherit
251
+ color: inherit
252
+ font-family: inherit
253
+ border-radius: 0
254
+
255
+ // prevent word break in safari
256
+ button,
257
+ input,
258
+ select,
259
+ textarea,
260
+ optgroup,
261
+ option
262
+ word-break: if($base-word-break, normal, null)
263
+
264
+ // 1. Show the overflow in IE.
265
+ // 2. Remove the inheritance of text transform in Edge, Firefox, and IE.
266
+ button
267
+ overflow: visible // 1
268
+ text-transform: none // 2
269
+
270
+ // Correct the inability to style clickable types in iOS and Safari.
271
+ button,
272
+ [type=button],
273
+ [type=reset],
274
+ [type=submit]
275
+ -webkit-appearance: button
276
+
277
+ // Restore the focus styles unset by the previous rule in Firefox.
278
+ button:-moz-focusring,
279
+ [type=button]:-moz-focusring,
280
+ [type=reset]:-moz-focusring,
281
+ [type=submit]:-moz-focusring
282
+ outline: 1px dotted ButtonText
283
+
284
+ // Remove the inner border and padding in Firefox.
285
+ ::-moz-focus-inner
286
+ padding: 0
287
+ border-style: none
288
+
289
+ // 1. Correct the padding in Firefox.
290
+ fieldset
291
+ padding: 0 // 1
292
+ margin: 0
293
+ border: none
294
+
295
+ // Show the overflow in Edge and IE.
296
+ input
297
+ overflow: visible
298
+
299
+ // 1. Correct the text wrapping in Edge and IE.
300
+ // 2. Correct the color inheritance from `fieldset` elements in IE.
301
+ // 3. Remove the padding so developers are not caught out
302
+ // when they zero out `fieldset` elements in all browsers.
303
+ legend
304
+ box-sizing: border-box // 1
305
+ display: table // 1
306
+ max-width: 100% // 1
307
+ padding: 0 // 3
308
+ white-space: normal // 1
309
+ color: inherit // 2
310
+
311
+ // 1. Add the correct display in Edge and IE.
312
+ // 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
313
+ progress
314
+ display: inline-block // 1
315
+ vertical-align: top // 2
316
+
317
+ // Remove the inheritance of text transform in Firefox.
318
+ select
319
+ text-transform: none
320
+
321
+ // 1. Remove the default vertical scrollbar in IE.
322
+ // 2. Change the resize direction on textareas in all browsers (opinionated).
323
+ textarea
324
+ overflow: auto // 1
325
+ -webkit-overflow-scrolling: touch
326
+ resize: vertical // 2
327
+
328
+ // 1. Add the correct box sizing in IE 10-.
329
+ // 2. Remove the padding in IE 10-.
330
+ [type=checkbox],
331
+ [type=radio]
332
+ box-sizing: border-box // 1
333
+ padding: 0 // 2
334
+
335
+ // Correct the cursor style of increment and decrement buttons in Chrome.
336
+ ::-webkit-inner-spin-button,
337
+ ::-webkit-outer-spin-button
338
+ height: auto
339
+
340
+ // 1. Correct the odd appearance in Chrome and Safari.
341
+ // 2. Correct the outline style in Safari.
342
+ [type=search]
343
+ -webkit-appearance: textfield // 1
344
+ outline-offset: -2px // 2
345
+
346
+ // Remove the inner padding in Chrome and Safari on macOS.
347
+ ::-webkit-search-decoration
348
+ -webkit-appearance: none
349
+
350
+ // 1. Correct the inability to style clickable types in iOS and Safari.
351
+ // 2. Change font properties to `inherit` in Safari.
352
+ ::-webkit-file-upload-button
353
+ -webkit-appearance: button // 1
354
+ font: inherit // 2
355
+
356
+
357
+
358
+ // Interactive
359
+ // ==========================================================================
360
+
361
+ // Add the correct display in Edge and IE.
362
+ details
363
+ display: block
364
+
365
+ // Add the correct display in all browsers.
366
+ summary
367
+ display: list-item
368
+
369
+
370
+
371
+ // Scripting
372
+ // ==========================================================================
373
+
374
+ // Add the correct display in IE 9-.
375
+ canvas
376
+ display: inline-block
377
+
378
+ // Add the correct display in IE.
379
+ template
380
+ display: none
381
+
382
+
383
+
384
+ // User interaction
385
+ // ==========================================================================
386
+
387
+ // 1. Remove the tapping delay on clickable elements
388
+ // in all browsers (opinionated).
389
+ // 2. Remove the tapping delay in IE 10.
390
+ a,
391
+ area,
392
+ button,
393
+ input,
394
+ label,
395
+ select,
396
+ summary,
397
+ textarea,
398
+ [tabindex]
399
+ -ms-touch-action: manipulation // 1
400
+ touch-action: manipulation // 2
401
+
402
+ // Add the correct display in IE 10-.
403
+ [hidden]
404
+ display: none
405
+
406
+
407
+
408
+ // Accessibility
409
+ // ==========================================================================
410
+
411
+ // Change the cursor on busy elements in all browsers (opinionated).
412
+ [aria-busy=true]
413
+ cursor: progress
414
+
415
+ // Change the cursor on control elements in all browsers (opinionated).
416
+ [aria-controls]
417
+ cursor: pointer
418
+
419
+ // Change the cursor on disabled, not-editable, or otherwise inoperable elements
420
+ // in all browsers (opinionated).
421
+ [aria-disabled],
422
+ [disabled]
423
+ cursor: not-allowed
424
+
425
+ // Change the display on visually hidden accessible elements
426
+ // in all browsers (opinionated).
427
+ [aria-hidden=false][hidden]:not(:focus)
428
+ display: inherit
429
+ position: absolute
430
+ clip: rect(0, 0, 0, 0)