-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve addon and bring it to latest standards
- Loading branch information
Showing
8 changed files
with
163 additions
and
157 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
@import 'ember-floating-labels/variables'; | ||
|
||
.floating-label { | ||
position: relative; | ||
input, | ||
select { | ||
padding: 0.94em 12px; | ||
} | ||
|
||
select { | ||
padding-right: 16px; | ||
-webkit-appearance:none; | ||
-moz-appearance:none; | ||
} | ||
|
||
&.has-focus, | ||
&.has-content { | ||
input, textarea { | ||
padding-top: 1.5em; | ||
padding-bottom: 0.38em; | ||
} | ||
select { | ||
padding-top: 0.7em; | ||
padding-bottom: 0; | ||
&.input-lg { | ||
padding-top: 0.4em; | ||
} | ||
} | ||
.control-label { | ||
top: 5px; | ||
margin-top: 0; | ||
opacity: 1; | ||
transform: perspective(1px) scale(.75); | ||
} | ||
} | ||
.control-label { | ||
position: absolute; | ||
z-index: 1; | ||
top: 50%; | ||
left: 14px; | ||
margin-top: -7px; | ||
font-size: 14px; | ||
line-height: 14px; | ||
font-weight: normal; | ||
transition: all 450ms cubic-bezier(.23, 1, .32, 1) 0ms; | ||
transform: translate3d(0, 0, 0) scale(1); | ||
transform-origin: left top 0; | ||
pointer-events: none; | ||
opacity: 0.6; | ||
.floating-label-textarea & { | ||
top: 12px; | ||
margin-top: 0; | ||
} | ||
} | ||
.form-control::placeholder { | ||
opacity: 0; | ||
transition: all 350ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; | ||
} | ||
&.is-disabled .form-control::placeholder, | ||
.form-control:focus::placeholder { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
/* only show custom indicator arrow in webkit/firefox */ | ||
@media screen and (-webkit-min-device-pixel-ratio:0) { | ||
.floating-label-select:after { | ||
content: " "; | ||
position: absolute; | ||
display: inline-block; | ||
width: 0; | ||
height: 0; | ||
top: 0; | ||
bottom: 0; | ||
right: 8px; | ||
margin: auto; | ||
border-style: solid; | ||
border-width: 7px 4px 0 4px; | ||
border-color: #ccc transparent transparent transparent; | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
@-moz-document url-prefix() { | ||
.floating-label-select:after { | ||
content: " "; | ||
position: absolute; | ||
display: inline-block; | ||
width: 0; | ||
height: 0; | ||
top: 0; | ||
bottom: 0; | ||
right: 8px; | ||
margin: auto; | ||
border-style: solid; | ||
border-width: 7px 4px 0 4px; | ||
border-color: #ccc transparent transparent transparent; | ||
pointer-events: none; | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
name: require('./package').name, | ||
included: function(/* app */) { | ||
this._super.included.apply(this, arguments); | ||
} | ||
name: 'ember-floating-labels', | ||
included: function(/* app */) { | ||
this._super.included.apply(this, arguments); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import Ember from 'ember'; | ||
import EmberObject from '@ember/object'; | ||
import FlInputActionsMixin from 'fl-input/mixins/fl-input-actions'; | ||
import { module, test } from 'qunit'; | ||
|
||
module('Unit | Mixin | fl input actions'); | ||
|
||
// Replace this with your real tests. | ||
test('it works', function(assert) { | ||
let FlInputActionsObject = Ember.Object.extend(FlInputActionsMixin); | ||
let FlInputActionsObject = EmberObject.extend(FlInputActionsMixin); | ||
let subject = FlInputActionsObject.create(); | ||
assert.ok(subject); | ||
}); |
Oops, something went wrong.