express_admin 1.7.5 → 1.7.7

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 (177) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/express_admin/components/command_button.js.coffee +25 -0
  3. data/app/assets/stylesheets/express_admin/components/_command_button.sass +6 -1
  4. data/app/assets/stylesheets/express_admin/globals/_variables.sass +2 -0
  5. data/app/assets/stylesheets/express_admin/plugins/_select2.sass +3 -0
  6. data/app/assets/stylesheets/express_admin/screen.sass +0 -2
  7. data/app/assets/stylesheets/express_admin/shared/_tables.sass +2 -0
  8. data/app/components/express_admin/command_button.rb +9 -3
  9. data/app/components/express_admin/definition_table.rb +1 -1
  10. data/app/components/express_admin/smart_table.rb +6 -0
  11. data/app/views/layouts/devise.html.erb +19 -0
  12. data/config/initializers/postgresql_trigram.rb +13 -0
  13. data/db/migrate/20150928044202_install_trigram.rb +18 -0
  14. data/lib/express_admin/engine.rb +4 -2
  15. data/lib/express_admin/search.rb +51 -0
  16. data/lib/express_admin/standard_actions.rb +18 -5
  17. data/lib/express_admin/version.rb +1 -1
  18. data/test/dummy/db/test.sqlite3 +0 -0
  19. data/test/dummy/test/components/command_button_test.rb +2 -2
  20. metadata +22 -160
  21. data/app/assets/stylesheets/express_admin/shared/_buttons.sass +0 -3
  22. data/app/assets/stylesheets/express_admin/shared/_tabs.sass +0 -25
  23. data/vendor/gems/express_templates/CHANGELOG.md +0 -12
  24. data/vendor/gems/express_templates/Gemfile +0 -16
  25. data/vendor/gems/express_templates/LICENSE +0 -21
  26. data/vendor/gems/express_templates/README.md +0 -133
  27. data/vendor/gems/express_templates/Rakefile +0 -32
  28. data/vendor/gems/express_templates/express_templates.gemspec +0 -32
  29. data/vendor/gems/express_templates/lib/arbre/patches.rb +0 -76
  30. data/vendor/gems/express_templates/lib/core_extensions/proc.rb +0 -103
  31. data/vendor/gems/express_templates/lib/core_extensions/string.rb +0 -25
  32. data/vendor/gems/express_templates/lib/express_templates/compiler.rb +0 -22
  33. data/vendor/gems/express_templates/lib/express_templates/components/all.rb +0 -28
  34. data/vendor/gems/express_templates/lib/express_templates/components/base.rb +0 -156
  35. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/resourceful.rb +0 -213
  36. data/vendor/gems/express_templates/lib/express_templates/components/configurable.rb +0 -181
  37. data/vendor/gems/express_templates/lib/express_templates/components/container.rb +0 -45
  38. data/vendor/gems/express_templates/lib/express_templates/components/forms/basic_fields.rb +0 -52
  39. data/vendor/gems/express_templates/lib/express_templates/components/forms/checkbox.rb +0 -37
  40. data/vendor/gems/express_templates/lib/express_templates/components/forms/express_form.rb +0 -48
  41. data/vendor/gems/express_templates/lib/express_templates/components/forms/form_component.rb +0 -88
  42. data/vendor/gems/express_templates/lib/express_templates/components/forms/option_support.rb +0 -69
  43. data/vendor/gems/express_templates/lib/express_templates/components/forms/radio.rb +0 -65
  44. data/vendor/gems/express_templates/lib/express_templates/components/forms/select.rb +0 -126
  45. data/vendor/gems/express_templates/lib/express_templates/components/forms/select_collection.rb +0 -45
  46. data/vendor/gems/express_templates/lib/express_templates/components/forms/submit.rb +0 -30
  47. data/vendor/gems/express_templates/lib/express_templates/components/forms.rb +0 -16
  48. data/vendor/gems/express_templates/lib/express_templates/components/tree_for.rb +0 -88
  49. data/vendor/gems/express_templates/lib/express_templates/components.rb +0 -11
  50. data/vendor/gems/express_templates/lib/express_templates/indenter.rb +0 -47
  51. data/vendor/gems/express_templates/lib/express_templates/interpolator.rb +0 -36
  52. data/vendor/gems/express_templates/lib/express_templates/renderer.rb +0 -9
  53. data/vendor/gems/express_templates/lib/express_templates/template/handler.rb +0 -32
  54. data/vendor/gems/express_templates/lib/express_templates/version.rb +0 -3
  55. data/vendor/gems/express_templates/lib/express_templates.rb +0 -18
  56. data/vendor/gems/express_templates/lib/tasks/express_templates.rake +0 -4
  57. data/vendor/gems/express_templates/test/compiler_test.rb +0 -9
  58. data/vendor/gems/express_templates/test/components/base_test.rb +0 -67
  59. data/vendor/gems/express_templates/test/components/capabilities/resourceful_test.rb +0 -63
  60. data/vendor/gems/express_templates/test/components/configurable_test.rb +0 -140
  61. data/vendor/gems/express_templates/test/components/forms/basic_fields_test.rb +0 -158
  62. data/vendor/gems/express_templates/test/components/forms/checkbox_test.rb +0 -51
  63. data/vendor/gems/express_templates/test/components/forms/express_form_test.rb +0 -62
  64. data/vendor/gems/express_templates/test/components/forms/radio_test.rb +0 -112
  65. data/vendor/gems/express_templates/test/components/forms/select_test.rb +0 -129
  66. data/vendor/gems/express_templates/test/components/forms/submit_test.rb +0 -36
  67. data/vendor/gems/express_templates/test/components/tree_for_test.rb +0 -70
  68. data/vendor/gems/express_templates/test/core_extensions/proc_test.rb +0 -90
  69. data/vendor/gems/express_templates/test/core_extensions/string_test.rb +0 -20
  70. data/vendor/gems/express_templates/test/dummy/Rakefile +0 -6
  71. data/vendor/gems/express_templates/test/dummy/app/assets/javascripts/application.js +0 -13
  72. data/vendor/gems/express_templates/test/dummy/app/assets/stylesheets/application.css +0 -15
  73. data/vendor/gems/express_templates/test/dummy/app/controllers/application_controller.rb +0 -5
  74. data/vendor/gems/express_templates/test/dummy/app/controllers/hello_controller.rb +0 -5
  75. data/vendor/gems/express_templates/test/dummy/app/helpers/application_helper.rb +0 -2
  76. data/vendor/gems/express_templates/test/dummy/app/views/hello/show.html.et +0 -6
  77. data/vendor/gems/express_templates/test/dummy/app/views/layouts/application.html.et +0 -15
  78. data/vendor/gems/express_templates/test/dummy/bin/bundle +0 -3
  79. data/vendor/gems/express_templates/test/dummy/bin/rails +0 -4
  80. data/vendor/gems/express_templates/test/dummy/bin/rake +0 -4
  81. data/vendor/gems/express_templates/test/dummy/config/application.rb +0 -26
  82. data/vendor/gems/express_templates/test/dummy/config/boot.rb +0 -5
  83. data/vendor/gems/express_templates/test/dummy/config/environment.rb +0 -5
  84. data/vendor/gems/express_templates/test/dummy/config/environments/development.rb +0 -37
  85. data/vendor/gems/express_templates/test/dummy/config/environments/production.rb +0 -82
  86. data/vendor/gems/express_templates/test/dummy/config/environments/test.rb +0 -40
  87. data/vendor/gems/express_templates/test/dummy/config/initializers/assets.rb +0 -8
  88. data/vendor/gems/express_templates/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  89. data/vendor/gems/express_templates/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  90. data/vendor/gems/express_templates/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  91. data/vendor/gems/express_templates/test/dummy/config/initializers/inflections.rb +0 -16
  92. data/vendor/gems/express_templates/test/dummy/config/initializers/mime_types.rb +0 -4
  93. data/vendor/gems/express_templates/test/dummy/config/initializers/session_store.rb +0 -3
  94. data/vendor/gems/express_templates/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  95. data/vendor/gems/express_templates/test/dummy/config/locales/en.yml +0 -23
  96. data/vendor/gems/express_templates/test/dummy/config/routes.rb +0 -4
  97. data/vendor/gems/express_templates/test/dummy/config/secrets.yml +0 -22
  98. data/vendor/gems/express_templates/test/dummy/config.ru +0 -4
  99. data/vendor/gems/express_templates/test/dummy/public/404.html +0 -67
  100. data/vendor/gems/express_templates/test/dummy/public/422.html +0 -67
  101. data/vendor/gems/express_templates/test/dummy/public/500.html +0 -66
  102. data/vendor/gems/express_templates/test/dummy/public/favicon.ico +0 -0
  103. data/vendor/gems/express_templates/test/dummy/test/controllers/hello_controller_test.rb +0 -14
  104. data/vendor/gems/express_templates/test/dummy/test/helpers/hello_helper_test.rb +0 -4
  105. data/vendor/gems/express_templates/test/express_templates_test.rb +0 -23
  106. data/vendor/gems/express_templates/test/handler_test.rb +0 -148
  107. data/vendor/gems/express_templates/test/indenter_test.rb +0 -27
  108. data/vendor/gems/express_templates/test/interpolator_test.rb +0 -80
  109. data/vendor/gems/express_templates/test/performance_test.rb +0 -97
  110. data/vendor/gems/express_templates/test/test_helper.rb +0 -178
  111. data/vendor/gems/foundation_apps_styles/Gemfile +0 -4
  112. data/vendor/gems/foundation_apps_styles/LICENSE.txt +0 -21
  113. data/vendor/gems/foundation_apps_styles/README.md +0 -41
  114. data/vendor/gems/foundation_apps_styles/Rakefile +0 -13
  115. data/vendor/gems/foundation_apps_styles/bin/console +0 -14
  116. data/vendor/gems/foundation_apps_styles/bin/setup +0 -7
  117. data/vendor/gems/foundation_apps_styles/foundation_apps_styles.gemspec +0 -24
  118. data/vendor/gems/foundation_apps_styles/lib/foundation_apps_styles/version.rb +0 -3
  119. data/vendor/gems/foundation_apps_styles/lib/foundation_apps_styles.rb +0 -6
  120. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/account.svg +0 -44
  121. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/action.svg +0 -38
  122. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/ban.svg +0 -17
  123. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/bell.svg +0 -22
  124. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/bookmark.svg +0 -14
  125. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/cart.svg +0 -35
  126. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/chevron.svg +0 -28
  127. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/circle-check.svg +0 -25
  128. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/circle-x.svg +0 -25
  129. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/cog.svg +0 -17
  130. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/comment-square.svg +0 -14
  131. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/dashboard.svg +0 -38
  132. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/document.svg +0 -28
  133. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/envelope.svg +0 -44
  134. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/flag.svg +0 -24
  135. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/home.svg +0 -28
  136. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/lock.svg +0 -55
  137. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/magnifying-glass.svg +0 -26
  138. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/person.svg +0 -62
  139. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/reload.svg +0 -19
  140. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/share-boxed.svg +0 -17
  141. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/star.svg +0 -14
  142. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/thumb.svg +0 -38
  143. data/vendor/gems/foundation_apps_styles/vendor/assets/iconic/zoom.svg +0 -56
  144. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/_global.scss +0 -131
  145. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/_includes.scss +0 -33
  146. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/_settings.scss +0 -614
  147. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_accordion.scss +0 -72
  148. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_action-sheet.scss +0 -265
  149. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_block-list.scss +0 -360
  150. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_button-group.scss +0 -197
  151. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_button.scss +0 -205
  152. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_card.scss +0 -93
  153. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_extras.scss +0 -54
  154. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_forms.scss +0 -460
  155. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_grid.scss +0 -422
  156. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_iconic.scss +0 -95
  157. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_label.scss +0 -134
  158. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_list.scss +0 -19
  159. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_menu-bar.scss +0 -382
  160. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_modal.scss +0 -129
  161. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_motion.scss +0 -525
  162. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_notification.scss +0 -207
  163. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_off-canvas.scss +0 -169
  164. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_panel.scss +0 -134
  165. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_popup.scss +0 -68
  166. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_switch.scss +0 -134
  167. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_tabs.scss +0 -100
  168. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_title-bar.scss +0 -135
  169. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_typography.scss +0 -345
  170. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/components/_utilities.scss +0 -160
  171. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/foundation-apps.css +0 -6146
  172. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/foundation.scss +0 -50
  173. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/helpers/_breakpoints.scss +0 -154
  174. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/helpers/_functions.scss +0 -343
  175. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/helpers/_images.scss +0 -19
  176. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/helpers/_mixins.scss +0 -123
  177. data/vendor/gems/foundation_apps_styles/vendor/assets/stylesheets/vendor/_normalize.scss +0 -424
