jquery-ui-rails 6.0.1 → 8.0.0

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 (170) hide show
  1. checksums.yaml +5 -5
  2. data/History.md +11 -2
  3. data/README.md +12 -12
  4. data/Rakefile +8 -3
  5. data/VERSIONS.md +2 -0
  6. data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
  7. data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
  8. data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
  9. data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
  10. data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
  11. data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  12. data/app/assets/javascripts/jquery-ui/data.js +16 -18
  13. data/app/assets/javascripts/jquery-ui/disable-selection.js +10 -7
  14. data/app/assets/javascripts/jquery-ui/effect.js +69 -752
  15. data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +11 -8
  16. data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +11 -8
  17. data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +11 -8
  18. data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +11 -8
  19. data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +13 -10
  20. data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +11 -8
  21. data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +11 -8
  22. data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +11 -8
  23. data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +11 -8
  24. data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +11 -8
  25. data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +11 -8
  26. data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +11 -8
  27. data/app/assets/javascripts/jquery-ui/effects/effect-size.js +13 -8
  28. data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +11 -8
  29. data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +12 -9
  30. data/app/assets/javascripts/jquery-ui/focusable.js +13 -20
  31. data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +11 -10
  32. data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +8 -5
  33. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +8 -5
  34. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +7 -4
  35. data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +14 -11
  36. data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +14 -11
  37. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +15 -12
  38. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +14 -11
  39. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +12 -9
  40. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +12 -9
  41. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +8 -5
  42. data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +15 -12
  43. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
  44. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +14 -11
  45. data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +13 -10
  46. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +8 -5
  47. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +8 -5
  48. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +8 -5
  49. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +14 -11
  50. data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +14 -11
  51. data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +8 -5
  52. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +14 -11
  53. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +8 -5
  54. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +14 -11
  55. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +13 -10
  56. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +5 -2
  57. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +7 -4
  58. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +6 -3
  59. data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +14 -11
  60. data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +14 -11
  61. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +7 -4
  62. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +14 -11
  63. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +9 -6
  64. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +14 -11
  65. data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +16 -12
  66. data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +13 -10
  67. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +14 -11
  68. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +14 -11
  69. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +14 -11
  70. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +11 -8
  71. data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +14 -11
  72. data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +9 -6
  73. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +12 -9
  74. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +12 -9
  75. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +8 -5
  76. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +13 -10
  77. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +11 -8
  78. data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +14 -11
  79. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +8 -5
  80. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +14 -11
  81. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +11 -8
  82. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +7 -4
  83. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +8 -5
  84. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +11 -8
  85. data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +11 -8
  86. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +14 -11
  87. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +13 -10
  88. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +12 -9
  89. data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +10 -7
  90. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +10 -7
  91. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +14 -11
  92. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +14 -11
  93. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +14 -11
  94. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +14 -11
  95. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +14 -11
  96. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +14 -11
  97. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +14 -11
  98. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +10 -7
  99. data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +14 -11
  100. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +14 -11
  101. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +14 -11
  102. data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +14 -11
  103. data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +7 -4
  104. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +14 -11
  105. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +14 -11
  106. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +15 -12
  107. data/app/assets/javascripts/jquery-ui/jquery-patch.js +58 -0
  108. data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
  109. data/app/assets/javascripts/jquery-ui/keycode.js +11 -7
  110. data/app/assets/javascripts/jquery-ui/labels.js +18 -13
  111. data/app/assets/javascripts/jquery-ui/plugin.js +5 -2
  112. data/app/assets/javascripts/jquery-ui/position.js +30 -17
  113. data/app/assets/javascripts/jquery-ui/scroll-parent.js +10 -7
  114. data/app/assets/javascripts/jquery-ui/tabbable.js +11 -8
  115. data/app/assets/javascripts/jquery-ui/unique-id.js +10 -7
  116. data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +691 -0
  117. data/app/assets/javascripts/jquery-ui/version.js +6 -3
  118. data/app/assets/javascripts/jquery-ui/widget.js +56 -30
  119. data/app/assets/javascripts/jquery-ui/widgets/accordion.js +32 -23
  120. data/app/assets/javascripts/jquery-ui/widgets/autocomplete.js +31 -74
  121. data/app/assets/javascripts/jquery-ui/widgets/button.js +91 -28
  122. data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +27 -24
  123. data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +15 -11
  124. data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +185 -68
  125. data/app/assets/javascripts/jquery-ui/widgets/dialog.js +57 -54
  126. data/app/assets/javascripts/jquery-ui/widgets/draggable.js +30 -25
  127. data/app/assets/javascripts/jquery-ui/widgets/droppable.js +25 -19
  128. data/app/assets/javascripts/jquery-ui/widgets/menu.js +90 -52
  129. data/app/assets/javascripts/jquery-ui/widgets/mouse.js +36 -40
  130. data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +14 -11
  131. data/app/assets/javascripts/jquery-ui/widgets/resizable.js +116 -42
  132. data/app/assets/javascripts/jquery-ui/widgets/selectable.js +18 -11
  133. data/app/assets/javascripts/jquery-ui/widgets/selectmenu.js +30 -52
  134. data/app/assets/javascripts/jquery-ui/widgets/slider.js +15 -12
  135. data/app/assets/javascripts/jquery-ui/widgets/sortable.js +193 -140
  136. data/app/assets/javascripts/jquery-ui/widgets/spinner.js +28 -45
  137. data/app/assets/javascripts/jquery-ui/widgets/tabs.js +32 -66
  138. data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +38 -36
  139. data/app/assets/javascripts/jquery-ui.js +3 -7
  140. data/app/assets/stylesheets/jquery-ui/accordion.css +5 -5
  141. data/app/assets/stylesheets/jquery-ui/all.css +5 -5
  142. data/app/assets/stylesheets/jquery-ui/autocomplete.css +5 -5
  143. data/app/assets/stylesheets/jquery-ui/base.css +5 -5
  144. data/app/assets/stylesheets/jquery-ui/button.css +6 -11
  145. data/app/assets/stylesheets/jquery-ui/checkboxradio.css +5 -5
  146. data/app/assets/stylesheets/jquery-ui/controlgroup.css +5 -8
  147. data/app/assets/stylesheets/jquery-ui/core.css +5 -9
  148. data/app/assets/stylesheets/jquery-ui/datepicker.css +5 -5
  149. data/app/assets/stylesheets/jquery-ui/dialog.css +5 -5
  150. data/app/assets/stylesheets/jquery-ui/draggable.css +4 -5
  151. data/app/assets/stylesheets/jquery-ui/menu.css +5 -7
  152. data/app/assets/stylesheets/jquery-ui/progressbar.css +5 -6
  153. data/app/assets/stylesheets/jquery-ui/resizable.css +4 -5
  154. data/app/assets/stylesheets/jquery-ui/selectable.css +4 -5
  155. data/app/assets/stylesheets/jquery-ui/selectmenu.css +5 -5
  156. data/app/assets/stylesheets/jquery-ui/slider.css +6 -13
  157. data/app/assets/stylesheets/jquery-ui/sortable.css +4 -5
  158. data/app/assets/stylesheets/jquery-ui/spinner.css +5 -5
  159. data/app/assets/stylesheets/jquery-ui/tabs.css +5 -5
  160. data/app/assets/stylesheets/jquery-ui/theme.css.erb +10 -14
  161. data/app/assets/stylesheets/jquery-ui/tooltip.css +5 -5
  162. data/lib/jquery/ui/rails/version.rb +2 -2
  163. metadata +11 -15
  164. data/app/assets/javascripts/jquery-ui/core.js +0 -15
  165. data/app/assets/javascripts/jquery-ui/escape-selector.js +0 -23
  166. data/app/assets/javascripts/jquery-ui/form.js +0 -22
  167. data/app/assets/javascripts/jquery-ui/ie.js +0 -17
  168. data/app/assets/javascripts/jquery-ui/jquery-1-7.js +0 -91
  169. data/app/assets/javascripts/jquery-ui/safe-active-element.js +0 -42
  170. data/app/assets/javascripts/jquery-ui/safe-blur.js +0 -23
