govuk_publishing_components 28.9.2 → 29.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
  4. data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
  5. data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
  6. data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
  8. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
  9. data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
  10. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
  11. data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
  12. data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
  13. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
  14. data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
  15. data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
  16. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
  17. data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
  18. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
  19. data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
  20. data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
  21. data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
  22. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
  23. data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
  24. data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
  25. data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
  26. data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
  27. data/app/views/govuk_publishing_components/components/docs/input.yml +3 -3
  28. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
  29. data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
  30. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
  31. data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
  32. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
  33. data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
  34. data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
  35. data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
  36. data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
  37. data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
  38. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
  39. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
  40. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
  41. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
  42. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
  43. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  44. data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
  45. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  46. data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
  47. data/config/initializers/assets.rb +15 -45
  48. data/lib/govuk_publishing_components/version.rb +1 -1
  49. metadata +10 -117
  50. data/node_modules/jquery/AUTHORS.txt +0 -266
  51. data/node_modules/jquery/LICENSE.txt +0 -36
  52. data/node_modules/jquery/README.md +0 -65
  53. data/node_modules/jquery/bower.json +0 -14
  54. data/node_modules/jquery/dist/jquery.js +0 -11008
  55. data/node_modules/jquery/dist/jquery.min.js +0 -5
  56. data/node_modules/jquery/dist/jquery.min.map +0 -1
  57. data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  58. data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
  59. data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  60. data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  61. data/node_modules/jquery/package.json +0 -85
  62. data/node_modules/jquery/src/ajax/jsonp.js +0 -100
  63. data/node_modules/jquery/src/ajax/load.js +0 -83
  64. data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
  65. data/node_modules/jquery/src/ajax/parseXML.js +0 -31
  66. data/node_modules/jquery/src/ajax/script.js +0 -95
  67. data/node_modules/jquery/src/ajax/var/location.js +0 -3
  68. data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  69. data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
  70. data/node_modules/jquery/src/ajax/xhr.js +0 -229
  71. data/node_modules/jquery/src/ajax.js +0 -842
  72. data/node_modules/jquery/src/attributes/attr.js +0 -281
  73. data/node_modules/jquery/src/attributes/classes.js +0 -174
  74. data/node_modules/jquery/src/attributes/prop.js +0 -156
  75. data/node_modules/jquery/src/attributes/support.js +0 -70
  76. data/node_modules/jquery/src/attributes/val.js +0 -191
  77. data/node_modules/jquery/src/attributes.js +0 -11
  78. data/node_modules/jquery/src/callbacks.js +0 -232
  79. data/node_modules/jquery/src/core/access.js +0 -65
  80. data/node_modules/jquery/src/core/init.js +0 -140
  81. data/node_modules/jquery/src/core/parseHTML.js +0 -41
  82. data/node_modules/jquery/src/core/ready.js +0 -163
  83. data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
  84. data/node_modules/jquery/src/core.js +0 -529
  85. data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
  86. data/node_modules/jquery/src/css/adjustCSS.js +0 -65
  87. data/node_modules/jquery/src/css/curCSS.js +0 -137
  88. data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
  89. data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
  90. data/node_modules/jquery/src/css/showHide.js +0 -45
  91. data/node_modules/jquery/src/css/support.js +0 -184
  92. data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
  93. data/node_modules/jquery/src/css/var/isHidden.js +0 -16
  94. data/node_modules/jquery/src/css/var/rmargin.js +0 -3
  95. data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
  96. data/node_modules/jquery/src/css/var/swap.js +0 -24
  97. data/node_modules/jquery/src/css.js +0 -563
  98. data/node_modules/jquery/src/data/support.js +0 -23
  99. data/node_modules/jquery/src/data/var/acceptData.js +0 -20
  100. data/node_modules/jquery/src/data.js +0 -342
  101. data/node_modules/jquery/src/deferred.js +0 -159
  102. data/node_modules/jquery/src/deprecated.js +0 -34
  103. data/node_modules/jquery/src/dimensions.js +0 -56
  104. data/node_modules/jquery/src/effects/Tween.js +0 -121
  105. data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
  106. data/node_modules/jquery/src/effects/support.js +0 -58
  107. data/node_modules/jquery/src/effects.js +0 -640
  108. data/node_modules/jquery/src/event/ajax.js +0 -20
  109. data/node_modules/jquery/src/event/alias.js +0 -25
  110. data/node_modules/jquery/src/event/support.js +0 -28
  111. data/node_modules/jquery/src/event.js +0 -1134
  112. data/node_modules/jquery/src/exports/amd.js +0 -24
  113. data/node_modules/jquery/src/exports/global.js +0 -26
  114. data/node_modules/jquery/src/intro.js +0 -44
  115. data/node_modules/jquery/src/jquery.js +0 -37
  116. data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
  117. data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
  118. data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
  119. data/node_modules/jquery/src/manipulation/getAll.js +0 -33
  120. data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
  121. data/node_modules/jquery/src/manipulation/support.js +0 -72
  122. data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
  123. data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
  124. data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
  125. data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
  126. data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
  127. data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  128. data/node_modules/jquery/src/manipulation.js +0 -585
  129. data/node_modules/jquery/src/offset.js +0 -219
  130. data/node_modules/jquery/src/outro.js +0 -2
  131. data/node_modules/jquery/src/queue/delay.js +0 -22
  132. data/node_modules/jquery/src/queue.js +0 -144
  133. data/node_modules/jquery/src/selector-sizzle.js +0 -14
  134. data/node_modules/jquery/src/selector.js +0 -1
  135. data/node_modules/jquery/src/serialize.js +0 -125
  136. data/node_modules/jquery/src/support.js +0 -63
  137. data/node_modules/jquery/src/traversing/findFilter.js +0 -100
  138. data/node_modules/jquery/src/traversing/var/dir.js +0 -20
  139. data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
  140. data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
  141. data/node_modules/jquery/src/traversing.js +0 -179
  142. data/node_modules/jquery/src/var/class2type.js +0 -5
  143. data/node_modules/jquery/src/var/concat.js +0 -5
  144. data/node_modules/jquery/src/var/deletedIds.js +0 -3
  145. data/node_modules/jquery/src/var/document.js +0 -3
  146. data/node_modules/jquery/src/var/documentElement.js +0 -5
  147. data/node_modules/jquery/src/var/hasOwn.js +0 -5
  148. data/node_modules/jquery/src/var/indexOf.js +0 -5
  149. data/node_modules/jquery/src/var/pnum.js +0 -3
  150. data/node_modules/jquery/src/var/push.js +0 -5
  151. data/node_modules/jquery/src/var/rcssNum.js +0 -7
  152. data/node_modules/jquery/src/var/rnotwhite.js +0 -3
  153. data/node_modules/jquery/src/var/slice.js +0 -5
  154. data/node_modules/jquery/src/var/support.js +0 -5
  155. data/node_modules/jquery/src/var/toString.js +0 -5
  156. data/node_modules/jquery/src/wrap.js +0 -77