@@ -1,525 +0,0 @@
1
- // FOUNDATION MOTION UI
2
- // Table of Contents
3
- //
4
- // 0. Variables
5
- // 1. Base Transitions
6
- // a. Slide
7
- // b. Fade
8
- // c. Hinge
9
- // d. Scale
10
- // e. Spin
11
- // 2. Base Animations
12
- // a. Shake
13
- // b. Spinners
14
- // c. Wiggle
15
- // 3. HTML Attributes
16
-
17
- // 0. Variables
18
- // - - - - - - - - - - - - - - - - - - - - - - - - -
19
-
20
- /// @Foundation.settings
21
- // Motion UI
22
- // Classes to use when triggering in/out animations
23
- $motion-class: (
24
- in: "ng-enter",
25
- out: "ng-leave",
26
- ) !default;
27
- $motion-class-active: (
28
- in: "ng-enter-active",
29
- out: "ng-leave-active",
30
- ) !default;
31
- $motion-class-stagger: (
32
- in: "ng-enter-stagger",
33
- out: "ng-leave-stagger",
34
- ) !default;
35
- $motion-class-showhide: (
36
- in: "ng-hide-remove",
37
- out: "ng-hide-add",
38
- );
39
- $motion-class-showhide-active: (
40
- in: "ng-hide-remove-active",
41
- out: "ng-hide-add-active",
42
- );
43
-
44
- // Set if movement-based transitions should also fade the element in and out
45
- $motion-slide-and-fade: false !default;
46
- $motion-hinge-and-fade: true !default;
47
- $motion-scale-and-fade: true !default;
48
- $motion-spin-and-fade: true !default;
49
-
50
- // Default speed for transitions and animations
51
- $motion-duration-default: 500ms !default;
52
-
53
- // Slow and fast modifiders
54
- $motion-duration-slow: 750ms !default;
55
- $motion-duration-fast: 250ms !default;
56
- $motion-stagger-duration-default: 150ms !default;
57
- $motion-stagger-duration-short: 50ms !default;
58
- $motion-stagger-duration-long: 300ms !default;
59
-
60
- // Default timing function for transitions and animations
61
- $motion-timing-default: ease !default;
62
-
63
- // Built-in and custom easing functions
64
- // Every item in this map becomes a CSS class
65
- $motion-timings: (
66
- linear: linear,
67
- ease: ease,
68
- easeIn: ease-in,
69
- easeOut: ease-out,
70
- easeInOut: ease-in-out,
71
- bounceIn: cubic-bezier(0.485, 0.155, 0.240, 1.245),
72
- bounceOut: cubic-bezier(0.485, 0.155, 0.515, 0.845),
73
- bounceInOut: cubic-bezier(0.760, -0.245, 0.240, 1.245),
74
- ) !default;
75
-
76
- // Default delay for all transitions and animations
77
- $motion-delay-default: 0 !default;
78
- // Short and long delay modifiers
79
- $motion-delay-short: 300ms !default;
80
- $motion-delay-long: 700ms !default;
81
- ///
82
-
83
- // Looks for a timing function in the list of presets
84
- // If none are found, returns the value as-is.
85
- @function get-timing($timing) {
86
- @if map-has-key($motion-timings, $timing) {
87
- @return map-get($motion-timings, $timing);
88
- }
89
- @else {
90
- @return $timing;
91
- }
92
- }
93
-
94
- // Applies transition settings common to all mixins
95
- @mixin transition-basics(
96
- $duration: $motion-duration-default,
97
- $timing: $motion-timing-default,
98
- $delay: $motion-delay-default
99
- ) {
100
- transition-duration: $duration;
101
- transition-timing-function: get-timing($timing);
102
- transition-delay: $delay;
103
- }
104
-
105
- // Wraps content in an enter/leave class, chained to the parent selector
106
- // Define the initial state of a transition here
107
- @mixin transition-start($dir) {
108
- $sel1: map-get($motion-class, $dir);
109
- $sel2: map-get($motion-class-showhide, $dir);
110
-
111
- &.#{$sel1},
112
- &.#{$sel2} {
113
- @content;
114
- }
115
- }
116
-
117
- // Wraps content in an enter/leave active class, chained to the matching
118
- // enter/leave class, chained to the parent selector
119
- // Define the end state of a transition here
120
- @mixin transition-end($dir) {
121
- $sel1: map-get($motion-class, $dir);
122
- $sel1A: map-get($motion-class-active, $dir);
123
-
124
- $sel2: map-get($motion-class-showhide, $dir);
125
- $sel2A: map-get($motion-class-showhide-active, $dir);
126
-
127
- &.#{$sel1}.#{$sel1A},
128
- &.#{$sel2}.#{$sel2A} {
129
- @content;
130
- }
131
- }
132
-
133
- @mixin stagger($delay-amount) {
134
- transition-delay: $delay-amount;
135
- // this is to avoid accidental CSS inheritance
136
- transition-duration:0;
137
- }
138
-
139
-
140
- // 1. Base Transitions
141
- // - - - - - - - - - - - - - - - - - - - - - - - - -
142
-
143
- // SLIDE
144
- @mixin slide (
145
- $dir: in,
146
- $from: left,
147
- $fade: $motion-slide-and-fade,
148
- $duration: $motion-duration-default,
149
- $timing: $motion-timing-default,
150
- $delay: $motion-delay-default
151
- ) {
152
- $slideDirections: (
153
- top: translateY(-100%),
154
- right: translateX(100%),
155
- bottom: translateY(100%),
156
- left: translateX(-100%),
157
- );
158
- $start: '';
159
- $end: '';
160
-
161
- @if $dir == in {
162
- $start: map-get($slideDirections, $from);
163
- $end: translateX(0) translateY(0);
164
- }
165
- @else {
166
- $start: translateX(0) translateY(0);
167
- $end: map-get($slideDirections, $from);
168
- }
169
-
170
- // CSS Output
171
- @include transition-start($dir) {
172
- @include transition-basics($duration, $timing, $delay);
173
- transition-property: transform, opacity;
174
- backface-visibility: hidden;
175
- transform: $start;
176
-
177
- @if $fade { opacity: if($dir == in, 0, 1); }
178
- }
179
- @include transition-end($dir) {
180
- transform: $end;
181
-
182
- @if $fade { opacity: if($dir == in, 1, 0); }
183
- }
184
- }
185
-
186
- // FADE
187
- @mixin fade(
188
- $dir: in,
189
- $from: 0,
190
- $to: 1,
191
- $duration: $motion-duration-default,
192
- $timing: $motion-timing-default,
193
- $delay: $motion-delay-default
194
- ) {
195
- @include transition-start($dir) {
196
- @include transition-basics($duration, $timing, $delay);
197
- transition-property: opacity;
198
- opacity: $from;
199
- }
200
- @include transition-end($dir) {
201
- opacity: $to;
202
- }
203
- }
204
-
205
- // HINGE
206
- @mixin hinge (
207
- $dir: in,
208
- $from: left,
209
- $axis: edge,
210
- $perspective: 2000px,
211
- $turn-origin: from-back,
212
- $fade: $motion-hinge-and-fade,
213
- $duration: $motion-duration-default,
214
- $timing: $motion-timing-default,
215
- $delay: $motion-delay-default
216
- ) {
217
-
218
- // Rotation directions when hinging from back vs. front
219
- $rotationAmount: 90deg;
220
- $rotationsBack: (
221
- top: rotateX($rotationAmount * -1),
222
- right: rotateY($rotationAmount * -1),
223
- bottom: rotateX($rotationAmount),
224
- left: rotateY($rotationAmount),
225
- );
226
- $rotationsFrom: (
227
- top: rotateX($rotationAmount),
228
- right: rotateY($rotationAmount),
229
- bottom: rotateX($rotationAmount * -1),
230
- left: rotateY($rotationAmount * -1),
231
- );
232
-
233
- // Rotation origin
234
- $rotation: '';
235
- @if $turn-origin == from-front {
236
- $rotation: map-get($rotationsFrom, $from);
237
- }
238
- @else if $turn-origin == from-back {
239
- $rotation: map-get($rotationsBack, $from);
240
- }
241
- @else {
242
- @warn "`$turn-origin` must be either `from-back` or `from-front`";
243
- }
244
-
245
- // Start and end state
246
- $start: '';
247
- $end: '';
248
- @if $dir == in {
249
- $start: perspective($perspective) $rotation;
250
- $end: rotate(0deg);
251
- }
252
- @else {
253
- $start: rotate(0deg);
254
- $end: perspective($perspective) $rotation;
255
- }
256
-
257
- // Turn axis
258
- $origin: '';
259
- @if $axis == edge {
260
- $origin: $from;
261
- }
262
- @else {
263
- $origin: center;
264
- }
265
-
266
- @include transition-start($dir) {
267
- @include transition-basics($duration, $timing, $delay);
268
- transition-property: transform, opacity;
269
- transform: $start;
270
- transform-origin: $origin;
271
- @if $fade { opacity: if($dir == in, 0, 1); }
272
- }
273
- @include transition-end($dir) {
274
- transform: $end;
275
- @if $fade { opacity: if($dir == in, 1, 0); }
276
- }
277
- }
278
-
279
- // SCALE
280
- @mixin scale(
281
- $dir: in,
282
- $from: 1.5,
283
- $to: 1,
284
- $fade: $motion-scale-and-fade,
285
- $duration: $motion-duration-default,
286
- $timing: $motion-timing-default,
287
- $delay: $motion-delay-default
288
- ) {
289
- @include transition-start($dir) {
290
- @include transition-basics($duration, $timing, $delay);
291
- transition-property: transform, property;
292
- transform: scale($from);
293
- @if $fade { opacity: if($dir == in, 0, 1) }
294
- }
295
- @include transition-end($dir) {
296
- transform: scale($to);
297
- @if $fade { opacity: if($dir == in, 1, 0) }
298
- }
299
- }
300
-
301
- // SPIN
302
- @mixin spin(
303
- $dir: in,
304
- $amount: 0.75turn,
305
- $ccw: false,
306
- $fade: $motion-spin-and-fade,
307
- $duration: $motion-duration-default,
308
- $timing: $motion-timing-default,
309
- $delay: $motion-delay-default
310
- ) {
311
- $amount: turn-to-deg($amount);
312
- $start: 0;
313
- $end: 0;
314
-
315
- @if $dir == in {
316
- $start: if($ccw, $amount, $amount * -1);
317
- $end: 0;
318
- }
319
- @else {
320
- $start: 0;
321
- $end: if($ccw, $amount * -1, $amount);
322
- }
323
-
324
- @include transition-start($dir) {
325
- @include transition-basics($duration, $timing, $delay);
326
- transition-property: transform, opacity;
327
- transform: rotate($start);
328
- @if $fade { opacity: if($dir == in, 0, 1); }
329
- }
330
- @include transition-end($dir) {
331
- transform: rotate($end);
332
- @if $fade { opacity: if($dir == in, 1, 0); }
333
- }
334
- }
335
-
336
-
337
- // 2. Base Animations
338
- // - - - - - - - - - - - - - - - - - - - - - - - - -
339
-
340
- // SHAKE
341
- @keyframes shake {
342
- 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% {
343
- transform: translateX(7%);
344
- }
345
- 5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% {
346
- transform: translateX(-7%);
347
- }
348
- 100% { transform: translateX(0); }
349
- }
350
-
351
- // SPINNERS
352
- @keyframes spin-cw {
353
- 0% { transform: rotate(0deg); }
354
- 100% { transform: rotate(360deg); }
355
- }
356
-
357
- @keyframes spin-ccw {
358
- 0% { transform: rotate(0deg); }
359
- 100% { transform: rotate(-360deg); }
360
- }
361
-
362
- // WIGGLE
363
- @keyframes wiggle {
364
- 40%, 50%, 60% {
365
- transform: rotate(7deg);
366
- }
367
- 35%, 45%, 55%, 65% {
368
- transform: rotate(-7deg);
369
- }
370
- 0%, 30%, 70%, 100% { transform: rotate(0); }
371
- }
372
-
373
- @mixin animation(
374
- $animation,
375
- $duration: $motion-duration-default,
376
- $timing: $motion-timing-default,
377
- $delay: $motion-delay-default,
378
- $iterations: null
379
- ) {
380
-
381
- animation-name: $animation;
382
- animation-duration: $duration;
383
- animation-timing-function: $timing;
384
-
385
- backface-visibility: hidden;
386
- transform: translate3d(0,0,0);
387
-
388
- @if $delay != null {
389
- animation-delay: $delay;
390
- }
391
- @if $iterations != null {
392
- animation-iteration-count: $iterations;
393
- }
394
-
395
- @if $animation == null {
396
- @warn "Please include an animation name";
397
- }
398
- }
399
-
400
- // 3. HTML Exports
401
- // - - - - - - - - - - - - - - - - - - - - - - - - -
402
-
403
- @include exports(motion) {
404
- /*
405
- Transitions
406
- */
407
-
408
- // Slide
409
- .slideInUp { @include slide($from: bottom); }
410
- .slideInRight { @include slide($from: left); }
411
- .slideInDown { @include slide($from: top); }
412
- .slideInLeft { @include slide($from: right); }
413
- .slideOutUp { @include slide($dir: out, $from: top); }
414
- .slideOutRight { @include slide($dir: out, $from: right); }
415
- .slideOutDown { @include slide($dir: out, $from: bottom); }
416
- .slideOutLeft { @include slide($dir: out, $from: left); }
417
-
418
- // Fade
419
- .fadeIn { @include fade(in, 0, 1); }
420
- .fadeOut { @include fade(out, 1, 0); }
421
-
422
- // Hinge
423
- .hingeInFromTop { @include hinge($dir: in, $from: top); }
424
- .hingeInFromRight { @include hinge($dir: in, $from: right); }
425
- .hingeInFromBottom { @include hinge($dir: in, $from: bottom); }
426
- .hingeInFromLeft { @include hinge($dir: in, $from: left); }
427
- .hingeInFromMiddleX { @include hinge($dir: in, $from: top, $axis: center); }
428
- .hingeInFromMiddleY { @include hinge($dir: in, $from: right, $axis: center); }
429
- .hingeOutFromTop { @include hinge($dir: out, $from: top); }
430
- .hingeOutFromRight { @include hinge($dir: out, $from: right); }
431
- .hingeOutFromBottom { @include hinge($dir: out, $from: bottom); }
432
- .hingeOutFromLeft { @include hinge($dir: out, $from: left); }
433
- .hingeOutFromMiddleX { @include hinge($dir: out, $from: top, $axis: center); }
434
- .hingeOutFromMiddleY { @include hinge($dir: out, $from: right, $axis: center); }
435
-
436
- // Scale
437
- .zoomIn { @include scale(in, 1.5, 1); }
438
- .zoomOut { @include scale(out, 0.5, 1); }
439
-
440
- // Spin
441
- .spinIn { @include spin(in, 0.75turn); }
442
- .spinOut { @include spin(out, 0.75turn); }
443
- .spinInCCW { @include spin(in, 0.75turn, true); }
444
- .spinOutCCW { @include spin(out, 0.75turn, true); }
445
-
446
- /*
447
- Transition modifiers
448
- */
449
-
450
- // Duration
451
- .slow { transition-duration: $motion-duration-slow !important; }
452
- .fast { transition-duration: $motion-duration-fast !important; }
453
-
454
- // Easing
455
- @each $easing in map-keys($motion-timings) {
456
- .#{$easing} {
457
- transition-timing-function: map-get($motion-timings, $easing) !important;
458
- }
459
- }
460
-
461
- // Delay
462
- .delay { transition-delay: $motion-delay-short !important; }
463
- .long-delay { transition-delay: $motion-delay-long !important; }
464
-
465
- /*
466
- Animations
467
- */
468
-
469
- .shake { @include animation(shake); }
470
- .spin-cw { @include animation(spin-cw); }
471
- .spin-ccw { @include animation(spin-ccw); }
472
- .wiggle { @include animation(wiggle); }
473
-
474
- /*
475
- Animation modifiers
476
- */
477
-
478
- .shake,
479
- .spin-cw,
480
- .spin-ccw,
481
- .wiggle {
482
- // Repeat
483
- &.infinite { animation-iteration-count: infinite; }
484
-
485
- // Easing
486
- @each $timing in map-keys($motion-timings) {
487
- &.#{$timing} {
488
- animation-timing-function: map-get($motion-timings, $timing) !important;
489
- }
490
- }
491
-
492
- // Duration
493
- &.slow { animation-duration: $motion-duration-slow !important; }
494
- &.fast { animation-duration: $motion-duration-fast !important; }
495
-
496
- // Delay
497
- &.delay { animation-delay: $motion-delay-short !important; }
498
- &.long-delay { animation-delay: $motion-delay-long !important; }
499
- }
500
- .stagger { @include stagger($motion-stagger-duration-default); }
501
- .stort-stagger { @include stagger($motion-stagger-duration-default); }
502
- .long-stagger { @include stagger($motion-stagger-duration-default); }
503
- }
504
-
505
- // View animation classes
506
- // - - - - - - - - - - - - - - - - - - - -
507
-
508
- // Applied to the immediate parent of the animating views
509
- .position-absolute {
510
- overflow: hidden;
511
- position: relative;
512
- }
513
-
514
- // Applied to the animating views
515
- [ui-view] {
516
- &.ng-enter-active, &.ng-leave-active {
517
- position: absolute !important;
518
- backface-visibility: hidden;
519
- -webkit-transform-style: preserve-3d;
520
- top: 0;
521
- right: 0;
522
- bottom: 0;
523
- left: 0;
524
- }
525
- }
@@ -1,207 +0,0 @@
1
- /*
2
- NOTIFICATION
3
- ------------
4
-
5
- An alert that pins to the corner of the screen when triggered by JavaScript. It can be set to disappear after a certain period of time, or to stay put until the user clicks on it. A custom action can be asigned to a notification as well.
6
-
7
- Optionally, the notifications directive can also tap into the browser's native notification support, if it exists.
8
- */
9
-
10
- /// @Foundation.settings
11
- // Notification
12
- $notification-default-position: right top !default;
13
- $notification-width: rem-calc(400) !default;
14
- $notification-offset: $global-padding !default;
15
-
16
- $notification-background: $primary-color !default;
17
- $notification-color: white !default;
18
- $notification-padding: $global-padding !default;
19
- $notification-radius: 4px !default;
20
-
21
- $notification-icon-size: 60px !default;
22
- $notification-icon-margin: $global-padding !default;
23
- $notification-icon-align: top !default;
24
-
25
- ///
26
-
27
- %notification {
28
- z-index: 1000;
29
- display: flex;
30
- position: relative;
31
- margin-top: .5rem;
32
- margin-bottom: .5rem;
33
- display: none;
34
-
35
- h1 {
36
- font-size: 1.25em;
37
- margin: 0;
38
- }
39
- p {
40
- margin: 0;
41
- }
42
-
43
- // Placeholder animation
44
- // transition: opacity 1s ease-out;
45
-
46
- &.is-active {
47
- display: flex;
48
- }
49
-
50
- .close-button {
51
- color: white;
52
- }
53
- }
54
-
55
- %notification-container {
56
- z-index: 3000;
57
- position: fixed;
58
-
59
- display: flex;
60
- flex-direction: column;
61
- }
62
-
63
- @mixin notification-layout(
64
- $x: nth($notification-default-position, 1),
65
- $y: nth($notification-default-position, 2),
66
- $size: $notification-width,
67
- $offset: $notification-offset
68
- ) {
69
- width: $size;
70
-
71
- @if $x == right {
72
- right: $offset;
73
- }
74
- @else if $x == left {
75
- left: $offset;
76
- }
77
- @else if $x == middle {
78
- left: 50%;
79
- margin-left: -($size / 2);
80
- }
81
-
82
- @if $y == top {
83
- top: $offset;
84
- }
85
- @else if $y == bottom {
86
- top: auto;
87
- bottom: $offset;
88
- }
89
-
90
- // On small screens, notifications are full width but maintain their vertical orientation
91
- @include breakpoint(small only) {
92
- width: auto;
93
- left: $offset;
94
- right: $offset;
95
- margin-left: 0;
96
- }
97
- }
98
- @mixin notification-style(
99
- $background: $notification-background,
100
- $color: $notification-color,
101
- $padding: $notification-padding,
102
- $radius: $notification-radius
103
- ) {
104
- background: $background;
105
- padding: $padding;
106
- border-radius: $radius;
107
-
108
- &, h1, h2, h3, h4, h5, h6 {
109
- color: $color;
110
- }
111
- }
112
-
113
- @mixin notification(
114
- $background: $notification-background,
115
- $color: $notification-color,
116
- $padding: $notification-padding,
117
- $radius: $notification-radius
118
- ) {
119
- @extend %notification;
120
- @include notification-style($background, $color, $padding, $radius);
121
- }
122
-
123
- @mixin notification-container(
124
- $x: nth($notification-default-position, 1),
125
- $y: nth($notification-default-position, 2),
126
- $size: $notification-width,
127
- $offset: $notification-offset
128
- ) {
129
- @extend %notification-container;
130
- @include notification-layout($x, $y, $size, $offset);
131
- }
132
-
133
- @mixin notification-icon(
134
- $size: $notification-icon-size,
135
- $margin: $notification-icon-margin,
136
- $align: $notification-icon-align
137
- ) {
138
- $alignments: (
139
- top: flex-start,
140
- middle: middle,
141
- bottom: flex-end,
142
- );
143
- flex: 0 0 $size;
144
- margin-right: $global-padding;
145
- align-self: map-get($alignments, $align);
146
-
147
- img {
148
- width: 100%;
149
- height: auto;
150
- }
151
- }
152
-
153
- /*
154
- CSS Output
155
- */
156
-
157
- @include exports(notification) {
158
- .notification {
159
- @include notification;
160
-
161
- &.success { @include notification-style($success-color) }
162
- &.warning { @include notification-style($warning-color) }
163
- &.alert { @include notification-style($alert-color) }
164
- &.dark { @include notification-style($dark-color, #fff) }
165
-
166
-
167
- }
168
-
169
- .static-notification {
170
- @include notification;
171
-
172
- position: fixed !important;
173
-
174
- &.top-right { @include notification-layout(right, top); }
175
- &.top-left { @include notification-layout(left, top); }
176
- &.top-middle { @include notification-layout(middle, top); }
177
-
178
- &.bottom-right { @include notification-layout(right, bottom); }
179
- &.bottom-left { @include notification-layout(left, bottom); }
180
- &.bottom-middle { @include notification-layout(middle, bottom); }
181
-
182
- &.success { @include notification-style($success-color) }
183
- &.warning { @include notification-style($warning-color) }
184
- &.alert { @include notification-style($alert-color) }
185
- &.dark { @include notification-style($dark-color, #fff) }
186
- }
187
-
188
- .notification-container {
189
- @include notification-container;
190
-
191
- &.top-right { @include notification-layout(right, top); }
192
- &.top-left { @include notification-layout(left, top); }
193
- &.top-middle { @include notification-layout(middle, top); }
194
-
195
- &.bottom-right { @include notification-layout(right, bottom); }
196
- &.bottom-left { @include notification-layout(left, bottom); }
197
- &.bottom-middle { @include notification-layout(middle, bottom); }
198
- }
199
-
200
- .notification-icon {
201
- @include notification-icon;
202
- }
203
- .notification-content {
204
- flex: 1;
205
- }
206
-
207
- }