@@ -0,0 +1,691 @@
1
+ /*!
2
+ * jQuery Color Animations v3.0.0
3
+ * https://github.com/jquery/jquery-color
4
+ *
5
+ * Copyright OpenJS Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * https://jquery.org/license
8
+ *
9
+ * Date: Wed May 15 16:49:44 2024 +0200
10
+ */
11
+
12
+ ( function( root, factory ) {
13
+ "use strict";
14
+
15
+ if ( typeof define === "function" && define.amd ) {
16
+
17
+ // AMD. Register as an anonymous module.
18
+ define( [ "jquery" ], factory );
19
+ } else if ( typeof exports === "object" ) {
20
+ module.exports = factory( require( "jquery" ) );
21
+ } else {
22
+ factory( root.jQuery );
23
+ }
24
+ } )( this, function( jQuery, undefined ) {
25
+ "use strict";
26
+
27
+ var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
28
+ "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
29
+
30
+ class2type = {},
31
+ toString = class2type.toString,
32
+
33
+ // plusequals test for += 100 -= 100
34
+ rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
35
+
36
+ // a set of RE's that can match strings and generate color tuples.
37
+ stringParsers = [ {
38
+ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
39
+ parse: function( execResult ) {
40
+ return [
41
+ execResult[ 1 ],
42
+ execResult[ 2 ],
43
+ execResult[ 3 ],
44
+ execResult[ 4 ]
45
+ ];
46
+ }
47
+ }, {
48
+ re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
49
+ parse: function( execResult ) {
50
+ return [
51
+ execResult[ 1 ] * 2.55,
52
+ execResult[ 2 ] * 2.55,
53
+ execResult[ 3 ] * 2.55,
54
+ execResult[ 4 ]
55
+ ];
56
+ }
57
+ }, {
58
+
59
+ // this regex ignores A-F because it's compared against an already lowercased string
60
+ re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
61
+ parse: function( execResult ) {
62
+ return [
63
+ parseInt( execResult[ 1 ], 16 ),
64
+ parseInt( execResult[ 2 ], 16 ),
65
+ parseInt( execResult[ 3 ], 16 ),
66
+ execResult[ 4 ] ?
67
+ ( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
68
+ 1
69
+ ];
70
+ }
71
+ }, {
72
+
73
+ // this regex ignores A-F because it's compared against an already lowercased string
74
+ re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
75
+ parse: function( execResult ) {
76
+ return [
77
+ parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
78
+ parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
79
+ parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
80
+ execResult[ 4 ] ?
81
+ ( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
82
+ .toFixed( 2 ) :
83
+ 1
84
+ ];
85
+ }
86
+ }, {
87
+ re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
88
+ space: "hsla",
89
+ parse: function( execResult ) {
90
+ return [
91
+ execResult[ 1 ],
92
+ execResult[ 2 ] / 100,
93
+ execResult[ 3 ] / 100,
94
+ execResult[ 4 ]
95
+ ];
96
+ }
97
+ } ],
98
+
99
+ // jQuery.Color( )
100
+ color = jQuery.Color = function( color, green, blue, alpha ) {
101
+ return new jQuery.Color.fn.parse( color, green, blue, alpha );
102
+ },
103
+ spaces = {
104
+ rgba: {
105
+ props: {
106
+ red: {
107
+ idx: 0,
108
+ type: "byte"
109
+ },
110
+ green: {
111
+ idx: 1,
112
+ type: "byte"
113
+ },
114
+ blue: {
115
+ idx: 2,
116
+ type: "byte"
117
+ }
118
+ }
119
+ },
120
+
121
+ hsla: {
122
+ props: {
123
+ hue: {
124
+ idx: 0,
125
+ type: "degrees"
126
+ },
127
+ saturation: {
128
+ idx: 1,
129
+ type: "percent"
130
+ },
131
+ lightness: {
132
+ idx: 2,
133
+ type: "percent"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ propTypes = {
139
+ "byte": {
140
+ floor: true,
141
+ max: 255
142
+ },
143
+ "percent": {
144
+ max: 1
145
+ },
146
+ "degrees": {
147
+ mod: 360,
148
+ floor: true
149
+ }
150
+ },
151
+
152
+ // colors = jQuery.Color.names
153
+ colors,
154
+
155
+ // local aliases of functions called often
156
+ each = jQuery.each;
157
+
158
+ // define cache name and alpha properties
159
+ // for rgba and hsla spaces
160
+ each( spaces, function( spaceName, space ) {
161
+ space.cache = "_" + spaceName;
162
+ space.props.alpha = {
163
+ idx: 3,
164
+ type: "percent",
165
+ def: 1
166
+ };
167
+ } );
168
+
169
+ // Populate the class2type map
170
+ jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
171
+ function( _i, name ) {
172
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
173
+ } );
174
+
175
+ function getType( obj ) {
176
+ if ( obj == null ) {
177
+ return obj + "";
178
+ }
179
+
180
+ return typeof obj === "object" ?
181
+ class2type[ toString.call( obj ) ] || "object" :
182
+ typeof obj;
183
+ }
184
+
185
+ function clamp( value, prop, allowEmpty ) {
186
+ var type = propTypes[ prop.type ] || {};
187
+
188
+ if ( value == null ) {
189
+ return ( allowEmpty || !prop.def ) ? null : prop.def;
190
+ }
191
+
192
+ // ~~ is an short way of doing floor for positive numbers
193
+ value = type.floor ? ~~value : parseFloat( value );
194
+
195
+ if ( type.mod ) {
196
+
197
+ // we add mod before modding to make sure that negatives values
198
+ // get converted properly: -10 -> 350
199
+ return ( value + type.mod ) % type.mod;
200
+ }
201
+
202
+ // for now all property types without mod have min and max
203
+ return Math.min( type.max, Math.max( 0, value ) );
204
+ }
205
+
206
+ function stringParse( string ) {
207
+ var inst = color(),
208
+ rgba = inst._rgba = [];
209
+
210
+ string = string.toLowerCase();
211
+
212
+ each( stringParsers, function( _i, parser ) {
213
+ var parsed,
214
+ match = parser.re.exec( string ),
215
+ values = match && parser.parse( match ),
216
+ spaceName = parser.space || "rgba";
217
+
218
+ if ( values ) {
219
+ parsed = inst[ spaceName ]( values );
220
+
221
+ // if this was an rgba parse the assignment might happen twice
222
+ // oh well....
223
+ inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
224
+ rgba = inst._rgba = parsed._rgba;
225
+
226
+ // exit each( stringParsers ) here because we matched
227
+ return false;
228
+ }
229
+ } );
230
+
231
+ // Found a stringParser that handled it
232
+ if ( rgba.length ) {
233
+
234
+ // if this came from a parsed string, force "transparent" when alpha is 0
235
+ // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
236
+ if ( rgba.join() === "0,0,0,0" ) {
237
+ jQuery.extend( rgba, colors.transparent );
238
+ }
239
+ return inst;
240
+ }
241
+
242
+ // named colors
243
+ return colors[ string ];
244
+ }
245
+
246
+ color.fn = jQuery.extend( color.prototype, {
247
+ parse: function( red, green, blue, alpha ) {
248
+ if ( red === undefined ) {
249
+ this._rgba = [ null, null, null, null ];
250
+ return this;
251
+ }
252
+ if ( red.jquery || red.nodeType ) {
253
+ red = jQuery( red ).css( green );
254
+ green = undefined;
255
+ }
256
+
257
+ var inst = this,
258
+ type = getType( red ),
259
+ rgba = this._rgba = [];
260
+
261
+ // more than 1 argument specified - assume ( red, green, blue, alpha )
262
+ if ( green !== undefined ) {
263
+ red = [ red, green, blue, alpha ];
264
+ type = "array";
265
+ }
266
+
267
+ if ( type === "string" ) {
268
+ return this.parse( stringParse( red ) || colors._default );
269
+ }
270
+
271
+ if ( type === "array" ) {
272
+ each( spaces.rgba.props, function( _key, prop ) {
273
+ rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
274
+ } );
275
+ return this;
276
+ }
277
+
278
+ if ( type === "object" ) {
279
+ if ( red instanceof color ) {
280
+ each( spaces, function( _spaceName, space ) {
281
+ if ( red[ space.cache ] ) {
282
+ inst[ space.cache ] = red[ space.cache ].slice();
283
+ }
284
+ } );
285
+ } else {
286
+ each( spaces, function( _spaceName, space ) {
287
+ var cache = space.cache;
288
+ each( space.props, function( key, prop ) {
289
+
290
+ // if the cache doesn't exist, and we know how to convert
291
+ if ( !inst[ cache ] && space.to ) {
292
+
293
+ // if the value was null, we don't need to copy it
294
+ // if the key was alpha, we don't need to copy it either
295
+ if ( key === "alpha" || red[ key ] == null ) {
296
+ return;
297
+ }
298
+ inst[ cache ] = space.to( inst._rgba );
299
+ }
300
+
301
+ // this is the only case where we allow nulls for ALL properties.
302
+ // call clamp with alwaysAllowEmpty
303
+ inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
304
+ } );
305
+
306
+ // everything defined but alpha?
307
+ if ( inst[ cache ] && jQuery.inArray(
308
+ null,
309
+ inst[ cache ].slice( 0, 3 )
310
+ ) < 0 ) {
311
+
312
+ // use the default of 1
313
+ if ( inst[ cache ][ 3 ] == null ) {
314
+ inst[ cache ][ 3 ] = 1;
315
+ }
316
+
317
+ if ( space.from ) {
318
+ inst._rgba = space.from( inst[ cache ] );
319
+ }
320
+ }
321
+ } );
322
+ }
323
+ return this;
324
+ }
325
+ },
326
+ is: function( compare ) {
327
+ var is = color( compare ),
328
+ same = true,
329
+ inst = this;
330
+
331
+ each( spaces, function( _, space ) {
332
+ var localCache,
333
+ isCache = is[ space.cache ];
334
+ if ( isCache ) {
335
+ localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
336
+ each( space.props, function( _, prop ) {
337
+ if ( isCache[ prop.idx ] != null ) {
338
+ same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
339
+ return same;
340
+ }
341
+ } );
342
+ }
343
+ return same;
344
+ } );
345
+ return same;
346
+ },
347
+ _space: function() {
348
+ var used = [],
349
+ inst = this;
350
+ each( spaces, function( spaceName, space ) {
351
+ if ( inst[ space.cache ] ) {
352
+ used.push( spaceName );
353
+ }
354
+ } );
355
+ return used.pop();
356
+ },
357
+ transition: function( other, distance ) {
358
+ var end = color( other ),
359
+ spaceName = end._space(),
360
+ space = spaces[ spaceName ],
361
+ startColor = this.alpha() === 0 ? color( "transparent" ) : this,
362
+ start = startColor[ space.cache ] || space.to( startColor._rgba ),
363
+ result = start.slice();
364
+
365
+ end = end[ space.cache ];
366
+ each( space.props, function( _key, prop ) {
367
+ var index = prop.idx,
368
+ startValue = start[ index ],
369
+ endValue = end[ index ],
370
+ type = propTypes[ prop.type ] || {};
371
+
372
+ // if null, don't override start value
373
+ if ( endValue === null ) {
374
+ return;
375
+ }
376
+
377
+ // if null - use end
378
+ if ( startValue === null ) {
379
+ result[ index ] = endValue;
380
+ } else {
381
+ if ( type.mod ) {
382
+ if ( endValue - startValue > type.mod / 2 ) {
383
+ startValue += type.mod;
384
+ } else if ( startValue - endValue > type.mod / 2 ) {
385
+ startValue -= type.mod;
386
+ }
387
+ }
388
+ result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
389
+ }
390
+ } );
391
+ return this[ spaceName ]( result );
392
+ },
393
+ blend: function( opaque ) {
394
+
395
+ // if we are already opaque - return ourself
396
+ if ( this._rgba[ 3 ] === 1 ) {
397
+ return this;
398
+ }
399
+
400
+ var rgb = this._rgba.slice(),
401
+ a = rgb.pop(),
402
+ blend = color( opaque )._rgba;
403
+
404
+ return color( jQuery.map( rgb, function( v, i ) {
405
+ return ( 1 - a ) * blend[ i ] + a * v;
406
+ } ) );
407
+ },
408
+ toRgbaString: function() {
409
+ var prefix = "rgba(",
410
+ rgba = jQuery.map( this._rgba, function( v, i ) {
411
+ if ( v != null ) {
412
+ return v;
413
+ }
414
+ return i > 2 ? 1 : 0;
415
+ } );
416
+
417
+ if ( rgba[ 3 ] === 1 ) {
418
+ rgba.pop();
419
+ prefix = "rgb(";
420
+ }
421
+
422
+ return prefix + rgba.join( ", " ) + ")";
423
+ },
424
+ toHslaString: function() {
425
+ var prefix = "hsla(",
426
+ hsla = jQuery.map( this.hsla(), function( v, i ) {
427
+ if ( v == null ) {
428
+ v = i > 2 ? 1 : 0;
429
+ }
430
+
431
+ // catch 1 and 2
432
+ if ( i && i < 3 ) {
433
+ v = Math.round( v * 100 ) + "%";
434
+ }
435
+ return v;
436
+ } );
437
+
438
+ if ( hsla[ 3 ] === 1 ) {
439
+ hsla.pop();
440
+ prefix = "hsl(";
441
+ }
442
+ return prefix + hsla.join( ", " ) + ")";
443
+ },
444
+ toHexString: function( includeAlpha ) {
445
+ var rgba = this._rgba.slice(),
446
+ alpha = rgba.pop();
447
+
448
+ if ( includeAlpha ) {
449
+ rgba.push( ~~( alpha * 255 ) );
450
+ }
451
+
452
+ return "#" + jQuery.map( rgba, function( v ) {
453
+
454
+ // default to 0 when nulls exist
455
+ return ( "0" + ( v || 0 ).toString( 16 ) ).substr( -2 );
456
+ } ).join( "" );
457
+ },
458
+ toString: function() {
459
+ return this.toRgbaString();
460
+ }
461
+ } );
462
+ color.fn.parse.prototype = color.fn;
463
+
464
+ // hsla conversions adapted from:
465
+ // https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
466
+
467
+ function hue2rgb( p, q, h ) {
468
+ h = ( h + 1 ) % 1;
469
+ if ( h * 6 < 1 ) {
470
+ return p + ( q - p ) * h * 6;
471
+ }
472
+ if ( h * 2 < 1 ) {
473
+ return q;
474
+ }
475
+ if ( h * 3 < 2 ) {
476
+ return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
477
+ }
478
+ return p;
479
+ }
480
+
481
+ spaces.hsla.to = function( rgba ) {
482
+ if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
483
+ return [ null, null, null, rgba[ 3 ] ];
484
+ }
485
+ var r = rgba[ 0 ] / 255,
486
+ g = rgba[ 1 ] / 255,
487
+ b = rgba[ 2 ] / 255,
488
+ a = rgba[ 3 ],
489
+ max = Math.max( r, g, b ),
490
+ min = Math.min( r, g, b ),
491
+ diff = max - min,
492
+ add = max + min,
493
+ l = add * 0.5,
494
+ h, s;
495
+
496
+ if ( min === max ) {
497
+ h = 0;
498
+ } else if ( r === max ) {
499
+ h = ( 60 * ( g - b ) / diff ) + 360;
500
+ } else if ( g === max ) {
501
+ h = ( 60 * ( b - r ) / diff ) + 120;
502
+ } else {
503
+ h = ( 60 * ( r - g ) / diff ) + 240;
504
+ }
505
+
506
+ // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
507
+ // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
508
+ if ( diff === 0 ) {
509
+ s = 0;
510
+ } else if ( l <= 0.5 ) {
511
+ s = diff / add;
512
+ } else {
513
+ s = diff / ( 2 - add );
514
+ }
515
+ return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
516
+ };
517
+
518
+ spaces.hsla.from = function( hsla ) {
519
+ if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
520
+ return [ null, null, null, hsla[ 3 ] ];
521
+ }
522
+ var h = hsla[ 0 ] / 360,
523
+ s = hsla[ 1 ],
524
+ l = hsla[ 2 ],
525
+ a = hsla[ 3 ],
526
+ q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
527
+ p = 2 * l - q;
528
+
529
+ return [
530
+ Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
531
+ Math.round( hue2rgb( p, q, h ) * 255 ),
532
+ Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
533
+ a
534
+ ];
535
+ };
536
+
537
+
538
+ each( spaces, function( spaceName, space ) {
539
+ var props = space.props,
540
+ cache = space.cache,
541
+ to = space.to,
542
+ from = space.from;
543
+
544
+ // makes rgba() and hsla()
545
+ color.fn[ spaceName ] = function( value ) {
546
+
547
+ // generate a cache for this space if it doesn't exist
548
+ if ( to && !this[ cache ] ) {
549
+ this[ cache ] = to( this._rgba );
550
+ }
551
+ if ( value === undefined ) {
552
+ return this[ cache ].slice();
553
+ }
554
+
555
+ var ret,
556
+ type = getType( value ),
557
+ arr = ( type === "array" || type === "object" ) ? value : arguments,
558
+ local = this[ cache ].slice();
559
+
560
+ each( props, function( key, prop ) {
561
+ var val = arr[ type === "object" ? key : prop.idx ];
562
+ if ( val == null ) {
563
+ val = local[ prop.idx ];
564
+ }
565
+ local[ prop.idx ] = clamp( val, prop );
566
+ } );
567
+
568
+ if ( from ) {
569
+ ret = color( from( local ) );
570
+ ret[ cache ] = local;
571
+ return ret;
572
+ } else {
573
+ return color( local );
574
+ }
575
+ };
576
+
577
+ // makes red() green() blue() alpha() hue() saturation() lightness()
578
+ each( props, function( key, prop ) {
579
+
580
+ // alpha is included in more than one space
581
+ if ( color.fn[ key ] ) {
582
+ return;
583
+ }
584
+ color.fn[ key ] = function( value ) {
585
+ var local, cur, match, fn,
586
+ vtype = getType( value );
587
+
588
+ if ( key === "alpha" ) {
589
+ fn = this._hsla ? "hsla" : "rgba";
590
+ } else {
591
+ fn = spaceName;
592
+ }
593
+ local = this[ fn ]();
594
+ cur = local[ prop.idx ];
595
+
596
+ if ( vtype === "undefined" ) {
597
+ return cur;
598
+ }
599
+
600
+ if ( vtype === "function" ) {
601
+ value = value.call( this, cur );
602
+ vtype = getType( value );
603
+ }
604
+ if ( value == null && prop.empty ) {
605
+ return this;
606
+ }
607
+ if ( vtype === "string" ) {
608
+ match = rplusequals.exec( value );
609
+ if ( match ) {
610
+ value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
611
+ }
612
+ }
613
+ local[ prop.idx ] = value;
614
+ return this[ fn ]( local );
615
+ };
616
+ } );
617
+ } );
618
+
619
+ // add cssHook and .fx.step function for each named hook.
620
+ // accept a space separated string of properties
621
+ color.hook = function( hook ) {
622
+ var hooks = hook.split( " " );
623
+ each( hooks, function( _i, hook ) {
624
+ jQuery.cssHooks[ hook ] = {
625
+ set: function( elem, value ) {
626
+ var parsed;
627
+
628
+ if ( value !== "transparent" &&
629
+ ( getType( value ) !== "string" ||
630
+ ( parsed = stringParse( value ) ) ) ) {
631
+ value = color( parsed || value );
632
+ value = value.toRgbaString();
633
+ }
634
+ elem.style[ hook ] = value;
635
+ }
636
+ };
637
+ jQuery.fx.step[ hook ] = function( fx ) {
638
+ if ( !fx.colorInit ) {
639
+ fx.start = color( fx.elem, hook );
640
+ fx.end = color( fx.end );
641
+ fx.colorInit = true;
642
+ }
643
+ jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
644
+ };
645
+ } );
646
+
647
+ };
648
+
649
+ color.hook( stepHooks );
650
+
651
+ jQuery.cssHooks.borderColor = {
652
+ expand: function( value ) {
653
+ var expanded = {};
654
+
655
+ each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
656
+ expanded[ "border" + part + "Color" ] = value;
657
+ } );
658
+ return expanded;
659
+ }
660
+ };
661
+
662
+ // Basic color names only.
663
+ // Usage of any of the other color names requires adding yourself or including
664
+ // jquery.color.svg-names.js.
665
+ colors = jQuery.Color.names = {
666
+
667
+ // 4.1. Basic color keywords
668
+ aqua: "#00ffff",
669
+ black: "#000000",
670
+ blue: "#0000ff",
671
+ fuchsia: "#ff00ff",
672
+ gray: "#808080",
673
+ green: "#008000",
674
+ lime: "#00ff00",
675
+ maroon: "#800000",
676
+ navy: "#000080",
677
+ olive: "#808000",
678
+ purple: "#800080",
679
+ red: "#ff0000",
680
+ silver: "#c0c0c0",
681
+ teal: "#008080",
682
+ white: "#ffffff",
683
+ yellow: "#ffff00",
684
+
685
+ // 4.2.3. "transparent" color keyword
686
+ transparent: [ null, null, null, 0 ],
687
+
688
+ _default: "#ffffff"
689
+ };
690
+
691
+ } );
@@ -1,4 +1,6 @@
1
1
  ( function( factory ) {
2
+ "use strict";
3
+
2
4
  if ( typeof define === "function" && define.amd ) {
3
5
 
4
6
  // AMD. Register as an anonymous module.
@@ -8,10 +10,11 @@
8
10
  // Browser globals
9
11
  factory( jQuery );
10
12
  }
11
- } ( function( $ ) {
13
+ } )( function( $ ) {
14
+ "use strict";
12
15
 
13
16
  $.ui = $.ui || {};
14
17
 
15
- return $.ui.version = "1.12.1";
18
+ return $.ui.version = "1.14.1";
16
19
 
17
- } ) );
20
+ } );