You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2018/04/24 22:21:31 UTC
[royale-asjs] branch develop updated: refactor Jewel TextField to
TextInput, since is more appropiate, and more near to flex
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 11da0cc refactor Jewel TextField to TextInput, since is more appropiate, and more near to flex
11da0cc is described below
commit 11da0cc61655d02bda3caf13d17966787ab6f41e
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Apr 25 00:21:26 2018 +0200
refactor Jewel TextField to TextInput, since is more appropiate, and more near to flex
---
.../src/main/royale/TextInputPlayGround.mxml | 18 ++++++------
.../RemoteObjectAMFTest/src/main/royale/App.mxml | 4 +--
.../projects/Jewel/src/main/resources/defaults.css | 2 +-
.../Jewel/src/main/resources/jewel-manifest.xml | 2 +-
.../main/royale/org/apache/royale/jewel/Label.as | 2 +-
.../royale/jewel/{TextField.as => TextInput.as} | 12 ++++----
.../royale/jewel/beads/views/TextFieldView.as | 2 +-
.../royale/jewel/supportClasses/ITextField.as | 6 ++--
.../{ITextField.as => ITextInput.as} | 6 ++--
.../{TextFieldBase.as => TextInputBase.as} | 16 +++++-----
.../{_textfield.sass => _textinput.sass} | 4 +--
.../projects/Jewel/src/main/sass/defaults.sass | 2 +-
.../JewelTheme/src/main/resources/defaults.css | 12 ++++----
.../_textinput.sass} | 0
.../{_textfield.sass => _textinput.sass} | 34 +++++++++++-----------
.../_textinput.sass} | 0
.../themes/JewelTheme/src/main/sass/defaults.sass | 6 ++--
17 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
index e7538d5..c6add56 100644
--- a/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
@@ -27,41 +27,41 @@ limitations under the License.
<j:VerticalLayoutWithPaddingAndGap gap="10"/>
</js:beads>
- <html:H3 text="Jewel TextField"/>
+ <html:H3 text="Jewel TextInput"/>
<js:Group>
<js:beads>
<j:HorizontalLayoutWithPaddingAndGap gap="10"/>
</js:beads>
<j:TextButton text="Check it!" primary="true"/>
- <j:TextField text="A TextField"/>
+ <j:TextInput text="A TextInput"/>
</js:Group>
<js:Group>
<js:beads>
<j:HorizontalLayoutWithPaddingAndGap gap="10"/>
</js:beads>
- <j:TextField>
+ <j:TextInput>
<j:beads>
<js:TextPromptBead prompt="With prompt..."/>
</j:beads>
- </j:TextField>
+ </j:TextInput>
<j:TextButton text="Send" primary="true"/>
</js:Group>
- <j:TextField text="Disabled with text...">
+ <j:TextInput text="Disabled with text...">
<j:beads>
- <js:TextPromptBead prompt="Disabled Textfield..."/>
+ <js:TextPromptBead prompt="Disabled TextInput..."/>
<j:Disabled/>
</j:beads>
- </j:TextField>
+ </j:TextInput>
- <j:TextField>
+ <j:TextInput>
<j:beads>
<js:TextPromptBead prompt="Disabled with prompt..."/>
<j:Disabled/>
</j:beads>
- </j:TextField>
+ </j:TextInput>
diff --git a/examples/royale/RemoteObjectAMFTest/src/main/royale/App.mxml b/examples/royale/RemoteObjectAMFTest/src/main/royale/App.mxml
index 21c3b91..4689b12 100644
--- a/examples/royale/RemoteObjectAMFTest/src/main/royale/App.mxml
+++ b/examples/royale/RemoteObjectAMFTest/src/main/royale/App.mxml
@@ -107,11 +107,11 @@ limitations under the License.
<js:beads>
<j:HorizontalLayoutWithPaddingAndGap gap="10"/>
</js:beads>
- <j:TextField id="name_txt">
+ <j:TextInput id="name_txt">
<j:beads>
<js:TextPromptBead prompt="Name to send via AMF"/>
</j:beads>
- </j:TextField>
+ </j:TextInput>
<j:TextButton text="Send to Name" primary="true" click="sendName()"/>
</js:Group>
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index 74e327a..57a6091 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -180,7 +180,7 @@ j|Slider {
iTrackView: ClassReference("org.apache.royale.jewel.beads.views.SliderTrackView");
}
}
-j|TextField {
+j|TextInput {
IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
}
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index 02b7007..82e7691 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -25,7 +25,7 @@
<component id="Button" class="org.apache.royale.jewel.Button"/>
<component id="TextButton" class="org.apache.royale.jewel.TextButton"/>
<component id="Label" class="org.apache.royale.jewel.Label"/>
- <component id="TextField" class="org.apache.royale.jewel.TextField"/>
+ <component id="TextInput" class="org.apache.royale.jewel.TextInput"/>
<component id="Slider" class="org.apache.royale.jewel.Slider"/>
<component id="RadioButton" class="org.apache.royale.jewel.RadioButton"/>
<component id="CheckBox" class="org.apache.royale.jewel.CheckBox"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as
index 90f3827..c99300d 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as
@@ -40,7 +40,7 @@ package org.apache.royale.jewel
[Event(name="click", type="org.apache.royale.events.MouseEvent")]
/*
- * Label probably should extend TextField directly,
+ * Label probably should extend TextInput directly,
* but the player's APIs for TextLine do not allow
* direct instantiation, and we might want to allow
* Labels to be declared and have their actual
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextField.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextInput.as
similarity index 92%
rename from frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextField.as
rename to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextInput.as
index 039e5a3..bafe839 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextField.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextInput.as
@@ -17,7 +17,7 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.jewel
{
- import org.apache.royale.jewel.supportClasses.TextFieldBase;
+ import org.apache.royale.jewel.supportClasses.TextInputBase;
import org.apache.royale.utils.ClassSelectorList;
COMPILE::JS
@@ -28,7 +28,7 @@ package org.apache.royale.jewel
}
/**
- * The TextField class implements the basic control for
+ * The TextInput class implements the basic control for
* single-line text input.
*
* @toplevel
@@ -37,7 +37,7 @@ package org.apache.royale.jewel
* @playerversion AIR 2.6
* @productversion Royale 0.9.2
*/
- public class TextField extends TextFieldBase
+ public class TextInput extends TextInputBase
{
/**
* Constructor.
@@ -47,13 +47,13 @@ package org.apache.royale.jewel
* @playerversion AIR 2.6
* @productversion Royale 0.9.2
*/
- public function TextField()
+ public function TextInput()
{
super();
classSelectorList = new ClassSelectorList(this);
- typeNames = "jewel textfield";
+ typeNames = "jewel textinput";
}
protected var classSelectorList:ClassSelectorList;
@@ -99,7 +99,7 @@ package org.apache.royale.jewel
goog.events.listen(input, 'input', textChangeHandler);
//label = document.createElement('label') as HTMLLabelElement;
- //label.className = "jewel-textfield-label";
+ //label.className = "jewel-textinput-label";
//textNode = document.createTextNode('') as Text;
//label.appendChild(textNode);
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/TextFieldView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/TextFieldView.as
index 4c8df5e..f0506fd 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/TextFieldView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/TextFieldView.as
@@ -24,7 +24,7 @@ package org.apache.royale.jewel.beads.views
/**
* The TextFieldView class is the default view for
* the org.apache.royale.jewel.Label class.
- * It displays text using a TextField, so there is no
+ * It displays text using a TextInput, so there is no
* right-to-left text support in this view.
*
* @langversion 3.0
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as
index e1ed050..3fe4f96 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as
@@ -19,15 +19,15 @@
package org.apache.royale.jewel.supportClasses
{
/**
- * ITextField is the interface that all text jewel classes.
- * It's used mainly in org.apache.royale.jewel.supportClasses.TextFieldBase
+ * ITextInput is the interface that all text jewel classes.
+ * It's used mainly in org.apache.royale.jewel.supportClasses.TextInputBase
*
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
* @productversion Royale 9.2
*/
- public interface ITextField
+ public interface ITextInput
{
COMPILE::JS
{
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextInput.as
similarity index 95%
copy from frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as
copy to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextInput.as
index e1ed050..3fe4f96 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextInput.as
@@ -19,15 +19,15 @@
package org.apache.royale.jewel.supportClasses
{
/**
- * ITextField is the interface that all text jewel classes.
- * It's used mainly in org.apache.royale.jewel.supportClasses.TextFieldBase
+ * ITextInput is the interface that all text jewel classes.
+ * It's used mainly in org.apache.royale.jewel.supportClasses.TextInputBase
*
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
* @productversion Royale 9.2
*/
- public interface ITextField
+ public interface ITextInput
{
COMPILE::JS
{
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/TextFieldBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/TextInputBase.as
similarity index 89%
rename from frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/TextFieldBase.as
rename to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/TextInputBase.as
index 454cec2..543320d 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/TextFieldBase.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/TextInputBase.as
@@ -20,7 +20,7 @@ package org.apache.royale.jewel.supportClasses
import org.apache.royale.events.Event;
import org.apache.royale.html.TextInput;
- import org.apache.royale.jewel.supportClasses.ITextField;
+ import org.apache.royale.jewel.supportClasses.ITextInput;
COMPILE::JS
{
@@ -31,14 +31,14 @@ package org.apache.royale.jewel.supportClasses
}
/**
- * The TextFieldBase class is the base class for TextField and TextArea Jewel controls
+ * The TextInputBase class is the base class for TextInput and TextArea Jewel controls
*
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
* @productversion Royale 0.9.2
*/
- public class TextFieldBase extends TextInput implements ITextField
+ public class TextInputBase extends TextInput implements ITextInput
{
/**
* Constructor.
@@ -48,7 +48,7 @@ package org.apache.royale.jewel.supportClasses
* @playerversion AIR 2.6
* @productversion Royale 0.9.2
*/
- public function TextFieldBase()
+ public function TextInputBase()
{
super();
}
@@ -58,7 +58,7 @@ package org.apache.royale.jewel.supportClasses
private var _textNode:Text;
/**
- * @copy org.apache.royale.jewel.supportClasses.ITextField#textNode
+ * @copy org.apache.royale.jewel.supportClasses.ITextInput#textNode
*
* @langversion 3.0
* @playerversion Flash 10.2
@@ -80,7 +80,7 @@ package org.apache.royale.jewel.supportClasses
COMPILE::JS
private var _input:HTMLInputElement;
/**
- * @copy org.apache.royale.jewel.supportClasses.ITextField#input
+ * @copy org.apache.royale.jewel.supportClasses.ITextInput#input
*
* @langversion 3.0
* @playerversion Flash 10.2
@@ -102,7 +102,7 @@ package org.apache.royale.jewel.supportClasses
private var _label:HTMLLabelElement;
/**
- * @copy org.apache.royale.jewel.supportClasses.ITextField#label
+ * @copy org.apache.royale.jewel.supportClasses.ITextInput#label
*
* @langversion 3.0
* @playerversion Flash 10.2
@@ -140,7 +140,7 @@ package org.apache.royale.jewel.supportClasses
private var _isInvalid:Boolean = false;
/**
* A boolean flag to activate "is-invalid" effect selector.
- * Defines the textfield as invalid on initial load.
+ * Defines the textinput as invalid on initial load.
* Optional
*
* @langversion 3.0
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_textfield.sass b/frameworks/projects/Jewel/src/main/sass/components/_textinput.sass
similarity index 97%
rename from frameworks/projects/Jewel/src/main/sass/components/_textfield.sass
rename to frameworks/projects/Jewel/src/main/sass/components/_textinput.sass
index c6252cb..f440985 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_textfield.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_textinput.sass
@@ -17,9 +17,9 @@
//
////////////////////////////////////////////////////////////////////////////////
-.jewel.textfield
+.jewel.textinput
-j|TextField
+j|TextInput
IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
//IBeadView: ClassReference("org.apache.royale.html.beads.TextInputWithBorderView")
//IBeadController: ClassReference("org.apache.royale.html.beads.controllers.EditableTextKeyboardController")
diff --git a/frameworks/projects/Jewel/src/main/sass/defaults.sass b/frameworks/projects/Jewel/src/main/sass/defaults.sass
index 239c77b..84dd1f0 100644
--- a/frameworks/projects/Jewel/src/main/sass/defaults.sass
+++ b/frameworks/projects/Jewel/src/main/sass/defaults.sass
@@ -32,6 +32,6 @@
@import "components/radiobutton"
@import "components/slider"
@import "components/textbutton"
-@import "components/textfield"
+@import "components/textinput"
@import "components/titlebar"
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index bce4706..89ae835 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -599,11 +599,11 @@ j|Alert {
text-shadow: unset;
}
-.jewel.textfield {
+.jewel.textinput {
position: relative;
display: inline-flex;
}
-.jewel.textfield input {
+.jewel.textinput input {
-webkit-appearance: none;
-moz-appearance: none;
-o-appearance: none;
@@ -626,20 +626,20 @@ j|Alert {
transition-duration: 0.3s;
transition-timing-function: easein;
}
-.jewel.textfield input:focus {
+.jewel.textinput input:focus {
border: 1px solid #0f88d1;
}
-.jewel.textfield input::placeholder {
+.jewel.textinput input::placeholder {
color: #a6a6a6;
}
-.jewel.textfield input[disabled] {
+.jewel.textinput input[disabled] {
cursor: unset;
background: #f3f3f3;
border: 1px solid #d9d9d9;
box-shadow: none;
color: silver;
}
-.jewel.textfield input[disabled]::placeholder {
+.jewel.textinput input[disabled]::placeholder {
color: silver;
}
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components-secondary/_textfield.sass b/frameworks/themes/JewelTheme/src/main/sass/components-emphasized/_textinput.sass
similarity index 100%
rename from frameworks/themes/JewelTheme/src/main/sass/components-secondary/_textfield.sass
rename to frameworks/themes/JewelTheme/src/main/sass/components-emphasized/_textinput.sass
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_textfield.sass b/frameworks/themes/JewelTheme/src/main/sass/components-primary/_textinput.sass
similarity index 78%
rename from frameworks/themes/JewelTheme/src/main/sass/components-primary/_textfield.sass
rename to frameworks/themes/JewelTheme/src/main/sass/components-primary/_textinput.sass
index f1e9b08..867755b 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_textfield.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components-primary/_textinput.sass
@@ -20,22 +20,22 @@
// Jewel Textfield
// Textfield variables
-$textfield-margin: 0 !default
-$textfield-padding: .67em 1em !default
+$textinput-margin: 0 !default
+$textinput-padding: .67em 1em !default
//10px 16px
-$textfield-min-height: 34px !default
-$textfield-min-width: 74px !default
+$textinput-min-height: 34px !default
+$textinput-min-width: 74px !default
-$textfield-border-radius: 3px
+$textinput-border-radius: 3px
-=textfield-theme($textfield-text-color)
+=textinput-theme($textinput-text-color)
position: relative
display: inline-flex
input
+appear(none)
- margin: $textfield-margin
- padding: $textfield-padding
+ margin: $textinput-margin
+ padding: $textinput-padding
max-width: 100%
@@ -50,7 +50,7 @@ $textfield-border-radius: 3px
family: $font-stack
size: $font-size
weight: normal
- color: $textfield-text-color
+ color: $textinput-text-color
@if $flat
background: $default-color
@@ -59,7 +59,7 @@ $textfield-border-radius: 3px
background: linear-gradient(lighten($default-color, 15%), lighten($default-color, 10%))
border: 1px solid darken($default-color, 15%)
//box-shadow: none
- border-radius: $textfield-border-radius
+ border-radius: $textinput-border-radius
@if $transitions-enable
transition:
@@ -77,7 +77,7 @@ $textfield-border-radius: 3px
// background-color: #DFDFDF;
&::placeholder
- color: lighten($textfield-text-color, 15%)
+ color: lighten($textinput-text-color, 15%)
&[disabled]
cursor: unset
@@ -93,14 +93,14 @@ $textfield-border-radius: 3px
&::placeholder
color: $disabled-font-color
-.jewel.textfield
+.jewel.textinput
@if $dark
- +textfield-theme($font-dark-color)
+ +textinput-theme($font-dark-color)
@else
- +textfield-theme($font-light-color)
+ +textinput-theme($font-light-color)
-// .jewel.textfield.primary
+// .jewel.textinput.primary
// @if $dark
-// +textfield-theme($primary-color, $font-dark-color)
+// +textinput-theme($primary-color, $font-dark-color)
// @else
-// +textfield-theme($primary-color, $font-light-color)
+// +textinput-theme($primary-color, $font-light-color)
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components-emphasized/_textfield.sass b/frameworks/themes/JewelTheme/src/main/sass/components-secondary/_textinput.sass
similarity index 100%
rename from frameworks/themes/JewelTheme/src/main/sass/components-emphasized/_textfield.sass
rename to frameworks/themes/JewelTheme/src/main/sass/components-secondary/_textinput.sass
diff --git a/frameworks/themes/JewelTheme/src/main/sass/defaults.sass b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
index 74c5d22..4a8f282 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
@@ -37,7 +37,7 @@
@import "components-primary/radiobutton"
@import "components-primary/slider"
@import "components-primary/textbutton"
-@import "components-primary/textfield"
+@import "components-primary/textinput"
@import "components-primary/titlebar"
@import "components-secondary/alert"
@@ -51,7 +51,7 @@
@import "components-secondary/radiobutton"
@import "components-secondary/slider"
@import "components-secondary/textbutton"
-@import "components-secondary/textfield"
+@import "components-secondary/textinput"
@import "components-secondary/titlebar"
@import "components-emphasized/alert"
@@ -65,5 +65,5 @@
@import "components-emphasized/radiobutton"
@import "components-emphasized/slider"
@import "components-emphasized/textbutton"
-@import "components-emphasized/textfield"
+@import "components-emphasized/textinput"
@import "components-emphasized/titlebar"
--
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.