foundation-rails 6.3.1.0 → 6.4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/bower.json +3 -3
  3. data/lib/foundation/rails/version.rb +1 -1
  4. data/lib/generators/foundation/install_generator.rb +1 -1
  5. data/lib/generators/foundation/templates/_settings.scss +291 -48
  6. data/vendor/assets/js/entries/foundation-plugins.js +25 -0
  7. data/vendor/assets/js/entries/foundation.js +101 -0
  8. data/vendor/assets/js/entries/plugins/foundation.abide.js +4 -0
  9. data/vendor/assets/js/entries/plugins/foundation.accordion.js +4 -0
  10. data/vendor/assets/js/entries/plugins/foundation.accordionMenu.js +5 -0
  11. data/vendor/assets/js/entries/plugins/foundation.core.js +21 -0
  12. data/vendor/assets/js/entries/plugins/foundation.drilldown.js +4 -0
  13. data/vendor/assets/js/entries/plugins/foundation.dropdown.js +5 -0
  14. data/vendor/assets/js/entries/plugins/foundation.dropdownMenu.js +4 -0
  15. data/vendor/assets/js/entries/plugins/foundation.equalizer.js +4 -0
  16. data/vendor/assets/js/entries/plugins/foundation.interchange.js +4 -0
  17. data/vendor/assets/js/entries/plugins/foundation.magellan.js +4 -0
  18. data/vendor/assets/js/entries/plugins/foundation.offcanvas.js +4 -0
  19. data/vendor/assets/js/entries/plugins/foundation.orbit.js +5 -0
  20. data/vendor/assets/js/entries/plugins/foundation.responsiveAccordionTabs.js +5 -0
  21. data/vendor/assets/js/entries/plugins/foundation.responsiveMenu.js +5 -0
  22. data/vendor/assets/js/entries/plugins/foundation.responsiveToggle.js +5 -0
  23. data/vendor/assets/js/entries/plugins/foundation.reveal.js +4 -0
  24. data/vendor/assets/js/entries/plugins/foundation.slider.js +5 -0
  25. data/vendor/assets/js/entries/plugins/foundation.smoothScroll.js +5 -0
  26. data/vendor/assets/js/entries/plugins/foundation.sticky.js +5 -0
  27. data/vendor/assets/js/entries/plugins/foundation.tabs.js +5 -0
  28. data/vendor/assets/js/entries/plugins/foundation.toggler.js +5 -0
  29. data/vendor/assets/js/entries/plugins/foundation.tooltip.js +4 -0
  30. data/vendor/assets/js/entries/plugins/foundation.util.box.js +4 -0
  31. data/vendor/assets/js/entries/plugins/foundation.util.imageLoader.js +5 -0
  32. data/vendor/assets/js/entries/plugins/foundation.util.keyboard.js +4 -0
  33. data/vendor/assets/js/entries/plugins/foundation.util.mediaQuery.js +4 -0
  34. data/vendor/assets/js/entries/plugins/foundation.util.motion.js +5 -0
  35. data/vendor/assets/js/entries/plugins/foundation.util.nest.js +5 -0
  36. data/vendor/assets/js/entries/plugins/foundation.util.timer.js +5 -0
  37. data/vendor/assets/js/entries/plugins/foundation.util.touch.js +7 -0
  38. data/vendor/assets/js/entries/plugins/foundation.util.triggers.js +5 -0
  39. data/vendor/assets/js/foundation.abide.js.es6 +18 -15
  40. data/vendor/assets/js/foundation.accordion.js.es6 +37 -23
  41. data/vendor/assets/js/foundation.accordionMenu.js.es6 +96 -51
  42. data/vendor/assets/js/foundation.core.js.es6 +46 -87
  43. data/vendor/assets/js/foundation.drilldown.js.es6 +47 -29
  44. data/vendor/assets/js/foundation.dropdown.js.es6 +84 -122
  45. data/vendor/assets/js/foundation.dropdownMenu.js.es6 +44 -28
  46. data/vendor/assets/js/foundation.equalizer.js.es6 +18 -17
  47. data/vendor/assets/js/foundation.interchange.js.es6 +26 -19
  48. data/vendor/assets/js/foundation.js.es6 +8 -3
  49. data/vendor/assets/js/foundation.magellan.js.es6 +36 -30
  50. data/vendor/assets/js/foundation.offcanvas.js.es6 +148 -36
  51. data/vendor/assets/js/foundation.orbit.js.es6 +26 -18
  52. data/vendor/assets/js/foundation.plugin.js.es6 +54 -0
  53. data/vendor/assets/js/foundation.positionable.js.es6 +206 -0
  54. data/vendor/assets/js/{foundation.zf.responsiveAccordionTabs.js.es6 → foundation.responsiveAccordionTabs.js.es6} +33 -30
  55. data/vendor/assets/js/foundation.responsiveMenu.js.es6 +37 -29
  56. data/vendor/assets/js/foundation.responsiveToggle.js.es6 +17 -16
  57. data/vendor/assets/js/foundation.reveal.js.es6 +61 -79
  58. data/vendor/assets/js/foundation.slider.js.es6 +33 -18
  59. data/vendor/assets/js/foundation.smoothScroll.js.es6 +135 -0
  60. data/vendor/assets/js/foundation.sticky.js.es6 +25 -17
  61. data/vendor/assets/js/foundation.tabs.js.es6 +35 -27
  62. data/vendor/assets/js/foundation.toggler.js.es6 +15 -13
  63. data/vendor/assets/js/foundation.tooltip.js.es6 +100 -108
  64. data/vendor/assets/js/foundation.util.box.js.es6 +114 -78
  65. data/vendor/assets/js/foundation.util.core.js.es6 +52 -0
  66. data/vendor/assets/js/foundation.util.imageLoader.js.es6 +45 -0
  67. data/vendor/assets/js/foundation.util.keyboard.js.es6 +41 -31
  68. data/vendor/assets/js/foundation.util.mediaQuery.js.es6 +59 -55
  69. data/vendor/assets/js/foundation.util.motion.js.es6 +4 -5
  70. data/vendor/assets/js/foundation.util.nest.js.es6 +9 -23
  71. data/vendor/assets/js/{foundation.util.timerAndImageLoader.js.es6 → foundation.util.timer.js.es6} +2 -42
  72. data/vendor/assets/js/foundation.util.touch.js.es6 +91 -294
  73. data/vendor/assets/js/foundation.util.triggers.js.es6 +199 -141
  74. data/vendor/assets/scss/_global.scss +29 -1
  75. data/vendor/assets/scss/components/_accordion-menu.scss +148 -13
  76. data/vendor/assets/scss/components/_accordion.scss +5 -0
  77. data/vendor/assets/scss/components/_breadcrumbs.scss +26 -9
  78. data/vendor/assets/scss/components/_button-group.scss +4 -4
  79. data/vendor/assets/scss/components/_button.scss +59 -12
  80. data/vendor/assets/scss/components/_card.scss +10 -2
  81. data/vendor/assets/scss/components/_drilldown.scss +90 -41
  82. data/vendor/assets/scss/components/_dropdown-menu.scss +52 -6
  83. data/vendor/assets/scss/components/_dropdown.scss +8 -1
  84. data/vendor/assets/scss/components/_flex.scss +85 -2
  85. data/vendor/assets/scss/components/_menu.scss +267 -162
  86. data/vendor/assets/scss/components/_off-canvas.scss +159 -45
  87. data/vendor/assets/scss/components/_pagination.scss +1 -1
  88. data/vendor/assets/scss/components/_reveal.scss +13 -11
  89. data/vendor/assets/scss/components/_slider.scss +0 -1
  90. data/vendor/assets/scss/components/_sticky.scss +1 -0
  91. data/vendor/assets/scss/components/_table.scss +7 -6
  92. data/vendor/assets/scss/components/_tabs.scss +1 -1
  93. data/vendor/assets/scss/components/_title-bar.scss +1 -1
  94. data/vendor/assets/scss/components/_tooltip.scss +74 -21
  95. data/vendor/assets/scss/components/_top-bar.scss +2 -0
  96. data/vendor/assets/scss/forms/_fieldset.scss +0 -1
  97. data/vendor/assets/scss/forms/_meter.scss +7 -1
  98. data/vendor/assets/scss/forms/_select.scss +4 -3
  99. data/vendor/assets/scss/forms/_text.scss +11 -2
  100. data/vendor/assets/scss/foundation.scss +17 -3
  101. data/vendor/assets/scss/grid/_flex-grid.scss +3 -52
  102. data/vendor/assets/scss/prototype/_arrow.scss +36 -0
  103. data/vendor/assets/scss/prototype/_border-box.scss +35 -0
  104. data/vendor/assets/scss/prototype/_border-none.scss +35 -0
  105. data/vendor/assets/scss/prototype/_bordered.scss +54 -0
  106. data/vendor/assets/scss/prototype/_box.scss +23 -0
  107. data/vendor/assets/scss/prototype/_display.scss +50 -0
  108. data/vendor/assets/scss/prototype/_font-styling.scss +95 -0
  109. data/vendor/assets/scss/prototype/_list-style-type.scss +95 -0
  110. data/vendor/assets/scss/prototype/_overflow.scss +72 -0
  111. data/vendor/assets/scss/prototype/_position.scss +114 -0
  112. data/vendor/assets/scss/prototype/_prototype.scss +91 -0
  113. data/vendor/assets/scss/prototype/_relation.scss +157 -0
  114. data/vendor/assets/scss/prototype/_rotate.scss +31 -0
  115. data/vendor/assets/scss/prototype/_rounded.scss +54 -0
  116. data/vendor/assets/scss/prototype/_separator.scss +96 -0
  117. data/vendor/assets/scss/prototype/_shadow.scss +43 -0
  118. data/vendor/assets/scss/prototype/_sizing.scss +73 -0
  119. data/vendor/assets/scss/prototype/_spacing.scss +204 -0
  120. data/vendor/assets/scss/prototype/_text-decoration.scss +48 -0
  121. data/vendor/assets/scss/prototype/_text-transformation.scss +48 -0
  122. data/vendor/assets/scss/prototype/_text-utilities.scss +88 -0
  123. data/vendor/assets/scss/prototype/_typescale.scss +20 -0
  124. data/vendor/assets/scss/settings/_settings.scss +291 -48
  125. data/vendor/assets/scss/typography/_base.scss +2 -2
  126. data/vendor/assets/scss/typography/_helpers.scss +6 -4
  127. data/vendor/assets/scss/util/_breakpoint.scss +60 -1
  128. data/vendor/assets/scss/util/_color.scss +8 -5
  129. data/vendor/assets/scss/util/_mixins.scss +45 -5
  130. data/vendor/assets/scss/xy-grid/_cell.scss +179 -0
  131. data/vendor/assets/scss/xy-grid/_classes.scss +455 -0
  132. data/vendor/assets/scss/xy-grid/_collapse.scss +54 -0
  133. data/vendor/assets/scss/xy-grid/_frame.scss +54 -0
  134. data/vendor/assets/scss/xy-grid/_grid.scss +56 -0
  135. data/vendor/assets/scss/xy-grid/_gutters.scss +45 -0
  136. data/vendor/assets/scss/xy-grid/_layout.scss +33 -0
  137. data/vendor/assets/scss/xy-grid/_position.scss +28 -0
  138. data/vendor/assets/scss/xy-grid/_xy-grid.scss +52 -0
  139. metadata +73 -4
