fomantic-ui 2.10.0-beta.1 → 2.10.0-beta.10
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.
- package/.all-contributorsrc +9 -0
- package/.eslintrc.js +0 -10
- package/CONTRIBUTING.md +4 -1
- package/CONTRIBUTORS.md +1 -0
- package/FAQ.md +7 -2
- package/README.md +5 -9
- package/ROADMAP.md +4 -4
- package/SECURITY.md +8 -7
- package/changelog-setup.js +64 -70
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +103 -142
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +157 -210
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -2
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -2
- package/dist/components/calendar.js +314 -352
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -2
- package/dist/components/checkbox.js +85 -135
- package/dist/components/checkbox.min.css +2 -2
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +2 -4
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +1 -11
- package/dist/components/dimmer.js +61 -94
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -2
- package/dist/components/divider.min.css +2 -2
- package/dist/components/dropdown.css +30 -51
- package/dist/components/dropdown.js +736 -1055
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +85 -114
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +3809 -7617
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +2 -3
- package/dist/components/flyout.js +226 -355
- package/dist/components/flyout.min.css +2 -2
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +5 -95
- package/dist/components/form.js +335 -444
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +2 -58
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +4 -4
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -536
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -3
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -9
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +5 -9
- package/dist/components/modal.js +261 -384
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +68 -98
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -2
- package/dist/components/popup.js +198 -271
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +109 -144
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +91 -123
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +2 -9
- package/dist/components/search.js +277 -379
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +2 -7
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -2
- package/dist/components/shape.js +158 -224
- package/dist/components/shape.min.css +2 -2
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +2 -3
- package/dist/components/sidebar.js +124 -206
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +9 -25
- package/dist/components/site.js +38 -57
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +246 -329
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +70 -100
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +135 -180
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +176 -244
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +3 -37
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -3
- package/dist/components/toast.js +109 -147
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +91 -146
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +146 -224
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +3906 -8720
- package/dist/semantic.js +4397 -6155
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/assets/show-examples.js +2 -4
- package/gulpfile.js +5 -7
- package/package.json +3 -5
- package/scripts/nightly-version.js +7 -10
- package/src/README.md +3 -3
- package/src/definitions/behaviors/api.js +156 -209
- package/src/definitions/behaviors/form.js +334 -443
- package/src/definitions/behaviors/state.js +69 -99
- package/src/definitions/behaviors/visibility.js +145 -223
- package/src/definitions/collections/form.less +1 -13
- package/src/definitions/collections/grid.less +1 -61
- package/src/definitions/collections/menu.less +0 -11
- package/src/definitions/collections/table.less +1 -35
- package/src/definitions/elements/input.less +1 -61
- package/src/definitions/elements/segment.less +0 -6
- package/src/definitions/globals/site.js +37 -56
- package/src/definitions/globals/site.less +2 -18
- package/src/definitions/modules/accordion.js +102 -141
- package/src/definitions/modules/calendar.js +313 -351
- package/src/definitions/modules/checkbox.js +84 -134
- package/src/definitions/modules/dimmer.js +60 -93
- package/src/definitions/modules/dimmer.less +0 -9
- package/src/definitions/modules/dropdown.js +735 -1054
- package/src/definitions/modules/dropdown.less +31 -47
- package/src/definitions/modules/embed.js +84 -113
- package/src/definitions/modules/flyout.js +225 -354
- package/src/definitions/modules/modal.js +260 -383
- package/src/definitions/modules/modal.less +1 -1
- package/src/definitions/modules/nag.js +67 -97
- package/src/definitions/modules/popup.js +197 -270
- package/src/definitions/modules/progress.js +108 -143
- package/src/definitions/modules/rating.js +90 -122
- package/src/definitions/modules/search.js +276 -378
- package/src/definitions/modules/search.less +0 -3
- package/src/definitions/modules/shape.js +157 -223
- package/src/definitions/modules/sidebar.js +123 -205
- package/src/definitions/modules/slider.js +245 -328
- package/src/definitions/modules/slider.less +1 -1
- package/src/definitions/modules/sticky.js +134 -179
- package/src/definitions/modules/tab.js +175 -243
- package/src/definitions/modules/toast.js +108 -146
- package/src/definitions/modules/toast.less +1 -1
- package/src/definitions/modules/transition.js +90 -145
- package/src/theme.less +0 -13
- package/src/themes/basic/elements/icon.variables +1 -1
- package/src/themes/default/collections/grid.variables +0 -30
- package/src/themes/default/collections/table.variables +1 -5
- package/src/themes/default/elements/icon.variables +3 -3
- package/src/themes/default/globals/site.variables +8 -15
- package/src/themes/default/globals/variation.variables +1 -2
- package/src/themes/default/modules/dropdown.variables +1 -0
- package/src/themes/default/modules/slider.variables +1 -1
- package/src/themes/github/elements/icon.variables +1 -1
- package/src/themes/material/elements/icon.variables +1 -1
- package/tasks/README.md +1 -1
- package/tasks/admin/components/create.js +89 -122
- package/tasks/admin/components/init.js +34 -65
- package/tasks/admin/components/update.js +50 -61
- package/tasks/admin/distributions/create.js +71 -111
- package/tasks/admin/distributions/init.js +32 -63
- package/tasks/admin/distributions/update.js +49 -57
- package/tasks/admin/publish.js +1 -1
- package/tasks/admin/register.js +14 -19
- package/tasks/admin/release.js +2 -2
- package/tasks/build/assets.js +14 -18
- package/tasks/build/css.js +59 -68
- package/tasks/build/javascript.js +48 -56
- package/tasks/build.js +4 -6
- package/tasks/check-install.js +5 -8
- package/tasks/clean.js +5 -7
- package/tasks/collections/admin.js +14 -16
- package/tasks/collections/build.js +6 -8
- package/tasks/collections/docs.js +4 -6
- package/tasks/collections/install.js +2 -4
- package/tasks/collections/rtl.js +2 -4
- package/tasks/collections/various.js +2 -4
- package/tasks/config/admin/github.js +9 -19
- package/tasks/config/admin/templates/README.md +2 -2
- package/tasks/config/admin/templates/bower.json +2 -4
- package/tasks/config/admin/templates/composer.json +1 -1
- package/tasks/config/admin/templates/css-package.js +1 -4
- package/tasks/config/admin/templates/less-package.js +1 -3
- package/tasks/config/defaults.js +0 -1
- package/tasks/config/npm/gulpfile.js +4 -6
- package/tasks/config/project/config.js +27 -35
- package/tasks/config/project/install.js +64 -82
- package/tasks/config/project/release.js +7 -9
- package/tasks/config/tasks.js +10 -21
- package/tasks/config/user.js +14 -20
- package/tasks/docs/build.js +26 -31
- package/tasks/docs/metadata.js +30 -39
- package/tasks/docs/serve.js +23 -27
- package/tasks/install.js +94 -128
- package/tasks/rtl/build.js +2 -4
- package/tasks/rtl/watch.js +3 -5
- package/tasks/watch.js +13 -13
- package/test/meteor/fonts.js +1 -2
- package/test/modules/module.spec.js +16 -18
- package/types/fomantic-ui-calendar.d.ts +1 -1
- package/types/fomantic-ui-dropdown.d.ts +45 -1
- package/types/fomantic-ui-embed.d.ts +1 -1
- package/types/fomantic-ui-flyout.d.ts +1 -1
- package/types/fomantic-ui-form.d.ts +0 -7
- package/types/fomantic-ui-modal.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +12 -6
- package/types/fomantic-ui-toast.d.ts +1 -1
- package/src/themes/basic/assets/fonts/icons.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
- package/src/themes/default/assets/fonts/icons.woff +0 -0
- package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
- package/src/themes/github/assets/fonts/octicons.woff +0 -0
- package/src/themes/material/assets/fonts/icons.woff +0 -0
package/dist/components/shape.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.10+3ca268e - Shape
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -20,50 +20,46 @@
|
|
20
20
|
: globalThis;
|
21
21
|
|
22
22
|
$.fn.shape = function (parameters) {
|
23
|
-
|
24
|
-
$allModules = $(this),
|
23
|
+
let $allModules = $(this);
|
25
24
|
|
26
|
-
|
27
|
-
|
25
|
+
let time = Date.now();
|
26
|
+
let performance = [];
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
let query = arguments[0];
|
29
|
+
let methodInvoked = typeof query === 'string';
|
30
|
+
let queryArguments = [].slice.call(arguments, 1);
|
32
31
|
|
33
|
-
|
34
|
-
;
|
32
|
+
let returnedValue;
|
35
33
|
|
36
34
|
$allModules.each(function () {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
module
|
66
|
-
;
|
35
|
+
let settings = $.isPlainObject(parameters)
|
36
|
+
? $.extend(true, {}, $.fn.shape.settings, parameters)
|
37
|
+
: $.extend({}, $.fn.shape.settings);
|
38
|
+
|
39
|
+
// internal aliases
|
40
|
+
let namespace = settings.namespace;
|
41
|
+
let selector = settings.selector;
|
42
|
+
let error = settings.error;
|
43
|
+
let className = settings.className;
|
44
|
+
|
45
|
+
// define namespaces for modules
|
46
|
+
let eventNamespace = '.' + namespace;
|
47
|
+
let moduleNamespace = 'module-' + namespace;
|
48
|
+
|
49
|
+
// selector cache
|
50
|
+
let $module = $(this);
|
51
|
+
let $sides = $module.find('>' + selector.sides);
|
52
|
+
let $side = $sides.find('>' + selector.side);
|
53
|
+
|
54
|
+
// private variables
|
55
|
+
let nextIndex = false;
|
56
|
+
let $activeSide;
|
57
|
+
let $nextSide;
|
58
|
+
|
59
|
+
// standard module
|
60
|
+
let element = this;
|
61
|
+
let instance = $module.data(moduleNamespace);
|
62
|
+
let module;
|
67
63
|
|
68
64
|
module = {
|
69
65
|
|
@@ -77,16 +73,14 @@
|
|
77
73
|
module.verbose('Storing instance of module', module);
|
78
74
|
instance = module;
|
79
75
|
$module
|
80
|
-
.data(moduleNamespace, instance)
|
81
|
-
;
|
76
|
+
.data(moduleNamespace, instance);
|
82
77
|
},
|
83
78
|
|
84
79
|
destroy: function () {
|
85
80
|
module.verbose('Destroying previous module for', element);
|
86
81
|
$module
|
87
82
|
.removeData(moduleNamespace)
|
88
|
-
.off(eventNamespace)
|
89
|
-
;
|
83
|
+
.off(eventNamespace);
|
90
84
|
},
|
91
85
|
|
92
86
|
refresh: function () {
|
@@ -98,10 +92,8 @@
|
|
98
92
|
|
99
93
|
repaint: function () {
|
100
94
|
module.verbose('Forcing repaint event');
|
101
|
-
|
102
|
-
|
103
|
-
fakeAssignment = shape.offsetWidth
|
104
|
-
;
|
95
|
+
let shape = $sides[0] || document.createElement('div');
|
96
|
+
let fakeAssignment = shape.offsetWidth;
|
105
97
|
},
|
106
98
|
|
107
99
|
animate: function (propertyObject, callback) {
|
@@ -117,20 +109,16 @@
|
|
117
109
|
settings.onBeforeChange.call($nextSide[0]);
|
118
110
|
module.verbose('Starting CSS animation');
|
119
111
|
$module
|
120
|
-
.addClass(className.animating)
|
121
|
-
;
|
112
|
+
.addClass(className.animating);
|
122
113
|
$sides
|
123
114
|
.css(propertyObject)
|
124
|
-
.one('transitionend', callback)
|
125
|
-
;
|
115
|
+
.one('transitionend', callback);
|
126
116
|
module.set.duration(settings.duration);
|
127
117
|
requestAnimationFrame(function () {
|
128
118
|
$module
|
129
|
-
.addClass(className.animating)
|
130
|
-
;
|
119
|
+
.addClass(className.animating);
|
131
120
|
$activeSide
|
132
|
-
.addClass(className.hidden)
|
133
|
-
;
|
121
|
+
.addClass(className.hidden);
|
134
122
|
});
|
135
123
|
},
|
136
124
|
|
@@ -142,8 +130,7 @@
|
|
142
130
|
setTimeout(function () {
|
143
131
|
$module.shape(method);
|
144
132
|
}, 0);
|
145
|
-
})
|
146
|
-
;
|
133
|
+
});
|
147
134
|
},
|
148
135
|
|
149
136
|
reset: function () {
|
@@ -151,23 +138,19 @@
|
|
151
138
|
$module
|
152
139
|
.removeClass(className.animating)
|
153
140
|
.attr('style', '')
|
154
|
-
.removeAttr('style')
|
155
|
-
;
|
141
|
+
.removeAttr('style');
|
156
142
|
// removeAttr style does not consistently work in safari
|
157
143
|
$sides
|
158
144
|
.attr('style', '')
|
159
|
-
.removeAttr('style')
|
160
|
-
;
|
145
|
+
.removeAttr('style');
|
161
146
|
$side
|
162
147
|
.attr('style', '')
|
163
148
|
.removeAttr('style')
|
164
|
-
.removeClass(className.hidden)
|
165
|
-
;
|
149
|
+
.removeClass(className.hidden);
|
166
150
|
$nextSide
|
167
151
|
.removeClass(className.animating)
|
168
152
|
.attr('style', '')
|
169
|
-
.removeAttr('style')
|
170
|
-
;
|
153
|
+
.removeAttr('style');
|
171
154
|
},
|
172
155
|
|
173
156
|
is: {
|
@@ -204,46 +187,40 @@
|
|
204
187
|
$sides.add($side)
|
205
188
|
.css({
|
206
189
|
'transition-duration': duration,
|
207
|
-
})
|
208
|
-
;
|
190
|
+
});
|
209
191
|
}
|
210
192
|
},
|
211
193
|
|
212
194
|
currentStageSize: function () {
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
height = $activeSide.outerHeight(true)
|
217
|
-
;
|
195
|
+
let $activeSide = $side.filter('.' + className.active);
|
196
|
+
let width = $activeSide.outerWidth(true);
|
197
|
+
let height = $activeSide.outerHeight(true);
|
218
198
|
$module
|
219
199
|
.css({
|
220
200
|
width: width,
|
221
201
|
height: height,
|
222
|
-
})
|
223
|
-
;
|
202
|
+
});
|
224
203
|
},
|
225
204
|
|
226
205
|
stageSize: function () {
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
$
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
: settings.height)
|
246
|
-
;
|
206
|
+
let $clone = $module.clone().addClass(className.loading);
|
207
|
+
let $side = $clone.find('>' + selector.sides + '>' + selector.side);
|
208
|
+
let $activeSide = $side.filter('.' + className.active);
|
209
|
+
let $nextSide = nextIndex
|
210
|
+
? $side.eq(nextIndex)
|
211
|
+
: ($activeSide.next(selector.side).length > 0
|
212
|
+
? $activeSide.next(selector.side)
|
213
|
+
: $side.first());
|
214
|
+
let newWidth = settings.width === 'next'
|
215
|
+
? $nextSide.outerWidth(true)
|
216
|
+
: (settings.width === 'initial'
|
217
|
+
? $module.width()
|
218
|
+
: settings.width);
|
219
|
+
let newHeight = settings.height === 'next'
|
220
|
+
? $nextSide.outerHeight(true)
|
221
|
+
: (settings.height === 'initial'
|
222
|
+
? $module.height()
|
223
|
+
: settings.height);
|
247
224
|
$activeSide.removeClass(className.active);
|
248
225
|
$nextSide.addClass(className.active);
|
249
226
|
$clone.insertAfter($module);
|
@@ -272,11 +249,9 @@
|
|
272
249
|
active: function () {
|
273
250
|
module.verbose('Setting new side to active', $nextSide);
|
274
251
|
$side
|
275
|
-
.removeClass(className.active)
|
276
|
-
;
|
252
|
+
.removeClass(className.active);
|
277
253
|
$nextSide
|
278
|
-
.addClass(className.active)
|
279
|
-
;
|
254
|
+
.addClass(className.active);
|
280
255
|
settings.onChange.call($nextSide[0]);
|
281
256
|
module.set.defaultSide();
|
282
257
|
},
|
@@ -294,9 +269,7 @@
|
|
294
269
|
|
295
270
|
return;
|
296
271
|
}
|
297
|
-
|
298
|
-
transform = module.get.transform[type]()
|
299
|
-
;
|
272
|
+
let transform = module.get.transform[type]();
|
300
273
|
if (!module.is.animating()) {
|
301
274
|
module.debug('Flipping ' + type, $nextSide);
|
302
275
|
module.set.stageSize();
|
@@ -337,10 +310,8 @@
|
|
337
310
|
|
338
311
|
transform: {
|
339
312
|
up: function () {
|
340
|
-
|
341
|
-
|
342
|
-
translateY = $nextSide.outerHeight(true) - translateZ
|
343
|
-
;
|
313
|
+
let translateZ = $activeSide.outerHeight(true) / 2;
|
314
|
+
let translateY = $nextSide.outerHeight(true) - translateZ;
|
344
315
|
|
345
316
|
return {
|
346
317
|
transform: 'translateY(' + translateY + 'px) translateZ(-' + translateZ + 'px) rotateX(-90deg)',
|
@@ -348,11 +319,9 @@
|
|
348
319
|
},
|
349
320
|
|
350
321
|
down: function () {
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
}
|
355
|
-
;
|
322
|
+
let translate = {
|
323
|
+
z: $activeSide.outerHeight(true) / 2,
|
324
|
+
};
|
356
325
|
|
357
326
|
return {
|
358
327
|
transform: 'translateY(-' + translate.z + 'px) translateZ(-' + translate.z + 'px) rotateX(90deg)',
|
@@ -360,10 +329,8 @@
|
|
360
329
|
},
|
361
330
|
|
362
331
|
left: function () {
|
363
|
-
|
364
|
-
|
365
|
-
translateX = $nextSide.outerWidth(true) - translateZ
|
366
|
-
;
|
332
|
+
let translateZ = $activeSide.outerWidth(true) / 2;
|
333
|
+
let translateX = $nextSide.outerWidth(true) - translateZ;
|
367
334
|
|
368
335
|
return {
|
369
336
|
transform: 'translateX(' + translateX + 'px) translateZ(-' + translateZ + 'px) rotateY(90deg)',
|
@@ -371,11 +338,9 @@
|
|
371
338
|
},
|
372
339
|
|
373
340
|
right: function () {
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
}
|
378
|
-
;
|
341
|
+
let translate = {
|
342
|
+
z: $activeSide.outerWidth(true) / 2,
|
343
|
+
};
|
379
344
|
|
380
345
|
return {
|
381
346
|
transform: 'translateX(-' + translate.z + 'px) translateZ(-' + translate.z + 'px) rotateY(-90deg)',
|
@@ -383,11 +348,9 @@
|
|
383
348
|
},
|
384
349
|
|
385
350
|
over: function () {
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
}
|
390
|
-
;
|
351
|
+
let translate = {
|
352
|
+
x: -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),
|
353
|
+
};
|
391
354
|
|
392
355
|
return {
|
393
356
|
transform: 'translateX(' + translate.x + 'px) rotateY(180deg)',
|
@@ -395,11 +358,9 @@
|
|
395
358
|
},
|
396
359
|
|
397
360
|
back: function () {
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
}
|
402
|
-
;
|
361
|
+
let translate = {
|
362
|
+
x: -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),
|
363
|
+
};
|
403
364
|
|
404
365
|
return {
|
405
366
|
transform: 'translateX(' + translate.x + 'px) rotateY(-180deg)',
|
@@ -418,140 +379,120 @@
|
|
418
379
|
stage: {
|
419
380
|
|
420
381
|
above: function () {
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
}
|
429
|
-
;
|
382
|
+
let box = {
|
383
|
+
origin: ($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2,
|
384
|
+
depth: {
|
385
|
+
active: $nextSide.outerHeight(true) / 2,
|
386
|
+
next: $activeSide.outerHeight(true) / 2,
|
387
|
+
},
|
388
|
+
};
|
430
389
|
module.verbose('Setting the initial animation position as above', $nextSide, box);
|
431
390
|
$activeSide
|
432
391
|
.css({
|
433
392
|
transform: 'rotateX(0deg)',
|
434
|
-
})
|
435
|
-
;
|
393
|
+
});
|
436
394
|
$nextSide
|
437
395
|
.addClass(className.animating)
|
438
396
|
.css({
|
439
397
|
top: box.origin + 'px',
|
440
398
|
transform: 'rotateX(90deg) translateZ(' + box.depth.next + 'px) translateY(-' + box.depth.active + 'px)',
|
441
|
-
})
|
442
|
-
;
|
399
|
+
});
|
443
400
|
},
|
444
401
|
|
445
402
|
below: function () {
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
}
|
454
|
-
;
|
403
|
+
let box = {
|
404
|
+
origin: ($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2,
|
405
|
+
depth: {
|
406
|
+
active: $nextSide.outerHeight(true) / 2,
|
407
|
+
next: $activeSide.outerHeight(true) / 2,
|
408
|
+
},
|
409
|
+
};
|
455
410
|
module.verbose('Setting the initial animation position as below', $nextSide, box);
|
456
411
|
$activeSide
|
457
412
|
.css({
|
458
413
|
transform: 'rotateX(0deg)',
|
459
|
-
})
|
460
|
-
;
|
414
|
+
});
|
461
415
|
$nextSide
|
462
416
|
.addClass(className.animating)
|
463
417
|
.css({
|
464
418
|
top: box.origin + 'px',
|
465
419
|
transform: 'rotateX(-90deg) translateZ(' + box.depth.next + 'px) translateY(' + box.depth.active + 'px)',
|
466
|
-
})
|
467
|
-
;
|
420
|
+
});
|
468
421
|
},
|
469
422
|
|
470
423
|
left: function () {
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
424
|
+
let height = {
|
425
|
+
active: $activeSide.outerWidth(true),
|
426
|
+
next: $nextSide.outerWidth(true),
|
427
|
+
};
|
428
|
+
let box = {
|
429
|
+
origin: (height.active - height.next) / 2,
|
430
|
+
depth: {
|
431
|
+
active: height.next / 2,
|
432
|
+
next: height.active / 2,
|
475
433
|
},
|
476
|
-
|
477
|
-
origin: (height.active - height.next) / 2,
|
478
|
-
depth: {
|
479
|
-
active: height.next / 2,
|
480
|
-
next: height.active / 2,
|
481
|
-
},
|
482
|
-
}
|
483
|
-
;
|
434
|
+
};
|
484
435
|
module.verbose('Setting the initial animation position as left', $nextSide, box);
|
485
436
|
$activeSide
|
486
437
|
.css({
|
487
438
|
transform: 'rotateY(0deg)',
|
488
|
-
})
|
489
|
-
;
|
439
|
+
});
|
490
440
|
$nextSide
|
491
441
|
.addClass(className.animating)
|
492
442
|
.css({
|
493
443
|
left: box.origin + 'px',
|
494
444
|
transform: 'rotateY(-90deg) translateZ(' + box.depth.next + 'px) translateX(-' + box.depth.active + 'px)',
|
495
|
-
})
|
496
|
-
;
|
445
|
+
});
|
497
446
|
},
|
498
447
|
|
499
448
|
right: function () {
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
449
|
+
let height = {
|
450
|
+
active: $activeSide.outerWidth(true),
|
451
|
+
next: $nextSide.outerWidth(true),
|
452
|
+
};
|
453
|
+
let box = {
|
454
|
+
origin: (height.active - height.next) / 2,
|
455
|
+
depth: {
|
456
|
+
active: height.next / 2,
|
457
|
+
next: height.active / 2,
|
504
458
|
},
|
505
|
-
|
506
|
-
origin: (height.active - height.next) / 2,
|
507
|
-
depth: {
|
508
|
-
active: height.next / 2,
|
509
|
-
next: height.active / 2,
|
510
|
-
},
|
511
|
-
}
|
512
|
-
;
|
459
|
+
};
|
513
460
|
module.verbose('Setting the initial animation position as right', $nextSide, box);
|
514
461
|
$activeSide
|
515
462
|
.css({
|
516
463
|
transform: 'rotateY(0deg)',
|
517
|
-
})
|
518
|
-
;
|
464
|
+
});
|
519
465
|
$nextSide
|
520
466
|
.addClass(className.animating)
|
521
467
|
.css({
|
522
468
|
left: box.origin + 'px',
|
523
469
|
transform: 'rotateY(90deg) translateZ(' + box.depth.next + 'px) translateX(' + box.depth.active + 'px)',
|
524
|
-
})
|
525
|
-
;
|
470
|
+
});
|
526
471
|
},
|
527
472
|
|
528
473
|
behind: function () {
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
474
|
+
let height = {
|
475
|
+
active: $activeSide.outerWidth(true),
|
476
|
+
next: $nextSide.outerWidth(true),
|
477
|
+
};
|
478
|
+
let box = {
|
479
|
+
origin: (height.active - height.next) / 2,
|
480
|
+
depth: {
|
481
|
+
active: height.next / 2,
|
482
|
+
next: height.active / 2,
|
533
483
|
},
|
534
|
-
|
535
|
-
origin: (height.active - height.next) / 2,
|
536
|
-
depth: {
|
537
|
-
active: height.next / 2,
|
538
|
-
next: height.active / 2,
|
539
|
-
},
|
540
|
-
}
|
541
|
-
;
|
484
|
+
};
|
542
485
|
module.verbose('Setting the initial animation position as behind', $nextSide, box);
|
543
486
|
$activeSide
|
544
487
|
.css({
|
545
488
|
transform: 'rotateY(0deg)',
|
546
|
-
})
|
547
|
-
;
|
489
|
+
});
|
548
490
|
$nextSide
|
549
491
|
.addClass(className.animating)
|
550
492
|
.css({
|
551
493
|
left: box.origin + 'px',
|
552
494
|
transform: 'rotateY(-180deg)',
|
553
|
-
})
|
554
|
-
;
|
495
|
+
});
|
555
496
|
},
|
556
497
|
},
|
557
498
|
setting: function (name, value) {
|
@@ -605,11 +546,9 @@
|
|
605
546
|
},
|
606
547
|
performance: {
|
607
548
|
log: function (message) {
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
previousTime
|
612
|
-
;
|
549
|
+
let currentTime;
|
550
|
+
let executionTime;
|
551
|
+
let previousTime;
|
613
552
|
if (settings.performance) {
|
614
553
|
currentTime = Date.now();
|
615
554
|
previousTime = time || currentTime;
|
@@ -628,10 +567,8 @@
|
|
628
567
|
}, 500);
|
629
568
|
},
|
630
569
|
display: function () {
|
631
|
-
|
632
|
-
|
633
|
-
totalTime = 0
|
634
|
-
;
|
570
|
+
let title = settings.name + ':';
|
571
|
+
let totalTime = 0;
|
635
572
|
time = false;
|
636
573
|
clearTimeout(module.performance.timer);
|
637
574
|
$.each(performance, function (index, data) {
|
@@ -656,22 +593,19 @@
|
|
656
593
|
},
|
657
594
|
},
|
658
595
|
invoke: function (query, passedArguments, context) {
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
response
|
664
|
-
;
|
596
|
+
let object = instance;
|
597
|
+
let maxDepth;
|
598
|
+
let found;
|
599
|
+
let response;
|
665
600
|
passedArguments = passedArguments || queryArguments;
|
666
601
|
context = context || element;
|
667
602
|
if (typeof query === 'string' && object !== undefined) {
|
668
603
|
query = query.split(/[ .]/);
|
669
604
|
maxDepth = query.length - 1;
|
670
605
|
$.each(query, function (depth, value) {
|
671
|
-
|
606
|
+
let camelCaseValue = depth !== maxDepth
|
672
607
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
673
|
-
: query
|
674
|
-
;
|
608
|
+
: query;
|
675
609
|
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
676
610
|
object = object[camelCaseValue];
|
677
611
|
} else if (object[camelCaseValue] !== undefined) {
|
@@ -712,7 +646,7 @@
|
|
712
646
|
if (instance === undefined) {
|
713
647
|
module.initialize();
|
714
648
|
}
|
715
|
-
|
649
|
+
let $inputs = $module.find('input');
|
716
650
|
if ($inputs.length > 0) {
|
717
651
|
$inputs.trigger('blur');
|
718
652
|
setTimeout(function () {
|
@@ -767,7 +701,7 @@
|
|
767
701
|
onBeforeChange: function () {},
|
768
702
|
onChange: function () {},
|
769
703
|
|
770
|
-
// allow animation to same side
|
704
|
+
// allow animation to the same side
|
771
705
|
allowRepeats: false,
|
772
706
|
|
773
707
|
// animation duration
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.10+3ca268e - Shape
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
6
6
|
* Released under the MIT license
|
7
7
|
* https://opensource.org/licenses/MIT
|
8
8
|
*
|
9
|
-
*/.ui.shape{position:relative;vertical-align:top;display:inline-block;perspective:2000px;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out}.ui.shape .side,.ui.shape .sides{transform-style:preserve-3d}.ui.shape .side{display:none;opacity:1;width:100%;margin:0!important;-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.shape .side *{-webkit-backface-visibility:visible!important;backface-visibility:visible!important}.ui.cube.shape .side{min-width:15em;height:15em;padding:2em;background-color:#e6e6e6;color:rgba(0,0,0,.87);box-shadow:0 0 2px rgba(0,0,0,.3)}.ui.cube.shape .side>.content{width:100%;height:100%;display:table;text-align:center;-webkit-user-select:text
|
9
|
+
*/.ui.shape{position:relative;vertical-align:top;display:inline-block;perspective:2000px;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out}.ui.shape .side,.ui.shape .sides{transform-style:preserve-3d}.ui.shape .side{display:none;opacity:1;width:100%;margin:0!important;-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.shape .side *{-webkit-backface-visibility:visible!important;backface-visibility:visible!important}.ui.cube.shape .side{min-width:15em;height:15em;padding:2em;background-color:#e6e6e6;color:rgba(0,0,0,.87);box-shadow:0 0 2px rgba(0,0,0,.3)}.ui.cube.shape .side>.content{width:100%;height:100%;display:table;text-align:center;-webkit-user-select:text;user-select:text}.ui.cube.shape .side>.content>div{display:table-cell;vertical-align:middle;font-size:2em}.ui.text.shape.animating .sides{position:static}.ui.text.shape .side{white-space:nowrap}.ui.text.shape .side>*{white-space:normal}.ui.loading.shape{position:absolute;top:-9999px;left:-9999px}.ui.shape .animating.side{position:absolute;top:0;left:0;display:block;z-index:100}.ui.shape .hidden.side{opacity:.6}.ui.shape.animating .sides{position:absolute;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out}.ui.shape.animating .side{transition:opacity .6s ease-in-out}.ui.shape .animating.side *,.ui.shape.animating .side *{transition:none}.ui.shape .active.side{display:block}
|