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,563 +0,0 @@
1
- define( [
2
- "./core",
3
- "./var/pnum",
4
- "./core/access",
5
- "./css/var/rmargin",
6
- "./var/document",
7
- "./var/rcssNum",
8
- "./css/var/rnumnonpx",
9
- "./css/var/cssExpand",
10
- "./css/var/isHidden",
11
- "./css/var/swap",
12
- "./css/curCSS",
13
- "./css/adjustCSS",
14
- "./css/defaultDisplay",
15
- "./css/addGetHookIf",
16
- "./css/support",
17
-
18
- "./core/init",
19
- "./core/ready",
20
- "./selector" // contains
21
- ], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand,
22
- isHidden, swap, curCSS, adjustCSS, defaultDisplay, addGetHookIf, support ) {
23
-
24
- var
25
-
26
- // BuildExclude
27
- getStyles = curCSS.getStyles,
28
- ralpha = /alpha\([^)]*\)/i,
29
- ropacity = /opacity\s*=\s*([^)]*)/i,
30
-
31
- // swappable if display is none or starts with table except
32
- // "table", "table-cell", or "table-caption"
33
- // see here for display values:
34
- // https://developer.mozilla.org/en-US/docs/CSS/display
35
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
36
- rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
37
-
38
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
39
- cssNormalTransform = {
40
- letterSpacing: "0",
41
- fontWeight: "400"
42
- },
43
-
44
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
45
- emptyStyle = document.createElement( "div" ).style;
46
-
47
- // BuildExclude
48
- curCSS = curCSS.curCSS;
49
-
50
- // return a css property mapped to a potentially vendor prefixed property
51
- function vendorPropName( name ) {
52
-
53
- // shortcut for names that are not vendor prefixed
54
- if ( name in emptyStyle ) {
55
- return name;
56
- }
57
-
58
- // check for vendor prefixed names
59
- var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),
60
- i = cssPrefixes.length;
61
-
62
- while ( i-- ) {
63
- name = cssPrefixes[ i ] + capName;
64
- if ( name in emptyStyle ) {
65
- return name;
66
- }
67
- }
68
- }
69
-
70
- function showHide( elements, show ) {
71
- var display, elem, hidden,
72
- values = [],
73
- index = 0,
74
- length = elements.length;
75
-
76
- for ( ; index < length; index++ ) {
77
- elem = elements[ index ];
78
- if ( !elem.style ) {
79
- continue;
80
- }
81
-
82
- values[ index ] = jQuery._data( elem, "olddisplay" );
83
- display = elem.style.display;
84
- if ( show ) {
85
-
86
- // Reset the inline display of this element to learn if it is
87
- // being hidden by cascaded rules or not
88
- if ( !values[ index ] && display === "none" ) {
89
- elem.style.display = "";
90
- }
91
-
92
- // Set elements which have been overridden with display: none
93
- // in a stylesheet to whatever the default browser style is
94
- // for such an element
95
- if ( elem.style.display === "" && isHidden( elem ) ) {
96
- values[ index ] =
97
- jQuery._data( elem, "olddisplay", defaultDisplay( elem.nodeName ) );
98
- }
99
- } else {
100
- hidden = isHidden( elem );
101
-
102
- if ( display && display !== "none" || !hidden ) {
103
- jQuery._data(
104
- elem,
105
- "olddisplay",
106
- hidden ? display : jQuery.css( elem, "display" )
107
- );
108
- }
109
- }
110
- }
111
-
112
- // Set the display of most of the elements in a second loop
113
- // to avoid the constant reflow
114
- for ( index = 0; index < length; index++ ) {
115
- elem = elements[ index ];
116
- if ( !elem.style ) {
117
- continue;
118
- }
119
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
120
- elem.style.display = show ? values[ index ] || "" : "none";
121
- }
122
- }
123
-
124
- return elements;
125
- }
126
-
127
- function setPositiveNumber( elem, value, subtract ) {
128
- var matches = rnumsplit.exec( value );
129
- return matches ?
130
-
131
- // Guard against undefined "subtract", e.g., when used as in cssHooks
132
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
133
- value;
134
- }
135
-
136
- function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
137
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
138
-
139
- // If we already have the right measurement, avoid augmentation
140
- 4 :
141
-
142
- // Otherwise initialize for horizontal or vertical properties
143
- name === "width" ? 1 : 0,
144
-
145
- val = 0;
146
-
147
- for ( ; i < 4; i += 2 ) {
148
-
149
- // both box models exclude margin, so add it if we want it
150
- if ( extra === "margin" ) {
151
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
152
- }
153
-
154
- if ( isBorderBox ) {
155
-
156
- // border-box includes padding, so remove it if we want content
157
- if ( extra === "content" ) {
158
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
159
- }
160
-
161
- // at this point, extra isn't border nor margin, so remove border
162
- if ( extra !== "margin" ) {
163
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
164
- }
165
- } else {
166
-
167
- // at this point, extra isn't content, so add padding
168
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
169
-
170
- // at this point, extra isn't content nor padding, so add border
171
- if ( extra !== "padding" ) {
172
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
173
- }
174
- }
175
- }
176
-
177
- return val;
178
- }
179
-
180
- function getWidthOrHeight( elem, name, extra ) {
181
-
182
- // Start with offset property, which is equivalent to the border-box value
183
- var valueIsBorderBox = true,
184
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
185
- styles = getStyles( elem ),
186
- isBorderBox = support.boxSizing &&
187
- jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
188
-
189
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
190
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
191
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
192
- if ( val <= 0 || val == null ) {
193
-
194
- // Fall back to computed then uncomputed css if necessary
195
- val = curCSS( elem, name, styles );
196
- if ( val < 0 || val == null ) {
197
- val = elem.style[ name ];
198
- }
199
-
200
- // Computed unit is not pixels. Stop here and return.
201
- if ( rnumnonpx.test( val ) ) {
202
- return val;
203
- }
204
-
205
- // we need the check for style in case a browser which returns unreliable values
206
- // for getComputedStyle silently falls back to the reliable elem.style
207
- valueIsBorderBox = isBorderBox &&
208
- ( support.boxSizingReliable() || val === elem.style[ name ] );
209
-
210
- // Normalize "", auto, and prepare for extra
211
- val = parseFloat( val ) || 0;
212
- }
213
-
214
- // use the active box-sizing model to add/subtract irrelevant styles
215
- return ( val +
216
- augmentWidthOrHeight(
217
- elem,
218
- name,
219
- extra || ( isBorderBox ? "border" : "content" ),
220
- valueIsBorderBox,
221
- styles
222
- )
223
- ) + "px";
224
- }
225
-
226
- jQuery.extend( {
227
-
228
- // Add in style property hooks for overriding the default
229
- // behavior of getting and setting a style property
230
- cssHooks: {
231
- opacity: {
232
- get: function( elem, computed ) {
233
- if ( computed ) {
234
-
235
- // We should always get a number back from opacity
236
- var ret = curCSS( elem, "opacity" );
237
- return ret === "" ? "1" : ret;
238
- }
239
- }
240
- }
241
- },
242
-
243
- // Don't automatically add "px" to these possibly-unitless properties
244
- cssNumber: {
245
- "animationIterationCount": true,
246
- "columnCount": true,
247
- "fillOpacity": true,
248
- "flexGrow": true,
249
- "flexShrink": true,
250
- "fontWeight": true,
251
- "lineHeight": true,
252
- "opacity": true,
253
- "order": true,
254
- "orphans": true,
255
- "widows": true,
256
- "zIndex": true,
257
- "zoom": true
258
- },
259
-
260
- // Add in properties whose names you wish to fix before
261
- // setting or getting the value
262
- cssProps: {
263
-
264
- // normalize float css property
265
- "float": support.cssFloat ? "cssFloat" : "styleFloat"
266
- },
267
-
268
- // Get and set the style property on a DOM Node
269
- style: function( elem, name, value, extra ) {
270
-
271
- // Don't set styles on text and comment nodes
272
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
273
- return;
274
- }
275
-
276
- // Make sure that we're working with the right name
277
- var ret, type, hooks,
278
- origName = jQuery.camelCase( name ),
279
- style = elem.style;
280
-
281
- name = jQuery.cssProps[ origName ] ||
282
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
283
-
284
- // gets hook for the prefixed version
285
- // followed by the unprefixed version
286
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
287
-
288
- // Check if we're setting a value
289
- if ( value !== undefined ) {
290
- type = typeof value;
291
-
292
- // Convert "+=" or "-=" to relative numbers (#7345)
293
- if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
294
- value = adjustCSS( elem, name, ret );
295
-
296
- // Fixes bug #9237
297
- type = "number";
298
- }
299
-
300
- // Make sure that null and NaN values aren't set. See: #7116
301
- if ( value == null || value !== value ) {
302
- return;
303
- }
304
-
305
- // If a number was passed in, add the unit (except for certain CSS properties)
306
- if ( type === "number" ) {
307
- value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
308
- }
309
-
310
- // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
311
- // but it would mean to define eight
312
- // (for every problematic property) identical functions
313
- if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
314
- style[ name ] = "inherit";
315
- }
316
-
317
- // If a hook was provided, use that value, otherwise just set the specified value
318
- if ( !hooks || !( "set" in hooks ) ||
319
- ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
320
-
321
- // Support: IE
322
- // Swallow errors from 'invalid' CSS values (#5509)
323
- try {
324
- style[ name ] = value;
325
- } catch ( e ) {}
326
- }
327
-
328
- } else {
329
-
330
- // If a hook was provided get the non-computed value from there
331
- if ( hooks && "get" in hooks &&
332
- ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
333
-
334
- return ret;
335
- }
336
-
337
- // Otherwise just get the value from the style object
338
- return style[ name ];
339
- }
340
- },
341
-
342
- css: function( elem, name, extra, styles ) {
343
- var num, val, hooks,
344
- origName = jQuery.camelCase( name );
345
-
346
- // Make sure that we're working with the right name
347
- name = jQuery.cssProps[ origName ] ||
348
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
349
-
350
- // gets hook for the prefixed version
351
- // followed by the unprefixed version
352
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
353
-
354
- // If a hook was provided get the computed value from there
355
- if ( hooks && "get" in hooks ) {
356
- val = hooks.get( elem, true, extra );
357
- }
358
-
359
- // Otherwise, if a way to get the computed value exists, use that
360
- if ( val === undefined ) {
361
- val = curCSS( elem, name, styles );
362
- }
363
-
364
- //convert "normal" to computed value
365
- if ( val === "normal" && name in cssNormalTransform ) {
366
- val = cssNormalTransform[ name ];
367
- }
368
-
369
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
370
- if ( extra === "" || extra ) {
371
- num = parseFloat( val );
372
- return extra === true || isFinite( num ) ? num || 0 : val;
373
- }
374
- return val;
375
- }
376
- } );
377
-
378
- jQuery.each( [ "height", "width" ], function( i, name ) {
379
- jQuery.cssHooks[ name ] = {
380
- get: function( elem, computed, extra ) {
381
- if ( computed ) {
382
-
383
- // certain elements can have dimension info if we invisibly show them
384
- // however, it must have a current display style that would benefit from this
385
- return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
386
- elem.offsetWidth === 0 ?
387
- swap( elem, cssShow, function() {
388
- return getWidthOrHeight( elem, name, extra );
389
- } ) :
390
- getWidthOrHeight( elem, name, extra );
391
- }
392
- },
393
-
394
- set: function( elem, value, extra ) {
395
- var styles = extra && getStyles( elem );
396
- return setPositiveNumber( elem, value, extra ?
397
- augmentWidthOrHeight(
398
- elem,
399
- name,
400
- extra,
401
- support.boxSizing &&
402
- jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
403
- styles
404
- ) : 0
405
- );
406
- }
407
- };
408
- } );
409
-
410
- if ( !support.opacity ) {
411
- jQuery.cssHooks.opacity = {
412
- get: function( elem, computed ) {
413
-
414
- // IE uses filters for opacity
415
- return ropacity.test( ( computed && elem.currentStyle ?
416
- elem.currentStyle.filter :
417
- elem.style.filter ) || "" ) ?
418
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
419
- computed ? "1" : "";
420
- },
421
-
422
- set: function( elem, value ) {
423
- var style = elem.style,
424
- currentStyle = elem.currentStyle,
425
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
426
- filter = currentStyle && currentStyle.filter || style.filter || "";
427
-
428
- // IE has trouble with opacity if it does not have layout
429
- // Force it by setting the zoom level
430
- style.zoom = 1;
431
-
432
- // if setting opacity to 1, and no other filters exist -
433
- // attempt to remove filter attribute #6652
434
- // if value === "", then remove inline opacity #12685
435
- if ( ( value >= 1 || value === "" ) &&
436
- jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
437
- style.removeAttribute ) {
438
-
439
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
440
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
441
- // style.removeAttribute is IE Only, but so apparently is this code path...
442
- style.removeAttribute( "filter" );
443
-
444
- // if there is no filter style applied in a css rule
445
- // or unset inline opacity, we are done
446
- if ( value === "" || currentStyle && !currentStyle.filter ) {
447
- return;
448
- }
449
- }
450
-
451
- // otherwise, set new filter values
452
- style.filter = ralpha.test( filter ) ?
453
- filter.replace( ralpha, opacity ) :
454
- filter + " " + opacity;
455
- }
456
- };
457
- }
458
-
459
- jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
460
- function( elem, computed ) {
461
- if ( computed ) {
462
- return swap( elem, { "display": "inline-block" },
463
- curCSS, [ elem, "marginRight" ] );
464
- }
465
- }
466
- );
467
-
468
- jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
469
- function( elem, computed ) {
470
- if ( computed ) {
471
- return (
472
- parseFloat( curCSS( elem, "marginLeft" ) ) ||
473
-
474
- // Support: IE<=11+
475
- // Running getBoundingClientRect on a disconnected node in IE throws an error
476
- // Support: IE8 only
477
- // getClientRects() errors on disconnected elems
478
- ( jQuery.contains( elem.ownerDocument, elem ) ?
479
- elem.getBoundingClientRect().left -
480
- swap( elem, { marginLeft: 0 }, function() {
481
- return elem.getBoundingClientRect().left;
482
- } ) :
483
- 0
484
- )
485
- ) + "px";
486
- }
487
- }
488
- );
489
-
490
- // These hooks are used by animate to expand properties
491
- jQuery.each( {
492
- margin: "",
493
- padding: "",
494
- border: "Width"
495
- }, function( prefix, suffix ) {
496
- jQuery.cssHooks[ prefix + suffix ] = {
497
- expand: function( value ) {
498
- var i = 0,
499
- expanded = {},
500
-
501
- // assumes a single number if not a string
502
- parts = typeof value === "string" ? value.split( " " ) : [ value ];
503
-
504
- for ( ; i < 4; i++ ) {
505
- expanded[ prefix + cssExpand[ i ] + suffix ] =
506
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
507
- }
508
-
509
- return expanded;
510
- }
511
- };
512
-
513
- if ( !rmargin.test( prefix ) ) {
514
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
515
- }
516
- } );
517
-
518
- jQuery.fn.extend( {
519
- css: function( name, value ) {
520
- return access( this, function( elem, name, value ) {
521
- var styles, len,
522
- map = {},
523
- i = 0;
524
-
525
- if ( jQuery.isArray( name ) ) {
526
- styles = getStyles( elem );
527
- len = name.length;
528
-
529
- for ( ; i < len; i++ ) {
530
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
531
- }
532
-
533
- return map;
534
- }
535
-
536
- return value !== undefined ?
537
- jQuery.style( elem, name, value ) :
538
- jQuery.css( elem, name );
539
- }, name, value, arguments.length > 1 );
540
- },
541
- show: function() {
542
- return showHide( this, true );
543
- },
544
- hide: function() {
545
- return showHide( this );
546
- },
547
- toggle: function( state ) {
548
- if ( typeof state === "boolean" ) {
549
- return state ? this.show() : this.hide();
550
- }
551
-
552
- return this.each( function() {
553
- if ( isHidden( this ) ) {
554
- jQuery( this ).show();
555
- } else {
556
- jQuery( this ).hide();
557
- }
558
- } );
559
- }
560
- } );
561
-
562
- return jQuery;
563
- } );
@@ -1,23 +0,0 @@
1
- define( [
2
- "../var/document",
3
- "../var/support"
4
- ], function( document, support ) {
5
-
6
- ( function() {
7
- var div = document.createElement( "div" );
8
-
9
- // Support: IE<9
10
- support.deleteExpando = true;
11
- try {
12
- delete div.test;
13
- } catch ( e ) {
14
- support.deleteExpando = false;
15
- }
16
-
17
- // Null elements to avoid leaks in IE.
18
- div = null;
19
- } )();
20
-
21
- return support;
22
-
23
- } );
@@ -1,20 +0,0 @@
1
- define( [
2
- "../../core"
3
- ], function( jQuery ) {
4
-
5
- /**
6
- * Determines whether an object can have data
7
- */
8
- return function( elem ) {
9
- var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ],
10
- nodeType = +elem.nodeType || 1;
11
-
12
- // Do not set data on non-element DOM nodes because it will not be cleared (#8335).
13
- return nodeType !== 1 && nodeType !== 9 ?
14
- false :
15
-
16
- // Nodes accept data unless otherwise specified; rejection can be conditional
17
- !noData || noData !== true && elem.getAttribute( "classid" ) === noData;
18
- };
19
-
20
- } );