@@ -0,0 +1,25 @@
1
+ import { Abide } from '../foundation.abide';
2
+ import { Accordion } from '../foundation.accordion';
3
+ import { AccordionMenu } from '../foundation.accordionMenu';
4
+ import { Drilldown } from '../foundation.drilldown';
5
+ import { Dropdown } from '../foundation.dropdown';
6
+ import { DropdownMenu } from '../foundation.dropdownMenu';
7
+ import { Equalizer } from '../foundation.equalizer';
8
+ import { Interchange } from '../foundation.interchange';
9
+ import { Magellan } from '../foundation.magellan';
10
+ import { OffCanvas } from '../foundation.offcanvas';
11
+ import { Orbit } from '../foundation.orbit';
12
+ import { ResponsiveMenu } from '../foundation.responsiveMenu';
13
+ import { ResponsiveToggle } from '../foundation.responsiveToggle';
14
+ import { Reveal } from '../foundation.reveal';
15
+ import { Slider } from '../foundation.slider';
16
+ import { SmoothScroll } from '../foundation.smoothScroll';
17
+ import { Sticky } from '../foundation.sticky';
18
+ import { Tabs } from '../foundation.tabs';
19
+ import { Toggler } from '../foundation.toggler';
20
+ import { Tooltip } from '../foundation.tooltip';
21
+ import { ResponsiveAccordionTabs } from '../foundation.responsiveAccordionTabs';
22
+
23
+ export {
24
+ Abide, Accordion, AccordionMenu, Drilldown, Dropdown, DropdownMenu, Equalizer, Interchange, Magellan, OffCanvas, Orbit, ResponsiveMenu, ResponsiveToggle, Reveal, Slider, SmoothScroll, Sticky, Tabs, Toggler, Tooltip, ResponsiveAccordionTabs
25
+ }
@@ -0,0 +1,101 @@
1
+ import $ from 'jquery';
2
+
3
+ import { Foundation } from '../foundation.core';
4
+ Foundation.addToJquery($);
5
+
6
+ // Add Foundation Utils to Foundation global namespace for backwards
7
+ // compatibility.
8
+
9
+ import { rtl, GetYoDigits, transitionend } from '../foundation.util.core';
10
+ Foundation.rtl = rtl;
11
+ Foundation.GetYoDigits = GetYoDigits;
12
+ Foundation.transitionend = transitionend;
13
+
14
+ import { Box } from '../foundation.util.box'
15
+ import { onImagesLoaded } from '../foundation.util.imageLoader';
16
+ import { Keyboard } from '../foundation.util.keyboard';
17
+ import { MediaQuery } from '../foundation.util.mediaQuery';
18
+ import { Motion, Move } from '../foundation.util.motion';
19
+ import { Nest } from '../foundation.util.nest';
20
+ import { Timer } from '../foundation.util.timer';
21
+
22
+ Foundation.Box = Box;
23
+ Foundation.onImagesLoaded = onImagesLoaded;
24
+ Foundation.Keyboard = Keyboard;
25
+ Foundation.MediaQuery = MediaQuery;
26
+ Foundation.Motion = Motion;
27
+ Foundation.Move = Move;
28
+ Foundation.Nest = Nest;
29
+ Foundation.Timer = Timer;
30
+
31
+ // Touch and Triggers previously were almost purely sede effect driven,
32
+ // so no // need to add it to Foundation, just init them.
33
+
34
+ import { Touch } from '../foundation.util.touch';
35
+ Touch.init($);
36
+
37
+ import { Triggers } from '../foundation.util.triggers';
38
+ Triggers.init($, Foundation);
39
+
40
+ import { Abide } from '../foundation.abide';
41
+ Foundation.plugin(Abide, 'Abide');
42
+
43
+ import { Accordion } from '../foundation.accordion';
44
+ Foundation.plugin(Accordion, 'Accordion');
45
+
46
+ import { AccordionMenu } from '../foundation.accordionMenu';
47
+ Foundation.plugin(AccordionMenu, 'AccordionMenu');
48
+
49
+ import { Drilldown } from '../foundation.drilldown';
50
+ Foundation.plugin(Drilldown, 'Drilldown');
51
+
52
+ import { Dropdown } from '../foundation.dropdown';
53
+ Foundation.plugin(Dropdown, 'Dropdown');
54
+
55
+ import { DropdownMenu } from '../foundation.dropdownMenu';
56
+ Foundation.plugin(DropdownMenu, 'DropdownMenu');
57
+
58
+ import { Equalizer } from '../foundation.equalizer';
59
+ Foundation.plugin(Equalizer, 'Equalizer');
60
+
61
+ import { Interchange } from '../foundation.interchange';
62
+ Foundation.plugin(Interchange, 'Interchange');
63
+
64
+ import { Magellan } from '../foundation.magellan';
65
+ Foundation.plugin(Magellan, 'Magellan');
66
+
67
+ import { OffCanvas } from '../foundation.offcanvas';
68
+ Foundation.plugin(OffCanvas, 'OffCanvas');
69
+
70
+ import { Orbit } from '../foundation.orbit';
71
+ Foundation.plugin(Orbit, 'Orbit');
72
+
73
+ import { ResponsiveMenu } from '../foundation.responsiveMenu';
74
+ Foundation.plugin(ResponsiveMenu, 'ResponsiveMenu');
75
+
76
+ import { ResponsiveToggle } from '../foundation.responsiveToggle';
77
+ Foundation.plugin(ResponsiveToggle, 'ResponsiveToggle');
78
+
79
+ import { Reveal } from '../foundation.reveal';
80
+ Foundation.plugin(Reveal, 'Reveal');
81
+
82
+ import { Slider } from '../foundation.slider';
83
+ Foundation.plugin(Slider, 'Slider');
84
+
85
+ import { SmoothScroll } from '../foundation.smoothScroll';
86
+ Foundation.plugin(SmoothScroll, 'SmoothScroll');
87
+
88
+ import { Sticky } from '../foundation.sticky';
89
+ Foundation.plugin(Sticky, 'Sticky');
90
+
91
+ import { Tabs } from '../foundation.tabs';
92
+ Foundation.plugin(Tabs, 'Tabs');
93
+
94
+ import { Toggler } from '../foundation.toggler';
95
+ Foundation.plugin(Toggler, 'Toggler');
96
+
97
+ import { Tooltip } from '../foundation.tooltip';
98
+ Foundation.plugin(Tooltip, 'Tooltip');
99
+
100
+ import { ResponsiveAccordionTabs } from '../foundation.responsiveAccordionTabs';
101
+ Foundation.plugin(ResponsiveAccordionTabs, 'ResponsiveAccordionTabs');
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Abide } from '../../foundation.abide';
4
+ Foundation.plugin(Abide, 'Abide');
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Accordion } from '../../foundation.accordion';
4
+ Foundation.plugin(Accordion, 'Accordion');
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { AccordionMenu } from '../../foundation.accordionMenu';
4
+ Foundation.plugin(AccordionMenu, 'AccordionMenu');
5
+
@@ -0,0 +1,21 @@
1
+ import $ from 'jquery';
2
+
3
+ import { Foundation } from '../../foundation.core';
4
+ Foundation.addToJquery($);
5
+
6
+ // These are now separated out, but historically were a part of this module,
7
+ // and since this is here for backwards compatibility we include them in
8
+ // this entry.
9
+ import {rtl, GetYoDigits, transitionend} from '../../foundation.util.core';
10
+ Foundation.rtl = rtl;
11
+ Foundation.GetYoDigits = GetYoDigits;
12
+ Foundation.transitionend = transitionend;
13
+
14
+ // Every plugin depends on plugin now, we can include that on the core for the
15
+ // script inclusion path.
16
+
17
+ import { Plugin } from '../../foundation.plugin';
18
+ Foundation.Plugin = Plugin;
19
+
20
+
21
+ window.Foundation = Foundation;
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Drilldown } from '../../foundation.drilldown';
4
+ Foundation.plugin(Drilldown, 'Drilldown');
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Dropdown } from '../../foundation.dropdown';
4
+ Foundation.plugin(Dropdown, 'Dropdown');
5
+
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { DropdownMenu } from '../../foundation.dropdownMenu';
4
+ Foundation.plugin(DropdownMenu, 'DropdownMenu');
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Equalizer } from '../../foundation.equalizer';
4
+ Foundation.plugin(Equalizer, 'Equalizer');
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Interchange } from '../../foundation.interchange';
4
+ Foundation.plugin(Interchange, 'Interchange');
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Magellan } from '../../foundation.magellan';
4
+ Foundation.plugin(Magellan, 'Magellan');
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { OffCanvas } from '../../foundation.offcanvas';
4
+ Foundation.plugin(OffCanvas, 'OffCanvas');
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Orbit } from '../../foundation.orbit';
4
+ Foundation.plugin(Orbit, 'Orbit');
5
+
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { ResponsiveAccordionTabs } from '../../foundation.responsiveAccordionTabs';
4
+ Foundation.plugin(ResponsiveAccordionTabs, 'ResponsiveAccordionTabs');
5
+
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { ResponsiveMenu } from '../../foundation.responsiveMenu';
4
+ Foundation.plugin(ResponsiveMenu, 'ResponsiveMenu');
5
+
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { ResponsiveToggle } from '../../foundation.responsiveToggle';
4
+ Foundation.plugin(ResponsiveToggle, 'ResponsiveToggle');
5
+
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Reveal } from '../../foundation.reveal';
4
+ Foundation.plugin(Reveal, 'Reveal');
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Slider } from '../../foundation.slider';
4
+ Foundation.plugin(Slider, 'Slider');
5
+
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { SmoothScroll } from '../../foundation.smoothScroll';
4
+ Foundation.plugin(SmoothScroll, 'SmoothScroll');
5
+
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Sticky } from '../../foundation.sticky';
4
+ Foundation.plugin(Sticky, 'Sticky');
5
+
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Tabs } from '../../foundation.tabs';
4
+ Foundation.plugin(Tabs, 'Tabs');
5
+
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Toggler } from '../../foundation.toggler';
4
+ Foundation.plugin(Toggler, 'Toggler');
5
+
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Tooltip } from '../../foundation.tooltip';
4
+ Foundation.plugin(Tooltip, 'Tooltip');
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+ import { Box } from '../../foundation.util.box';
3
+
4
+ Foundation.Box = Box;
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { onImagesLoaded } from '../../foundation.util.imageLoader';
4
+
5
+ Foundation.onImagesLoaded = onImagesLoaded;
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+ import { Keyboard } from '../../foundation.util.keyboard';
3
+
4
+ Foundation.Keyboard = Keyboard;
@@ -0,0 +1,4 @@
1
+ import { Foundation } from './foundation.core';
2
+ import { MediaQuery } from '../../foundation.util.mediaQuery';
3
+
4
+ Foundation.MediaQuery = MediaQuery;
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+ import { Motion, Move } from '../../foundation.util.motion';
3
+
4
+ Foundation.Motion = Motion;
5
+ Foundation.Move = Move;
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Nest } from '../../foundation.util.nest';
4
+
5
+ Foundation.Nest = Nest;
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+
3
+ import { Timer } from '../../foundation.util.timer';
4
+
5
+ Foundation.Timer = Timer;
@@ -0,0 +1,7 @@
1
+ import $ from 'jquery';
2
+
3
+ import { Touch } from '../../foundation.util.touch';
4
+
5
+ Touch.init($);
6
+
7
+ window.Foundation.Touch = Touch;
@@ -0,0 +1,5 @@
1
+ import { Foundation } from './foundation.core';
2
+ import $ from 'jquery';
3
+
4
+ import { Triggers } from '../../foundation.util.triggers';
5
+ Triggers.init($, Foundation);
@@ -1,27 +1,28 @@
1
1
  'use strict';