@@ -1,342 +0,0 @@
1
- define( [
2
- "./core",
3
- "./var/deletedIds",
4
- "./data/support",
5
- "./data/var/acceptData"
6
- ], function( jQuery, deletedIds, support, acceptData ) {
7
-
8
- var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
9
- rmultiDash = /([A-Z])/g;
10
-
11
- function dataAttr( elem, key, data ) {
12
-
13
- // If nothing was found internally, try to fetch any
14
- // data from the HTML5 data-* attribute
15
- if ( data === undefined && elem.nodeType === 1 ) {
16
-
17
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
18
-
19
- data = elem.getAttribute( name );
20
-
21
- if ( typeof data === "string" ) {
22
- try {
23
- data = data === "true" ? true :
24
- data === "false" ? false :
25
- data === "null" ? null :
26
-
27
- // Only convert to a number if it doesn't change the string
28
- +data + "" === data ? +data :
29
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
30
- data;
31
- } catch ( e ) {}
32
-
33
- // Make sure we set the data so it isn't changed later
34
- jQuery.data( elem, key, data );
35
-
36
- } else {
37
- data = undefined;
38
- }
39
- }
40
-
41
- return data;
42
- }
43
-
44
- // checks a cache object for emptiness
45
- function isEmptyDataObject( obj ) {
46
- var name;
47
- for ( name in obj ) {
48
-
49
- // if the public data object is empty, the private is still empty
50
- if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) {
51
- continue;
52
- }
53
- if ( name !== "toJSON" ) {
54
- return false;
55
- }
56
- }
57
-
58
- return true;
59
- }
60
-
61
- function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
62
- if ( !acceptData( elem ) ) {
63
- return;
64
- }
65
-
66
- var ret, thisCache,
67
- internalKey = jQuery.expando,
68
-
69
- // We have to handle DOM nodes and JS objects differently because IE6-7
70
- // can't GC object references properly across the DOM-JS boundary
71
- isNode = elem.nodeType,
72
-
73
- // Only DOM nodes need the global jQuery cache; JS object data is
74
- // attached directly to the object so GC can occur automatically
75
- cache = isNode ? jQuery.cache : elem,
76
-
77
- // Only defining an ID for JS objects if its cache already exists allows
78
- // the code to shortcut on the same path as a DOM node with no cache
79
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
80
-
81
- // Avoid doing any more work than we need to when trying to get data on an
82
- // object that has no data at all
83
- if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&
84
- data === undefined && typeof name === "string" ) {
85
- return;
86
- }
87
-
88
- if ( !id ) {
89
-
90
- // Only DOM nodes need a new unique ID for each element since their data
91
- // ends up in the global cache
92
- if ( isNode ) {
93
- id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
94
- } else {
95
- id = internalKey;
96
- }
97
- }
98
-
99
- if ( !cache[ id ] ) {
100
-
101
- // Avoid exposing jQuery metadata on plain JS objects when the object
102
- // is serialized using JSON.stringify
103
- cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
104
- }
105
-
106
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
107
- // shallow copied over onto the existing cache
108
- if ( typeof name === "object" || typeof name === "function" ) {
109
- if ( pvt ) {
110
- cache[ id ] = jQuery.extend( cache[ id ], name );
111
- } else {
112
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
113
- }
114
- }
115
-
116
- thisCache = cache[ id ];
117
-
118
- // jQuery data() is stored in a separate object inside the object's internal data
119
- // cache in order to avoid key collisions between internal data and user-defined
120
- // data.
121
- if ( !pvt ) {
122
- if ( !thisCache.data ) {
123
- thisCache.data = {};
124
- }
125
-
126
- thisCache = thisCache.data;
127
- }
128
-
129
- if ( data !== undefined ) {
130
- thisCache[ jQuery.camelCase( name ) ] = data;
131
- }
132
-
133
- // Check for both converted-to-camel and non-converted data property names
134
- // If a data property was specified
135
- if ( typeof name === "string" ) {
136
-
137
- // First Try to find as-is property data
138
- ret = thisCache[ name ];
139
-
140
- // Test for null|undefined property data
141
- if ( ret == null ) {
142
-
143
- // Try to find the camelCased property
144
- ret = thisCache[ jQuery.camelCase( name ) ];
145
- }
146
- } else {
147
- ret = thisCache;
148
- }
149
-
150
- return ret;
151
- }
152
-
153
- function internalRemoveData( elem, name, pvt ) {
154
- if ( !acceptData( elem ) ) {
155
- return;
156
- }
157
-
158
- var thisCache, i,
159
- isNode = elem.nodeType,
160
-
161
- // See jQuery.data for more information
162
- cache = isNode ? jQuery.cache : elem,
163
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
164
-
165
- // If there is already no cache entry for this object, there is no
166
- // purpose in continuing
167
- if ( !cache[ id ] ) {
168
- return;
169
- }
170
-
171
- if ( name ) {
172
-
173
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
174
-
175
- if ( thisCache ) {
176
-
177
- // Support array or space separated string names for data keys
178
- if ( !jQuery.isArray( name ) ) {
179
-
180
- // try the string as a key before any manipulation
181
- if ( name in thisCache ) {
182
- name = [ name ];
183
- } else {
184
-
185
- // split the camel cased version by spaces unless a key with the spaces exists
186
- name = jQuery.camelCase( name );
187
- if ( name in thisCache ) {
188
- name = [ name ];
189
- } else {
190
- name = name.split( " " );
191
- }
192
- }
193
- } else {
194
-
195
- // If "name" is an array of keys...
196
- // When data is initially created, via ("key", "val") signature,
197
- // keys will be converted to camelCase.
198
- // Since there is no way to tell _how_ a key was added, remove
199
- // both plain key and camelCase key. #12786
200
- // This will only penalize the array argument path.
201
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
202
- }
203
-
204
- i = name.length;
205
- while ( i-- ) {
206
- delete thisCache[ name[ i ] ];
207
- }
208
-
209
- // If there is no data left in the cache, we want to continue
210
- // and let the cache object itself get destroyed
211
- if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {
212
- return;
213
- }
214
- }
215
- }
216
-
217
- // See jQuery.data for more information
218
- if ( !pvt ) {
219
- delete cache[ id ].data;
220
-
221
- // Don't destroy the parent cache unless the internal data object
222
- // had been the only thing left in it
223
- if ( !isEmptyDataObject( cache[ id ] ) ) {
224
- return;
225
- }
226
- }
227
-
228
- // Destroy the cache
229
- if ( isNode ) {
230
- jQuery.cleanData( [ elem ], true );
231
-
232
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
233
- /* jshint eqeqeq: false */
234
- } else if ( support.deleteExpando || cache != cache.window ) {
235
- /* jshint eqeqeq: true */
236
- delete cache[ id ];
237
-
238
- // When all else fails, undefined
239
- } else {
240
- cache[ id ] = undefined;
241
- }
242
- }
243
-
244
- jQuery.extend( {
245
- cache: {},
246
-
247
- // The following elements (space-suffixed to avoid Object.prototype collisions)
248
- // throw uncatchable exceptions if you attempt to set expando properties
249
- noData: {
250
- "applet ": true,
251
- "embed ": true,
252
-
253
- // ...but Flash objects (which have this classid) *can* handle expandos
254
- "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
255
- },
256
-
257
- hasData: function( elem ) {
258
- elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];
259
- return !!elem && !isEmptyDataObject( elem );
260
- },
261
-
262
- data: function( elem, name, data ) {
263
- return internalData( elem, name, data );
264
- },
265
-
266
- removeData: function( elem, name ) {
267
- return internalRemoveData( elem, name );
268
- },
269
-
270
- // For internal use only.
271
- _data: function( elem, name, data ) {
272
- return internalData( elem, name, data, true );
273
- },
274
-
275
- _removeData: function( elem, name ) {
276
- return internalRemoveData( elem, name, true );
277
- }
278
- } );
279
-
280
- jQuery.fn.extend( {
281
- data: function( key, value ) {
282
- var i, name, data,
283
- elem = this[ 0 ],
284
- attrs = elem && elem.attributes;
285
-
286
- // Special expections of .data basically thwart jQuery.access,
287
- // so implement the relevant behavior ourselves
288
-
289
- // Gets all values
290
- if ( key === undefined ) {
291
- if ( this.length ) {
292
- data = jQuery.data( elem );
293
-
294
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
295
- i = attrs.length;
296
- while ( i-- ) {
297
-
298
- // Support: IE11+
299
- // The attrs elements can be null (#14894)
300
- if ( attrs[ i ] ) {
301
- name = attrs[ i ].name;
302
- if ( name.indexOf( "data-" ) === 0 ) {
303
- name = jQuery.camelCase( name.slice( 5 ) );
304
- dataAttr( elem, name, data[ name ] );
305
- }
306
- }
307
- }
308
- jQuery._data( elem, "parsedAttrs", true );
309
- }
310
- }
311
-
312
- return data;
313
- }
314
-
315
- // Sets multiple values
316
- if ( typeof key === "object" ) {
317
- return this.each( function() {
318
- jQuery.data( this, key );
319
- } );
320
- }
321
-
322
- return arguments.length > 1 ?
323
-
324
- // Sets one value
325
- this.each( function() {
326
- jQuery.data( this, key, value );
327
- } ) :
328
-
329
- // Gets one value
330
- // Try to fetch any internally stored data first
331
- elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
332
- },
333
-
334
- removeData: function( key ) {
335
- return this.each( function() {
336
- jQuery.removeData( this, key );
337
- } );
338
- }
339
- } );
340
-
341
- return jQuery;
342
- } );
@@ -1,159 +0,0 @@
1
- define( [
2
- "./core",
3
- "./var/slice",
4
- "./callbacks"
5
- ], function( jQuery, slice ) {
6
-
7
- jQuery.extend( {
8
-
9
- Deferred: function( func ) {
10
- var tuples = [
11
-
12
- // action, add listener, listener list, final state
13
- [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
14
- [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
15
- [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
16
- ],
17
- state = "pending",
18
- promise = {
19
- state: function() {
20
- return state;
21
- },
22
- always: function() {
23
- deferred.done( arguments ).fail( arguments );
24
- return this;
25
- },
26
- then: function( /* fnDone, fnFail, fnProgress */ ) {
27
- var fns = arguments;
28
- return jQuery.Deferred( function( newDefer ) {
29
- jQuery.each( tuples, function( i, tuple ) {
30
- var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
31
-
32
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
33
- deferred[ tuple[ 1 ] ]( function() {
34
- var returned = fn && fn.apply( this, arguments );
35
- if ( returned && jQuery.isFunction( returned.promise ) ) {
36
- returned.promise()
37
- .progress( newDefer.notify )
38
- .done( newDefer.resolve )
39
- .fail( newDefer.reject );
40
- } else {
41
- newDefer[ tuple[ 0 ] + "With" ](
42
- this === promise ? newDefer.promise() : this,
43
- fn ? [ returned ] : arguments
44
- );
45
- }
46
- } );
47
- } );
48
- fns = null;
49
- } ).promise();
50
- },
51
-
52
- // Get a promise for this deferred
53
- // If obj is provided, the promise aspect is added to the object
54
- promise: function( obj ) {
55
- return obj != null ? jQuery.extend( obj, promise ) : promise;
56
- }
57
- },
58
- deferred = {};
59
-
60
- // Keep pipe for back-compat
61
- promise.pipe = promise.then;
62
-
63
- // Add list-specific methods
64
- jQuery.each( tuples, function( i, tuple ) {
65
- var list = tuple[ 2 ],
66
- stateString = tuple[ 3 ];
67
-
68
- // promise[ done | fail | progress ] = list.add
69
- promise[ tuple[ 1 ] ] = list.add;
70
-
71
- // Handle state
72
- if ( stateString ) {
73
- list.add( function() {
74
-
75
- // state = [ resolved | rejected ]
76
- state = stateString;
77
-
78
- // [ reject_list | resolve_list ].disable; progress_list.lock
79
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
80
- }
81
-
82
- // deferred[ resolve | reject | notify ]
83
- deferred[ tuple[ 0 ] ] = function() {
84
- deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
85
- return this;
86
- };
87
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
88
- } );
89
-
90
- // Make the deferred a promise
91
- promise.promise( deferred );
92
-
93
- // Call given func if any
94
- if ( func ) {
95
- func.call( deferred, deferred );
96
- }
97
-
98
- // All done!
99
- return deferred;
100
- },
101
-
102
- // Deferred helper
103
- when: function( subordinate /* , ..., subordinateN */ ) {
104
- var i = 0,
105
- resolveValues = slice.call( arguments ),
106
- length = resolveValues.length,
107
-
108
- // the count of uncompleted subordinates
109
- remaining = length !== 1 ||
110
- ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
111
-
112
- // the master Deferred.
113
- // If resolveValues consist of only a single Deferred, just use that.
114
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
115
-
116
- // Update function for both resolve and progress values
117
- updateFunc = function( i, contexts, values ) {
118
- return function( value ) {
119
- contexts[ i ] = this;
120
- values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
121
- if ( values === progressValues ) {
122
- deferred.notifyWith( contexts, values );
123
-
124
- } else if ( !( --remaining ) ) {
125
- deferred.resolveWith( contexts, values );
126
- }
127
- };
128
- },
129
-
130
- progressValues, progressContexts, resolveContexts;
131
-
132
- // add listeners to Deferred subordinates; treat others as resolved
133
- if ( length > 1 ) {
134
- progressValues = new Array( length );
135
- progressContexts = new Array( length );
136
- resolveContexts = new Array( length );
137
- for ( ; i < length; i++ ) {
138
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
139
- resolveValues[ i ].promise()
140
- .progress( updateFunc( i, progressContexts, progressValues ) )
141
- .done( updateFunc( i, resolveContexts, resolveValues ) )
142
- .fail( deferred.reject );
143
- } else {
144
- --remaining;
145
- }
146
- }
147
- }
148
-
149
- // if we're not waiting on anything, resolve the master
150
- if ( !remaining ) {
151
- deferred.resolveWith( resolveContexts, resolveValues );
152
- }
153
-
154
- return deferred.promise();
155
- }
156
- } );
157
-
158
- return jQuery;
159
- } );
@@ -1,34 +0,0 @@
1
- define( [
2
- "./core",
3
- "./traversing"
4
- ], function( jQuery ) {
5
-
6
- jQuery.fn.extend( {
7
-
8
- bind: function( types, data, fn ) {
9
- return this.on( types, null, data, fn );
10
- },
11
- unbind: function( types, fn ) {
12
- return this.off( types, null, fn );
13
- },
14
-
15
- delegate: function( selector, types, data, fn ) {
16
- return this.on( types, selector, data, fn );
17
- },
18
- undelegate: function( selector, types, fn ) {
19
-
20
- // ( namespace ) or ( selector, types [, fn] )
21
- return arguments.length === 1 ?
22
- this.off( selector, "**" ) :
23
- this.off( types, selector || "**", fn );
24
- }
25
- } );
26
-
27
- // The number of elements contained in the matched element set
28
- jQuery.fn.size = function() {
29
- return this.length;
30
- };
31
-
32
- jQuery.fn.andSelf = jQuery.fn.addBack;
33
-
34
- } );
@@ -1,56 +0,0 @@
1
- define( [
2
- "./core",
3
- "./core/access",
4
- "./css"
5
- ], function( jQuery, access ) {
6
-
7
- // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
8
- jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
9
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
10
- function( defaultExtra, funcName ) {
11
-
12
- // margin is only for outerHeight, outerWidth
13
- jQuery.fn[ funcName ] = function( margin, value ) {
14
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
15
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
16
-
17
- return access( this, function( elem, type, value ) {
18
- var doc;
19
-
20
- if ( jQuery.isWindow( elem ) ) {
21
-
22
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
23
- // isn't a whole lot we can do. See pull request at this URL for discussion:
24
- // https://github.com/jquery/jquery/pull/764
25
- return elem.document.documentElement[ "client" + name ];
26
- }
27
-
28
- // Get document width or height
29
- if ( elem.nodeType === 9 ) {
30
- doc = elem.documentElement;
31
-
32
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
33
- // whichever is greatest
34
- // unfortunately, this causes bug #3838 in IE6/8 only,
35
- // but there is currently no good, small way to fix it.
36
- return Math.max(
37
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
38
- elem.body[ "offset" + name ], doc[ "offset" + name ],
39
- doc[ "client" + name ]
40
- );
41
- }
42
-
43
- return value === undefined ?
44
-
45
- // Get width or height on the element, requesting but not forcing parseFloat
46
- jQuery.css( elem, type, extra ) :
47
-
48
- // Set width or height on the element
49
- jQuery.style( elem, type, value, extra );
50
- }, type, chainable ? margin : undefined, chainable, null );
51
- };
52
- } );
53
- } );
54
-
55
- return jQuery;
56
- } );
@@ -1,121 +0,0 @@
1
- define( [
2
- "../core",
3
- "../css"
4
- ], function( jQuery ) {
5
-
6
- function Tween( elem, options, prop, end, easing ) {
7
- return new Tween.prototype.init( elem, options, prop, end, easing );
8
- }
9
- jQuery.Tween = Tween;
10
-
11
- Tween.prototype = {
12
- constructor: Tween,
13
- init: function( elem, options, prop, end, easing, unit ) {
14
- this.elem = elem;
15
- this.prop = prop;
16
- this.easing = easing || jQuery.easing._default;
17
- this.options = options;
18
- this.start = this.now = this.cur();
19
- this.end = end;
20
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
21
- },
22
- cur: function() {
23
- var hooks = Tween.propHooks[ this.prop ];
24
-
25
- return hooks && hooks.get ?
26
- hooks.get( this ) :
27
- Tween.propHooks._default.get( this );
28
- },
29
- run: function( percent ) {
30
- var eased,
31
- hooks = Tween.propHooks[ this.prop ];
32
-
33
- if ( this.options.duration ) {
34
- this.pos = eased = jQuery.easing[ this.easing ](
35
- percent, this.options.duration * percent, 0, 1, this.options.duration
36
- );
37
- } else {
38
- this.pos = eased = percent;
39
- }
40
- this.now = ( this.end - this.start ) * eased + this.start;
41
-
42
- if ( this.options.step ) {
43
- this.options.step.call( this.elem, this.now, this );
44
- }
45
-
46
- if ( hooks && hooks.set ) {
47
- hooks.set( this );
48
- } else {
49
- Tween.propHooks._default.set( this );
50
- }
51
- return this;
52
- }
53
- };
54
-
55
- Tween.prototype.init.prototype = Tween.prototype;
56
-
57
- Tween.propHooks = {
58
- _default: {
59
- get: function( tween ) {
60
- var result;
61
-
62
- // Use a property on the element directly when it is not a DOM element,
63
- // or when there is no matching style property that exists.
64
- if ( tween.elem.nodeType !== 1 ||
65
- tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
66
- return tween.elem[ tween.prop ];
67
- }
68
-
69
- // passing an empty string as a 3rd parameter to .css will automatically
70
- // attempt a parseFloat and fallback to a string if the parse fails
71
- // so, simple values such as "10px" are parsed to Float.
72
- // complex values such as "rotate(1rad)" are returned as is.
73
- result = jQuery.css( tween.elem, tween.prop, "" );
74
-
75
- // Empty strings, null, undefined and "auto" are converted to 0.
76
- return !result || result === "auto" ? 0 : result;
77
- },
78
- set: function( tween ) {
79
-
80
- // use step hook for back compat - use cssHook if its there - use .style if its
81
- // available and use plain properties where available
82
- if ( jQuery.fx.step[ tween.prop ] ) {
83
- jQuery.fx.step[ tween.prop ]( tween );
84
- } else if ( tween.elem.nodeType === 1 &&
85
- ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
86
- jQuery.cssHooks[ tween.prop ] ) ) {
87
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
88
- } else {
89
- tween.elem[ tween.prop ] = tween.now;
90
- }
91
- }
92
- }
93
- };
94
-
95
- // Support: IE <=9
96
- // Panic based approach to setting things on disconnected nodes
97
-
98
- Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
99
- set: function( tween ) {
100
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
101
- tween.elem[ tween.prop ] = tween.now;
102
- }
103
- }
104
- };
105
-
106
- jQuery.easing = {
107
- linear: function( p ) {
108
- return p;
109
- },
110
- swing: function( p ) {
111
- return 0.5 - Math.cos( p * Math.PI ) / 2;
112
- },
113
- _default: "swing"
114
- };
115
-
116
- jQuery.fx = Tween.prototype.init;
117
-
118
- // Back Compat <1.8 extension point
119
- jQuery.fx.step = {};
120
-
121
- } );