2
2
 
3
- !function($) {
3
+ import $ from 'jquery';
4
+ import { Plugin } from './foundation.plugin';
4
5
 
5
6
  /**
6
7
  * Abide module.
7
8
  * @module foundation.abide
8
9
  */
9
10
 
10
- class Abide {
11
+ class Abide extends Plugin {
11
12
  /**
12
13
  * Creates a new instance of Abide.
13
14
  * @class
15
+ * @name Abide
14
16
  * @fires Abide#init
15
17
  * @param {Object} element - jQuery object to add the trigger to.
16
18
  * @param {Object} options - Overrides to the default plugin settings.
17
19
  */
18
- constructor(element, options = {}) {
20
+ _setup(element, options = {}) {
19
21
  this.$element = element;
20
22
  this.options = $.extend({}, Abide.defaults, this.$element.data(), options);
21
23
 
24
+ this.className = 'Abide'; // ie9 back compat
22
25
  this._init();
23
-
24
- Foundation.registerPlugin(this, 'Abide');
25
26
  }
26
27
 
27
28
  /**
@@ -242,7 +243,7 @@ class Abide {
242
243
  }
243
244
 
244
245
  /**
245
- * Goes through a form to find inputs and proceeds to validate them in ways specific to their type.
246
+ * Goes through a form to find inputs and proceeds to validate them in ways specific to their type.
246
247
  * Ignores inputs with data-abide-ignore, type="hidden" or disabled attributes set
247
248
  * @fires Abide#invalid
248
249
  * @fires Abide#valid
@@ -453,7 +454,7 @@ class Abide {
453
454
  * Destroys an instance of Abide.
454
455
  * Removes error styles and classes from elements, without resetting their values.
455
456
  */
456
- destroy() {
457
+ _destroy() {
457
458
  var _this = this;
458
459
  this.$element
459
460
  .off('.abide')
@@ -465,8 +466,6 @@ class Abide {
465
466
  .each(function() {
466
467
  _this.removeErrorClasses($(this));
467
468
  });
468
-
469
- Foundation.unregisterPlugin(this);
470
469
  }
471
470
  }
472
471
 
@@ -538,7 +537,7 @@ Abide.defaults = {
538
537
  number : /^[-+]?\d*(?:[\.\,]\d+)?$/,
539
538
 
540
539
  // amex, visa, diners
541
- card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
540
+ card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
542
541
  cvv : /^([0-9]){3,4}$/,
543
542
 
544
543
  // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
@@ -560,7 +559,14 @@ Abide.defaults = {
560
559
  day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,
561
560
 
562
561
  // #FFF or #FFFFFF
563
- color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
562
+ color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,
563
+
564
+ // Domain || URL
565
+ website: {
566
+ test: (text) => {
567
+ return Abide.defaults.patterns['domain'].test(text) || Abide.defaults.patterns['url'].test(text);
568
+ }
569
+ }
564
570
  },
565
571
 
566
572
  /**
@@ -578,7 +584,4 @@ Abide.defaults = {
578
584
  }
579
585
  }
580
586
 
581
- // Window exports
582
- Foundation.plugin(Abide, 'Abide');
583
-
584
- }(jQuery);
587
+ export {Abide};
@@ -1,30 +1,33 @@
1
1
  'use strict';
2
2
 
3
- !function($) {
3
+ import $ from 'jquery';
4
+ import { Keyboard } from './foundation.util.keyboard';
5
+ import { GetYoDigits } from './foundation.util.core';
6
+ import { Plugin } from './foundation.plugin';
4
7
 
5
8
  /**
6
9
  * Accordion module.
7
10
  * @module foundation.accordion
8
11
  * @requires foundation.util.keyboard
9
- * @requires foundation.util.motion
10
12
  */
11
13
 
12
- class Accordion {
14
+ class Accordion extends Plugin {
13
15
  /**
14
16
  * Creates a new instance of an accordion.
15
17
  * @class
18
+ * @name Accordion
16
19
  * @fires Accordion#init
17
20
  * @param {jQuery} element - jQuery object to make into an accordion.
18
21
  * @param {Object} options - a plain object with settings to override the default options.
19
22
  */
20
- constructor(element, options) {
23
+ _setup(element, options) {
21
24
  this.$element = element;
22
25
  this.options = $.extend({}, Accordion.defaults, this.$element.data(), options);
23
26
 
27
+ this.className = 'Accordion'; // ie9 back compat
24
28
  this._init();
25
29
 
26
- Foundation.registerPlugin(this, 'Accordion');
27
- Foundation.Keyboard.register('Accordion', {
30
+ Keyboard.register('Accordion', {
28
31
  'ENTER': 'toggle',
29
32
  'SPACE': 'toggle',
30
33
  'ARROW_DOWN': 'next',
@@ -43,7 +46,7 @@ class Accordion {
43
46
  this.$tabs.each(function(idx, el) {
44
47
  var $el = $(el),
45
48
  $content = $el.children('[data-tab-content]'),
46
- id = $content[0].id || Foundation.GetYoDigits(6, 'accordion'),
49
+ id = $content[0].id || GetYoDigits(6, 'accordion'),
47
50
  linkId = el.id || `${id}-label`;
48
51
 
49
52
  $el.find('a:first').attr({
@@ -118,7 +121,7 @@ class Accordion {
118
121
  e.preventDefault();
119
122
  _this.toggle($tabContent);
120
123
  }).on('keydown.zf.accordion', function(e){
121
- Foundation.Keyboard.handleKey(e, 'Accordion', {
124
+ Keyboard.handleKey(e, 'Accordion', {
122
125
  toggle: function() {
123
126
  _this.toggle($tabContent);
124
127
  },
@@ -153,6 +156,10 @@ class Accordion {
153
156
  * @function
154
157
  */
155
158
  toggle($target) {
159
+ if ($target.closest('[data-accordion]').is('[disabled]')) {
160
+ console.info('Cannot toggle an accordion that is disabled.');
161
+ return;
162
+ }
156
163
  if($target.parent().hasClass('is-active')) {
157
164
  this.up($target);
158
165
  } else {
@@ -178,6 +185,14 @@ class Accordion {
178
185
  * @function
179
186
  */
180
187
  down($target, firstTime) {
188
+ /**
189
+ * checking firstTime allows for initial render of the accordion
190
+ * to render preset is-active panes.
191
+ */
192
+ if ($target.closest('[data-accordion]').is('[disabled]') && !firstTime) {
193
+ console.info('Cannot call down on an accordion that is disabled.');
194
+ return;
195
+ }
181
196
  $target
182
197
  .attr('aria-hidden', false)
183
198
  .parent('[data-tab-content]')
@@ -212,6 +227,11 @@ class Accordion {
212
227
  * @function
213
228
  */
214
229
  up($target) {
230
+ if ($target.closest('[data-accordion]').is('[disabled]')) {
231
+ console.info('Cannot call up on an accordion that is disabled.');
232
+ return;
233
+ }
234
+
215
235
  var $aunts = $target.parent().siblings(),
216
236
  _this = this;
217
237
 
@@ -219,15 +239,13 @@ class Accordion {
219
239
  return;
220
240
  }
221
241
 
222
- // Foundation.Move(this.options.slideSpeed, $target, function(){
223
- $target.slideUp(_this.options.slideSpeed, function () {
224
- /**
225
- * Fires when the tab is done collapsing up.
226
- * @event Accordion#up
227
- */
228
- _this.$element.trigger('up.zf.accordion', [$target]);
229
- });
230
- // });
242
+ $target.slideUp(_this.options.slideSpeed, function () {
243
+ /**
244
+ * Fires when the tab is done collapsing up.
245
+ * @event Accordion#up
246
+ */
247
+ _this.$element.trigger('up.zf.accordion', [$target]);
248
+ });
231
249
 
232
250
  $target.attr('aria-hidden', true)
233
251
  .parent().removeClass('is-active');
@@ -243,14 +261,13 @@ class Accordion {
243
261
  * @fires Accordion#destroyed
244
262
  * @function
245
263
  */
246
- destroy() {
264
+ _destroy() {
247
265
  this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');
248
266
  this.$element.find('a').off('.zf.accordion');
249
267
  if(this.options.deepLink) {
250
268
  $(window).off('popstate', this._checkDeepLink);
251
269
  }
252
270
 
253
- Foundation.unregisterPlugin(this);
254
271
  }
255
272
  }
256
273
 
@@ -309,7 +326,4 @@ Accordion.defaults = {
309
326
  updateHistory: false
310
327
  };
311
328
 
312
- // Window exports
313
- Foundation.plugin(Accordion, 'Accordion');
314
-
315
- }(jQuery);
329
+ export {Accordion};