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/03/20 23:33:07 UTC

[royale-asjs] branch feature/jewel-ui-set updated (54c2bed -> 33cf18f)

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a change to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


 discard 54c2bed  12 Color Palette Plan Almost done and working for Button, but only one project theme for now
 discard 12d2cf8  some minor changes
 discard 2355909  introduce jewel checkbox and refactor styles to make more easy handle the rest of components to be included
 discard 5538948  changes to slider
 discard edb3cc6  viewbeads inlib and theme  (commented)
 discard 10a94bd  remove settings
 discard 97f8f85  fix classreference compilation with themes in pom.xml
 discard d6b8cb5  remove unused css
 discard ea46b06  fix new classlist utility methods
 discard 8457969  Moved util functions to package-level ones
 discard 32415cc  Insert a ViewBead that is in JewelTheme and compiles ok, but JewelExample can't see it, why??
 discard 136217f  Refactor new styles API in UIBase to new ClassListUtil
 discard 63ff483  update css
 discard c6ee4fa  Decouple theme in JewelTheme and JewelBlueTheme
 discard c2b91d9  UIBase typenames and classNames proposal - working, but I'm sure will be things to modify and/or enhance for performance
 discard ca6bbe7  remove JewelThemeFontInject
 discard 14e0336  Ant build for Jewel project, theme and example
 discard 2a12b84  Added HorizontalLayoutWithPaddingAndGap and VerticalLayoutWithPaddingAndGap using CSS, but gaps and padding are still in inline style, what can be ok, but can't be modified at runtime, this must be revisited some time later
 discard 5faca3c  HorizontalLayout and VerticalLayout in Jewel based on CSS working
 discard aa98978  add TextFieldView;
 discard 61f9c1f  Jewel Label added
 discard a864dd6  testing Lato font in theme
 discard 7919fdc  added html template to example until we get font injection from theme
 discard d40c320  fix textfield error setting typeNames in constructor
 discard ebabc42  update classList to fix issues. Now work totaly as expected
 discard 4edd22e  uibase refactor to classList
 discard 70b51e4  forgotten changes in pom
 discard ddbb674  redo branch due to mistake in the rebase
     add c520bd8  MDL Menu: Fix issue where position of Menu wasn't setup at all
     add 83c355e  example of how to debug ant task
     add 235c514  Removed warning
     add 4628588  Added InfiniteVScroller
     add 5b86482  Updated release notes
     new eba2506  redo branch due to mistake in the rebase
     new 5d79739  forgotten changes in pom
     new 2133d63  uibase refactor to classList
     new d975764  update classList to fix issues. Now work totaly as expected
     new 52f8c6a  fix textfield error setting typeNames in constructor
     new 1ff20fd  added html template to example until we get font injection from theme
     new 9c13696  testing Lato font in theme
     new e0dfe7b  Jewel Label added
     new 82027d5  add TextFieldView;
     new 1adc4ef  HorizontalLayout and VerticalLayout in Jewel based on CSS working
     new 56801c2  Added HorizontalLayoutWithPaddingAndGap and VerticalLayoutWithPaddingAndGap using CSS, but gaps and padding are still in inline style, what can be ok, but can't be modified at runtime, this must be revisited some time later
     new 0c6b9e2  Ant build for Jewel project, theme and example
     new 73a080a  remove JewelThemeFontInject
     new 89a7884  UIBase typenames and classNames proposal - working, but I'm sure will be things to modify and/or enhance for performance
     new a27e7f9  Decouple theme in JewelTheme and JewelBlueTheme
     new da8da85  update css
     new 50b924c  Refactor new styles API in UIBase to new ClassListUtil
     new 07ce149  Insert a ViewBead that is in JewelTheme and compiles ok, but JewelExample can't see it, why??
     new 3f4b32a  Moved util functions to package-level ones
     new b315196  fix new classlist utility methods
     new d945694  remove unused css
     new af95141  fix classreference compilation with themes in pom.xml
     new c413361  remove settings
     new de8ee7c  viewbeads inlib and theme  (commented)
     new ecd1b9f  changes to slider
     new ec1dde1  introduce jewel checkbox and refactor styles to make more easy handle the rest of components to be included
     new 063d9b3  some minor changes
     new 33cf18f  12 Color Palette Plan Almost done and working for Button, but only one project theme for now

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (54c2bed)
            \
             N -- N -- N   refs/heads/feature/jewel-ui-set (33cf18f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 28 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 RELEASE_NOTES.md                                   |   1 +
 .../ListExample/src/main/royale/MyInitialView.mxml |   4 +
 .../Basic/src/main/resources/basic-manifest.xml    |   1 +
 .../apache/royale/html/beads/InfiniteVScroller.as  | 157 +++++++++++++++++++++
 frameworks/projects/Core/src/test/royale/build.xml |   5 +
 .../flexUnitTests/KeyboardEventConverterTest.as    |   2 +-
 .../src/main/royale/org/apache/royale/mdl/Menu.as  |  56 ++++----
 7 files changed, 199 insertions(+), 27 deletions(-)
 create mode 100644 frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/InfiniteVScroller.as

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 21/28: remove unused css

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit d945694ccddef6788cbe921667e31c282550d5e9
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Mar 16 16:21:30 2018 +0100

    remove unused css
---
 frameworks/projects/Jewel/pom.xml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/frameworks/projects/Jewel/pom.xml b/frameworks/projects/Jewel/pom.xml
index e7de6c2..196c471 100644
--- a/frameworks/projects/Jewel/pom.xml
+++ b/frameworks/projects/Jewel/pom.xml
@@ -60,10 +60,6 @@
               <name>defaults.css</name>
               <path>../src/main/resources/defaults.css</path>
             </include-file>
-            <include-file>
-              <name>jewel-framework.css</name>
-              <path>../src/main/resources/jewel-framework.css</path>
-            </include-file>
           </includeFiles>
           <includeLookupOnly>true</includeLookupOnly>
           <!--<allowSubclassOverrides>true</allowSubclassOverrides>-->

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 10/28: HorizontalLayout and VerticalLayout in Jewel based on CSS working

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 1adc4ef21f18aa55ac30b8bc204e17738393a197
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Mar 14 13:57:24 2018 +0100

    HorizontalLayout and VerticalLayout in Jewel based on CSS working
---
 .../royale/JewelExample/src/main/royale/App.mxml   |  2 +-
 frameworks/projects/Jewel/pom.xml                  |  6 +-
 .../projects/Jewel/src/main/resources/defaults.css | 79 +++++++++++-----------
 .../Jewel/src/main/resources/jewel-framework.css   | 34 +++++-----
 .../main/royale/org/apache/royale/jewel/Label.as   |  4 +-
 .../royale/jewel/beads/layouts/HorizontalLayout.as | 61 ++++-------------
 .../royale/jewel/beads/layouts/VerticalLayout.as   | 41 +++++------
 .../projects/Jewel/src/main/sass/_global.sass      | 40 +++++------
 .../projects/Jewel/src/main/sass/defaults.sass     | 21 ++++++
 9 files changed, 130 insertions(+), 158 deletions(-)

diff --git a/examples/royale/JewelExample/src/main/royale/App.mxml b/examples/royale/JewelExample/src/main/royale/App.mxml
index 3d41276..f403dc7 100644
--- a/examples/royale/JewelExample/src/main/royale/App.mxml
+++ b/examples/royale/JewelExample/src/main/royale/App.mxml
@@ -31,7 +31,7 @@
 	<js:initialView>
 		<js:View>
 			<js:beads>
-				<js:HorizontalLayout />
+				<j:HorizontalLayout />
 			</js:beads>
 			<local:ButtonPlayGround/>
 			<local:TextInputPlayGround/>
diff --git a/frameworks/projects/Jewel/pom.xml b/frameworks/projects/Jewel/pom.xml
index 82b2c68..53fb1fc 100644
--- a/frameworks/projects/Jewel/pom.xml
+++ b/frameworks/projects/Jewel/pom.xml
@@ -57,9 +57,13 @@
           </includeClasses>
           <includeFiles>
             <include-file>
+              <name>defaults.css</name>
+              <path>../src/main/resources/defaults.css</path>
+            </include-file>
+            <!-- <include-file>
               <name>jewel.css</name>
               <path>../src/main/resources/jewel-framework.css</path>
-            </include-file>
+            </include-file> -->
           </includeFiles>
           <includeLookupOnly>true</includeLookupOnly>
           <!--<allowSubclassOverrides>true</allowSubclassOverrides>-->
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index f09b980..0c58f7b 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -1,5 +1,4 @@
-/*
- *
+/**
  *  Licensed to the Apache Software Foundation (ASF) under one or more
  *  contributor license agreements.  See the NOTICE file distributed with
  *  this work for additional information regarding copyright ownership.
@@ -14,57 +13,59 @@
  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
- *
  */
-
 @namespace "library://ns.apache.org/royale/jewel";
+.layout.horizontal {
+  white-space: nowrap;
+  display: block;
+}
+.layout.horizontal > * {
+  display: inline-block !important;
+}
 
-.vertical-layout-padding-gap {
-	display: block !important;
+.layout.vertical {
+  vertical-align: top;
+}
+.layout.vertical > * {
+  display: block !important;
+}
+
+.jewel.label {
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
+  white-space: nowrap;
 }
 
-/*
-* Jewel TextField
-*/
 TextField {
-	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");*/
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
 }
-.vTextField--input {}
-.vTextField--label {}
 
-/*
-* Jewel Slider
-*/
 Slider {
-	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
-	IBeadView:  ClassReference("org.apache.royale.jewel.beads.SliderView");
-	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout");
-	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController");
-	position: relative;
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
+  IBeadView: ClassReference("org.apache.royale.jewel.beads.SliderView");
+  IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout");
+  IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController");
+  position: relative;
 }
+
 .SliderTrack {
-	position: absolute;
+  position: absolute;
 }
+
 .SliderThumb {
-	position: absolute;
-	border-radius: 15px;
+  position: absolute;
+  border-radius: 15px;
 }
 
-@media -royale-swf
-{
-    Slider
-	{
-		iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView");
-		iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView");
-	}
+@media -royale-swf {
+  Slider {
+    iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView");
+    iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView");
+  }
 
-	RadioButton
-	{
-		IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
-		IBeadView:  ClassReference("org.apache.royale.jewel.beads.RadioButtonView");			
-		/*font-size: 11px;
-		font-family: Arial;*/
-	}
+  RadioButton {
+    IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
+    IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView");
+  }
 }
+
+/*# sourceMappingURL=defaults.css.map */
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-framework.css b/frameworks/projects/Jewel/src/main/resources/jewel-framework.css
index 1d18965..ac1da5e 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-framework.css
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-framework.css
@@ -15,33 +15,30 @@
  *  limitations under the License.
  */
 @namespace "library://ns.apache.org/royale/jewel";
-.layout .horizontal {
+.layout.horizontal {
   white-space: nowrap;
+  display: block;
 }
-.layout .vertical {
+.layout.horizontal > * {
+  display: inline-block !important;
+}
+
+.layout.vertical {
+  vertical-align: top;
+}
+.layout.vertical > * {
   display: block !important;
 }
 
-/**
- * Jewel Label
- */	 */
-Label {
+.jewel.label {
   IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
-  IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView");
-  iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead");
   white-space: nowrap;
 }
 
-/**
- * Jewel TextField
- */
 TextField {
   IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
 }
 
-/**
- * Jewel Slider
- */
 Slider {
   IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
   IBeadView: ClassReference("org.apache.royale.jewel.beads.SliderView");
@@ -64,10 +61,11 @@ Slider {
     iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView");
     iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView");
   }
-}
-RadioButton {
-  IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
-  IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView");
+
+  RadioButton {
+    IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
+    IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView");
+  }
 }
 
 /*# sourceMappingURL=jewel-framework.css.map */
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 a9e683e..90f3827 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
@@ -179,9 +179,7 @@ package org.apache.royale.jewel
 
             textNode = document.createTextNode(_text) as Text;
             element.appendChild(textNode);
-
-            //element.style.whiteSpace = "nowrap";
-
+            
             return element;
         }
 
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
index 16950a3..eff02f9 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
@@ -31,9 +31,6 @@ package org.apache.royale.jewel.beads.layouts
 	COMPILE::SWF {
 			import org.apache.royale.core.UIBase;
 	}
-    COMPILE::JS {
-        import org.apache.royale.core.WrappedHTMLElement;
-    }
 
     /**
      *  The HorizontalLayout class is a simple layout
@@ -62,32 +59,8 @@ package org.apache.royale.jewel.beads.layouts
 		}
 
         /**
-         *  @copy org.apache.royale.core.IBead#strand
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
-         *  @royaleignorecoercion HTMLElement
-         *  @royaleignorecoercion org.apache.royale.core.IUIBase
-         */
-		override public function set strand(value:IStrand):void
-		{
-			super.strand = value;
-			
-            COMPILE::JS
-            {
-				var base:IUIBase = value as IUIBase;
-				if (base.element.style.display !== "none") {
-					base.element.style.display = "block";
-				}
-            }
-		}
-
-        /**
          * @copy org.apache.royale.core.IBeadLayout#layout
          * @royaleignorecoercion org.apache.royale.core.ILayoutHost
-         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
          */
 		override public function layout():Boolean
 		{
@@ -167,27 +140,21 @@ package org.apache.royale.jewel.beads.layouts
             }
             COMPILE::JS
             {
-                var children:Array;
-                var i:int;
-                var n:int;
 				var contentView:IParentIUIBase = layoutView as IParentIUIBase;
-				contentView.element.classList.add("layout parent"); //style["white-space"] = "nowrap";
-                children = contentView.internalChildren();
-
-                n = children.length;
-                for (i = 0; i < n; i++)
-                {
-                    var child:WrappedHTMLElement = children[i] as WrappedHTMLElement;
-					if (child == null) continue;
-
-					 child.classList.add("layout horizontal");
-
-					/*child.royale_wrapper.setDisplayStyleForLayout('inline-block');
-					if (child.style.display !== 'none')
-					{
-						child.style.display = 'inline-block';
-					}*/
-				}
+				contentView.element.classList.add("layout", "horizontal");
+
+				/** 
+				 *  This Layout uses the following CSS rules
+				 * 
+				 *  .layout.horizontal {
+				 *		white-space: nowrap;
+				 *		display: block;
+				 *	}
+				 *
+				 *	.layout.horizontal > * {
+				 *		display: inline-block !important;
+				 *	}
+				 */
 
                 return true;
             }
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
index fab6700..cc217c2 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
@@ -21,14 +21,11 @@ package org.apache.royale.jewel.beads.layouts
 	import org.apache.royale.core.LayoutBase;
 	
 	import org.apache.royale.core.IBeadLayout;
-	import org.apache.royale.core.IBeadModel;
     import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
 	import org.apache.royale.core.ILayoutChild;
 	import org.apache.royale.core.ILayoutHost;
 	import org.apache.royale.core.ILayoutView;
-	import org.apache.royale.core.ILayoutParent;
 	import org.apache.royale.core.IParentIUIBase;
-	import org.apache.royale.core.IStrand;
 	import org.apache.royale.core.IUIBase;
     import org.apache.royale.core.layout.EdgeData;
 	import org.apache.royale.core.ValuesManager;
@@ -36,10 +33,6 @@ package org.apache.royale.jewel.beads.layouts
 	{
 		import org.apache.royale.core.WrappedHTMLElement;
 	}
-	import org.apache.royale.events.Event;
-	import org.apache.royale.events.IEventDispatcher;
-	import org.apache.royale.geom.Rectangle;
-	import org.apache.royale.utils.CSSUtils;
 
 	/**
 	 *  The VerticalLayout class is a simple layout
@@ -156,35 +149,33 @@ package org.apache.royale.jewel.beads.layouts
 			}
 			COMPILE::JS
 			{
-				var children:Array;
-				var i:int;
-				var n:int;
 				var contentView:IParentIUIBase = layoutView as IParentIUIBase;
-				contentView.element.classList.add("layout parent");//style["vertical-align"] = "top";
+				contentView.element.classList.add("layout", "vertical");
 				
-				children = contentView.internalChildren();
+				var children:Array = contentView.internalChildren();
 				n = children.length;
+
+				var i:int;
+				var n:int;
 				for (i = 0; i < n; i++)
 				{
 					var child:WrappedHTMLElement = children[i] as WrappedHTMLElement;
 					if (child == null) continue;
 					
-                    child.classList.add("layout vertical");
-
-                    /*child.royale_wrapper.setDisplayStyleForLayout('block');
-					if (child.style.display === 'none')
-					{
-						child.royale_wrapper.setDisplayStyleForLayout('block');
-					}
-					else
-					{
-						// block elements don't measure width correctly so set to inline for a second
-						child.style.display = 'inline-block';
-						child.style.display = 'block';
-					}*/
 					child.royale_wrapper.dispatchEvent('sizeChanged');
 				}
 
+				/**
+				 * This Layout uses the following CSS rules
+				 * 
+				 * .layout.vertical {
+				 *	vertical-align: top;
+				 *	}
+				 *	.layout.vertical > * {
+				 *	display: block !important;
+				 *	}
+				 */
+
 				return true;
 			}
 		}
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index 99552d3..c886218 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -19,35 +19,27 @@
 
 @namespace "library://ns.apache.org/royale/jewel"
 
-.layout
-	.horizontal
-		white-space: nowrap
-	.vertical
+.layout.horizontal
+	white-space: nowrap
+	display: block
+	> *
+		display: inline-block !important
+.layout.vertical
+	vertical-align: top
+	> *
 		display: block !important
 
-/**
- * Jewel Label
- */	
-Label
+.jewel.label
 	IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
-	IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
-	iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead")
+	//IBeadView: ClassReference("org.apache.royale.jewel.beads.TextFieldView")
+	//iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead")
 	white-space: nowrap
 
-/**
- * Jewel TextField
- */
 TextField
 	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")
 
-.vTextField--input
-.vTextField--label
-
-/**
- * Jewel Slider
- */
 Slider
 	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel")
 	IBeadView:  ClassReference("org.apache.royale.jewel.beads.SliderView")
@@ -67,8 +59,8 @@ Slider
 		iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView")
 		iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView")
 
-RadioButton
-	IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel")
-	IBeadView:  ClassReference("org.apache.royale.jewel.beads.RadioButtonView")
-	//font-size: 11px
-	//font-family: Arial
+	RadioButton
+		IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel")
+		IBeadView:  ClassReference("org.apache.royale.jewel.beads.RadioButtonView")
+		//font-size: 11px
+		//font-family: Arial
diff --git a/frameworks/projects/Jewel/src/main/sass/defaults.sass b/frameworks/projects/Jewel/src/main/sass/defaults.sass
new file mode 100644
index 0000000..10e81d9
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/defaults.sass
@@ -0,0 +1,21 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+// Variables
+    
+// Global
+@import "global"

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 19/28: Moved util functions to package-level ones

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 3f4b32abb146a8789ed0a8e269470b8f3e402c15
Author: Harbs <ha...@in-tools.com>
AuthorDate: Fri Mar 16 13:05:15 2018 +0200

    Moved util functions to package-level ones
    
    (not sure about removeAllStyles — it seemed to have had a bug so it was probably not functional either way)
---
 .../projects/Core/src/main/royale/CoreClasses.as   |  5 +++
 .../apache/royale/utils/cssclasslist/addStyles.as  | 47 ++++++++++++++++++++++
 .../royale/utils/cssclasslist/removeAllStyles.as   | 41 +++++++++++++++++++
 .../royale/utils/cssclasslist/removeStyles.as      | 46 +++++++++++++++++++++
 .../royale/utils/cssclasslist/toggleStyle.as       | 39 ++++++++++++++++++
 .../main/royale/org/apache/royale/core/UIBase.as   |  4 +-
 .../main/royale/org/apache/royale/jewel/Button.as  |  8 ++--
 7 files changed, 184 insertions(+), 6 deletions(-)

diff --git a/frameworks/projects/Core/src/main/royale/CoreClasses.as b/frameworks/projects/Core/src/main/royale/CoreClasses.as
index 2ec8859..3df4330 100644
--- a/frameworks/projects/Core/src/main/royale/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/royale/CoreClasses.as
@@ -226,6 +226,11 @@ internal class CoreClasses
 		import org.apache.royale.utils.object.defineSimpleGetter; defineSimpleGetter;
 		import org.apache.royale.utils.object.defineProperty; defineProperty;
 		import org.apache.royale.utils.object.defineSimpleProperty; defineSimpleProperty;
+
+		import org.apache.royale.utils.cssclasslist.removeAllStyles; removeAllStyles;
+		import org.apache.royale.utils.cssclasslist.removeStyles; removeStyles;
+		import org.apache.royale.utils.cssclasslist.toggleStyle; toggleStyle;
+		import org.apache.royale.utils.cssclasslist.addStyles; addStyles;
 	}
 	//Package Level Functions
 	import org.apache.royale.debugging.assert; assert;
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/addStyles.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/addStyles.as
new file mode 100644
index 0000000..aa995a0
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/addStyles.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "Licens"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.utils.cssclasslist
+{
+    import org.apache.royale.core.IUIBase;
+    
+    /**
+     *  Add one or more styles to the component. If the specified class already 
+     *  exist, the class will not be added.
+     *  
+     *  @param value, a String with the style (or styles separated by an space) to
+     *  add from the component. If the string is empty doesn't perform any action
+     *  
+     *  @langversion 3.0
+     *  @productversion Royale 0.9.3
+     */
+    public function addStyles(wrapper:IUIBase, value:String):void
+    {
+        if (value == "") return;
+        
+        if (value.indexOf(" ") >= 0)
+        {
+            var classes:Array = value.split(" ");
+            wrapper.element.classList.add.apply(wrapper.element.classList, classes);
+        } else
+        {
+            wrapper.element.classList.add(value);
+        }
+    }
+
+}
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeAllStyles.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeAllStyles.as
new file mode 100644
index 0000000..4d19c79
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeAllStyles.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "Licens"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.utils.cssclasslist
+{
+    import org.apache.royale.core.IUIBase;
+
+    /**
+     *  Removes all styles
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.3
+     */
+    public function removeAllStyles(wrapper:IUIBase):void
+    {
+        var classList:DOMTokenList = wrapper.element.classList;
+        var i:int;
+        for( i = classList.length -1; i > 0; i-- )
+        {
+            classList.remove(classList[i]);
+        }
+    }
+
+}
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeStyles.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeStyles.as
new file mode 100644
index 0000000..21f59e0
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeStyles.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "Licens"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.utils.cssclasslist
+{
+    import org.apache.royale.core.IUIBase;
+
+    /**
+     *  Removes one or more styles from the component. Removing a class that does not 
+     *  exist, does not throw any error
+     * 
+     *  @param value, a String with the style (or styles separated by an space) to 
+     *  remove from the component. If the string is empty doesn't perform any action
+     *  
+     *  @langversion 3.0
+     *  @productversion Royale 0.9.3
+     */
+    public function removeStyles(wrapper:IUIBase, value:String):void
+    {
+        if (value == "") return;
+
+        if (value.indexOf(" ") >= 0)
+        {
+            var classes:Array = value.split(" ");
+            wrapper.element.classList.remove.apply(wrapper.element.classList, classes);
+        } else
+        {
+            wrapper.element.classList.remove(value);
+        }
+    }
+}
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/toggleStyle.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/toggleStyle.as
new file mode 100644
index 0000000..8ef9224
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/toggleStyle.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "Licens"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.utils.cssclasslist
+{
+    import org.apache.royale.core.IUIBase;
+
+    /**
+     *  Adds or removes a single style. 
+     * 
+     *  The first parameter removes the style from an element, and returns false.
+     *  If the style does not exist, it is added to the element, and the return value is true.
+     * 
+     *  The optional second parameter is a Boolean value that forces the class to be added 
+     *  or removed, regardless of whether or not it already existed.
+     * 
+     *  @langversion 3.0
+     *  @productversion Royale 0.9.3
+     */
+    public function toggleStyle(wrapper:IUIBase, value:String, force:Boolean = false):Boolean
+    {
+        return wrapper.element.classList.toggle(value, force);
+    }
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
index de5e089..c14e113 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
@@ -37,7 +37,7 @@ package org.apache.royale.core
     {
         import org.apache.royale.html.util.addElementToWrapper;
         import org.apache.royale.utils.CSSUtils;
-        import org.apache.royale.util.ClassListUtil;
+        import org.apache.royale.utils.cssclasslist.addStyles;
     }
 	
 	/**
@@ -1085,7 +1085,7 @@ package org.apache.royale.core
         COMPILE::JS
         protected function setClassName(value:String):void
         {
-            ClassListUtil.addStyles(this, value);
+            addStyles(this, value);
         }
 
         
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index 5e4dba9..4059764 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -23,7 +23,7 @@ package org.apache.royale.jewel
     COMPILE::JS
     {
         import org.apache.royale.core.WrappedHTMLElement;
-        import org.apache.royale.util.ClassListUtil;
+        import org.apache.royale.utils.cssclasslist.toggleStyle;
     }
 
     /**
@@ -88,7 +88,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    ClassListUtil.toggleStyle(this, "primary", value);
+                    toggleStyle(this, "primary", value);
                 }
             }
         }
@@ -118,7 +118,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    ClassListUtil.toggleStyle(this, "secondary", value);
+                    toggleStyle(this, "secondary", value);
                 }
             }
         }
@@ -148,7 +148,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    ClassListUtil.toggleStyle(this, "emphasized", value);
+                    toggleStyle(this, "emphasized", value);
                 }
             }
         }

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 22/28: fix classreference compilation with themes in pom.xml

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit af95141b054ec37f94aa100ac04202b508704bac
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Mar 16 18:39:42 2018 +0100

    fix classreference compilation with themes in pom.xml
---
 examples/royale/JewelExample/pom.xml               | 23 ++++++++++++++++++++++
 .../JewelTheme/src/main/resources/defaults.css     |  1 +
 .../src/main/sass/components/_label.sass           |  2 +-
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml
index 19f1837..5427bc4 100644
--- a/examples/royale/JewelExample/pom.xml
+++ b/examples/royale/JewelExample/pom.xml
@@ -81,6 +81,13 @@
       <artifactId>Basic</artifactId>
       <version>0.9.3-SNAPSHOT</version>
       <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
       <classifier>js</classifier>
     </dependency>
     <dependency>
@@ -92,10 +99,26 @@
     </dependency>
     <dependency>
       <groupId>org.apache.royale.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
       <artifactId>JewelTheme</artifactId>
       <version>0.9.3-SNAPSHOT</version>
       <type>swc</type>
       <scope>theme</scope>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>JewelTheme</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <scope>theme</scope>
+      <classifier>js</classifier>
     </dependency>
     <dependency>
       <groupId>org.apache.royale.framework</groupId>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index 714ec69..9022239 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -221,6 +221,7 @@
  * Jewel Label
  */
 .jewel.label {
+  IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead");
   font-family: "Lato", sans-serif;
   font-size: 0.75rem;
 }
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
index bb933f8..27906d1 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
@@ -22,7 +22,7 @@
  */
 .jewel.label
 	//IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
-	//IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead")
+	IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead")
 	font:
 		family: $font-stack
 		size: $font-size
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 16/28: update css

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit da8da850aba9ec47880915b906f88e71af30202a
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Mar 15 18:40:53 2018 +0100

    update css
---
 frameworks/themes/JewelTheme/src/main/resources/defaults.css | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index 423dc09..714ec69 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -65,7 +65,7 @@
 .jewel.button.primary {
   background-color: #dedede;
   transition-duration: 0.4s;
-  color: black;
+  color: #000000;
 }
 .jewel.button.primary:hover {
   background-color: #ededed;
@@ -85,7 +85,7 @@
 .jewel.button.secondary {
   background-color: #011833;
   transition-duration: 0.4s;
-  color: black;
+  color: #000000;
 }
 .jewel.button.secondary:hover {
   background-color: #022651;
@@ -105,7 +105,7 @@
 .jewel.button.emphasized {
   background-color: #1FD348;
   transition-duration: 0.4s;
-  color: black;
+  color: #000000;
 }
 .jewel.button.emphasized:hover {
   background-color: #30e158;
@@ -160,7 +160,7 @@
 .jewel.textbutton.primary {
   background-color: #dedede;
   transition-duration: 0.4s;
-  color: black;
+  color: #000000;
 }
 .jewel.textbutton.primary:hover {
   background-color: #ededed;
@@ -180,7 +180,7 @@
 .jewel.textbutton.secondary {
   background-color: #011833;
   transition-duration: 0.4s;
-  color: black;
+  color: #000000;
 }
 .jewel.textbutton.secondary:hover {
   background-color: #022651;
@@ -200,7 +200,7 @@
 .jewel.textbutton.emphasized {
   background-color: #1FD348;
   transition-duration: 0.4s;
-  color: black;
+  color: #000000;
 }
 .jewel.textbutton.emphasized:hover {
   background-color: #30e158;

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 14/28: UIBase typenames and classNames proposal - working, but I'm sure will be things to modify and/or enhance for performance

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 89a7884aa66e8814b1e51e9ef2b94cc31c7cb1f5
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Mar 15 14:16:50 2018 +0100

    UIBase typenames and classNames proposal - working, but I'm sure will be things to modify and/or enhance for performance
---
 .../main/royale/org/apache/royale/core/UIBase.as   | 139 ++++++++++++++++-----
 .../main/royale/org/apache/royale/jewel/Button.as  |   6 +-
 2 files changed, 112 insertions(+), 33 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
index 2d279c0..1a04fcf 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
@@ -1025,8 +1025,10 @@ package org.apache.royale.core
          * 
          *  @royalesuppresspublicvarwarning
          */
-        private var _typeNames:String;
+        public var typeNames:String;
         
+        private var _className:String;
+
         /**
          *  The classname.  Often used for CSS
          *  class selector lookups.
@@ -1036,67 +1038,142 @@ package org.apache.royale.core
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
          */
-        public function get typeNames():String
+        public function get className():String
 		{
-			return _typeNames;
+			return _className;
 		}
 
         /**
          *  @private
          */
-        public function set typeNames(value:String):void
+        public function set className(value:String):void
         {
-            if (_typeNames !== value)
+            if (_className !== value)
             {
-                _typeNames = value;
+                _className = value;
 
                 COMPILE::JS
                 {
-                    element.className = "";
-                    setClassName(_typeNames);             
+                    setClassName(computeFinalClassNames());             
                 }
+                
+                dispatchEvent(new Event("classNameChanged"));
             }
         }
 
-        private var _className:String;
-
         /**
-         *  The classname.  Often used for CSS
-         *  class selector lookups.
+         *  Computes the final syles for this component joining typeNames and classNames
+         *  styles
          *  
          *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
+         *  @productversion Royale 0.9.3
          */
-        public function get className():String
+        COMPILE::JS
+        protected function computeFinalClassNames():String
 		{
-			return _className;
+            return  StringUtil.trim((_className ? _className : "") + " " + (typeNames ? typeNames : ""));
 		}
 
         /**
-         *  @private
+         *  Sets the component styles in JS
+         *  
+         *  @langversion 3.0
+         *  @productversion Royale 0.0
          */
-        public function set className(value:String):void
+        COMPILE::JS
+        protected function setClassName(value:String):void
         {
-            if (_className !== value)
+            addStyles(value);
+        }
+
+        /**
+         *  Add one or more styles to the component. If the specified class already 
+         *  exist, the class will not be added.
+         *  
+         *  @param value, a String with the style (or styles separated by an space) to
+         *  add from the component. If the string is empty doesn't perform any action
+         *  
+         *  @langversion 3.0
+         *  @productversion Royale 0.9.3
+         */
+        COMPILE::JS
+        protected function addStyles(value:String):void
+        {
+            if (value == "") return;
+            
+            if (value.indexOf(" ") >= 0)
             {
-                _className = value;
+                var classes:Array = value.split(" ");
+                element.classList.add.apply(element.classList, classes);
+            } else
+            {
+                element.classList.add(value);
+            }
+        }
 
-                COMPILE::JS
-                {
-                    setClassName(typeNames ? typeNames + " " + _className : _className);             
-                }
-                
-                dispatchEvent(new Event("classNameChanged"));
+        /**
+         *  Removes one or more styles from the component. Removing a class that does not 
+         *  exist, does not throw any error
+         * 
+         *  @param value, a String with the style (or styles separated by an space) to 
+         *  remove from the component. If the string is empty doesn't perform any action
+         *  
+         *  @langversion 3.0
+         *  @productversion Royale 0.9.3
+         */
+        COMPILE::JS
+        protected function removeStyles(value:String):void
+        {
+            if (value == "") return;
+
+            if (value.indexOf(" ") >= 0)
+            {
+                var classes:Array = value.split(" ");
+                element.classList.remove.apply(element.classList, classes);
+            } else
+            {
+                element.classList.remove(value);
             }
         }
 
+        /**
+         *  Adds or removes a single style. 
+         * 
+         *  The first parameter removes the style from an element, and returns false.
+         *  If the style does not exist, it is added to the element, and the return value is true.
+         * 
+         *  The optional second parameter is a Boolean value that forces the class to be added 
+         *  or removed, regardless of whether or not it already existed.
+         * 
+         *  @langversion 3.0
+         *  @productversion Royale 0.9.3
+         */
         COMPILE::JS
-        protected function setClassName(value:String):void
+        protected function toggleStyle(value:String, force:Boolean = false):Boolean
         {
-            var classes:Array = value.split(" ");
-            element.classList.add.apply(element.classList, classes);
+            return element.classList.toggle(value, force);
+        }
+
+        /**
+         *  Removes all styles that are not in typeNames
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::JS
+        protected function removeAllStyles():void
+        {
+            var classList:DOMTokenList = element.classList;
+            var i:int;
+            for( i = classList.length; i > 0; i-- )
+            {
+                if(typeNames.indexOf(classList[i]) != 0)
+                {
+                    classList.remove(classList[i]);
+                }
+            }
         }
 
         /**
@@ -1385,6 +1462,8 @@ package org.apache.royale.core
 			
             COMPILE::JS
             {
+                setClassName(computeFinalClassNames());
+                
 				if (style)
                     ValuesManager.valuesImpl.applyStyles(this, style);
             }
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index 53f58e4..1fea4bc 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -88,7 +88,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    element.classList.toggle("primary", value);
+                    toggleStyle("primary", value);
                 }
             }
         }
@@ -118,7 +118,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    element.classList.toggle("secondary", value);
+                    toggleStyle("secondary", value);
                 }
             }
         }
@@ -148,7 +148,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    element.classList.toggle("emphasized", value);
+                    toggleStyle("emphasized", value);
                 }
             }
         }

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 08/28: Jewel Label added

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit e0dfe7b93fa278028d94e5a4048072563291a8da
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Mar 13 17:45:21 2018 +0100

    Jewel Label added
---
 .../src/main/royale/ButtonPlayGround.mxml          |   8 +-
 frameworks/projects/Jewel/pom.xml                  |   2 +-
 .../resources/{jewel.css => jewel-framework.css}   |  12 +-
 .../Jewel/src/main/resources/jewel-manifest.xml    |   1 +
 .../main/royale/org/apache/royale/jewel/Label.as   | 189 +++++++++++++++++++++
 .../projects/Jewel/src/main/sass/_global.sass      |  14 +-
 .../main/sass/{jewel.sass => jewel-framework.sass} |  16 +-
 .../src/main/resources/royale-jewel-blue.css       |   8 +
 .../src/main/resources/royale-jewel-red.css        |   8 +
 .../src/main/sass/{ => components}/_button.sass    |   0
 .../{_textfield.sass => components/_label.sass}    |  52 +-----
 .../main/sass/{ => components}/_textbutton.sass    |   0
 .../src/main/sass/{ => components}/_textfield.sass |   0
 .../src/main/sass/royale-jewel-blue.sass           |  13 +-
 .../JewelTheme/src/main/sass/royale-jewel-red.sass |  13 +-
 15 files changed, 248 insertions(+), 88 deletions(-)

diff --git a/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
index 5ca13a1..fd5f879 100644
--- a/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
@@ -35,14 +35,14 @@ limitations under the License.
 		<js:VerticalLayoutWithPaddingAndGap gap="10"/>
 	</js:beads>
 	
-	<js:Label text="Basic"/>
+	<j:Label text="Basic"/>
 	<js:Button/>
 	<js:TextButton text="Basic"/>
 
-	<js:Label text="Jewel Button"/>
+	<j:Label text="Jewel Button"/>
 	<j:Button primary="true"/>
 
-	<js:Label text="Jewel TextButton"/>
+	<j:Label text="Jewel TextButton"/>
 	
 	<j:TextButton text="DEFAULT"/>
 
@@ -60,7 +60,7 @@ limitations under the License.
 		</j:beads>
 	</j:TextButton>
 
-	<js:Label text="Jewel Button Sizing (respect min values)"/>
+	<j:Label text="Jewel Button Sizing (respect min values)"/>
 	<j:Slider id="slider" width="250" value="100" minimum="0" maximum="500"
 				valueChange="onValueChange(event)"/>
 	<j:Slider id="slider_v" width="250" value="40" minimum="0" maximum="300"
diff --git a/frameworks/projects/Jewel/pom.xml b/frameworks/projects/Jewel/pom.xml
index 74e2bd2..82b2c68 100644
--- a/frameworks/projects/Jewel/pom.xml
+++ b/frameworks/projects/Jewel/pom.xml
@@ -58,7 +58,7 @@
           <includeFiles>
             <include-file>
               <name>jewel.css</name>
-              <path>../src/main/resources/jewel.css</path>
+              <path>../src/main/resources/jewel-framework.css</path>
             </include-file>
           </includeFiles>
           <includeLookupOnly>true</includeLookupOnly>
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel.css b/frameworks/projects/Jewel/src/main/resources/jewel-framework.css
similarity index 84%
rename from frameworks/projects/Jewel/src/main/resources/jewel.css
rename to frameworks/projects/Jewel/src/main/resources/jewel-framework.css
index 21f1648..1d18965 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel.css
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-framework.css
@@ -23,6 +23,16 @@
 }
 
 /**
+ * Jewel Label
+ */	 */
+Label {
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
+  IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView");
+  iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead");
+  white-space: nowrap;
+}
+
+/**
  * Jewel TextField
  */
 TextField {
@@ -60,4 +70,4 @@ RadioButton {
   IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView");
 }
 
-/*# sourceMappingURL=jewel.css.map */
+/*# sourceMappingURL=jewel-framework.css.map */
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index b3bfccb..96b6b31 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -24,6 +24,7 @@
     <component id="Application" class="org.apache.royale.jewel.Application"/>
     <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="Slider" class="org.apache.royale.jewel.Slider"/>
     <component id="RadioButton" class="org.apache.royale.jewel.RadioButton"/>
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
new file mode 100644
index 0000000..a9e683e
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Label.as
@@ -0,0 +1,189 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+	import org.apache.royale.core.ITextModel;
+	import org.apache.royale.core.UIBase;
+	import org.apache.royale.core.ValuesManager;
+	import org.apache.royale.events.Event;
+	import org.apache.royale.events.IEventDispatcher;
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+        import org.apache.royale.html.util.addElementToWrapper;
+    }
+
+    /**
+     *  Dispatched when the user clicks on a Label.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.0
+     */
+    [Event(name="click", type="org.apache.royale.events.MouseEvent")]
+
+	/*
+	 *  Label probably should extend TextField 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
+	 *  view be swapped out.
+	 */
+
+    /**
+     *  The Label class implements the basic control for labeling
+     *  other controls.
+     *
+     *  @toplevel
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    public class Label extends UIBase
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function Label()
+		{
+			super();
+            typeNames = "jewel label";
+		}
+
+        COMPILE::JS
+        protected var textNode:Text;
+
+        COMPILE::JS
+        private var _text:String = "";
+
+        [Bindable("textChange")]
+        /**
+         *  The text to display in the label.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get text():String
+		{
+            COMPILE::SWF
+            {
+                return ITextModel(model).text;
+            }
+            COMPILE::JS
+            {
+                return _text;
+            }
+		}
+
+        /**
+         *  @private
+         */
+		public function set text(value:String):void
+		{
+            COMPILE::SWF
+            {
+                ITextModel(model).text = value;
+            }
+            COMPILE::JS
+            {
+                if (textNode)
+                {
+                    _text = value;
+                    textNode.nodeValue = value;
+                    this.dispatchEvent('textChange');
+                }
+            }
+
+		}
+
+        [Bindable("htmlChange")]
+        /**
+         *  The html-formatted text to display in the label.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get html():String
+		{
+            COMPILE::SWF
+            {
+                return ITextModel(model).html;
+            }
+            COMPILE::JS
+            {
+                return element.innerHTML;
+            }
+		}
+
+        /**
+         *  @private
+         */
+		public function set html(value:String):void
+        {
+            COMPILE::SWF
+            {
+                ITextModel(model).html = value;
+            }
+            COMPILE::JS
+            {
+                this.element.innerHTML = value;
+                this.dispatchEvent('textChange');
+            }
+        }
+
+        /**
+         *  @private
+         */
+        COMPILE::SWF
+        override public function addedToParent():void
+        {
+            super.addedToParent();
+            model.addEventListener("textChange", repeaterListener);
+            model.addEventListener("htmlChange", repeaterListener);
+        }
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+			addElementToWrapper(this,'span');
+
+            textNode = document.createTextNode(_text) as Text;
+            element.appendChild(textNode);
+
+            //element.style.whiteSpace = "nowrap";
+
+            return element;
+        }
+
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index b98f623..99552d3 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -24,15 +24,23 @@
 		white-space: nowrap
 	.vertical
 		display: block !important
-	
+
+/**
+ * Jewel Label
+ */	
+Label
+	IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
+	IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
+	iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead")
+	white-space: nowrap
 
 /**
  * Jewel TextField
  */
 TextField
 	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");
+	//IBeadView: ClassReference("org.apache.royale.html.beads.TextInputWithBorderView")
+	//IBeadController: ClassReference("org.apache.royale.html.beads.controllers.EditableTextKeyboardController")
 
 .vTextField--input
 .vTextField--label
diff --git a/frameworks/projects/Jewel/src/main/sass/jewel.sass b/frameworks/projects/Jewel/src/main/sass/jewel-framework.sass
similarity index 82%
rename from frameworks/projects/Jewel/src/main/sass/jewel.sass
rename to frameworks/projects/Jewel/src/main/sass/jewel-framework.sass
index 598c490..10e81d9 100644
--- a/frameworks/projects/Jewel/src/main/sass/jewel.sass
+++ b/frameworks/projects/Jewel/src/main/sass/jewel-framework.sass
@@ -16,20 +16,6 @@
  */
 
 // Variables
-//import "variables"
-//import "mixins"
-//import "functions"
-
+    
 // Global
 @import "global"
-
-// Components
-
-// Button
-//import "button"
-
-// TextButton
-//import "textbutton"
-
-// TextField
-//import "textfield"
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
index 03d06cb..32894c4 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
@@ -218,6 +218,14 @@
 }
 
 /**
+ * Jewel Label
+ */
+.jewel.label {
+  font-family: "Lato", sans-serif;
+  font-size: 0.75rem;
+}
+
+/**
  * Jewel TextField
  */
 TextField {
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
index ef40149..f6d83dd 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
@@ -218,6 +218,14 @@
 }
 
 /**
+ * Jewel Label
+ */
+.jewel.label {
+  font-family: "Lato", sans-serif;
+  font-size: 0.75rem;
+}
+
+/**
  * Jewel TextField
  */
 TextField {
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_button.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
similarity index 100%
rename from frameworks/themes/JewelTheme/src/main/sass/_button.sass
rename to frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_textfield.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
similarity index 55%
copy from frameworks/themes/JewelTheme/src/main/sass/_textfield.sass
copy to frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
index 84b696c..63b60c9 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_textfield.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
@@ -18,50 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /**
- * Jewel TextField
+ * Jewel Label
  */
-TextField
-	position: relative
-	display: inline-block
-	box-sizing: border-box
-	width: 300px
-	max-width: 100%
-	margin: 0
-
-.vTextField--input
-	font-size: 16px
-	font-family: 'Lato', sans-serif
-
-	border: none
-	border-bottom: 2px solid
-	border-bottom-color: #ff0000
-	display: block
-	margin: 0
-	padding: 4 0
-	width: 100px
-	background: transparent
-	text-align: left
-	color: inherit
-	outline: none
-
-.vTextField--label
-	bottom: 0
-	color: #ff0000
-	font-size: 13px
-	left: 0
-	right: 0
-	pointer-events: none
-	position: absolute
-	display: block
-	width: 100%
-	overflow: hidden
-	white-space: nowrap
-	text-align: left
-
-//    padding: 5px;
-//    border: solid 1px #666666;
-//    border-radius: 6px;
-//    color: #333333;
-//:hover 
-//    padding: 5px;
-//    background-color: #DFDFDF;
+.jewel.label
+	//IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
+	font:
+		family: $font-stack
+		size: $font-size
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
similarity index 100%
rename from frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass
rename to frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_textfield.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_textfield.sass
similarity index 100%
rename from frameworks/themes/JewelTheme/src/main/sass/_textfield.sass
rename to frameworks/themes/JewelTheme/src/main/sass/components/_textfield.sass
diff --git a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass
index 3c82eb7..2a9526d 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass
@@ -25,12 +25,7 @@
 @import "global"
 
 // Components
-
-// Button
-@import "button"
-
-// TextButton
-@import "textbutton"
-
-// TextField
-@import "textfield"
+@import "components/button"
+@import "components/textbutton"
+@import "components/label"
+@import "components/textfield"
diff --git a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass
index 54e8f75..2ecaa8c 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass
@@ -25,12 +25,7 @@
 @import "global"
 
 // Components
-
-// Button
-@import "button"
-
-// TextButton
-@import "textbutton"
-
-// TextField
-@import "textfield"
+@import "components/button"
+@import "components/textbutton"
+@import "components/label"
+@import "components/textfield"

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 12/28: Ant build for Jewel project, theme and example

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 0c6b9e2090528aa2607eba0f8226fa6c9709b1f8
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Mar 14 09:34:23 2018 -0700

    Ant build for Jewel project, theme and example
---
 examples/royale/JewelExample/build.xml             |   4 -
 .../src/main/config/compile-app-config.xml         |   1 +
 .../JewelTheme => js/projects/JewelJS}/build.xml   | 105 ++++++++++-----------
 .../JewelJS/src/main/config/compile-js-config.xml} |  54 ++++++-----
 .../src/main/config/compile-js-config.xml}         |  53 ++++++-----
 frameworks/themes/JewelTheme/build.xml             |   4 +-
 .../src/main/config/compile-swf-config.xml         |   5 -
 .../src/main/resources/royale-jewel-blue.css       |   1 +
 8 files changed, 115 insertions(+), 112 deletions(-)

diff --git a/examples/royale/JewelExample/build.xml b/examples/royale/JewelExample/build.xml
index b0cb3d3..5d5d8d3 100644
--- a/examples/royale/JewelExample/build.xml
+++ b/examples/royale/JewelExample/build.xml
@@ -43,10 +43,6 @@
                 <include name="**" />
             </fileset>
         </copy>
-        <replace file="${basedir}/bin/js-debug/index.html" token="${primary}" value="indigo" />
-        <replace file="${basedir}/bin/js-debug/index.html" token="${accent}" value="pink" />
-        <replace file="${basedir}/bin/js-release/index.html" token="${primary}" value="indigo" />
-        <replace file="${basedir}/bin/js-release/index.html" token="${accent}" value="pink" />
     </target>
     
     <target name="clean">
diff --git a/examples/royale/JewelExample/src/main/config/compile-app-config.xml b/examples/royale/JewelExample/src/main/config/compile-app-config.xml
index df6ea5b..d81fba3 100644
--- a/examples/royale/JewelExample/src/main/config/compile-app-config.xml
+++ b/examples/royale/JewelExample/src/main/config/compile-app-config.xml
@@ -23,6 +23,7 @@
     <compiler>
         <theme>
             <filename>../../../../../../frameworks/libs/JewelTheme.swc</filename>
+            <filename>../../../../../../frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css</filename>
         </theme>
     </compiler>
 </royale-config>
diff --git a/frameworks/themes/JewelTheme/build.xml b/frameworks/js/projects/JewelJS/build.xml
similarity index 50%
copy from frameworks/themes/JewelTheme/build.xml
copy to frameworks/js/projects/JewelJS/build.xml
index 6174e3e..151360c 100644
--- a/frameworks/themes/JewelTheme/build.xml
+++ b/frameworks/js/projects/JewelJS/build.xml
@@ -19,8 +19,8 @@
 -->
 
 
-<project name="JewelTheme" default="main" basedir=".">
-    <property name="ROYALE_HOME" location="../../.."/>
+<project name="JewelJS" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../../.."/>
     
     <property file="${ROYALE_HOME}/env.properties"/>
     <property environment="env"/>
@@ -28,40 +28,17 @@
     <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
     
     <property name="target.name" value="${ant.project.name}.swc" />
+    <echo file="${basedir}/${target.name}.properties">target.name.nojs=${ant.project.name}</echo>
+    <replaceregexp file="${basedir}/${target.name}.properties" match="(.*)JS$" replace="\1" flags="m" />
+    <property file="${basedir}/${target.name}.properties"/>
+    <delete file="${basedir}/${target.name}.properties"/>
     
-    <!-- doesn't contain compiled files so only need to compile JS version -->
-    <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
-    </target>
-    
-    <target name="compile-js">
-        <!-- doesn't contain compiled files so only need to compile JS version
-        <ant dir="${ROYALE_HOME}/frameworks/js/projects/${ant.project.name}JS/" inheritAll="false" >
-            <property name="ROYALE_SWF_COMPILER_HOME" value="${ROYALE_SWF_COMPILER_HOME}"/>
-            <property name="ROYALE_COMPILER_HOME" value="${ROYALE_COMPILER_HOME}"/>
-            <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
-        </ant>
-         -->
-    </target>
-    
-    <target name="copy-swc" if="env.AIR_HOME">
-        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/libs/${target.name}" />
-    </target>
-    
-    <target name="check-for-tests" >
-        <condition property="skip-tests" >
-            <not>
-                <available file="${basedir}/src/test/royale/build.xml" />
-            </not>
-        </condition>
-    </target>
-    
-    <target name="test" depends="check-for-tests" unless="skip-tests">
-        <ant dir="src/test/royale" />
+    <target name="main" depends="clean,check-compiler,compile" description="Full build of ${ant.project.name}.swc">
     </target>
     
     <target name="clean">
         <delete failonerror="false">
-            <fileset dir="${ROYALE_HOME}/frameworks/libs">
+            <fileset dir="${ROYALE_HOME}/frameworks/js/libs">
                 <include name="${target.name}"/>
             </fileset>
         </delete>
@@ -70,61 +47,75 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
-        <antcall target="clean-tests" />
     </target>
     
-    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
-        <ant dir="src/test/royale" target="clean"/>
-    </target>
-    
-    <target name="compile" description="Compiles .as files into .swc" if="env.AIR_HOME">
-        <echo message="Compiling libs/${ant.project.name}.swc"/>
-        <echo message="ROYALE_HOME: ${ROYALE_HOME}"/>
-        <echo message="ROYALE_SWF_COMPILER_HOME: ${ROYALE_SWF_COMPILER_HOME}"/>
+    <target name="compile" depends="check-compiler">
+        <echo message="Cross-compiling ${target.name}"/>
         <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
-        
+        <mkdir dir="${basedir}/target/generated-sources/royale"/>
         <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" >
             <jvmarg value="-Xmx384m" />
             <jvmarg value="-Dsun.io.useCanonCaches=false" />
             <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
             <arg value="+royalelib=${ROYALE_HOME}/frameworks" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
             <arg value="-compiler.strict-xml=true" />
-            <arg value="-compiler.targets=SWF" />
+            <arg value="-compiler.targets=SWF,JSRoyale" />
             <arg value="-output=${basedir}/target/${target.name}" />
-            <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" />
-            <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
-            <arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
+            <arg value="-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
+            <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml" />
         </java>
+        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/js/libs/${target.name}" />
     </target>
     
-    <target name="check-compiler" depends="check-compiler-home,check-transpiler-home">
+    <target name="copy-js" >
+        <mkdir dir="${ROYALE_HOME}/frameworks/js/generated-sources"/>
+        <copy todir="${ROYALE_HOME}/frameworks/js/generated-sources">
+            <fileset dir="${basedir}/target/generated-sources/royale">
+                <include name="**/**" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="check-compiler" depends="check-compiler-home, check-transpiler-home">
         <path id="lib.path">
             <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/>
         </path>
         <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
     </target>
     
-    <target name="check-compiler-home"
-        description="Set ROYALE_SWF_COMPILER_HOME to point at the compiler.">
+    <target name="check-compiler-home" unless="ROYALE_SWF_COMPILER_HOME"
+        description="Check ROYALE_SWF_COMPILER_HOME is a directory.">
         
-        <available file="${ROYALE_HOME}/lib/compiler-mxmlc.jar"
+        <echo message="ROYALE_SWF_COMPILER_HOME is ${env.ROYALE_SWF_COMPILER_HOME}"/>
+        
+        <available file="${env.ROYALE_SWF_COMPILER_HOME}/lib/compiler-mxmlc.jar"
         type="file"
         property="ROYALE_SWF_COMPILER_HOME"
-        value="${ROYALE_HOME}"/>
+        value="${env.ROYALE_SWF_COMPILER_HOME}"/>
         
-        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or the root of a Royale SDK"
+        <available file="${ROYALE_HOME}/../royale-compiler/compiler/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${ROYALE_HOME}/../royale-compiler/compiler"/>
+        
+        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or a Royale SDK folder"
         unless="ROYALE_SWF_COMPILER_HOME"/>
     </target>
     
-    <target name="check-transpiler-home"
-        description="Set ROYALE_COMPILER_HOME to point at the cross-compiler.">
+    <target name="check-transpiler-home" unless="ROYALE_COMPILER_HOME"
+        description="Check ROYALE_SWF_COMPILER_HOME is a directory.">
+        
+        <echo message="ROYALE_COMPILER_HOME is ${env.ROYALE_COMPILER_HOME}"/>
+        
+        <available file="${env.ROYALE_COMPILER_HOME}/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${env.ROYALE_COMPILER_HOME}"/>
         
-        <available file="${ROYALE_HOME}/js/lib/jsc.jar"
+        <available file="${ROYALE_HOME}/../royale-compiler/compiler-jx/lib/jsc.jar"
         type="file"
         property="ROYALE_COMPILER_HOME"
-        value="${ROYALE_HOME}/js"/>
+        value="${ROYALE_HOME}/../royale-compiler/compiler-jx"/>
         
         <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK"
         unless="ROYALE_COMPILER_HOME"/>
diff --git a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
similarity index 57%
copy from frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
copy to frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
index bb3e613..c49c05c 100644
--- a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
+++ b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
@@ -23,21 +23,11 @@
         
         <!-- build both SWF and JS. -->
         <targets>
+            <target>SWF</target>
             <target>JSRoyale</target>
         </targets>
         <strict-xml>true</strict-xml>
 
-        <external-library-path>
-            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
-            <path-element>../../../../../libs/Binding.swc</path-element>
-            <path-element>../../../../../libs/Core.swc</path-element>
-            <path-element>../../../../../libs/Graphics.swc</path-element>
-            <path-element>../../../../../libs/Basic.swc</path-element>
-            <path-element>../../../../../libs/Collections.swc</path-element>
-            <path-element>../../../../../libs/HTML.swc</path-element>
-        </external-library-path>
-        
-        <allow-subclass-overrides>true</allow-subclass-overrides>
 		<mxml>
 			<children-as-data>true</children-as-data>
 		</mxml>
@@ -47,7 +37,7 @@
 
         <define>
             <name>COMPILE::SWF</name>
-            <value>true</value>
+            <value>false</value>
         </define>
         <define>
             <name>COMPILE::JS</name>
@@ -64,10 +54,29 @@
 	  
         <locale/>
         
-        <library-path/>
-
+        <!-- overwrite the default library-path setting -->
+        <library-path>
+            <path-element>../../../../../../../js/libs/GCL.swc</path-element>
+            <!-- asjscompc won't 'link' these classes in, but will list their requires
+                 if these swcs are on the external-library-path then their requires
+                 will not be listed -->
+            <path-element>../../../../../libs/BindingJS.swc</path-element>
+            <path-element>../../../../../libs/CoreJS.swc</path-element>
+            <path-element>../../../../../libs/GraphicsJS.swc</path-element>
+            <path-element>../../../../../libs/CollectionsJS.swc</path-element>
+            <path-element>../../../../../libs/BasicJS.swc</path-element>
+            <path-element>../../../../../libs/HTMLJS.swc</path-element>
+        </library-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/royale/jewel</uri>
+                <manifest>../../../../../../projects/Jewel/src/main/resources/jewel-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
         <source-path>
-            <path-element>../royale</path-element>
+            <path-element>../../../../../../projects/Jewel/src/main/royale</path-element>
         </source-path>
         
         <warn-no-constructor>false</warn-no-constructor>
@@ -75,16 +84,19 @@
     
     <include-file>
         <name>defaults.css</name>
-        <path>../resources/defaults.css</path>
+        <path>../../../../../../projects/Jewel/src/main/resources/defaults.css</path>
     </include-file>
-
-    <include-lookup-only>true</include-lookup-only>
+    
+    <include-sources>
+    </include-sources>
     
     <include-classes>
-        <class>JewelThemeClasses</class>
+        <class>JewelClasses</class>
     </include-classes>
     
-    <target-player>${playerglobal.version}</target-player>
-	
+    <include-namespaces>
+        <uri>library://ns.apache.org/royale/jewel</uri>
+    </include-namespaces>
+        
 
 </royale-config>
diff --git a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml b/frameworks/js/themes/JewelThemeJS/src/main/config/compile-js-config.xml
similarity index 59%
copy from frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
copy to frameworks/js/themes/JewelThemeJS/src/main/config/compile-js-config.xml
index bb3e613..f663b1c 100644
--- a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
+++ b/frameworks/js/themes/JewelThemeJS/src/main/config/compile-js-config.xml
@@ -23,21 +23,11 @@
         
         <!-- build both SWF and JS. -->
         <targets>
+            <target>SWF</target>
             <target>JSRoyale</target>
         </targets>
         <strict-xml>true</strict-xml>
 
-        <external-library-path>
-            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
-            <path-element>../../../../../libs/Binding.swc</path-element>
-            <path-element>../../../../../libs/Core.swc</path-element>
-            <path-element>../../../../../libs/Graphics.swc</path-element>
-            <path-element>../../../../../libs/Basic.swc</path-element>
-            <path-element>../../../../../libs/Collections.swc</path-element>
-            <path-element>../../../../../libs/HTML.swc</path-element>
-        </external-library-path>
-        
-        <allow-subclass-overrides>true</allow-subclass-overrides>
 		<mxml>
 			<children-as-data>true</children-as-data>
 		</mxml>
@@ -47,7 +37,7 @@
 
         <define>
             <name>COMPILE::SWF</name>
-            <value>true</value>
+            <value>false</value>
         </define>
         <define>
             <name>COMPILE::JS</name>
@@ -64,27 +54,44 @@
 	  
         <locale/>
         
-        <library-path/>
-
+        <!-- overwrite the default library-path setting -->
+        <library-path>
+            <path-element>../../../../../../../js/libs/GCL.swc</path-element>
+            <!-- asjscompc won't 'link' these classes in, but will list their requires
+                 if these swcs are on the external-library-path then their requires
+                 will not be listed -->
+            <path-element>../../../../../libs/BindingJS.swc</path-element>
+            <path-element>../../../../../libs/CoreJS.swc</path-element>
+            <path-element>../../../../../libs/GraphicsJS.swc</path-element>
+            <path-element>../../../../../libs/CollectionsJS.swc</path-element>
+            <path-element>../../../../../libs/BasicJS.swc</path-element>
+            <path-element>../../../../../libs/HTMLJS.swc</path-element>
+        </library-path>
+        
+        <!--<namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/royale/jewel</uri>
+                <manifest>../../../../../../themes/JewelTheme/src/main/resources/jewel-manifest.xml</manifest>
+            </namespace>
+        </namespaces>-->
+        
         <source-path>
-            <path-element>../royale</path-element>
+            <path-element>../../../../../../themes/JewelTheme/src/main/royale</path-element>
         </source-path>
         
         <warn-no-constructor>false</warn-no-constructor>
     </compiler>
     
-    <include-file>
-        <name>defaults.css</name>
-        <path>../resources/defaults.css</path>
-    </include-file>
-
-    <include-lookup-only>true</include-lookup-only>
+    <include-sources>
+    </include-sources>
     
     <include-classes>
         <class>JewelThemeClasses</class>
     </include-classes>
     
-    <target-player>${playerglobal.version}</target-player>
-	
+    <!--<include-namespaces>
+        <uri>library://ns.apache.org/royale/jewel</uri>
+    </include-namespaces>-->
+        
 
 </royale-config>
diff --git a/frameworks/themes/JewelTheme/build.xml b/frameworks/themes/JewelTheme/build.xml
index 6174e3e..d2e5467 100644
--- a/frameworks/themes/JewelTheme/build.xml
+++ b/frameworks/themes/JewelTheme/build.xml
@@ -91,11 +91,11 @@
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
             <arg value="-compiler.strict-xml=true" />
-            <arg value="-compiler.targets=SWF" />
+            <arg value="-compiler.targets=SWF,JSRoyale" />
             <arg value="-output=${basedir}/target/${target.name}" />
             <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" />
             <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
-            <arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
+            <arg value="-js-load-config+=${basedir}/../../js/themes/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
         </java>
     </target>
     
diff --git a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
index bb3e613..38cf08c 100644
--- a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
+++ b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
@@ -73,11 +73,6 @@
         <warn-no-constructor>false</warn-no-constructor>
     </compiler>
     
-    <include-file>
-        <name>defaults.css</name>
-        <path>../resources/defaults.css</path>
-    </include-file>
-
     <include-lookup-only>true</include-lookup-only>
     
     <include-classes>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
index 32894c4..91f4512 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
@@ -20,6 +20,7 @@
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
+  fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
 }
 
 .royale {

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 03/28: uibase refactor to classList

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 2133d636f02f8c9409a15836a24f5b80bfb8de74
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Mon Mar 12 23:46:16 2018 +0100

    uibase refactor to classList
---
 .../main/royale/org/apache/royale/core/UIBase.as   | 1581 ++++++++++++++++++++
 .../main/royale/org/apache/royale/jewel/Button.as  |   14 +-
 .../royale/org/apache/royale/jewel/TextButton.as   |    4 +-
 3 files changed, 1587 insertions(+), 12 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
new file mode 100644
index 0000000..7abe638
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
@@ -0,0 +1,1581 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.core
+{
+    COMPILE::SWF
+    {
+        import flash.display.DisplayObject;
+        import flash.display.Sprite;
+        import flash.display.Stage;
+        import org.apache.royale.events.utils.MouseEventConverter;
+    }
+	
+	import org.apache.royale.events.Event;
+	import org.apache.royale.events.IEventDispatcher;
+	import org.apache.royale.events.MouseEvent;
+	import org.apache.royale.events.ValueChangeEvent;
+	import org.apache.royale.utils.loadBeadFromValuesManager;
+    import org.apache.royale.utils.StringUtil;
+
+    COMPILE::JS
+    {
+        import org.apache.royale.html.util.addElementToWrapper;
+        import org.apache.royale.utils.CSSUtils;
+    }
+	
+	/**
+	 *  Set a different class for click events so that
+	 *  there aren't dependencies on the flash classes
+	 *  on the JS side.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	[Event(name="click", type="org.apache.royale.events.MouseEvent")]
+	
+    /**
+     *  Set a different class for rollOver events so that
+     *  there aren't dependencies on the flash classes
+     *  on the JS side.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    [Event(name="rollOver", type="org.apache.royale.events.MouseEvent")]
+    
+    /**
+     *  Set a different class for rollOut events so that
+     *  there aren't dependencies on the flash classes
+     *  on the JS side.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    [Event(name="rollOut", type="org.apache.royale.events.MouseEvent")]
+    
+    /**
+     *  Set a different class for mouseDown events so that
+     *  there aren't dependencies on the flash classes
+     *  on the JS side.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    [Event(name="mouseDown", type="org.apache.royale.events.MouseEvent")]
+    
+    /**
+     *  Set a different class for mouseUp events so that
+     *  there aren't dependencies on the flash classes
+     *  on the JS side.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    [Event(name="mouseUp", type="org.apache.royale.events.MouseEvent")]
+    
+    /**
+     *  Set a different class for mouseMove events so that
+     *  there aren't dependencies on the flash classes
+     *  on the JS side.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    [Event(name="mouseMove", type="org.apache.royale.events.MouseEvent")]
+    
+    /**
+     *  Set a different class for mouseOut events so that
+     *  there aren't dependencies on the flash classes
+     *  on the JS side.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    [Event(name="mouseOut", type="org.apache.royale.events.MouseEvent")]
+    
+	/**
+	 *  Set a different class for mouseOver events so that
+	 *  there aren't dependencies on the flash classes
+	 *  on the JS side.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	[Event(name="mouseOver", type="org.apache.royale.events.MouseEvent")]
+	/**
+	 *  Set a different class for mouseWheel events so that
+	 *  there aren't dependencies on the flash classes
+	 *  on the JS side.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	[Event(name="mouseWheel", type="org.apache.royale.events.MouseEvent")]
+	
+	/**
+	 *  Set a different class for doubleClick events so that
+	 *  there aren't dependencies on the flash classes
+	 *  on the JS side.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	[Event(name="doubleClick", type="org.apache.royale.events.MouseEvent")]
+	
+    /**
+     *  The UIBase class is the base class for most composite user interface
+     *  components.  For the Flash Player, Buttons and Text controls may
+     *  have a different base class and therefore may not extend UIBase.
+     *  However all user interface components should implement IUIBase.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+	public class UIBase extends HTMLElementWrapper implements IStrandWithModel, IEventDispatcher, IParentIUIBase, IStyleableObject, ILayoutChild, IRoyaleElement
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function UIBase()
+		{
+			super();
+            
+            COMPILE::SWF
+            {
+                MouseEventConverter.setupInstanceConverters(this);
+                doubleClickEnabled = true; // make JS and flash consistent
+            }
+            
+            COMPILE::JS
+            {
+                createElement();
+            }
+        }
+        
+        COMPILE::SWF
+        public function get $displayObject():DisplayObject
+        {
+            return this;
+        }
+        
+        public function get royale_wrapper():Object
+        {
+            return this;
+        }
+        public function set royale_wrapper(value:Object):void
+        {
+        }
+        
+		private var _explicitWidth:Number;
+        
+        /**
+         *  The explicitly set width (as opposed to measured width
+         *  or percentage width).
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get explicitWidth():Number
+		{
+			return _explicitWidth;
+		}
+
+        /**
+         *  @private
+         */
+        public function set explicitWidth(value:Number):void
+		{
+			if (_explicitWidth == value)
+				return;
+			
+			// width can be pixel or percent not both
+			if (!isNaN(value))
+				_percentWidth = NaN;
+			
+			_explicitWidth = value;
+			
+			dispatchEvent(new Event("explicitWidthChanged"));
+		}
+		
+		private var _explicitHeight:Number;
+
+        /**
+         *  The explicitly set width (as opposed to measured width
+         *  or percentage width).
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function get explicitHeight():Number
+		{
+			return _explicitHeight;
+		}
+        
+        /**
+         *  @private
+         */
+		public function set explicitHeight(value:Number):void
+		{
+			if (_explicitHeight == value)
+				return;
+			
+			// height can be pixel or percent not both
+			if (!isNaN(value))
+				_percentHeight = NaN;
+			
+			_explicitHeight = value;
+			
+			dispatchEvent(new Event("explicitHeightChanged"));
+		}
+		
+		private var _percentWidth:Number;
+
+        /**
+         *  The requested percentage width this component
+         *  should have in the parent container.  Note that
+         *  the actual percentage may be different if the 
+         *  total is more than 100% or if there are other
+         *  components with explicitly set widths.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function get percentWidth():Number
+		{
+			return _percentWidth;
+		}
+
+        /**
+         *  @private
+         */
+		public function set percentWidth(value:Number):void
+		{
+			COMPILE::SWF {
+				if (_percentWidth == value)
+					return;
+				
+				if (!isNaN(value))
+					_explicitWidth = NaN;
+				
+				_percentWidth = value;
+			}
+			COMPILE::JS {
+				this._percentWidth = value;
+				this.positioner.style.width = value.toString() + '%';
+				if (!isNaN(value))
+					this._explicitWidth = NaN;
+			}
+			
+			dispatchEvent(new Event("percentWidthChanged"));
+		}
+
+        private var _percentHeight:Number;
+        
+        /**
+         *  The requested percentage height this component
+         *  should have in the parent container.  Note that
+         *  the actual percentage may be different if the 
+         *  total is more than 100% or if there are other
+         *  components with explicitly set heights.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get percentHeight():Number
+		{
+			return _percentHeight;
+		}
+        
+        /**
+         *  @private
+         */
+		public function set percentHeight(value:Number):void
+		{
+			COMPILE::SWF {
+				if (_percentHeight == value)
+					return;
+				
+				if (!isNaN(value))
+					_explicitHeight = NaN;
+				
+				_percentHeight = value;
+			}
+				
+			COMPILE::JS {
+				this._percentHeight = value;
+				this.positioner.style.height = value.toString() + '%';
+				if (!isNaN(value))
+					this._explicitHeight = NaN;
+			}
+			
+			dispatchEvent(new Event("percentHeightChanged"));
+		}
+		
+		private var _width:Number;
+
+        [Bindable("widthChanged")]
+        [PercentProxy("percentWidth")]
+        /**
+         *  The width of the component.  If no width has been previously
+         *  set the default width may be specified in the IValuesImpl
+         *  or determined as the bounding box around all child
+         *  components and graphics.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+        override public function get width():Number
+		{
+			var w:Number = _width;
+			if (isNaN(w)) {
+				w = $width;
+			}
+			return w;
+		}
+        
+        [Bindable("widthChanged")]
+        [PercentProxy("percentWidth")]
+        /**
+         * @royaleignorecoercion String
+         */
+        COMPILE::JS
+        public function get width():Number
+        {
+            var pixels:Number;
+            var strpixels:String = element.style.width as String;
+            if(strpixels == null)
+                pixels = NaN;
+            else
+                pixels = CSSUtils.toNumber(strpixels,NaN);
+            if (isNaN(pixels)) {
+                pixels = positioner.offsetWidth;
+                if (pixels == 0 && positioner.scrollWidth != 0) {
+                    // invisible child elements cause offsetWidth to be 0.
+                    pixels = positioner.scrollWidth;
+                }
+            }
+            return pixels;
+        }
+
+        /**
+         *  @private
+         */
+        COMPILE::SWF
+		override public function set width(value:Number):void
+		{
+			if (explicitWidth !== value)
+			{
+				explicitWidth = value;
+			}
+			
+            setWidth(value);
+		}
+        
+        /**
+         *  @private
+         */
+        COMPILE::JS
+        public function set width(value:Number):void
+        {
+            if (explicitWidth !== value)
+            {
+                explicitWidth = value;
+            }
+            
+            setWidth(value);
+        }
+
+        /**
+         *  Retrieve the low-level bounding box width.
+         *  Not implemented in JS.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+		public function get $width():Number
+		{
+			return super.width;
+		}
+		
+		private var _height:Number;
+
+        [Bindable("heightChanged")]
+        [PercentProxy("percentHeight")]
+        /**
+         *  The height of the component.  If no height has been previously
+         *  set the default height may be specified in the IValuesImpl
+         *  or determined as the bounding box around all child
+         *  components and graphics.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+		override public function get height():Number
+		{
+			var h:Number = _height;
+			if (isNaN(h)) {
+				h = $height;
+			}
+			return h;
+		}
+        
+        [Bindable("heightChanged")]
+        [PercentProxy("percentHeight")]
+        /**
+         * @royaleignorecoercion String
+         */
+        COMPILE::JS
+        public function get height():Number
+        {
+            var pixels:Number;
+            var strpixels:String = element.style.height as String;
+            if(strpixels == null)
+                pixels = NaN;
+            else
+                pixels = CSSUtils.toNumber(strpixels,NaN);
+            if (isNaN(pixels)) {
+                pixels = positioner.offsetHeight;
+                if (pixels == 0 && positioner.scrollHeight != 0) {
+                    // invisible child elements cause offsetHeight to be 0.
+                    pixels = positioner.scrollHeight;
+                }
+            }
+            return pixels;
+        }
+
+        /**
+         *  @private
+         */
+        COMPILE::SWF
+		override public function set height(value:Number):void
+		{
+			if (explicitHeight !== value)
+			{
+				explicitHeight = value;
+			}
+			
+            setHeight(value);
+		}
+        
+        /**
+         *  @private
+         */
+        COMPILE::JS
+        public function set height(value:Number):void
+        {
+            if (explicitHeight !== value)
+            {
+                explicitHeight = value;
+            }
+            
+            setHeight(value);
+        }
+        
+        /**
+         *  Retrieve the low-level bounding box height.
+         *  Not implemented in JS.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+		public function get $height():Number
+		{
+			return super.height;
+		}
+        
+        /**
+         *  @copy org.apache.royale.core.ILayoutChild#setHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function setHeight(value:Number, noEvent:Boolean = false):void
+        {
+            if (_height !== value)
+            {
+                _height = value;
+                COMPILE::JS
+                {
+                    this.positioner.style.height = value.toString() + 'px';        
+                }
+                if (!noEvent)
+                    dispatchEvent(new Event("heightChanged"));
+            }            
+        }
+
+        /**
+         *  @copy org.apache.royale.core.ILayoutChild#setWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function setWidth(value:Number, noEvent:Boolean = false):void
+        {
+            if (_width !== value)
+            {
+                _width = value;
+                COMPILE::JS
+                {
+                    this.positioner.style.width = value.toString() + 'px';        
+                }
+                if (!noEvent)
+                    dispatchEvent(new Event("widthChanged"));
+            }
+        }
+        
+        /**
+         *  @copy org.apache.royale.core.ILayoutChild#setWidthAndHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
+        {
+            if (_width !== newWidth)
+            {
+                _width = newWidth;
+                COMPILE::JS
+                {
+                    this.positioner.style.width = newWidth.toString() + 'px';        
+                }
+                if (!noEvent) 
+                    dispatchEvent(new Event("widthChanged"));
+            }
+            if (_height !== newHeight)
+            {
+                _height = newHeight;
+                COMPILE::JS
+                {
+                    this.positioner.style.height = newHeight.toString() + 'px';        
+                }
+                if (!noEvent)
+                    dispatchEvent(new Event("heightChanged"));
+            }            
+            dispatchEvent(new Event("sizeChanged"));
+        }
+        
+        /**
+         *  @copy org.apache.royale.core.ILayoutChild#isWidthSizedToContent
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function isWidthSizedToContent():Boolean
+        {
+            if (!isNaN(_explicitWidth))
+                return false;
+            if (!isNaN(_percentWidth))
+                return false;
+            var left:* = ValuesManager.valuesImpl.getValue(this, "left");
+            var right:* = ValuesManager.valuesImpl.getValue(this, "right");
+            return (left === undefined || right === undefined);
+
+        }
+        
+        /**
+         *  @copy org.apache.royale.core.ILayoutChild#isHeightSizedToContent
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function isHeightSizedToContent():Boolean
+        {
+            if (!isNaN(_explicitHeight))
+                return false;
+            if (!isNaN(_percentHeight))
+                return false;
+            var top:* = ValuesManager.valuesImpl.getValue(this, "top");
+            var bottom:* = ValuesManager.valuesImpl.getValue(this, "bottom");
+            return (top === undefined || bottom === undefined);          
+        }
+		
+        private var _x:Number;
+        
+        /**
+         *  @private
+         */
+        COMPILE::SWF
+        override public function set x(value:Number):void
+        {
+            super.x = _x = value;
+            if (!style)
+                style = { left: value };
+            else
+                style.left = value;
+        }
+        
+        /**
+         * @royaleignorecoercion HTMLElement
+         */
+        COMPILE::JS
+        public function set x(value:Number):void
+        {
+            //positioner.style.position = 'absolute';
+            if (positioner.parentNode != positioner.offsetParent)
+                value += (positioner.parentNode as HTMLElement).offsetLeft;
+            positioner.style.left = value.toString() + 'px';
+        }
+
+        /**
+         * @royaleignorecoercion String
+         * @royaleignorecoercion HTMLElement
+         */
+        COMPILE::JS
+        public function get x():Number
+        {
+            var strpixels:String = positioner.style.left as String;
+            var pixels:Number = parseFloat(strpixels);
+            if (isNaN(pixels))
+            {
+                pixels = positioner.offsetLeft;
+                if (positioner.parentNode != positioner.offsetParent)
+                    pixels -= (positioner.parentNode as HTMLElement).offsetLeft;
+            }
+            return pixels;
+        }
+        
+        /**
+         *  @copy org.apache.royale.core.ILayoutChild#setX
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         *  @royaleignorecoercion HTMLElement
+         */
+        public function setX(value:Number):void
+        {
+			COMPILE::SWF
+			{
+				super.x = value;					
+			}
+			COMPILE::JS
+			{
+				//positioner.style.position = 'absolute';
+                if (positioner.parentNode != positioner.offsetParent)
+                    value += (positioner.parentNode as HTMLElement).offsetLeft;
+				positioner.style.left = value.toString() + 'px';
+			}
+        }
+        
+        private var _y:Number;
+        
+        /**
+         *  @private
+         */
+        COMPILE::SWF
+        override public function set y(value:Number):void
+        {
+            super.y = _y = value;
+            if (!style)
+                style = { top: value };
+            else
+                style.top = value;
+        }
+        
+        /**
+         * @royaleignorecoercion HTMLElement
+         */
+        COMPILE::JS
+        public function set y(value:Number):void
+        {
+            //positioner.style.position = 'absolute';
+            if (positioner.parentNode != positioner.offsetParent)
+                value += (positioner.parentNode as HTMLElement).offsetTop;
+            positioner.style.top = value.toString() + 'px';
+        }
+        
+        /**
+         * @royaleignorecoercion String
+         * @royaleignorecoercion HTMLElement
+         */
+        COMPILE::JS
+        public function get y():Number
+        {
+            var strpixels:String = positioner.style.top as String;
+            var pixels:Number = parseFloat(strpixels);
+            if (isNaN(pixels))
+            {
+                pixels = positioner.offsetTop;
+                if (positioner.parentNode != positioner.offsetParent)
+                    pixels -= (positioner.parentNode as HTMLElement).offsetTop;
+            }
+            return pixels;
+        }
+        
+        /**
+         *  @copy org.apache.royale.core.ILayoutChild#setY
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         *  @royaleignorecoercion HTMLElement
+         */
+        public function setY(value:Number):void
+        {
+			COMPILE::SWF
+			{
+				super.y = value;					
+			}
+			COMPILE::JS
+			{
+				//positioner.style.position = 'absolute';
+                if (positioner.parentNode != positioner.offsetParent)
+                    value += (positioner.parentNode as HTMLElement).offsetTop;
+				positioner.style.top = value.toString() + 'px';				
+			}
+        }
+        
+		/**
+		 * @private
+		 */
+        [Bindable("visibleChanged")]
+        COMPILE::SWF
+		override public function set visible(value:Boolean):void
+		{
+			super.visible = value;
+			dispatchEvent(new Event(value?"show":"hide"));
+			dispatchEvent(new Event("visibleChanged"));
+        }
+        
+        COMPILE::JS
+        private var displayStyleForLayout:String;
+		
+		/**
+		 *  The display style is used for both visible
+		 *  and layout so is managed as a special case.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		COMPILE::JS
+		public function setDisplayStyleForLayout(value:String):void
+		{
+			if (positioner.style.display !== 'none')
+				positioner.style.display = value;
+			else
+				displayStyleForLayout = value;
+		}
+        
+        [Bindable("visibleChanged")]
+        COMPILE::JS
+        public function get visible():Boolean
+        {
+            return positioner.style.display !== 'none';
+        }
+        
+        COMPILE::JS
+        public function set visible(value:Boolean):void
+        {
+            var oldValue:Boolean = positioner.style.display !== 'none';
+            if (value !== oldValue) 
+            {
+                if (!value) 
+                {
+					displayStyleForLayout = positioner.style.display;
+                    positioner.style.display = 'none';
+                    dispatchEvent(new Event('hide'));
+                } 
+                else 
+                {
+                    if (displayStyleForLayout != null)
+                        positioner.style.display = displayStyleForLayout;
+                    dispatchEvent(new Event('show'));
+                }
+                dispatchEvent(new Event('visibleChanged'));
+            }
+        }
+        
+        /**
+         * @return The array of children.
+         * @royaleignorecoercion Array
+         */
+        COMPILE::JS
+        public function internalChildren():Array
+        {
+            return element.childNodes as Array;
+        }
+        
+        COMPILE::SWF
+		private var _model:IBeadModel;
+
+        /**
+         *  An IBeadModel that serves as the data model for the component.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+        public function get model():Object
+		{
+            if (_model == null)
+            {
+                // addbead will set _model
+                addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
+            }
+			return _model;
+		}
+
+        /**
+         *  @private
+         */
+        COMPILE::SWF
+		public function set model(value:Object):void
+		{
+			if (_model != value)
+			{
+				addBead(value as IBead);
+				dispatchEvent(new Event("modelChanged"));
+			}
+		}
+		
+        private var _view:IBeadView;
+        
+        /**
+         *  An IBeadView that serves as the view for the component.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         *  @royaleignorecoercion Class
+         */
+        public function get view():IBeadView
+        {
+            if(!_view)
+                _view = loadBeadFromValuesManager(IBeadView, "iBeadView", this) as IBeadView;
+            return _view;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set view(value:IBeadView):void
+        {
+            if (_view != value)
+            {
+                addBead(value as IBead);
+                dispatchEvent(new Event("viewChanged"));
+            }
+        }
+
+        private var _id:String;
+
+        /**
+         *  An id property for MXML documents.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get id():String
+		{
+			return _id;
+		}
+
+        /**
+         *  @private
+         */
+		public function set id(value:String):void
+		{
+			if (_id !== value)
+			{
+				_id = value;
+				dispatchEvent(new Event("idChanged"));
+			}
+            COMPILE::JS
+            {
+                element.id = _id;
+            }
+		}
+		
+        private var _style:Object;
+        
+        /**
+         *  The object that contains
+         *  "styles" and other associated
+         *  name-value pairs.  You can
+         *  also specify a string in
+         *  HTML style attribute format.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function get style():Object
+        {
+            return _style;
+        }
+        
+        /**
+         *  @private
+         *  @royaleignorecoercion String
+         */
+        public function set style(value:Object):void
+        {
+            if (_style !== value)
+            {
+                if (value is String)
+                {
+                    _style = ValuesManager.valuesImpl.parseStyles(value as String);
+                }
+                else
+                    _style = value;
+                if (!isNaN(_y))
+                    _style.top = _y;
+                if (!isNaN(_x))
+                    _style.left = _x;
+				COMPILE::JS
+				{
+					if (parent)
+						ValuesManager.valuesImpl.applyStyles(this, _style);
+				}
+                dispatchEvent(new Event("stylesChanged"));
+            }
+        }
+        
+        /**
+         *  A list of type names.  Often used for CSS
+         *  type selector lookups.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         * 
+         *  @royalesuppresspublicvarwarning
+         */
+        public var typeNames:String;
+        
+        private var _className:String;
+
+        /**
+         *  The classname.  Often used for CSS
+         *  class selector lookups.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function get className():String
+		{
+			return _className;
+		}
+
+        /**
+         *  @private
+         */
+        public function set className(value:String):void
+        {
+            if (_className !== value)
+            {
+                _className = value;
+
+                COMPILE::JS
+                {
+                    setClassName(_className);             
+                }
+                
+                dispatchEvent(new Event("classNameChanged"));
+            }
+        }
+
+        COMPILE::JS
+        protected function setClassName(value:String):void
+        {
+            element.classList.add(value);
+        }
+
+        /**
+         *  @copy org.apache.royale.core.IUIBase#element
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+        public function get element():IRoyaleElement
+        {
+            return this;
+        }
+		
+        /**
+         *  @copy org.apache.royale.core.Application#beads
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         * 
+         *  @royalesuppresspublicvarwarning
+         */
+		public var beads:Array;
+		
+        COMPILE::SWF
+		private var _beads:Vector.<IBead>;
+        
+        /**
+         *  @copy org.apache.royale.core.IStrand#addBead()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */        
+		override public function addBead(bead:IBead):void
+		{
+            var isView:Boolean;
+			if (!_beads)
+				_beads = new Vector.<IBead>;
+			_beads.push(bead);
+			if (bead is IBeadModel)
+				_model = bead as IBeadModel;
+            else if (bead is IBeadView)
+            {
+                _view = bead as IBeadView;
+                isView = true
+            }
+			bead.strand = this;
+			
+			if (isView) {
+				IEventDispatcher(this).dispatchEvent(new Event("viewChanged"));
+			}
+		}
+		
+        /**
+         *  @copy org.apache.royale.core.IStrand#getBeadByType()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+		public function getBeadByType(classOrInterface:Class):IBead
+		{
+			for each (var bead:IBead in _beads)
+			{
+				if (bead is classOrInterface)
+					return bead;
+			}
+			return null;
+		}
+		
+        /**
+         *  @copy org.apache.royale.core.IStrand#removeBead()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::SWF
+		public function removeBead(value:IBead):IBead	
+		{
+			var n:int = _beads.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				var bead:IBead = _beads[i];
+				if (bead == value)
+				{
+					_beads.splice(i, 1);
+					return bead;
+				}
+			}
+			return null;
+		}
+		
+        /**
+         *  @copy org.apache.royale.core.IParent#addElement()
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+		 *  @royaleignorecoercion org.apache.royale.core.IUIBase
+         */
+		public function addElement(c:IChild, dispatchEvent:Boolean = true):void
+		{
+            COMPILE::SWF
+            {
+                if (c is IUIBase)
+                {
+                    if (c is IRenderedObject)
+                        addChild(IRenderedObject(c).$displayObject);
+                    else
+                        addChild(c as DisplayObject);                        
+                    IUIBase(c).addedToParent();
+                }
+                else
+                    addChild(c as DisplayObject);
+            }
+            COMPILE::JS
+            {
+                element.appendChild(c.positioner);
+                (c as IUIBase).addedToParent();
+            }
+		}
+        
+        /**
+         *  @copy org.apache.royale.core.IParent#addElementAt()
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+		 *  @royaleignorecoercion org.apache.royale.core.IUIBase
+         */
+        public function addElementAt(c:IChild, index:int, dispatchEvent:Boolean = true):void
+        {
+            COMPILE::SWF
+            {
+                if (c is IUIBase)
+                {
+                    if (c is IRenderedObject)
+                        addChildAt(IUIBase(c).$displayObject, index);
+                    else
+                        addChildAt(c as DisplayObject, index);
+                    IUIBase(c).addedToParent();
+                }
+                else
+                    addChildAt(c as DisplayObject, index);
+            }
+            COMPILE::JS
+            {
+                var children:Array = internalChildren();
+                if (index >= children.length)
+                    addElement(c);
+                else
+                {
+                    element.insertBefore(c.positioner,
+                        children[index]);
+                    (c as IUIBase).addedToParent();
+                }
+            }
+        }
+        
+        /**
+         *  @copy org.apache.royale.core.IParent#getElementAt()
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function getElementAt(index:int):IChild
+        {
+            COMPILE::SWF
+            {
+                return getChildAt(index) as IChild;
+            }
+            COMPILE::JS
+            {
+                var children:Array = internalChildren();
+                if (children.length == 0)
+                {
+                    return null;
+                }
+                return children[index].royale_wrapper;
+            }
+        }        
+        
+        /**
+         *  @copy org.apache.royale.core.IParent#getElementIndex()
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function getElementIndex(c:IChild):int
+        {
+            COMPILE::SWF
+            {
+                if (c is IRenderedObject)
+                    return getChildIndex(IRenderedObject(c).$displayObject);
+                else
+                    return getChildIndex(c as DisplayObject);
+            }
+            COMPILE::JS
+            {
+                var children:Array = internalChildren();
+                var n:int = children.length;
+                for (var i:int = 0; i < n; i++)
+                {
+                    if (children[i] === c.element)
+                        return i;
+                }
+                return -1;                
+            }
+        }
+
+        /**
+         *  @copy org.apache.royale.core.IParent#removeElement()
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+		 *  @royaleignorecoercion HTMLElement
+         */
+        public function removeElement(c:IChild, dispatchEvent:Boolean = true):void
+        {
+            COMPILE::SWF
+            {
+                if (c is IRenderedObject)
+                    removeChild(IRenderedObject(c).$displayObject);
+                else
+                    removeChild(c as DisplayObject);
+            }
+            COMPILE::JS
+            {
+                element.removeChild(c.element as HTMLElement);
+            }
+        }
+		
+        /**
+         *  @copy org.apache.royale.core.IParent#numElements
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function get numElements():int
+        {
+            COMPILE::SWF
+            {
+                return numChildren;
+            }
+            COMPILE::JS
+            {
+                var children:Array = internalChildren();
+                return children.length;
+            }
+        }
+        
+        /**
+         *  The method called when added to a parent.  This is a good
+         *  time to set up beads.
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         *  @royaleignorecoercion Class
+         *  @royaleignorecoercion Number
+         */
+        public function addedToParent():void
+        {
+            var c:Class;
+			
+            COMPILE::JS
+            {
+				if (style)
+                    ValuesManager.valuesImpl.applyStyles(this, style);
+            }
+            
+			if (isNaN(_explicitWidth) && isNaN(_percentWidth)) 
+            {
+				var value:* = ValuesManager.valuesImpl.getValue(this,"width");
+				if (value !== undefined) 
+                {
+					if (value is String)
+                    {
+                        var s:String = String(value);
+                        if (s.indexOf("%") > -1)
+        					_percentWidth = Number(s.substring(0, s.length - 1));
+                        else
+                        {
+                            if (s.indexOf("px") !== -1)
+                                s = s.substring(0, s.length - 2);
+                            _width = _explicitWidth = Number(s);                            
+                        }
+                    }
+					else 
+						_width = _explicitWidth = value as Number;
+				}
+			}
+			
+			if (isNaN(_explicitHeight) && isNaN(_percentHeight)) 
+            {
+				value = ValuesManager.valuesImpl.getValue(this,"height");
+				if (value !== undefined) 
+                {
+                    if (value is String)
+                    {
+    					s = String(value);
+                        if (s.indexOf("%") !== -1)
+    						_percentHeight = Number(s.substring(0, s.length - 1));
+                        else
+                        {
+                            if (s.indexOf("px") !== -1)
+                                s = s.substring(0, s.length - 2);
+                            _height = _explicitHeight = Number(s);
+                        }
+					} 
+                    else
+						_height = _explicitHeight = value as Number;
+				}
+			}
+            
+            for each (var bead:IBead in beads)
+                addBead(bead);
+                
+			loadBeadFromValuesManager(IBeadModel, "iBeadModel", this);
+            loadBeadFromValuesManager(IBeadView, "iBeadView", this);
+			loadBeadFromValuesManager(IBeadController, "iBeadController", this);
+            dispatchEvent(new Event("beadsAdded"));
+        }
+
+        private var _measurementBead:IMeasurementBead;
+        /**
+         *  A measurement bead, if one exists.
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get measurementBead() : IMeasurementBead
+		{
+            if(!_measurementBead)
+            {
+			    _measurementBead = loadBeadFromValuesManager(IMeasurementBead, "iMeasurementBead", this) as IMeasurementBead;
+            }
+            return _measurementBead;
+		}
+        
+        COMPILE::SWF
+        private var _stageProxy:StageProxy;
+        
+        /**
+         *  @copy org.apache.royale.core.IUIBase#topMostEventDispatcher
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         *  @royaleignorecoercion org.apache.royale.events.IEventDispatcher
+         */
+		public function get topMostEventDispatcher():IEventDispatcher
+        {
+            COMPILE::SWF
+            {
+                if (!_stageProxy)
+                {
+                    _stageProxy = new StageProxy(stage);
+                    _stageProxy.addEventListener("removedFromStage", stageProxy_removedFromStageHandler);
+                }
+                
+                return _stageProxy;
+            }
+            COMPILE::JS
+            {
+                var e:WrappedHTMLElement = document.body as WrappedHTMLElement;
+                return e.royale_wrapper as IEventDispatcher;
+            }
+        }
+        
+        COMPILE::SWF
+        private function stageProxy_removedFromStageHandler(event:Event):void
+        {
+            _stageProxy = null;
+        }
+        
+        /**
+         * Rebroadcast an event from a sub component from the component.
+         */
+        protected function repeaterListener(event:Event):void
+        {
+            dispatchEvent(event);
+        }
+        
+        /**
+         * The HTMLElement used to position the component.
+         */
+        COMPILE::JS
+        public function get positioner():WrappedHTMLElement
+        {
+            return element;
+        }
+        
+        /**
+         * @private
+         */
+        COMPILE::JS
+        public function set positioner(value:WrappedHTMLElement):void
+        {
+            element = value;
+        }
+        
+        /**
+         * @return The actual element to be parented.
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        protected function createElement():WrappedHTMLElement
+        {
+			addElementToWrapper(this,'div');
+            positioner.style.display = 'block';
+            //positioner.style.position = 'relative';
+            return element;
+        }
+        
+        
+        /**
+         * The HTMLElement used to position the component.
+         * @royaleignorecoercion String
+         */
+        COMPILE::JS
+        public function get alpha():Number 
+        {
+            var stralpha:String = positioner.style.opacity as String;
+            var alpha:Number = parseFloat(stralpha);
+            return alpha;
+        }
+        
+        COMPILE::JS
+        public function set alpha(value:Number):void
+        {
+            positioner.style.opacity = value;
+        }
+
+        /**
+         * @param value The event containing new style properties.
+         */
+        COMPILE::JS
+        protected function styleChangeHandler(value:ValueChangeEvent):void
+        {
+            var newStyle:Object = {};
+            newStyle[value.propertyName] = value.newValue;
+            ValuesManager.valuesImpl.applyStyles(this, newStyle);
+        }
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         * @royaleignorecoercion org.apache.royale.core.IParent
+         */
+        COMPILE::JS
+        public function get parent():IParent
+        {
+            var p:WrappedHTMLElement = this.positioner.parentNode as WrappedHTMLElement;
+            var wrapper:IParent = p ? p.royale_wrapper as IParent : null;
+            return wrapper;
+        }
+        
+        COMPILE::SWF
+        {
+        [SWFOverride(returns="flash.display.DisplayObjectContainer")]
+        override public function get parent():IParent
+        {
+            return super.parent as IParent;
+        }
+        }
+        
+		COMPILE::SWF
+		public function get transformElement():IRoyaleElement
+		{
+			return this;
+		}
+		
+		COMPILE::JS
+		public function get transformElement():WrappedHTMLElement
+		{
+			return element;
+		}
+        
+        COMPILE::SWF
+        {
+        [SWFOverride(params="flash.events.Event", altparams="org.apache.royale.events.Event:org.apache.royale.events.MouseEvent")]
+        override public function dispatchEvent(event:org.apache.royale.events.Event):Boolean
+        {
+            return super.dispatchEvent(event);
+        }
+        }
+
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index 70d4d58..224c789 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -59,15 +59,11 @@ package org.apache.royale.jewel
 		{
 			super();
 
-            typeNames = "jewel button";
+            COMPILE::JS {
+                element.classList.add("jewel", "button");
+            }
 		}
 
-        COMPILE::JS
-        override protected function computeFinalClassNames():String
-        {
-            return super.computeFinalClassNames() + " " + element.classList;
-        }
-
         private var _primary:Boolean = false;
 
         /**
@@ -93,9 +89,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    
                     element.classList.toggle("primary", value);
-                    setClassName(computeFinalClassNames());
                 }
             }
         }
@@ -126,7 +120,6 @@ package org.apache.royale.jewel
                 COMPILE::JS
                 {
                     element.classList.toggle("secondary", value);
-                    setClassName(computeFinalClassNames());
                 }
             }
         }
@@ -157,7 +150,6 @@ package org.apache.royale.jewel
                 COMPILE::JS
                 {
                     element.classList.toggle("emphasized", value);
-                    setClassName(computeFinalClassNames());
                 }
             }
         }
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
index 67fdcdd..23eb625 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
@@ -51,7 +51,9 @@ package org.apache.royale.jewel
 		{
 			super();
 
-            typeNames = "jewel textbutton";
+            COMPILE::JS {
+                element.classList.add("jewel", "textbutton");
+            }
 		}
         
         /**

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 26/28: introduce jewel checkbox and refactor styles to make more easy handle the rest of components to be included

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit ec1dde1b2721a91e16be802acb2831e524437c4d
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Mon Mar 19 12:16:16 2018 +0100

    introduce jewel checkbox and refactor styles to make more easy handle the rest of components to be included
---
 .../src/main/royale/TextInputPlayGround.mxml       |   2 +-
 .../projects/Jewel/src/main/resources/defaults.css |  32 ++-
 .../Jewel/src/main/resources/jewel-manifest.xml    |   1 +
 .../projects/Jewel/src/main/royale/JewelClasses.as |   4 +-
 .../royale/org/apache/royale/jewel/CheckBox.as     | 230 +++++++++++++++++++++
 .../{RadioButtonView.as => views/CheckBoxView.as}  | 205 +++++++++---------
 .../jewel/beads/{ => views}/RadioButtonView.as     |   2 +-
 .../projects/Jewel/src/main/sass/_global.sass      |  37 ----
 .../Jewel/src/main/sass/components/_button.sass    |  20 ++
 .../Jewel/src/main/sass/components/_check.sass     |  27 +++
 .../Jewel/src/main/sass/components/_label.sass     |  27 +++
 .../Jewel/src/main/sass/components/_radio.sass     |  18 ++
 .../sass/{_global.sass => components/_slider.sass} |  38 +---
 .../src/main/sass/components/_textbutton.sass      |  20 ++
 .../Jewel/src/main/sass/components/_textfield.sass |  24 +++
 .../projects/Jewel/src/main/sass/defaults.sass     |  10 +
 16 files changed, 523 insertions(+), 174 deletions(-)

diff --git a/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
index 489bfb9..cb236e9 100644
--- a/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
@@ -24,5 +24,5 @@ limitations under the License.
 	
 	<j:RadioButton/>
 	<j:TextField text="Text Input" width="120" height="40"/>
-	
+	<j:CheckBox/>
 </js:Group>
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index 583ef87..627c8e3 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -30,16 +30,24 @@
   display: block !important;
 }
 
-Label {
-  iBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
+@media -royale-swf {
+  CheckBox {
+    IBeadModel: ClassReference("org.apache.royale.html.beads.models.ToggleButtonModel");
+    IBeadView: ClassReference("org.apache.royale.html.beads.CheckBoxView");
+  }
 }
-
 .jewel.label {
   white-space: nowrap;
 }
 
-TextField {
-  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
+Label {
+  iBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
+}
+
+.jewel.slider {
+  width: 100px;
+  height: 30px;
+  position: relative;
 }
 
 Slider {
@@ -49,12 +57,6 @@ Slider {
   IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController");
 }
 
-.jewel.slider {
-  width: 100px;
-  height: 30px;
-  position: relative;
-}
-
 .SliderTrack {
   position: absolute;
 }
@@ -74,6 +76,14 @@ Slider {
     IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
     IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView");
   }
+
+  CheckBox {
+    IBeadModel: ClassReference("org.apache.royale.html.beads.models.ToggleButtonModel");
+    IBeadView: ClassReference("org.apache.royale.html.beads.CheckBoxView");
+  }
+}
+TextField {
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
 }
 
 /*# sourceMappingURL=defaults.css.map */
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index c0840b8..7799373 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -28,6 +28,7 @@
     <component id="TextField" class="org.apache.royale.jewel.TextField"/>
     <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"/>
 
     <component id="Disabled" class="org.apache.royale.jewel.beads.Disabled"/>
 
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index 4f909d2..41f586d 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -36,7 +36,9 @@ package
             import org.apache.royale.jewel.beads.SliderThumbView; SliderThumbView;
             import org.apache.royale.jewel.beads.SliderTrackView; SliderTrackView;
 
-            import org.apache.royale.jewel.beads.RadioButtonView; RadioButtonView;
+            import org.apache.royale.jewel.beads.views.RadioButtonView; RadioButtonView;
+		    import org.apache.royale.jewel.beads.views.CheckBoxView; CheckBoxView;
+	
         }
 
         import org.apache.royale.jewel.beads.layouts.HorizontalLayout; HorizontalLayout;
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
new file mode 100644
index 0000000..ee8dbff
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/CheckBox.as
@@ -0,0 +1,230 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+    import org.apache.royale.html.CheckBox;
+    import org.apache.royale.core.IToggleButtonModel;
+
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+        import org.apache.royale.events.Event;
+        import org.apache.royale.html.util.addElementToWrapper;
+        import org.apache.royale.core.CSSClassList;
+    }
+
+    /**
+     *  The CheckBox class provides a Jewel UI-like appearance for a CheckBox.
+     *
+     *  A checkbox consists of a small square and, typically, text that clearly 
+     *  communicates a binary condition that will be set or unset when the user 
+     *  clicks or touches it. 
+     *  Checkboxes typically, but not necessarily, appear in groups, and can be
+     *  selected and deselected individually. The Jewel checkbox component allows
+     *  you to add display and click effects.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.3
+     */
+	public class CheckBox extends org.apache.royale.html.CheckBox
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.3
+         */
+		public function CheckBox()
+		{
+			super();
+
+            typeNames = "jewel checkbox";
+        }
+
+        COMPILE::JS
+        protected var input:HTMLInputElement;
+
+        COMPILE::JS
+        protected var checkbox:HTMLSpanElement;
+
+        COMPILE::JS
+        protected var label:HTMLLabelElement;
+        
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         * @royaleignorecoercion HTMLLabelElement
+         * @royaleignorecoercion HTMLInputElement
+         * @royaleignorecoercion HTMLSpanElement
+         * @royaleignorecoercion Text
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            label = addElementToWrapper(this,'label') as HTMLLabelElement;
+            
+            input = document.createElement('input') as HTMLInputElement;
+            input.type = 'checkbox';    
+            //input.className = 'input';
+            label.appendChild(input);
+            
+            checkbox = document.createElement('span') as HTMLSpanElement;
+            //checkbox.className = 'label';
+            label.appendChild(checkbox);
+            
+            (input as WrappedHTMLElement).royale_wrapper = this;
+            (checkbox as WrappedHTMLElement).royale_wrapper = this;
+            return element;
+        }
+
+        /**
+         *  The text label for the CheckBox.
+         *
+         *  @royaleignorecoercion Text
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.8
+         */
+		override public function get text():String
+		{
+            COMPILE::SWF
+            {
+    			return IToggleButtonModel(model).text;
+            }
+            COMPILE::JS
+            {
+                return textNode ? textNode.nodeValue : "";
+            }
+		}
+
+        /**
+         *  @private
+         */
+        override public function set text(value:String):void
+		{
+            COMPILE::SWF
+            {
+                IToggleButtonModel(model).text = value;
+            }
+
+            COMPILE::JS
+			{
+                if(!textNode)
+                {
+                    textNode = document.createTextNode('') as Text;
+                    checkbox.appendChild(textNode);
+                }
+                
+                textNode.nodeValue = value;	
+			}
+		}
+
+        /**
+         *  The value associated with the CheckBox.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9
+         */
+        public function get value():String
+        {
+            COMPILE::SWF
+            {
+                return IToggleButtonModel(model).html;
+            }
+
+            COMPILE::JS
+            {
+                return input.value;
+            }
+        }
+        public function set value(newValue:String):void
+        {
+            COMPILE::SWF
+            {
+                IToggleButtonModel(model).html = newValue;
+            }
+
+            COMPILE::JS
+            {
+                input.value = newValue;
+            }
+        }
+
+        COMPILE::JS
+        protected var textNode:Text;
+
+        [Bindable("change")]
+        /**
+         *  <code>true</code> if the check mark is displayed.
+         *
+         *  @default false
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.8
+         */
+		override public function get selected():Boolean
+		{
+            COMPILE::SWF
+            {
+    			return IToggleButtonModel(model).selected;
+            }
+            COMPILE::JS
+            {
+                return input.checked;
+            }
+		}
+
+        /**
+         *  @private
+         */
+        override public function set selected(value:Boolean):void
+        {
+            COMPILE::SWF
+            {
+                IToggleButtonModel(model).selected = value;
+            }
+
+            COMPILE::JS
+			{
+                if(input.checked == value)
+                    return;
+                var instance:Object = element['JewelCheckbox'];
+                if(instance)
+                {
+                    if(value)
+                        instance["check"]();
+                    else
+                        instance["uncheck"]();
+                }
+                else
+                    input.checked = value;
+                dispatchEvent(new Event(Event.CHANGE));
+            }
+        }
+    }
+
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as
similarity index 61%
copy from frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as
copy to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as
index 984b7b5..6a0424c 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as
@@ -16,7 +16,7 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.jewel.beads
+package org.apache.royale.jewel.beads.views
 {
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
@@ -28,29 +28,37 @@ package org.apache.royale.jewel.beads
 	import org.apache.royale.core.CSSTextField;
 	import org.apache.royale.core.IBeadView;
 	import org.apache.royale.core.IStrand;
-	import org.apache.royale.core.IValueToggleButtonModel;
+	import org.apache.royale.core.IToggleButtonModel;
 	import org.apache.royale.events.Event;
 	
-	/**
-	 *  The RadioButtonView class creates the visual elements of the org.apache.royale.html.RadioButton 
-	 *  component. 
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion Royale 0.0
-	 */
-	public class RadioButtonView extends BeadViewBase implements IBeadView
+    /**
+     *  The CheckBoxView class is the default view for
+     *  the org.apache.royale.html.CheckBox class.
+     *  It displays a simple checkbox with an 'x' if checked,
+     *  and a label on the right.  There are no styles or
+     *  properties to configure the look of the 'x' or the
+     *  position of the label relative to the checkbox as
+     *  there are no equivalents in the standard HTML checkbox.
+     * 
+     *  A more complex CheckBox could implement more view
+     *  configuration.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+	public class CheckBoxView extends BeadViewBase implements IBeadView
 	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
-		public function RadioButtonView()
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function CheckBoxView()
 		{
 			sprites = [ upSprite = new Sprite(),
 				        downSprite = new Sprite(),
@@ -81,46 +89,38 @@ package org.apache.royale.jewel.beads
 		
 		private var sprites:Array;
 		
-		private var _toggleButtonModel:IValueToggleButtonModel;
-		
-		/**
-		 *  The model used for the RadioButton.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
-		public function get toggleButtonModel() : IValueToggleButtonModel
+		private var _toggleButtonModel:IToggleButtonModel;
+
+        // TODO: Can we remove this?
+		private function get toggleButtonModel() : IToggleButtonModel
 		{
 			return _toggleButtonModel;
 		}
 		
-		/**
-		 *  @copy org.apache.royale.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
+        /**
+         *  @copy org.apache.royale.core.IBead#strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
 		override public function set strand(value:IStrand):void
 		{
 			super.strand = value;
-			_toggleButtonModel = value.getBeadByType(IValueToggleButtonModel) as IValueToggleButtonModel;
+            
+			_toggleButtonModel = value.getBeadByType(IToggleButtonModel) as IToggleButtonModel;
 			_toggleButtonModel.addEventListener("textChange", textChangeHandler);
 			_toggleButtonModel.addEventListener("htmlChange", htmlChangeHandler);
-			_toggleButtonModel.addEventListener("selectedValueChange", selectedValueChangeHandler);
-			if (_toggleButtonModel.text != null)
+			_toggleButtonModel.addEventListener("selectedChange", selectedChangeHandler);
+			if (_toggleButtonModel.text !== null)
 				text = _toggleButtonModel.text;
-			if (_toggleButtonModel.html != null)
-				html = _toggleButtonModel.html;
             for each( var s:Sprite in sprites )
             {
                 var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
                 tf.styleParent = value;
             }
-			
+            
 			layoutControl();
 			
 			var hitArea:Shape = new Shape();
@@ -137,25 +137,25 @@ package org.apache.royale.jewel.beads
 				text = toggleButtonModel.text;
 			if (toggleButtonModel.html !== null)
 				html = toggleButtonModel.html;
-			
-			if (toggleButtonModel.selected && toggleButtonModel.value == value) {
-				selected = true;
-			}
 		}
 		
-		/**
-		 *  The string label for the org.apache.royale.html.RadioButton.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
+        /**
+         *  @copy org.apache.royale.html.Label#text
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
 		public function get text():String
 		{
 			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
 			return tf.text;
 		}
+		
+        /**
+         *  @private
+         */
 		public function set text(value:String):void
 		{
 			for each( var s:Sprite in sprites )
@@ -167,19 +167,23 @@ package org.apache.royale.jewel.beads
 			layoutControl();
 		}
 		
-		/**
-		 *  The HTML string for the org.apache.royale.html.RadioButton.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
+        /**
+         *  @copy org.apache.royale.html.Label#html
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
 		public function get html():String
 		{
 			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
 			return tf.htmlText;
 		}
+		
+        /**
+         *  @private
+         */
 		public function set html(value:String):void
 		{
 			for each(var s:Sprite in sprites)
@@ -191,17 +195,11 @@ package org.apache.royale.jewel.beads
 			layoutControl();
 		}
 		
-		/**
-		 * @private
-		 */
 		private function textChangeHandler(event:Event):void
 		{
 			text = toggleButtonModel.text;
 		}
 		
-		/**
-		 * @private
-		 */
 		private function htmlChangeHandler(event:Event):void
 		{
 			html = toggleButtonModel.html;
@@ -209,17 +207,28 @@ package org.apache.royale.jewel.beads
 		
 		private var _selected:Boolean;
 		
-		/**
-		 * The selection state of the RadioButton
-		 */
+        /**
+         *  @copy org.apache.royale.core.IToggleButtonModel#selected
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
 		public function get selected():Boolean
 		{
 			return _selected;
 		}
+		
+        /**
+         *  @private
+         */
 		public function set selected(value:Boolean):void
 		{
 			_selected = value;
 			
+			layoutControl();
+			
 			if( value ) {
 				SimpleButton(_strand).upState = upAndSelectedSprite;
 				SimpleButton(_strand).downState = downAndSelectedSprite;
@@ -230,21 +239,21 @@ package org.apache.royale.jewel.beads
 				SimpleButton(_strand).downState = downSprite;
 				SimpleButton(_strand).overState = overSprite;
 			}
-			
-			layoutControl();
 		}
 		
-		/**
-		 * @private
-		 */
-		private function selectedValueChangeHandler(event:Event):void
+		private function selectedChangeHandler(event:Event):void
 		{
-			selected = _toggleButtonModel.value == _toggleButtonModel.selectedValue;
+			selected = toggleButtonModel.selected;
 		}
 		
-		/**
-		 * @private
-		 */
+        /**
+         *  Display the icon and text label
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
 		protected function layoutControl() : void
 		{
 			for each(var s:Sprite in sprites)
@@ -252,7 +261,7 @@ package org.apache.royale.jewel.beads
 				var icon:Shape = s.getChildByName("icon") as Shape;
 				var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
 				
-				drawRadioButton(icon);
+				drawCheckBox(icon);
 				
 				var mh:Number = Math.max(icon.height,tf.height);
 				
@@ -265,21 +274,27 @@ package org.apache.royale.jewel.beads
 			
 		}
 		
-		/**
-		 * @private
-		 */
-		protected function drawRadioButton(icon:Shape) : void
+        /**
+         *  Draw the checkbox
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		protected function drawCheckBox(icon:Shape) : void
 		{
 			icon.graphics.clear();
 			icon.graphics.beginFill(0xf8f8f8);
 			icon.graphics.lineStyle(1,0x808080);
-			icon.graphics.drawEllipse(0,0,10,10);
+			icon.graphics.drawRect(0,0,10,10);
 			icon.graphics.endFill();
 			
-			if( selected ) {
-				icon.graphics.beginFill(0);
-				icon.graphics.drawEllipse(3,3,4,4);
-				icon.graphics.endFill();
+			if( _toggleButtonModel.selected ) {
+                icon.graphics.lineStyle(2,0);
+				icon.graphics.moveTo(3,4);
+				icon.graphics.lineTo(5,7);
+				icon.graphics.lineTo(9,0);
 			}
 		}
 	}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/RadioButtonView.as
similarity index 99%
rename from frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as
rename to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/RadioButtonView.as
index 984b7b5..f5752ee 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/RadioButtonView.as
@@ -16,7 +16,7 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.jewel.beads
+package org.apache.royale.jewel.beads.views
 {
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index 4233a68..9fa8336 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -29,43 +29,6 @@
 	> *
 		display: block !important
 
-Label
-	iBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
-	//iBeadView: ClassReference("org.apache.royale.jewel.beads.views.JewelLabelViewBead")
-	//iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead")
-.jewel.label	
-	white-space: nowrap
-
-TextField
-	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")
-
-Slider
-	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel")
-	IBeadView:  ClassReference("org.apache.royale.jewel.beads.SliderView")
-	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout")
-	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController")
-
-.jewel.slider
-	width: 100px
-	height: 30px
-	position: relative
-
-.SliderTrack
-	position: absolute
 
-.SliderThumb
-	position: absolute
-	border-radius: 15px
 
-@media -royale-swf
-	Slider
-		iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView")
-		iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView")
 
-	RadioButton
-		IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel")
-		IBeadView:  ClassReference("org.apache.royale.jewel.beads.RadioButtonView")
-		//font-size: 11px
-		//font-family: Arial
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_button.sass b/frameworks/projects/Jewel/src/main/sass/components/_button.sass
new file mode 100644
index 0000000..019c818
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/components/_button.sass
@@ -0,0 +1,20 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_check.sass b/frameworks/projects/Jewel/src/main/sass/components/_check.sass
new file mode 100644
index 0000000..a4b504a
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/components/_check.sass
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+.jewel.check
+
+@media -royale-swf
+	CheckBox
+		IBeadModel: ClassReference("org.apache.royale.html.beads.models.ToggleButtonModel")
+		IBeadView:  ClassReference("org.apache.royale.html.beads.CheckBoxView")
+		//font-size: 11px
+		//font-family: Arial
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_label.sass b/frameworks/projects/Jewel/src/main/sass/components/_label.sass
new file mode 100644
index 0000000..628e3ca
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/components/_label.sass
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+.jewel.label	
+	white-space: nowrap
+
+Label
+	iBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
+	//iBeadView: ClassReference("org.apache.royale.jewel.beads.views.JewelLabelViewBead")
+	//iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead")
+
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_radio.sass b/frameworks/projects/Jewel/src/main/sass/components/_radio.sass
new file mode 100644
index 0000000..0c6fb82
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/components/_radio.sass
@@ -0,0 +1,18 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/components/_slider.sass
similarity index 70%
copy from frameworks/projects/Jewel/src/main/sass/_global.sass
copy to frameworks/projects/Jewel/src/main/sass/components/_slider.sass
index 4233a68..b61e110 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_slider.sass
@@ -17,29 +17,10 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-@namespace "library://ns.apache.org/royale/jewel"
-
-.layout.horizontal
-	white-space: nowrap
-	display: block
-	> *
-		display: inline-block !important
-.layout.vertical
-	vertical-align: top
-	> *
-		display: block !important
-
-Label
-	iBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
-	//iBeadView: ClassReference("org.apache.royale.jewel.beads.views.JewelLabelViewBead")
-	//iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead")
-.jewel.label	
-	white-space: nowrap
-
-TextField
-	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")
+.jewel.slider
+	width: 100px
+	height: 30px
+	position: relative
 
 Slider
 	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel")
@@ -47,11 +28,6 @@ Slider
 	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout")
 	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController")
 
-.jewel.slider
-	width: 100px
-	height: 30px
-	position: relative
-
 .SliderTrack
 	position: absolute
 
@@ -69,3 +45,9 @@ Slider
 		IBeadView:  ClassReference("org.apache.royale.jewel.beads.RadioButtonView")
 		//font-size: 11px
 		//font-family: Arial
+
+	CheckBox
+		IBeadModel: ClassReference("org.apache.royale.html.beads.models.ToggleButtonModel")
+		IBeadView:  ClassReference("org.apache.royale.html.beads.CheckBoxView")
+		//font-size: 11px
+		//font-family: Arial
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_textbutton.sass b/frameworks/projects/Jewel/src/main/sass/components/_textbutton.sass
new file mode 100644
index 0000000..019c818
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/components/_textbutton.sass
@@ -0,0 +1,20 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_textfield.sass b/frameworks/projects/Jewel/src/main/sass/components/_textfield.sass
new file mode 100644
index 0000000..7742b3f
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/components/_textfield.sass
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+TextField
+	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 10e81d9..a113a73 100644
--- a/frameworks/projects/Jewel/src/main/sass/defaults.sass
+++ b/frameworks/projects/Jewel/src/main/sass/defaults.sass
@@ -19,3 +19,13 @@
     
 // Global
 @import "global"
+
+// Components
+@import "components/button"
+@import "components/check"
+@import "components/label"
+@import "components/radio"
+@import "components/slider"
+@import "components/textbutton"
+@import "components/textfield"
+

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 06/28: added html template to example until we get font injection from theme

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 1ff20fd9d3f97a03179f49136ffdba54621994a5
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Mar 13 17:10:18 2018 +0100

    added html template to example until we get font injection from theme
---
 examples/royale/JewelExample/pom.xml               |  2 +-
 .../resources/jewel-example-index-template.html    | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml
index e71767e..5d0bcc6 100644
--- a/examples/royale/JewelExample/pom.xml
+++ b/examples/royale/JewelExample/pom.xml
@@ -48,7 +48,7 @@
         <configuration>
           <mainClass>App.mxml</mainClass>
           <targets>JSRoyale,SWF</targets>
-          <!--<htmlTemplate>${basedir}/target/javascript/bin/js-debug/jewel-js-index-template.html</htmlTemplate>-->
+          <htmlTemplate>${basedir}/target/javascript/bin/js-debug/jewel-example-index-template.html</htmlTemplate>
         </configuration>
       </plugin>
     </plugins>
diff --git a/examples/royale/JewelExample/src/main/resources/jewel-example-index-template.html b/examples/royale/JewelExample/src/main/resources/jewel-example-index-template.html
new file mode 100644
index 0000000..cf5ea3c
--- /dev/null
+++ b/examples/royale/JewelExample/src/main/resources/jewel-example-index-template.html
@@ -0,0 +1,31 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta name="Custom Template for injecting custom style CSS">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
+    <link rel="stylesheet" type="text/css" href="${application}.css">
+    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
+${head}
+</head>
+<body>
+${body}
+</body>
+</html>

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 28/28: 12 Color Palette Plan Almost done and working for Button, but only one project theme for now

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 33cf18f4659458c8d94fcbff4966af9e1f49c7e4
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Mar 21 00:32:23 2018 +0100

    12 Color Palette Plan Almost done and working for Button, but only one project theme for now
---
 examples/royale/JewelExample/pom.xml               |   4 +-
 .../src/main/royale/ButtonPlayGround.mxml          |   6 +-
 .../JewelTheme/src/main/resources/defaults.css     | 276 ++++++++++++++-------
 .../src/main/sass/_default-color-palette.sass      |  32 ++-
 .../themes/JewelTheme/src/main/sass/_mixins.sass   |  19 +-
 .../JewelTheme/src/main/sass/_variables.sass       |  10 +-
 .../src/main/sass/components/_button.sass          |  42 ++--
 .../src/main/sass/components/_textbutton.sass      |  68 +++--
 .../src/main/sass/components/_textfield.sass       |   9 +-
 9 files changed, 295 insertions(+), 171 deletions(-)

diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml
index 5427bc4..b2b08f8 100644
--- a/examples/royale/JewelExample/pom.xml
+++ b/examples/royale/JewelExample/pom.xml
@@ -120,13 +120,13 @@
       <scope>theme</scope>
       <classifier>js</classifier>
     </dependency>
-    <dependency>
+    <!-- <dependency>
       <groupId>org.apache.royale.framework</groupId>
       <artifactId>JewelBlueTheme</artifactId>
       <version>0.9.3-SNAPSHOT</version>
       <type>swc</type>
       <scope>theme</scope>
-    </dependency>
+    </dependency> -->
   </dependencies>
 
 </project>
diff --git a/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
index f89ecaa..51b95e5 100644
--- a/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
@@ -53,10 +53,10 @@ limitations under the License.
 		</j:beads>
 	</j:TextButton>
 	<j:Label text="Jewel Button Sizing (respect min values)"/>
-	<j:Slider id="slider" width="250" value="100" minimum="0" maximum="500"
+	<j:Slider id="slider" width="250" value="120" minimum="100" maximum="500"
 				valueChange="onValueChange(event)"/>
-	<j:Slider id="slider_v" width="250" value="40" minimum="0" maximum="300"
+	<j:Slider id="slider_v" width="250" value="40" minimum="40" maximum="300"
 				valueChange="onValueChange(event)"/>
-	<j:TextButton id="button" text="Button" width="100" height="40" primary="true"/>
+	<j:TextButton id="button" text="Button" width="120" height="40" primary="true"/>
 
 </js:Group>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index cc10a23..6e720c5 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -27,10 +27,7 @@
   margin: 10px;
 }
 
-/**
- * Jewel Button
- */
-.jewel.button, .jewel.button:hover, .jewel.textbutton, .jewel.textbutton:hover {
+.jewel.button {
   cursor: pointer;
   display: inline-block;
   margin: 0;
@@ -38,194 +35,299 @@
   min-width: 74px;
   min-height: 34px;
   /* Background: */
-  border: none;
   border-radius: 3px;
-}
-
-.jewel.button {
-  background-color: rgba(0, 0, 0, 0.3);
-  transition-duration: 0.4s;
-  color: rgba(0, 0, 0, 0.4);
+  border: 1px solid #b3b3b3;
+  background: linear-gradient(#e6e6e6, #cccccc);
+  box-shadow: inset 0 1px 0 white;
 }
 .jewel.button:hover {
-  background-color: rgba(15, 15, 15, 0.3);
+  border: 1px solid #a6a6a6;
+  background: linear-gradient(#d9d9d9, silver);
 }
 .jewel.button:active {
-  background-color: rgba(0, 0, 0, 0.3);
+  border: 1px solid #8d8d8d;
+  background: linear-gradient(silver, #a6a6a6);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.button:focus {
   outline: 0;
 }
 .jewel.button[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  box-shadow: none;
   cursor: unset;
 }
 
 .jewel.button.primary {
-  background-color: #dedede;
-  transition-duration: 0.4s;
-  color: #000000;
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border-radius: 3px;
+  border: 1px solid #0f88d1;
+  background: linear-gradient(#54b7f3, #24a3ef);
+  box-shadow: inset 0 1px 0 #9bd5f8;
 }
 .jewel.button.primary:hover {
-  background-color: #ededed;
+  border: 1px solid #0d79ba;
+  background: linear-gradient(#3CADF1, #1198e9);
 }
 .jewel.button.primary:active {
-  background-color: #cfcfcf;
+  border: 1px solid #0a5a8a;
+  background: linear-gradient(#1198e9, #0d79ba);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.button.primary:focus {
   outline: 0;
 }
 .jewel.button.primary[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  box-shadow: none;
   cursor: unset;
 }
 
 .jewel.button.secondary {
-  background-color: #011833;
-  transition-duration: 0.4s;
-  color: #000000;
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border-radius: 3px;
+  border: 1px solid #be390e;
+  background: linear-gradient(#f16c42, #ed4812);
+  box-shadow: inset 0 1px 0 #f6a389;
 }
 .jewel.button.secondary:hover {
-  background-color: #022651;
+  border: 1px solid #a6320d;
+  background: linear-gradient(#EF5A2A, #d64010);
 }
 .jewel.button.secondary:active {
-  background-color: #000a15;
+  border: 1px solid #772409;
+  background: linear-gradient(#d64010, #a6320d);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.button.secondary:focus {
   outline: 0;
 }
 .jewel.button.secondary[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  box-shadow: none;
   cursor: unset;
 }
 
 .jewel.button.emphasized {
-  background-color: #1FD348;
-  transition-duration: 0.4s;
-  color: #000000;
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border-radius: 3px;
+  border: 1px solid #277b32;
+  background: linear-gradient(#45c354, #34a241);
+  box-shadow: inset 0 1px 0 #7fd68a;
 }
 .jewel.button.emphasized:hover {
-  background-color: #30e158;
+  border: 1px solid #21682a;
+  background: linear-gradient(#3AB549, #2e8e39);
 }
 .jewel.button.emphasized:active {
-  background-color: #1bb83f;
+  border: 1px solid #15411a;
+  background: linear-gradient(#2e8e39, #21682a);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.button.emphasized:focus {
   outline: 0;
 }
 .jewel.button.emphasized[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  box-shadow: none;
   cursor: unset;
 }
 
-/**
- * Jewel TextButton
- */
-.jewel.textbutton, .jewel.textbutton:hover {
-  /* TextField */
+.jewel.label {
   font-family: "Lato", sans-serif;
-  font-style: bold;
-  font-size: 0.75rem;
-  text-transform: uppercase;
-  text-decoration: none;
-}
-.jewel.textbutton [disabled] {
-  text-shadow: unset;
+  font-size: 14px;
 }
 
 .jewel.textbutton {
-  background-color: rgba(0, 0, 0, 0.3);
-  transition-duration: 0.4s;
-  color: rgba(0, 0, 0, 0.4);
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border-radius: 3px;
+  border: 1px solid #b3b3b3;
+  background: linear-gradient(#e6e6e6, #cccccc);
+  box-shadow: inset 0 1px 0 white;
+  font-family: "Lato", sans-serif;
+  font-size: 14px;
+  font-weight: bold;
+  color: #808080;
+  text-transform: uppercase;
+  text-decoration: none;
 }
 .jewel.textbutton:hover {
-  background-color: rgba(15, 15, 15, 0.3);
+  border: 1px solid #a6a6a6;
+  background: linear-gradient(#d9d9d9, silver);
 }
 .jewel.textbutton:active {
-  background-color: rgba(0, 0, 0, 0.3);
+  border: 1px solid #8d8d8d;
+  background: linear-gradient(silver, #a6a6a6);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.textbutton:focus {
   outline: 0;
 }
 .jewel.textbutton[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  color: #b9b9b9;
+  box-shadow: none;
   cursor: unset;
+  font-weight: normal;
+  text-shadow: unset;
 }
 
 .jewel.textbutton.primary {
-  background-color: #dedede;
-  transition-duration: 0.4s;
-  color: #000000;
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border-radius: 3px;
+  border: 1px solid #0f88d1;
+  background: linear-gradient(#54b7f3, #24a3ef);
+  box-shadow: inset 0 1px 0 #9bd5f8;
+  font-family: "Lato", sans-serif;
+  font-size: 14px;
+  font-weight: bold;
+  color: #FFFFFF;
+  text-transform: uppercase;
+  text-decoration: none;
+  shadow: 0 1px 0 #d9d9d9;
 }
 .jewel.textbutton.primary:hover {
-  background-color: #ededed;
+  border: 1px solid #0d79ba;
+  background: linear-gradient(#3CADF1, #1198e9);
 }
 .jewel.textbutton.primary:active {
-  background-color: #cfcfcf;
+  border: 1px solid #0a5a8a;
+  background: linear-gradient(#1198e9, #0d79ba);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.textbutton.primary:focus {
   outline: 0;
 }
 .jewel.textbutton.primary[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  color: #b9b9b9;
+  box-shadow: none;
   cursor: unset;
+  font-weight: normal;
+  text-shadow: unset;
 }
 
 .jewel.textbutton.secondary {
-  background-color: #011833;
-  transition-duration: 0.4s;
-  color: #000000;
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border-radius: 3px;
+  border: 1px solid #be390e;
+  background: linear-gradient(#f16c42, #ed4812);
+  box-shadow: inset 0 1px 0 #f6a389;
+  font-family: "Lato", sans-serif;
+  font-size: 14px;
+  font-weight: bold;
+  color: #FFFFFF;
+  text-transform: uppercase;
+  text-decoration: none;
+  shadow: 0 1px 0 #d9d9d9;
 }
 .jewel.textbutton.secondary:hover {
-  background-color: #022651;
+  border: 1px solid #a6320d;
+  background: linear-gradient(#EF5A2A, #d64010);
 }
 .jewel.textbutton.secondary:active {
-  background-color: #000a15;
+  border: 1px solid #772409;
+  background: linear-gradient(#d64010, #a6320d);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.textbutton.secondary:focus {
   outline: 0;
 }
 .jewel.textbutton.secondary[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  color: #b9b9b9;
+  box-shadow: none;
   cursor: unset;
+  font-weight: normal;
+  text-shadow: unset;
 }
 
 .jewel.textbutton.emphasized {
-  background-color: #1FD348;
-  transition-duration: 0.4s;
-  color: #000000;
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border-radius: 3px;
+  border: 1px solid #277b32;
+  background: linear-gradient(#45c354, #34a241);
+  box-shadow: inset 0 1px 0 #7fd68a;
+  font-family: "Lato", sans-serif;
+  font-size: 14px;
+  font-weight: bold;
+  color: #FFFFFF;
+  text-transform: uppercase;
+  text-decoration: none;
+  shadow: 0 1px 0 #d9d9d9;
 }
 .jewel.textbutton.emphasized:hover {
-  background-color: #30e158;
+  border: 1px solid #21682a;
+  background: linear-gradient(#3AB549, #2e8e39);
 }
 .jewel.textbutton.emphasized:active {
-  background-color: #1bb83f;
+  border: 1px solid #15411a;
+  background: linear-gradient(#2e8e39, #21682a);
+  box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75);
 }
 .jewel.textbutton.emphasized:focus {
   outline: 0;
 }
 .jewel.textbutton.emphasized[disabled] {
-  background-color: #CCCCCC;
-  color: #888888;
+  border: 1px solid #c6c6c6;
+  background: #F9F9F9;
+  color: #b9b9b9;
+  box-shadow: none;
   cursor: unset;
+  font-weight: normal;
+  text-shadow: unset;
 }
 
-.jewel.label {
-  font-family: "Lato", sans-serif;
-  font-size: 0.75rem;
-}
-
-/**
- * Jewel TextField
- */
-TextField {
+.jewel.textfield {
   position: relative;
   display: inline-block;
   box-sizing: border-box;
@@ -234,7 +336,7 @@ TextField {
   margin: 0;
 }
 
-.vTextField--input {
+.jewel.textfield > input {
   font-size: 16px;
   font-family: "Lato", sans-serif;
   border: none;
@@ -250,7 +352,7 @@ TextField {
   outline: none;
 }
 
-.vTextField--label {
+.jewel.textfield > label {
   bottom: 0;
   color: #ff0000;
   font-size: 13px;
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_default-color-palette.sass b/frameworks/themes/JewelTheme/src/main/sass/_default-color-palette.sass
index 1b331d7..a4cfa7c 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_default-color-palette.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/_default-color-palette.sass
@@ -16,11 +16,29 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-// Color Themes
-$default-color: rgba(0,0,0,.3)
-$primary-color: #dedede
-$secondary-color: #011833
-$emphasized-color: #1FD348
 
-$default-font-color: rgba(0, 0, 0, .4)
-$font-color: #000000
\ No newline at end of file
+// 12 Color Themes (this will go to one separate project each one)
+$red: #EC1C24
+$amethyst: #922590
+$violet: #662C90
+$Sapphire: #2C74BE
+$blue: #3CADF1
+$turquoise: #29A89F
+$green: #3AB549
+$emerald: #8CC63C
+$yellow: #FCEF0A
+$sunflower: #F8B13F
+$orange: #F7941D
+$topaz: #EF5A2A
+
+// Common Colors
+$font-color: #FFFFFF
+$default-color: #d9d9d9
+$default-font-color: #808080
+$disabled-color: #F9F9F9
+
+// Var Colors
+$default-color: $default-color
+$primary-color: $blue
+$secondary-color: $topaz
+$emphasized-color: $green
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_mixins.sass b/frameworks/themes/JewelTheme/src/main/sass/_mixins.sass
index f4e7302..22b1b05 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_mixins.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/_mixins.sass
@@ -17,24 +17,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-=button-theme($button-color, $text-color)
-	//border-color: darken($button-color, 20%)
-	background-color: $button-color
-	transition:
-		duration: 0.4s
-	color: $text-color
-	&:hover
-		background-color: lighten($button-color, 6%)
-		//box-shadow: 0 .125em $off-wht, inset 0 .063em $off-wht, inset 0 -.188em lighten($btn-color, 2%)
-	&:active
-		background-color: darken($button-color, 6%)
-		//box-shadow: 0 .063em $off-wht, inset 0 0 1.094em darken($btn-color, 40%), inset 0 .063em darken($btn-color, 20%),inset 0 -0.188em darken($btn-color, 20%)
-	&:focus
-		outline: 0
-	&[disabled]
-		background-color: $disabled-color
-		color: $font-disabled-color
-		cursor: unset
+
 
 //=trans($val...)
 //	-webkit-transition: $val
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_variables.sass b/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
index 3a6b64b..9a5fef9 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
@@ -18,14 +18,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $font-stack: 'Lato', sans-serif
-$font-size: 0.75rem
-
-// Common Colors
-$white: rgba(white,.9)
-$disabled-color: #CCCCCC
-$font-disabled-color: #888888
+$font-size: 14px//0.75rem
 
 // Button variables
+$button-margin: 0 !default
+$button-padding: 10px 16px !default
+$button-min-height: 34px !default
 $button-min-width: 74px !default
 
 
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
index f8c5952..fc76a5a 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
@@ -17,34 +17,46 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-%button-def
+=button-theme($button-color)
 	cursor: pointer
-	
 	display: inline-block
-	margin: 0 //1rem
-	padding: 10px 16px //.938em 1.875em
+	margin: $button-margin //1rem
+	padding: $button-padding //.938em 1.875em
 	min-width: $button-min-width
-	min-height: 34px
-
+	min-height: $button-min-height
 	/* Background: */
-	border: none // .094em solid 
 	border-radius: 3px //.625em
-	//box-shadow: 0 .375em .313em -.313em rgba(black,.8), inset 0 .063em $off-wht, inset 0 -.188em rgba(black,.15)
-
-.jewel.button, .jewel.button:hover
-	@extend %button-def
+	border: 1px solid darken($button-color, 15%)// .094em solid 
+	background: linear-gradient(lighten($button-color, 5%), darken($button-color, 5%))
+	box-shadow: inset 0 1px 0 lighten($button-color, 20%)
+	//transition:
+	//	duration: 0.4s
+	&:hover
+		border: 1px solid darken($button-color, 20%)// .094em solid 
+		background: linear-gradient($button-color, darken($button-color, 10%))
+	&:active
+		border: 1px solid darken($button-color, 30%)// .094em solid 
+		background: linear-gradient(darken($button-color, 10%), darken($button-color, 20%))
+		box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75)
+	&:focus
+		outline: 0
+	&[disabled]
+		border: 1px solid darken($disabled-color, 20%)// .094em solid 
+		background: $disabled-color
+		box-shadow: none
+		cursor: unset
 
 .jewel.button
-	+button-theme($default-color, $default-font-color)
+	+button-theme($default-color)
 
 .jewel.button.primary
-	+button-theme($primary-color, $font-color)
+	+button-theme($primary-color)
 
 .jewel.button.secondary
-	+button-theme($secondary-color, $font-color)
+	+button-theme($secondary-color)
 
 .jewel.button.emphasized
-	+button-theme($emphasized-color, $font-color)
+	+button-theme($emphasized-color)
 
 
 //SVGs
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
index eb82343..d081579 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
@@ -17,45 +17,59 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-%textbutton-def
-	@extend %button-def
-	/* TextField */
+
+=textbutton-theme($button-color, $text-color)
+	cursor: pointer
+	display: inline-block
+	margin: $button-margin //1rem
+	padding: $button-padding //.938em 1.875em
+	min-width: $button-min-width
+	min-height: $button-min-height
+	/* Background: */
+	border-radius: 3px //.625em
+	border: 1px solid darken($button-color, 15%)// .094em solid 
+	background: linear-gradient(lighten($button-color, 5%), darken($button-color, 5%))
+	box-shadow: inset 0 1px 0 lighten($button-color, 20%)
+	//transition:
+	//	duration: 0.4s
 	font:
 		family: $font-stack 
-		style: bold 
-		size: $font-size
-	//+trans(0.2s ease-in-out)
+		size: $font-size//+trans(0.2s ease-in-out)
+		weight: bold
+	color: $text-color
 	text:
 		transform: uppercase
 		decoration: none 
-		//shadow: 0 -1px 0 rgba(0,0,0,0.70) //0 .063em 
-	[disabled]
+	@if $text-color == $font-color     
+		shadow: 0 1px 0 darken($text-color, 15%) //0 .063em
+	&:hover
+		border: 1px solid darken($button-color, 20%)// .094em solid 
+		background: linear-gradient($button-color, darken($button-color, 10%))
+	&:active
+		border: 1px solid darken($button-color, 30%)// .094em solid 
+		background: linear-gradient(darken($button-color, 10%), darken($button-color, 20%))
+		box-shadow: inset 0px 2px 3px 0px rgba(50, 50, 50, 0.75)
+	&:focus
+		outline: 0
+	&[disabled]
+		border: 1px solid darken($disabled-color, 20%)// .094em solid 
+		background: $disabled-color
+		color: darken($disabled-color, 25%)
+		box-shadow: none
+		cursor: unset
+		font:
+			weight: normal
 		text:
 			shadow: unset
 
-.jewel.textbutton, .jewel.textbutton:hover
-	@extend %textbutton-def
-
 .jewel.textbutton
-	+button-theme($default-color, $default-font-color)
+	+textbutton-theme($default-color, $default-font-color)
 
 .jewel.textbutton.primary
-	+button-theme($primary-color, $font-color)
+	+textbutton-theme($primary-color, $font-color)
 
 .jewel.textbutton.secondary
-	+button-theme($secondary-color, $font-color)
+	+textbutton-theme($secondary-color, $font-color)
 
 .jewel.textbutton.emphasized
-	+button-theme($emphasized-color, $font-color)
-
-// /* TextField: */
-//	font-family: $font-stack
-//	font-size: 14px
-//	font-weight: bold
-//	color: $font-normal-color
-//	text-shadow: 0 1px 0 #555
-
-//	padding: 10px 0px
-//	display: inline-block
-//	min-width: 80px
-
+	+textbutton-theme($emphasized-color, $font-color)
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_textfield.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_textfield.sass
index 84b696c..952e7c5 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_textfield.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_textfield.sass
@@ -17,10 +17,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-/**
- * Jewel TextField
- */
-TextField
+.jewel.textfield
 	position: relative
 	display: inline-block
 	box-sizing: border-box
@@ -28,7 +25,7 @@ TextField
 	max-width: 100%
 	margin: 0
 
-.vTextField--input
+.jewel.textfield > input
 	font-size: 16px
 	font-family: 'Lato', sans-serif
 
@@ -44,7 +41,7 @@ TextField
 	color: inherit
 	outline: none
 
-.vTextField--label
+.jewel.textfield > label
 	bottom: 0
 	color: #ff0000
 	font-size: 13px

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 05/28: fix textfield error setting typeNames in constructor

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 52f8c6abe983b08aa835f0c6c4bbfc9931fd1aa1
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Mar 13 16:31:10 2018 +0100

    fix textfield error setting typeNames in constructor
---
 .../royale/JewelExample/src/main/royale/TextInputPlayGround.mxml    | 6 ++----
 .../Jewel/src/main/royale/org/apache/royale/jewel/TextField.as      | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
index aa8c81a..489bfb9 100644
--- a/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
@@ -22,9 +22,7 @@ limitations under the License.
 		  xmlns:j="library://ns.apache.org/royale/jewel">
     
 	
-	
-	<j:TextField text="Text Input" width="120" height="40"/>
-
 	<j:RadioButton/>
-
+	<j:TextField text="Text Input" width="120" height="40"/>
+	
 </js:Group>
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/TextField.as
index 145ab37..69af720 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/TextField.as
@@ -49,6 +49,8 @@ package org.apache.royale.jewel
 		public function TextField()
 		{
 			super();
+
+            typeNames = "jewel textField";
 		}
 
         COMPILE::JS
@@ -82,8 +84,6 @@ package org.apache.royale.jewel
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-            typeNames = "TextField";
-
             var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
             div.className = typeNames;
             

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 18/28: Insert a ViewBead that is in JewelTheme and compiles ok, but JewelExample can't see it, why??

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 07ce14959a745bc890840b0c4ed5bf24cdd5f7f6
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Mar 15 23:00:12 2018 +0100

    Insert a ViewBead that is in JewelTheme and compiles ok, but JewelExample can't see it, why??
---
 examples/royale/JewelExample/pom.xml               |  4 +-
 .../Jewel/src/main/resources/jewel-framework.css   | 71 ----------------------
 frameworks/themes/JewelTheme/pom.xml               | 39 ++++++++++++
 .../JewelTheme/src/main/resources/defaults.css     |  1 +
 .../src/main/royale/JewelThemeClasses.as           |  2 +-
 .../apache/royale/beads/views/LabelViewBead.mxml   | 59 ++++++++++++++++++
 .../src/main/sass/components/_label.sass           |  1 +
 7 files changed, 103 insertions(+), 74 deletions(-)

diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml
index 19f1837..31fd5b8 100644
--- a/examples/royale/JewelExample/pom.xml
+++ b/examples/royale/JewelExample/pom.xml
@@ -97,13 +97,13 @@
       <type>swc</type>
       <scope>theme</scope>
     </dependency>
-    <dependency>
+    <!-- <dependency>
       <groupId>org.apache.royale.framework</groupId>
       <artifactId>JewelBlueTheme</artifactId>
       <version>0.9.3-SNAPSHOT</version>
       <type>swc</type>
       <scope>theme</scope>
-    </dependency>
+    </dependency> -->
   </dependencies>
 
 </project>
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-framework.css b/frameworks/projects/Jewel/src/main/resources/jewel-framework.css
deleted file mode 100644
index ac1da5e..0000000
--- a/frameworks/projects/Jewel/src/main/resources/jewel-framework.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-@namespace "library://ns.apache.org/royale/jewel";
-.layout.horizontal {
-  white-space: nowrap;
-  display: block;
-}
-.layout.horizontal > * {
-  display: inline-block !important;
-}
-
-.layout.vertical {
-  vertical-align: top;
-}
-.layout.vertical > * {
-  display: block !important;
-}
-
-.jewel.label {
-  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
-  white-space: nowrap;
-}
-
-TextField {
-  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
-}
-
-Slider {
-  IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
-  IBeadView: ClassReference("org.apache.royale.jewel.beads.SliderView");
-  IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout");
-  IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController");
-  position: relative;
-}
-
-.SliderTrack {
-  position: absolute;
-}
-
-.SliderThumb {
-  position: absolute;
-  border-radius: 15px;
-}
-
-@media -royale-swf {
-  Slider {
-    iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView");
-    iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView");
-  }
-
-  RadioButton {
-    IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
-    IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView");
-  }
-}
-
-/*# sourceMappingURL=jewel-framework.css.map */
diff --git a/frameworks/themes/JewelTheme/pom.xml b/frameworks/themes/JewelTheme/pom.xml
index 6370b58..84e7e1e 100644
--- a/frameworks/themes/JewelTheme/pom.xml
+++ b/frameworks/themes/JewelTheme/pom.xml
@@ -61,6 +61,7 @@
         <artifactId>sass-maven-plugin</artifactId>
         <version>3.5.2</version>
         <configuration>
+          <targets>JSRoyale,SWF</targets>
           <resources>
               <resource>
                   <source>
@@ -85,4 +86,42 @@
     </plugins>
   </build>
 
+  <dependencies>
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>${flash.version}</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+  </dependencies>
+
 </project>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index 714ec69..9022239 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -221,6 +221,7 @@
  * Jewel Label
  */
 .jewel.label {
+  IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead");
   font-family: "Lato", sans-serif;
   font-size: 0.75rem;
 }
diff --git a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
index 20662dc..cb5d275 100644
--- a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
+++ b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
@@ -27,7 +27,7 @@ package
      */
     internal class JewelThemeClasses
     {
-       
+       import org.apache.royale.beads.views.LabelViewBead; LabelViewBead;
     }
 
 }
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml
new file mode 100644
index 0000000..815c4dd
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:MXMLBeadView xmlns:fx="http://ns.adobe.com/mxml/2009"
+                 xmlns:js="library://ns.apache.org/royale/basic">
+				  
+    <fx:Script>
+        <![CDATA[
+            // import org.apache.royale.core.ITitleBarModel;
+            // import org.apache.royale.core.UIBase;
+            // import org.apache.royale.events.Event;
+            // import com.transpiledactionscript.puremvc.royale.employeeadmin.model.CustomPanelWithControlBarModel;
+     
+            // private function clickHandler():void
+            // {
+            //     var newEvent:org.apache.royale.events.Event = new org.apache.royale.events.Event('close');
+            //     UIBase(_strand).dispatchEvent(newEvent);   
+            // }
+        ]]>
+    </fx:Script>
+
+    <js:TextButton text="VIEWBEAD!!"/>
+    
+    <!-- <js:beads>
+        <js:MXMLBeadViewDataBinding />
+        <js:LayoutChangeNotifier watchedProperty="{titleLabel.text}" />
+        <js:LayoutChangeNotifier watchedProperty="{additionalInfoLabel.text}" />
+    </js:beads>
+
+    <js:Label id="titleLabel" text="{CustomPanelWithControlBarModel(model).title}" className="TitleBarTitle" >
+        <js:style>
+            <js:SimpleCSSStyles fontWeight="inherit" marginLeft="5" />
+        </js:style>
+    </js:Label>
+	<js:Label id="additionalInfoLabel" text="{CustomPanelWithControlBarModel(model).info}" height="16">
+		<js:style>
+            <js:SimpleCSSStyles fontWeight="inherit" marginRight="5" />
+        </js:style>
+	</js:Label>
+    <js:CloseButton id="closeButton" click="clickHandler()" className="TitleBarCloseButton"
+                    visible="{CustomPanelWithControlBarModel(model).showCloseButton}"/>
+     -->
+</js:MXMLBeadView>
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
index 63b60c9..27906d1 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
@@ -22,6 +22,7 @@
  */
 .jewel.label
 	//IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
+	IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead")
 	font:
 		family: $font-stack
 		size: $font-size
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 27/28: some minor changes

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 063d9b3ec0725712f233701e1ba8e3a488f37e35
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Mon Mar 19 17:10:05 2018 +0100

    some minor changes
---
 .../royale/org/apache/royale/jewel/TextField.as    |  4 +-
 .../src/main/sass/components/_button.sass          |  3 --
 .../components/{_textbutton.sass => _check.sass}   | 46 +---------------------
 .../components/{_textbutton.sass => _radio.sass}   | 46 +---------------------
 .../components/{_textbutton.sass => _slider.sass}  | 46 +---------------------
 .../src/main/sass/components/_textbutton.sass      |  7 +---
 .../themes/JewelTheme/src/main/sass/defaults.sass  |  5 ++-
 7 files changed, 11 insertions(+), 146 deletions(-)

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/TextField.as
index 69af720..6bd9f01 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/TextField.as
@@ -89,14 +89,14 @@ package org.apache.royale.jewel
             
             input = addElementToWrapper(this,'input') as HTMLInputElement;
             input.setAttribute('type', 'text');
-            input.className = "vTextField--input";
+            //input.className = "vTextField--input";
             
             //attach input handler to dispatch royale change event when user write in textinput
             //goog.events.listen(element, 'change', killChangeHandler);
             goog.events.listen(input, 'input', textChangeHandler);
             
             label = document.createElement('label') as HTMLLabelElement;
-            label.className = "vTextField--label";
+            //label.className = "vTextField--label";
 
             textNode = document.createTextNode('') as Text;
             label.appendChild(textNode);
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
index d04d186..f8c5952 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_button.sass
@@ -17,9 +17,6 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-/**
- * Jewel Button
- */
 %button-def
 	cursor: pointer
 	
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_check.sass
similarity index 52%
copy from frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
copy to frameworks/themes/JewelTheme/src/main/sass/components/_check.sass
index b02123a..7608f63 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_check.sass
@@ -16,49 +16,5 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
- 
-/**
- * Jewel TextButton
- */
-%textbutton-def
-	@extend %button-def
-	/* TextField */
-	font:
-		family: $font-stack 
-		style: bold 
-		size: $font-size
-	//+trans(0.2s ease-in-out)
-	text:
-		transform: uppercase
-		decoration: none 
-		//shadow: 0 .063em rgba(black,.3)
-	[disabled]
-		text:
-			shadow: unset
-
-.jewel.textbutton, .jewel.textbutton:hover
-	@extend %textbutton-def
-
-.jewel.textbutton
-	+button-theme($default-color, $default-font-color)
-
-.jewel.textbutton.primary
-	+button-theme($primary-color, $font-color)
-
-.jewel.textbutton.secondary
-	+button-theme($secondary-color, $font-color)
-
-.jewel.textbutton.emphasized
-	+button-theme($emphasized-color, $font-color)
-
-// /* TextField: */
-//	font-family: $font-stack
-//	font-size: 14px
-//	font-weight: bold
-//	color: $font-normal-color
-//	text-shadow: 0 1px 0 #555
-
-//	padding: 10px 0px
-//	display: inline-block
-//	min-width: 80px
 
+.jewel.check
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_radio.sass
similarity index 52%
copy from frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
copy to frameworks/themes/JewelTheme/src/main/sass/components/_radio.sass
index b02123a..689f939 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_radio.sass
@@ -16,49 +16,5 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
- 
-/**
- * Jewel TextButton
- */
-%textbutton-def
-	@extend %button-def
-	/* TextField */
-	font:
-		family: $font-stack 
-		style: bold 
-		size: $font-size
-	//+trans(0.2s ease-in-out)
-	text:
-		transform: uppercase
-		decoration: none 
-		//shadow: 0 .063em rgba(black,.3)
-	[disabled]
-		text:
-			shadow: unset
-
-.jewel.textbutton, .jewel.textbutton:hover
-	@extend %textbutton-def
-
-.jewel.textbutton
-	+button-theme($default-color, $default-font-color)
-
-.jewel.textbutton.primary
-	+button-theme($primary-color, $font-color)
-
-.jewel.textbutton.secondary
-	+button-theme($secondary-color, $font-color)
-
-.jewel.textbutton.emphasized
-	+button-theme($emphasized-color, $font-color)
-
-// /* TextField: */
-//	font-family: $font-stack
-//	font-size: 14px
-//	font-weight: bold
-//	color: $font-normal-color
-//	text-shadow: 0 1px 0 #555
-
-//	padding: 10px 0px
-//	display: inline-block
-//	min-width: 80px
 
+.jewel.radio
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_slider.sass
similarity index 52%
copy from frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
copy to frameworks/themes/JewelTheme/src/main/sass/components/_slider.sass
index b02123a..1d72a04 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_slider.sass
@@ -16,49 +16,5 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
- 
-/**
- * Jewel TextButton
- */
-%textbutton-def
-	@extend %button-def
-	/* TextField */
-	font:
-		family: $font-stack 
-		style: bold 
-		size: $font-size
-	//+trans(0.2s ease-in-out)
-	text:
-		transform: uppercase
-		decoration: none 
-		//shadow: 0 .063em rgba(black,.3)
-	[disabled]
-		text:
-			shadow: unset
-
-.jewel.textbutton, .jewel.textbutton:hover
-	@extend %textbutton-def
-
-.jewel.textbutton
-	+button-theme($default-color, $default-font-color)
-
-.jewel.textbutton.primary
-	+button-theme($primary-color, $font-color)
-
-.jewel.textbutton.secondary
-	+button-theme($secondary-color, $font-color)
-
-.jewel.textbutton.emphasized
-	+button-theme($emphasized-color, $font-color)
-
-// /* TextField: */
-//	font-family: $font-stack
-//	font-size: 14px
-//	font-weight: bold
-//	color: $font-normal-color
-//	text-shadow: 0 1px 0 #555
-
-//	padding: 10px 0px
-//	display: inline-block
-//	min-width: 80px
 
+.jewel.slider
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
index b02123a..eb82343 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_textbutton.sass
@@ -16,10 +16,7 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
- 
-/**
- * Jewel TextButton
- */
+
 %textbutton-def
 	@extend %button-def
 	/* TextField */
@@ -31,7 +28,7 @@
 	text:
 		transform: uppercase
 		decoration: none 
-		//shadow: 0 .063em rgba(black,.3)
+		//shadow: 0 -1px 0 rgba(0,0,0,0.70) //0 .063em 
 	[disabled]
 		text:
 			shadow: unset
diff --git a/frameworks/themes/JewelTheme/src/main/sass/defaults.sass b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
index b3bd62e..7ecc056 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
@@ -26,6 +26,9 @@
 
 // Components
 @import "components/button"
-@import "components/textbutton"
+@import "components/check"
 @import "components/label"
+@import "components/radio"
+@import "components/slider"
+@import "components/textbutton"
 @import "components/textfield"

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 01/28: redo branch due to mistake in the rebase

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit eba25062b9270627fcef41ab42c8fb40467a4e9f
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Mon Mar 12 22:10:01 2018 +0100

    redo branch due to mistake in the rebase
---
 examples/royale/JewelExample/.vscode/launch.json   |  21 ++
 examples/royale/JewelExample/.vscode/settings.json |   3 +
 examples/royale/JewelExample/.vscode/tasks.json    |   8 +
 examples/royale/JewelExample/README.txt            |  26 ++
 examples/royale/JewelExample/asconfig.json         |  31 ++
 examples/royale/JewelExample/build.xml             |  68 ++++
 examples/royale/JewelExample/pom.xml               | 102 ++++++
 .../src/main/config/compile-app-config.xml         |  28 ++
 .../src/main/resources/jewel-example-styles.css    |  25 ++
 .../royale/JewelExample/src/main/royale/App.mxml   |  40 +++
 .../src/main/royale/ButtonPlayGround.mxml          |  71 +++++
 .../src/main/royale/TextInputPlayGround.mxml       |  30 ++
 frameworks/projects/Jewel/.vscode/launch.json      |  21 ++
 frameworks/projects/Jewel/.vscode/settings.json    |   3 +
 frameworks/projects/Jewel/.vscode/tasks.json       |   8 +
 frameworks/projects/Jewel/asconfig.json            |  34 ++
 frameworks/projects/Jewel/build.xml                | 130 ++++++++
 frameworks/projects/Jewel/pom.xml                  | 186 +++++++++++
 .../Jewel/src/main/config/compile-swf-config.xml   | 105 +++++++
 .../projects/Jewel/src/main/resources/defaults.css |  70 +++++
 .../Jewel/src/main/resources/jewel-as-manifest.xml |  25 ++
 .../Jewel/src/main/resources/jewel-manifest.xml    |  37 +++
 .../projects/Jewel/src/main/resources/jewel.css    |  63 ++++
 .../projects/Jewel/src/main/royale/JewelClasses.as |  45 +++
 .../royale/org/apache/royale/jewel/Application.as  |  70 +++++
 .../main/royale/org/apache/royale/jewel/Button.as  | 165 ++++++++++
 .../royale/org/apache/royale/jewel/RadioButton.as  | 107 +++++++
 .../main/royale/org/apache/royale/jewel/Slider.as  |  72 +++++
 .../royale/org/apache/royale/jewel/TextButton.as   | 129 ++++++++
 .../royale/org/apache/royale/jewel/TextField.as    | 115 +++++++
 .../org/apache/royale/jewel/beads/Disabled.as      | 107 +++++++
 .../apache/royale/jewel/beads/RadioButtonView.as   | 286 +++++++++++++++++
 .../apache/royale/jewel/beads/SliderThumbView.as   | 121 ++++++++
 .../apache/royale/jewel/beads/SliderTrackView.as   | 121 ++++++++
 .../org/apache/royale/jewel/beads/SliderView.as    | 172 +++++++++++
 .../royale/jewel/beads/layouts/HorizontalLayout.as | 196 ++++++++++++
 .../royale/jewel/beads/layouts/VerticalLayout.as   | 193 ++++++++++++
 .../layouts/VerticalLayoutWithPaddingAndGap.as     | 341 +++++++++++++++++++++
 .../royale/jewel/supportClasses/ITextField.as      |  68 ++++
 .../royale/jewel/supportClasses/RadioButtonIcon.as | 117 +++++++
 .../royale/jewel/supportClasses/TextFieldBase.as   | 154 ++++++++++
 .../projects/Jewel/src/main/sass/_global.sass      |  66 ++++
 frameworks/projects/Jewel/src/main/sass/jewel.sass |  35 +++
 frameworks/projects/pom.xml                        |   1 +
 frameworks/themes/JewelTheme/.vscode/launch.json   |  21 ++
 frameworks/themes/JewelTheme/.vscode/settings.json |   3 +
 frameworks/themes/JewelTheme/.vscode/tasks.json    |   8 +
 frameworks/themes/JewelTheme/asconfig.json         |  34 ++
 frameworks/themes/JewelTheme/build.xml             | 133 ++++++++
 frameworks/themes/JewelTheme/pom.xml               |  88 ++++++
 .../src/main/config/compile-swf-config.xml         |  90 ++++++
 .../src/main/resources/assets/JewelButton2.svg     |  44 +++
 .../src/main/resources/assets/jewel-button.svg     |  37 +++
 .../src/main/resources/royale-jewel-blue.css       | 263 ++++++++++++++++
 .../src/main/resources/royale-jewel-red.css        | 263 ++++++++++++++++
 .../src/main/royale/JewelThemeClasses.as           |  36 +++
 .../apache/royale/jewel/JewelThemeFontInject.as    |  46 +++
 .../themes/JewelTheme/src/main/sass/_button.sass   |  73 +++++
 .../JewelTheme/src/main/sass/_functions.sass       |  18 ++
 .../themes/JewelTheme/src/main/sass/_global.sass   |  32 ++
 .../themes/JewelTheme/src/main/sass/_mixins.sass   |  43 +++
 .../JewelTheme/src/main/sass/_textbutton.sass      |  64 ++++
 .../JewelTheme/src/main/sass/_textfield.sass       |  67 ++++
 .../JewelTheme/src/main/sass/_variables.sass       |  31 ++
 .../src/main/sass/colors/_blue-color-palette.sass  |  26 ++
 .../src/main/sass/colors/_red-color-palette.sass   |  26 ++
 .../src/main/sass/royale-jewel-blue.sass           |  36 +++
 .../JewelTheme/src/main/sass/royale-jewel-red.sass |  36 +++
 frameworks/themes/pom.xml                          |   1 +
 69 files changed, 5335 insertions(+)

diff --git a/examples/royale/JewelExample/.vscode/launch.json b/examples/royale/JewelExample/.vscode/launch.json
new file mode 100644
index 0000000..5dfb672
--- /dev/null
+++ b/examples/royale/JewelExample/.vscode/launch.json
@@ -0,0 +1,21 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch Chrome against debug.html, with sourcemaps",
+            "type": "chrome",
+            "request": "launch",
+            "file": "${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": "mvn"
+        },
+        {
+            "name": "Launch Firefox against debug.html, with sourcemaps",
+            "type": "firefox",
+            "request": "launch",
+            "file": "${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": "mvn"
+        }
+    ]
+}
diff --git a/examples/royale/JewelExample/.vscode/settings.json b/examples/royale/JewelExample/.vscode/settings.json
new file mode 100644
index 0000000..1f5a970
--- /dev/null
+++ b/examples/royale/JewelExample/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+    "nextgenas.sdk.framework": "/Users/carlosrovira/Dev/Royale/Sdks/apache-royale-0.9.2-SNAPSHOT"
+}
\ No newline at end of file
diff --git a/examples/royale/JewelExample/.vscode/tasks.json b/examples/royale/JewelExample/.vscode/tasks.json
new file mode 100644
index 0000000..5d6198d
--- /dev/null
+++ b/examples/royale/JewelExample/.vscode/tasks.json
@@ -0,0 +1,8 @@
+{
+	// for the documentation about the tasks.json format
+	"version": "0.1.0",
+	"command": "mvn",
+	"args": ["clean", "install", "-DskipTests"],
+	"isShellCommand": true,
+	"showOutput": "always"
+}
\ No newline at end of file
diff --git a/examples/royale/JewelExample/README.txt b/examples/royale/JewelExample/README.txt
new file mode 100644
index 0000000..7b84b3a
--- /dev/null
+++ b/examples/royale/JewelExample/README.txt
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+DESCRIPTION
+
+The JewelExample is demo app to customize styles on Royale components
+
+Right now this is a starter project with only a button to start developing styles
+
+
diff --git a/examples/royale/JewelExample/asconfig.json b/examples/royale/JewelExample/asconfig.json
new file mode 100644
index 0000000..4b6259e
--- /dev/null
+++ b/examples/royale/JewelExample/asconfig.json
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+{
+    "config": "royale",
+    "compilerOptions": {
+        "debug": false,
+        "targets": ["JSRoyale","SWF"],
+        "source-map": true
+    },
+    "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
+    "files":
+    [
+        "src/main/royale/App.mxml"
+    ]
+}
diff --git a/examples/royale/JewelExample/build.xml b/examples/royale/JewelExample/build.xml
new file mode 100644
index 0000000..b0cb3d3
--- /dev/null
+++ b/examples/royale/JewelExample/build.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="JewelExample" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    <property name="example" value="App" />
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+
+    <include file="${basedir}/../../build_example.xml" />
+    
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+        <mkdir dir="${basedir}/bin/js-debug/assets" />
+        <copy todir="${basedir}/bin/js-debug/assets" failonerror="false">
+            <fileset dir="${basedir}/src/main/resources/assets">
+                <include name="**" />
+            </fileset>
+        </copy>
+        <mkdir dir="${basedir}/bin/js-release/assets" />
+        <copy todir="${basedir}/bin/js-release/assets" failonerror="false">
+            <fileset dir="${basedir}/src/main/resources/assets">
+                <include name="**" />
+            </fileset>
+        </copy>
+        <replace file="${basedir}/bin/js-debug/index.html" token="${primary}" value="indigo" />
+        <replace file="${basedir}/bin/js-debug/index.html" token="${accent}" value="pink" />
+        <replace file="${basedir}/bin/js-release/index.html" token="${primary}" value="indigo" />
+        <replace file="${basedir}/bin/js-release/index.html" token="${accent}" value="pink" />
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    <target name="examine" depends="build_example.get.browser">
+        <property name="which" value="debug" />
+        <echo message="See various team members."/>
+        <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+            <arg value="${basedir}/bin/js-${which}/index.html"/>
+        </exec>
+    </target>
+
+
+</project>
diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml
new file mode 100644
index 0000000..e71767e
--- /dev/null
+++ b/examples/royale/JewelExample/pom.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.examples</groupId>
+    <artifactId>examples-royale</artifactId>
+    <version>0.9.3-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>JewelExample</artifactId>
+  <version>0.9.3-SNAPSHOT</version>
+  <packaging>swf</packaging>
+
+  <name>Apache Royale: Examples: Royale: JewelExample</name>
+
+  <properties>
+    <!-- Customize Jewel colors  -->
+    <primary>red</primary>
+    <secondary>grey</secondary>
+  </properties>
+
+  <build>
+    <sourceDirectory>src/main/royale</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <mainClass>App.mxml</mainClass>
+          <targets>JSRoyale,SWF</targets>
+          <!--<htmlTemplate>${basedir}/target/javascript/bin/js-debug/jewel-js-index-template.html</htmlTemplate>-->
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>${flash.version}</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Jewel</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Jewel</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>JewelTheme</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <scope>theme</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/examples/royale/JewelExample/src/main/config/compile-app-config.xml b/examples/royale/JewelExample/src/main/config/compile-app-config.xml
new file mode 100644
index 0000000..df6ea5b
--- /dev/null
+++ b/examples/royale/JewelExample/src/main/config/compile-app-config.xml
@@ -0,0 +1,28 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<royale-config>
+    <js-output-optimization>
+        <optimization>skipAsCoercions</optimization>
+    </js-output-optimization>
+    <compiler>
+        <theme>
+            <filename>../../../../../../frameworks/libs/JewelTheme.swc</filename>
+        </theme>
+    </compiler>
+</royale-config>
diff --git a/examples/royale/JewelExample/src/main/resources/jewel-example-styles.css b/examples/royale/JewelExample/src/main/resources/jewel-example-styles.css
new file mode 100644
index 0000000..48829b3
--- /dev/null
+++ b/examples/royale/JewelExample/src/main/resources/jewel-example-styles.css
@@ -0,0 +1,25 @@
+/*
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+*/
+
+@namespace "http://www.w3.org/1999/xhtml";
+
+
+
diff --git a/examples/royale/JewelExample/src/main/royale/App.mxml b/examples/royale/JewelExample/src/main/royale/App.mxml
new file mode 100644
index 0000000..3d41276
--- /dev/null
+++ b/examples/royale/JewelExample/src/main/royale/App.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!---
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:j="library://ns.apache.org/royale/jewel"
+			   xmlns:js="library://ns.apache.org/royale/basic"
+			   xmlns:local="*">
+
+	<fx:Style source="../../main/resources/jewel-example-styles.css"/>
+	
+	<js:valuesImpl>
+		<js:SimpleCSSValuesImpl />
+	</js:valuesImpl>
+	<js:initialView>
+		<js:View>
+			<js:beads>
+				<js:HorizontalLayout />
+			</js:beads>
+			<local:ButtonPlayGround/>
+			<local:TextInputPlayGround/>
+        </js:View>
+	</js:initialView>
+</j:Application>
diff --git a/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
new file mode 100644
index 0000000..5ca13a1
--- /dev/null
+++ b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
+		  xmlns:js="library://ns.apache.org/royale/basic"
+		  xmlns:j="library://ns.apache.org/royale/jewel">
+    
+	<fx:Script>
+		<![CDATA[
+        private function onValueChange(event:Event):void
+        {
+        	button.width = slider.value;
+			button.height = slider_v.value;
+        }
+    	]]>
+	</fx:Script>
+
+	<js:beads>
+		<js:VerticalLayoutWithPaddingAndGap gap="10"/>
+	</js:beads>
+	
+	<js:Label text="Basic"/>
+	<js:Button/>
+	<js:TextButton text="Basic"/>
+
+	<js:Label text="Jewel Button"/>
+	<j:Button primary="true"/>
+
+	<js:Label text="Jewel TextButton"/>
+	
+	<j:TextButton text="DEFAULT"/>
+
+	<j:TextButton text="Button With More Text"/>
+
+	<j:TextButton text="PRIMARY" primary="true"/>
+
+	<j:TextButton text="SECONDARY" secondary="true"/>
+
+	<j:TextButton text="EMPHASIZED" emphasized="true"/>
+
+	<j:TextButton text="Disabled" primary="true">
+		<j:beads>
+			<j:Disabled/>
+		</j:beads>
+	</j:TextButton>
+
+	<js:Label text="Jewel Button Sizing (respect min values)"/>
+	<j:Slider id="slider" width="250" value="100" minimum="0" maximum="500"
+				valueChange="onValueChange(event)"/>
+	<j:Slider id="slider_v" width="250" value="40" minimum="0" maximum="300"
+				valueChange="onValueChange(event)"/>
+
+	<j:TextButton id="button" text="Button" width="100" height="40" primary="true"/>
+
+</js:Group>
diff --git a/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
new file mode 100644
index 0000000..aa8c81a
--- /dev/null
+++ b/examples/royale/JewelExample/src/main/royale/TextInputPlayGround.mxml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
+		  xmlns:js="library://ns.apache.org/royale/basic"
+		  xmlns:j="library://ns.apache.org/royale/jewel">
+    
+	
+	
+	<j:TextField text="Text Input" width="120" height="40"/>
+
+	<j:RadioButton/>
+
+</js:Group>
diff --git a/frameworks/projects/Jewel/.vscode/launch.json b/frameworks/projects/Jewel/.vscode/launch.json
new file mode 100644
index 0000000..5dfb672
--- /dev/null
+++ b/frameworks/projects/Jewel/.vscode/launch.json
@@ -0,0 +1,21 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch Chrome against debug.html, with sourcemaps",
+            "type": "chrome",
+            "request": "launch",
+            "file": "${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": "mvn"
+        },
+        {
+            "name": "Launch Firefox against debug.html, with sourcemaps",
+            "type": "firefox",
+            "request": "launch",
+            "file": "${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": "mvn"
+        }
+    ]
+}
diff --git a/frameworks/projects/Jewel/.vscode/settings.json b/frameworks/projects/Jewel/.vscode/settings.json
new file mode 100644
index 0000000..1f5a970
--- /dev/null
+++ b/frameworks/projects/Jewel/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+    "nextgenas.sdk.framework": "/Users/carlosrovira/Dev/Royale/Sdks/apache-royale-0.9.2-SNAPSHOT"
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/.vscode/tasks.json b/frameworks/projects/Jewel/.vscode/tasks.json
new file mode 100644
index 0000000..5d6198d
--- /dev/null
+++ b/frameworks/projects/Jewel/.vscode/tasks.json
@@ -0,0 +1,8 @@
+{
+	// for the documentation about the tasks.json format
+	"version": "0.1.0",
+	"command": "mvn",
+	"args": ["clean", "install", "-DskipTests"],
+	"isShellCommand": true,
+	"showOutput": "always"
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/asconfig.json b/frameworks/projects/Jewel/asconfig.json
new file mode 100644
index 0000000..f4421c7
--- /dev/null
+++ b/frameworks/projects/Jewel/asconfig.json
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ {
+    "config": "royale",
+    "type": "lib",
+    "compilerOptions": {
+        "debug": true,
+        "targets": [
+            "JSRoyale",
+            "SWF"
+        ],
+        "include-classes": [
+            "JewelClasses"
+        ],
+        "include-sources": [
+            "src/main/royale"
+        ],
+        "output": "target/Jewel.swc"
+    }
+}
diff --git a/frameworks/projects/Jewel/build.xml b/frameworks/projects/Jewel/build.xml
new file mode 100644
index 0000000..5ad2877
--- /dev/null
+++ b/frameworks/projects/Jewel/build.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="Jewel" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="compile-js">
+        <ant dir="${ROYALE_HOME}/frameworks/js/projects/${ant.project.name}JS/" inheritAll="false" >
+            <property name="ROYALE_SWF_COMPILER_HOME" value="${ROYALE_SWF_COMPILER_HOME}"/>
+            <property name="ROYALE_COMPILER_HOME" value="${ROYALE_COMPILER_HOME}"/>
+            <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+        </ant>
+    </target>
+    
+    <target name="copy-swc" if="env.AIR_HOME">
+        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/royale/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" />
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${ROYALE_HOME}/frameworks/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" target="clean"/>
+    </target>
+    
+    <target name="compile" description="Compiles .as files into .swc" if="env.AIR_HOME">
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
+        <echo message="ROYALE_HOME: ${ROYALE_HOME}"/>
+        <echo message="ROYALE_SWF_COMPILER_HOME: ${ROYALE_SWF_COMPILER_HOME}"/>
+        <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
+        
+        <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+royalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-compiler.strict-xml=true" />
+            <arg value="-compiler.targets=SWF,JSRoyale" />
+            <arg value="-output=${basedir}/target/${target.name}" />
+            <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" />
+            <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
+            <arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
+        </java>
+    </target>
+    
+    <target name="check-compiler" depends="check-compiler-home,check-transpiler-home">
+        <path id="lib.path">
+            <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-compiler-home"
+        description="Set ROYALE_SWF_COMPILER_HOME to point at the compiler.">
+        
+        <available file="${ROYALE_HOME}/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${ROYALE_HOME}"/>
+        
+        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or the root of a Royale SDK"
+        unless="ROYALE_SWF_COMPILER_HOME"/>
+    </target>
+    
+    <target name="check-transpiler-home"
+        description="Set ROYALE_COMPILER_HOME to point at the cross-compiler.">
+        
+        <available file="${ROYALE_HOME}/js/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${ROYALE_HOME}/js"/>
+        
+        <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK"
+        unless="ROYALE_COMPILER_HOME"/>
+    </target>
+    
+</project>
diff --git a/frameworks/projects/Jewel/pom.xml b/frameworks/projects/Jewel/pom.xml
new file mode 100644
index 0000000..74e2bd2
--- /dev/null
+++ b/frameworks/projects/Jewel/pom.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.framework</groupId>
+    <artifactId>projects</artifactId>
+    <version>0.9.3-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>Jewel</artifactId>
+  <version>0.9.3-SNAPSHOT</version>
+  <packaging>swc</packaging>
+
+  <name>Apache Royale: Framework: Libs: Jewel</name>
+
+  <build>
+    <sourceDirectory>src/main/royale</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+        <version>${royale.compiler.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <namespaces>
+            <namespace>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              <manifest>${project.basedir}/src/main/resources/jewel-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+              <type>as</type>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              <manifest>${project.basedir}/src/main/resources/jewel-as-manifest.xml</manifest>
+            </namespace>
+          </namespaces>
+          <includeClasses>
+            <includeClass>JewelClasses</includeClass>
+          </includeClasses>
+          <includeFiles>
+            <include-file>
+              <name>jewel.css</name>
+              <path>../src/main/resources/jewel.css</path>
+            </include-file>
+          </includeFiles>
+          <includeLookupOnly>true</includeLookupOnly>
+          <!--<allowSubclassOverrides>true</allowSubclassOverrides>-->
+          <skipExtern>true</skipExtern>
+          <!--<additionalCompilerOptions>-compiler.fxg-base-class=flash.display.Sprite</additionalCompilerOptions>-->
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>nl.geodienstencentrum.maven</groupId>
+        <artifactId>sass-maven-plugin</artifactId>
+        <version>3.5.2</version>
+        <configuration>
+          <resources>
+              <resource>
+                  <source>
+                      <directory>${basedir}/src/main/sass</directory>
+                      <includes>
+                          <include>**/*.sass</include>
+                      </includes>
+                  </source>
+                  <destination>${basedir}/src/main/resources</destination>
+              </resource>
+          </resources>
+        </configuration>
+        <executions>
+          <execution>
+              <id>generate-css-using-sass</id>
+              <goals>
+                  <goal>update-stylesheets</goal>
+              </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Binding</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Binding</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Graphics</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Graphics</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Collections</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Collections</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/frameworks/projects/Jewel/src/main/config/compile-swf-config.xml b/frameworks/projects/Jewel/src/main/config/compile-swf-config.xml
new file mode 100644
index 0000000..4c2f19e
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/config/compile-swf-config.xml
@@ -0,0 +1,105 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<royale-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <!-- build both SWF and JS. -->
+        <targets>
+            <target>JSRoyale</target>
+        </targets>
+        <strict-xml>true</strict-xml>
+
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../../../../libs/Binding.swc</path-element>
+            <path-element>../../../../../libs/Core.swc</path-element>
+            <path-element>../../../../../libs/Graphics.swc</path-element>
+            <path-element>../../../../../libs/Basic.swc</path-element>
+            <path-element>../../../../../libs/Collections.swc</path-element>
+            <path-element>../../../../../libs/HTML.swc</path-element>
+        </external-library-path>
+        
+        <allow-subclass-overrides>true</allow-subclass-overrides>
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.royale.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.royale.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <define>
+            <name>COMPILE::SWF</name>
+            <value>true</value>
+        </define>
+        <define>
+            <name>COMPILE::JS</name>
+            <value>false</value>
+        </define>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/royale/jewel</uri>
+                <manifest>../resources/jewel-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+                <uri>library://ns.apache.org/royale/jewel</uri>
+                <manifest>../resources/jewel-as-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>../royale</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>defaults.css</name>
+        <path>../resources/defaults.css</path>
+    </include-file>
+
+    <include-lookup-only>true</include-lookup-only>
+    
+    <include-classes>
+        <class>JewelClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/royale/jewel</uri>
+    </include-namespaces>
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</royale-config>
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
new file mode 100644
index 0000000..f09b980
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -0,0 +1,70 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+@namespace "library://ns.apache.org/royale/jewel";
+
+.vertical-layout-padding-gap {
+	display: block !important;
+}
+
+/*
+* Jewel TextField
+*/
+TextField {
+	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");*/
+}
+.vTextField--input {}
+.vTextField--label {}
+
+/*
+* Jewel Slider
+*/
+Slider {
+	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
+	IBeadView:  ClassReference("org.apache.royale.jewel.beads.SliderView");
+	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout");
+	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController");
+	position: relative;
+}
+.SliderTrack {
+	position: absolute;
+}
+.SliderThumb {
+	position: absolute;
+	border-radius: 15px;
+}
+
+@media -royale-swf
+{
+    Slider
+	{
+		iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView");
+		iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView");
+	}
+
+	RadioButton
+	{
+		IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
+		IBeadView:  ClassReference("org.apache.royale.jewel.beads.RadioButtonView");			
+		/*font-size: 11px;
+		font-family: Arial;*/
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-as-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-as-manifest.xml
new file mode 100644
index 0000000..e38496a
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-as-manifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    
+</componentPackage>
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
new file mode 100644
index 0000000..b3bfccb
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    <component id="Application" class="org.apache.royale.jewel.Application"/>
+    <component id="Button" class="org.apache.royale.jewel.Button"/>
+    <component id="TextButton" class="org.apache.royale.jewel.TextButton"/>
+    <component id="TextField" class="org.apache.royale.jewel.TextField"/>
+    <component id="Slider" class="org.apache.royale.jewel.Slider"/>
+    <component id="RadioButton" class="org.apache.royale.jewel.RadioButton"/>
+
+    <component id="Disabled" class="org.apache.royale.jewel.beads.Disabled"/>
+
+    <component id="HorizontalLayout" class="org.apache.royale.jewel.beads.layouts.HorizontalLayout"/>
+    <component id="VerticalLayout" class="org.apache.royale.jewel.beads.layouts.VerticalLayout"/>
+    <component id="VerticalLayoutWithPaddingAndGap" class="org.apache.royale.jewel.beads.layouts.VerticalLayoutWithPaddingAndGap"/>
+    
+</componentPackage>
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel.css b/frameworks/projects/Jewel/src/main/resources/jewel.css
new file mode 100644
index 0000000..21f1648
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/resources/jewel.css
@@ -0,0 +1,63 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+@namespace "library://ns.apache.org/royale/jewel";
+.layout .horizontal {
+  white-space: nowrap;
+}
+.layout .vertical {
+  display: block !important;
+}
+
+/**
+ * Jewel TextField
+ */
+TextField {
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
+}
+
+/**
+ * Jewel Slider
+ */
+Slider {
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
+  IBeadView: ClassReference("org.apache.royale.jewel.beads.SliderView");
+  IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout");
+  IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController");
+  position: relative;
+}
+
+.SliderTrack {
+  position: absolute;
+}
+
+.SliderThumb {
+  position: absolute;
+  border-radius: 15px;
+}
+
+@media -royale-swf {
+  Slider {
+    iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView");
+    iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView");
+  }
+}
+RadioButton {
+  IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
+  IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView");
+}
+
+/*# sourceMappingURL=jewel.css.map */
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
new file mode 100644
index 0000000..3cb788e
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+    /**
+     *  @private
+     *  This class is used to link additional classes into jewel.swc
+     *  beyond those that are found by dependecy analysis starting
+     *  from the classes specified in manifest.xml.
+     */
+    internal class JewelClasses
+    {
+        import org.apache.royale.jewel.beads.SliderView; SliderView;
+	    
+        COMPILE::SWF
+	    {
+            import org.apache.royale.jewel.beads.SliderThumbView; SliderThumbView;
+            import org.apache.royale.jewel.beads.SliderTrackView; SliderTrackView;
+
+            import org.apache.royale.jewel.beads.RadioButtonView; RadioButtonView;
+        }
+
+        import org.apache.royale.jewel.beads.layouts.HorizontalLayout; HorizontalLayout;
+        import org.apache.royale.jewel.beads.layouts.VerticalLayout; VerticalLayout;
+        import org.apache.royale.jewel.beads.layouts.VerticalLayoutWithPaddingAndGap; VerticalLayoutWithPaddingAndGap;
+    }
+
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Application.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Application.as
new file mode 100644
index 0000000..b29f0a4
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Application.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+    import org.apache.royale.core.Application;
+    import org.apache.royale.core.SimpleCSSValuesImpl;
+		
+	/**
+	 * Jewel Application holds specific Jewel need in a Royale Application.
+	 *
+	 * This class extends the standard Application and sets up the
+	 * SimpleCSSValuesImpl (implementation) for convenience.
+	 *
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.2
+	 */
+	public class Application extends org.apache.royale.core.Application
+	{
+		/**
+         *  constructor.
+         *
+		 * <inject_html>
+		 * <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
+     	 * </inject_html>
+	 	 * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.2
+         */
+		public function Application()
+		{
+			super();
+			
+			this.valuesImpl = new SimpleCSSValuesImpl();
+
+			// this a is temp solution until we get a better way to get a reference to Application
+			//topLevelApplication = this;
+		}
+
+		/**
+         *  static reference to this application used mainly for dialog (Dialog class)
+		 * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.2
+         */
+        //public static var topLevelApplication:Object;
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
new file mode 100644
index 0000000..70d4d58
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+    import org.apache.royale.html.Button;
+
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+        import org.apache.royale.html.util.addElementToWrapper;
+    }
+
+    /**
+     *  The Button class is a simple button.  Use TextButton for
+     *  buttons that should show text.  This is the lightest weight
+     *  button used for non-text buttons like the arrow buttons
+     *  in a Scrollbar or NumericStepper.
+     * 
+     *  The most common view for this button is CSSButtonView that
+     *  allows you to specify a backgroundImage in CSS that defines
+     *  the look of the button.
+     * 
+     *  However, when used in ScrollBar and when composed in many
+     *  other components, it is more common to assign a custom view
+     *  to the button.  
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+    public class Button extends org.apache.royale.html.Button
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function Button()
+		{
+			super();
+
+            typeNames = "jewel button";
+		}
+
+        COMPILE::JS
+        override protected function computeFinalClassNames():String
+        {
+            return super.computeFinalClassNames() + " " + element.classList;
+        }
+
+        private var _primary:Boolean = false;
+
+        /**
+		 *  A boolean flag to activate "primary" effect selector.
+		 *  Applies primary color display effect.
+         *  Colors are defined in royale-jewel.css
+         *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+        public function get primary():Boolean
+        {
+            return _primary;
+        }
+
+        public function set primary(value:Boolean):void
+        {
+            if (_primary != value)
+            {
+                _primary = value;
+
+                COMPILE::JS
+                {
+                    
+                    element.classList.toggle("primary", value);
+                    setClassName(computeFinalClassNames());
+                }
+            }
+        }
+        
+        private var _secondary:Boolean = false;
+
+        /**
+		 *  A boolean flag to activate "secondary" effect selector.
+		 *  Applies secondary color display effect.
+         *  Colors are defined in royale-jewel.css
+         *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+        public function get secondary():Boolean
+        {
+            return _secondary;
+        }
+
+        public function set secondary(value:Boolean):void
+        {
+            if (_secondary != value)
+            {
+                _secondary = value;
+
+                COMPILE::JS
+                {
+                    element.classList.toggle("secondary", value);
+                    setClassName(computeFinalClassNames());
+                }
+            }
+        }
+
+        private var _emphasized:Boolean = false;
+
+        /**
+		 *  A boolean flag to activate "emphasized" effect selector.
+		 *  Applies emphasized color display effect.
+         *  Colors are defined in royale-jewel.css
+         *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+        public function get emphasized():Boolean
+        {
+            return _emphasized;
+        }
+
+        public function set emphasized(value:Boolean):void
+        {
+            if (_emphasized != value)
+            {
+                _emphasized = value;
+
+                COMPILE::JS
+                {
+                    element.classList.toggle("emphasized", value);
+                    setClassName(computeFinalClassNames());
+                }
+            }
+        }
+	}
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
new file mode 100644
index 0000000..05a5b3d
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+    import org.apache.royale.html.RadioButton;
+
+    COMPILE::SWF
+    {
+        import flash.display.DisplayObject;
+    }
+
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+        import org.apache.royale.jewel.supportClasses.RadioButtonIcon;
+        import org.apache.royale.html.util.addElementToWrapper;
+    }
+
+    /**
+	 *  The RadioButton class is a component that displays a selectable Button. RadioButtons
+	 *  are typically used in groups, identified by the groupName property. RadioButton use
+	 *  the following beads:
+	 *
+	 *  org.apache.royale.core.IBeadModel: the data model, which includes the groupName.
+	 *  org.apache.royale.core.IBeadView:  the bead that constructs the visual parts of the RadioButton..
+	 *
+	 *  @toplevel
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+    COMPILE::SWF
+	public class RadioButton extends org.apache.royale.html.RadioButton
+    {
+        /**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function RadioButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+		{
+			super(upState, overState, downState, hitTestState);
+		}
+    }
+
+    COMPILE::JS
+    public class RadioButton extends org.apache.royale.html.RadioButton
+    {
+        /**
+         * @private
+         * 
+         *  @royalesuppresspublicvarwarning
+         */
+        public static var radioCounter:int = 0;
+
+        private var labelFor:HTMLLabelElement;
+        private var textNode:Text;
+        private var icon:RadioButtonIcon;
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         * @royaleignorecoercion HTMLInputElement
+         * @royaleignorecoercion HTMLLabelElement
+         * @royaleignorecoercion Text
+         */
+        override protected function createElement():WrappedHTMLElement
+        {
+            
+
+            icon = new RadioButtonIcon()
+            icon.id = '_radio_' + org.apache.royale.jewel.RadioButton.radioCounter++;
+
+            textNode = document.createTextNode('') as Text;
+
+            labelFor = addElementToWrapper(this,'label') as HTMLLabelElement;
+            labelFor.appendChild(icon.element);
+            labelFor.appendChild(textNode);
+            
+            (textNode as WrappedHTMLElement).royale_wrapper = this;
+			(icon.element as WrappedHTMLElement).royale_wrapper = this;
+
+            typeNames = 'RadioButton';
+
+            return element;
+        }
+    }
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
new file mode 100644
index 0000000..9d4f6d9
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+	import org.apache.royale.html.Slider;
+
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
+
+	[Event(name="valueChange", type="org.apache.royale.events.Event")]
+
+	/**
+	 *  The Slider class is a component that displays a range of values using a
+	 *  track and a thumb control. The Slider uses the following bead types:
+	 *
+	 *  org.apache.royale.core.IBeadModel: the data model, typically an IRangeModel, that holds the Slider values.
+	 *  org.apache.royale.core.IBeadView:  the bead that constructs the visual parts of the Slider.
+	 *  org.apache.royale.core.IBeadController: the bead that handles input.
+	 *  org.apache.royale.core.IThumbValue: the bead responsible for the display of the thumb control.
+	 *  org.apache.royale.core.ITrackView: the bead responsible for the display of the track.
+	 *
+     *  @toplevel
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.2
+	 */
+	public class Slider extends org.apache.royale.html.Slider
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+		public function Slider()
+		{
+			super();
+		}
+
+		
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+			return super.createElement();
+        }
+    }
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
new file mode 100644
index 0000000..67fdcdd
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
@@ -0,0 +1,129 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+    import org.apache.royale.core.ITextModel;
+
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+        import org.apache.royale.html.util.addElementToWrapper;
+    }
+    
+    [DefaultProperty("text")]
+
+    /**
+     *  The TextButton class implements a basic button that
+     *  displays text and provides a Jewel Design Library UI-like appearance.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.2
+     */
+	public class TextButton extends Button
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.2
+         */
+		public function TextButton()
+		{
+			super();
+
+            typeNames = "jewel textbutton";
+		}
+        
+        /**
+         *  @copy org.apache.royale.html.Label#text
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get text():String
+		{
+            COMPILE::SWF
+            {
+                return ITextModel(model).text;
+            }
+            COMPILE::JS
+            {
+                return element.innerHTML;
+            }
+		}
+
+        /**
+         *  @private
+         */
+		public function set text(value:String):void
+		{
+            COMPILE::SWF
+            {
+                ITextModel(model).text = value;
+            }
+            COMPILE::JS
+            {
+                this.element.innerHTML = value;
+                this.dispatchEvent('textChange');
+            }
+		}
+
+        /**
+         *  @copy org.apache.royale.html.Label#html
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function get html():String
+		{
+            COMPILE::SWF
+            {
+                return ITextModel(model).html;
+            }
+            COMPILE::JS
+            {
+                return element.innerHTML;
+            }
+		}
+
+        /**
+         *  @private
+         */
+		public function set html(value:String):void
+		{
+            COMPILE::SWF
+            {
+                ITextModel(model).html = value;
+            }
+            COMPILE::JS
+            {
+                this.element.innerHTML = value;
+                this.dispatchEvent('textChange');
+            }
+		}
+	}
+}
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/TextField.as
new file mode 100644
index 0000000..145ab37
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextField.as
@@ -0,0 +1,115 @@
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+    import org.apache.royale.jewel.supportClasses.TextFieldBase;
+
+    COMPILE::JS
+    {
+        import goog.events;
+        import org.apache.royale.core.WrappedHTMLElement;
+        import org.apache.royale.html.util.addElementToWrapper;
+    }
+
+    /**
+     *  The TextField class implements the basic control for
+     *  single-line text input.
+     *
+     *  @toplevel
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.2
+     */
+	public class TextField extends TextFieldBase
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.2
+         */
+		public function TextField()
+		{
+			super();
+		}
+
+        COMPILE::JS
+        private var _positioner:WrappedHTMLElement;
+
+		COMPILE::JS
+        /**
+         * The HTMLElement used to position the component.
+         */
+        override public function get positioner():WrappedHTMLElement
+		{
+			return _positioner;
+		}
+
+		COMPILE::JS
+        /**
+         * @private
+         */
+        override public function set positioner(value:WrappedHTMLElement):void
+		{
+			_positioner = value;
+		}
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         * @royaleignorecoercion HTMLDivElement
+         * @royaleignorecoercion HTMLInputElement
+         * @royaleignorecoercion HTMLLabelElement
+         * @royaleignorecoercion Text
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            typeNames = "TextField";
+
+            var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
+            div.className = typeNames;
+            
+            input = addElementToWrapper(this,'input') as HTMLInputElement;
+            input.setAttribute('type', 'text');
+            input.className = "vTextField--input";
+            
+            //attach input handler to dispatch royale change event when user write in textinput
+            //goog.events.listen(element, 'change', killChangeHandler);
+            goog.events.listen(input, 'input', textChangeHandler);
+            
+            label = document.createElement('label') as HTMLLabelElement;
+            label.className = "vTextField--label";
+
+            textNode = document.createTextNode('') as Text;
+            label.appendChild(textNode);
+            
+            div.appendChild(input);
+            div.appendChild(label);
+
+            positioner = div as WrappedHTMLElement;
+            (label as WrappedHTMLElement).royale_wrapper = this;
+            _positioner.royale_wrapper = this;
+            
+            return element;
+        }
+
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/Disabled.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/Disabled.as
new file mode 100644
index 0000000..30429d6
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/Disabled.as
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads
+{	
+	import org.apache.royale.core.IBead;
+	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.UIBase;
+	
+	/**
+	 *  The Disabled bead class is a specialty bead that can be used to disable a Jewel control.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.2
+	 */
+	public class Disabled implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+		public function Disabled()
+		{
+		}
+
+		private var _disabled:Boolean = true;
+        /**
+		 *  A boolean flag to enable or disable the host control.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+        public function get disabled():Boolean
+        {
+            return _disabled;
+        }
+        public function set disabled(value:Boolean):void
+        {
+            _disabled = value;
+
+			COMPILE::JS
+            {
+                updateHost();
+            }
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.royale.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 *  @royaleignorecoercion HTMLInputElement
+		 *  @royaleignorecoercion org.apache.royale.core.UIBase;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			var host:UIBase = value as UIBase;
+
+			COMPILE::JS
+			{
+				updateHost();
+			}
+		}
+
+		COMPILE::JS
+		private function updateHost():void
+		{
+			var host:UIBase = _strand as UIBase;
+
+			if (host)
+            {
+                _disabled ?
+				host.element.setAttribute('disabled', '') :
+				host.element.removeAttribute('disabled');
+            }
+		}
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as
new file mode 100644
index 0000000..984b7b5
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/RadioButtonView.as
@@ -0,0 +1,286 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads
+{
+	import flash.display.Shape;
+	import flash.display.SimpleButton;
+	import flash.display.Sprite;
+	import flash.text.TextFieldAutoSize;
+	import flash.text.TextFieldType;
+	
+    import org.apache.royale.core.BeadViewBase;
+	import org.apache.royale.core.CSSTextField;
+	import org.apache.royale.core.IBeadView;
+	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.IValueToggleButtonModel;
+	import org.apache.royale.events.Event;
+	
+	/**
+	 *  The RadioButtonView class creates the visual elements of the org.apache.royale.html.RadioButton 
+	 *  component. 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	public class RadioButtonView extends BeadViewBase implements IBeadView
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function RadioButtonView()
+		{
+			sprites = [ upSprite = new Sprite(),
+				        downSprite = new Sprite(),
+						overSprite = new Sprite(),
+						upAndSelectedSprite = new Sprite(),
+						downAndSelectedSprite = new Sprite(),
+						overAndSelectedSprite = new Sprite() ];
+			
+			for each( var s:Sprite in sprites )
+			{
+				var tf:CSSTextField = new CSSTextField();
+				tf.type = TextFieldType.DYNAMIC;
+				tf.autoSize = TextFieldAutoSize.LEFT;
+				tf.name = "textField";
+				var icon:Shape = new Shape();
+				icon.name = "icon";
+				s.addChild(icon);
+				s.addChild(tf);
+			}
+		}
+		
+		private var upSprite:Sprite;
+		private var downSprite:Sprite;
+		private var overSprite:Sprite;
+		private var upAndSelectedSprite:Sprite;
+		private var downAndSelectedSprite:Sprite;
+		private var overAndSelectedSprite:Sprite;
+		
+		private var sprites:Array;
+		
+		private var _toggleButtonModel:IValueToggleButtonModel;
+		
+		/**
+		 *  The model used for the RadioButton.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get toggleButtonModel() : IValueToggleButtonModel
+		{
+			return _toggleButtonModel;
+		}
+		
+		/**
+		 *  @copy org.apache.royale.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			_toggleButtonModel = value.getBeadByType(IValueToggleButtonModel) as IValueToggleButtonModel;
+			_toggleButtonModel.addEventListener("textChange", textChangeHandler);
+			_toggleButtonModel.addEventListener("htmlChange", htmlChangeHandler);
+			_toggleButtonModel.addEventListener("selectedValueChange", selectedValueChangeHandler);
+			if (_toggleButtonModel.text != null)
+				text = _toggleButtonModel.text;
+			if (_toggleButtonModel.html != null)
+				html = _toggleButtonModel.html;
+            for each( var s:Sprite in sprites )
+            {
+                var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
+                tf.styleParent = value;
+            }
+			
+			layoutControl();
+			
+			var hitArea:Shape = new Shape();
+			hitArea.graphics.beginFill(0x000000);
+			hitArea.graphics.drawRect(0,0,upSprite.width, upSprite.height);
+			hitArea.graphics.endFill();
+			
+			SimpleButton(value).upState = upSprite;
+			SimpleButton(value).downState = downSprite;
+			SimpleButton(value).overState = overSprite;
+			SimpleButton(value).hitTestState = hitArea;
+			
+			if (toggleButtonModel.text !== null)
+				text = toggleButtonModel.text;
+			if (toggleButtonModel.html !== null)
+				html = toggleButtonModel.html;
+			
+			if (toggleButtonModel.selected && toggleButtonModel.value == value) {
+				selected = true;
+			}
+		}
+		
+		/**
+		 *  The string label for the org.apache.royale.html.RadioButton.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get text():String
+		{
+			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
+			return tf.text;
+		}
+		public function set text(value:String):void
+		{
+			for each( var s:Sprite in sprites )
+			{
+				var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
+				tf.text = value;
+			}
+			
+			layoutControl();
+		}
+		
+		/**
+		 *  The HTML string for the org.apache.royale.html.RadioButton.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get html():String
+		{
+			var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
+			return tf.htmlText;
+		}
+		public function set html(value:String):void
+		{
+			for each(var s:Sprite in sprites)
+			{
+				var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
+				tf.htmlText = value;
+			}
+			
+			layoutControl();
+		}
+		
+		/**
+		 * @private
+		 */
+		private function textChangeHandler(event:Event):void
+		{
+			text = toggleButtonModel.text;
+		}
+		
+		/**
+		 * @private
+		 */
+		private function htmlChangeHandler(event:Event):void
+		{
+			html = toggleButtonModel.html;
+		}
+		
+		private var _selected:Boolean;
+		
+		/**
+		 * The selection state of the RadioButton
+		 */
+		public function get selected():Boolean
+		{
+			return _selected;
+		}
+		public function set selected(value:Boolean):void
+		{
+			_selected = value;
+			
+			if( value ) {
+				SimpleButton(_strand).upState = upAndSelectedSprite;
+				SimpleButton(_strand).downState = downAndSelectedSprite;
+				SimpleButton(_strand).overState = overAndSelectedSprite;
+				
+			} else {
+				SimpleButton(_strand).upState = upSprite;
+				SimpleButton(_strand).downState = downSprite;
+				SimpleButton(_strand).overState = overSprite;
+			}
+			
+			layoutControl();
+		}
+		
+		/**
+		 * @private
+		 */
+		private function selectedValueChangeHandler(event:Event):void
+		{
+			selected = _toggleButtonModel.value == _toggleButtonModel.selectedValue;
+		}
+		
+		/**
+		 * @private
+		 */
+		protected function layoutControl() : void
+		{
+			for each(var s:Sprite in sprites)
+			{
+				var icon:Shape = s.getChildByName("icon") as Shape;
+				var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
+				
+				drawRadioButton(icon);
+				
+				var mh:Number = Math.max(icon.height,tf.height);
+				
+				icon.x = 0;
+				icon.y = (mh - icon.height)/2;
+				
+				tf.x = icon.x + icon.width + 1;
+				tf.y = (mh - tf.height)/2;
+			}
+			
+		}
+		
+		/**
+		 * @private
+		 */
+		protected function drawRadioButton(icon:Shape) : void
+		{
+			icon.graphics.clear();
+			icon.graphics.beginFill(0xf8f8f8);
+			icon.graphics.lineStyle(1,0x808080);
+			icon.graphics.drawEllipse(0,0,10,10);
+			icon.graphics.endFill();
+			
+			if( selected ) {
+				icon.graphics.beginFill(0);
+				icon.graphics.drawEllipse(3,3,4,4);
+				icon.graphics.endFill();
+			}
+		}
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderThumbView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderThumbView.as
new file mode 100644
index 0000000..4df51c8
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderThumbView.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads
+{
+	import flash.display.Graphics;
+	import flash.display.Shape;
+	import flash.display.SimpleButton;
+
+    import org.apache.royale.core.BeadViewBase;
+    import org.apache.royale.core.IBeadView;
+    import org.apache.royale.core.IStrand;
+	import org.apache.royale.html.Button;
+    import org.apache.royale.events.Event;
+    import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.core.IChild;
+	
+	/**
+	 *  The SliderThumbView class creates the draggable input element for the 
+	 *  org.apache.royale.html.Slider component.
+	 *  
+	 *  @viewbead
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	public class SliderThumbView extends BeadViewBase implements IBeadView
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function SliderThumbView()
+		{
+            hitArea = new Shape();
+            upView = new Shape();
+            downView = new Shape();
+            overView = new Shape();                
+		}
+		
+		/**
+		 * @private
+		 */
+		private function drawView(g:Graphics, bgColor:uint):void
+		{
+			var host:Button = Button(_strand);
+            var button:SimpleButton = IChild(_strand).$displayObject as SimpleButton;
+			g.clear();
+			g.lineStyle(1,0x000000);
+			g.beginFill(bgColor,1.0);
+			g.drawCircle(host.width/2, host.height/2, 10);
+			g.endFill();
+		}
+		
+		private var hitArea:Shape;
+		
+		/**
+		 *  @copy org.apache.royale.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+         *  @royaleignoreimport org.apache.royale.core.WrappedHTMLElement
+         *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			
+            drawView(hitArea.graphics, 0xDD0000);
+            drawView(upView.graphics, 0xFFFFFF);
+            drawView(downView.graphics, 0x999999);
+            drawView(overView.graphics, 0xDDDDDD);
+            
+            var button:SimpleButton = IChild(value).$displayObject as SimpleButton;
+            button.upState = upView;
+            button.downState = downView;
+            button.overState = overView;
+            button.hitTestState = hitArea;
+            
+            IEventDispatcher(value).addEventListener("widthChanged",sizeChangeHandler);
+            IEventDispatcher(value).addEventListener("heightChanged",sizeChangeHandler);                
+		}
+		
+		private var upView:Shape;
+		private var downView:Shape;
+		private var overView:Shape;
+        
+		/**
+		 * @private
+		 */
+		private function sizeChangeHandler( event:Event ) : void
+		{
+			drawView(hitArea.graphics, 0xDD0000);
+			drawView(upView.graphics, 0xFFFFFF);
+			drawView(downView.graphics, 0x999999);
+			drawView(overView.graphics, 0xDDDDDD);
+		}
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderTrackView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderTrackView.as
new file mode 100644
index 0000000..a5e0410
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderTrackView.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads
+{
+	import flash.display.Graphics;
+	import flash.display.Shape;
+	import flash.display.SimpleButton;			
+	
+	import org.apache.royale.core.BeadViewBase;
+	import org.apache.royale.core.IBeadView;
+	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.UIBase;
+	import org.apache.royale.html.Button;
+	import org.apache.royale.events.Event;
+	import org.apache.royale.events.IEventDispatcher;
+	import org.apache.royale.core.IChild;
+	
+	/**
+	 *  The SliderTrackView class creates the track area for the org.apache.royale.html.Slider
+	 *  component.
+	 *  
+	 *  @viewbead
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	public class SliderTrackView extends BeadViewBase implements IBeadView
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function SliderTrackView()
+		{
+			hitArea = new Shape();
+			upView = new Shape();
+			downView = new Shape();
+			overView = new Shape();					
+		}
+		
+		/**
+		 * @private
+		 */
+		private function drawView(g:Graphics, bgColor:uint):void
+		{
+			var host:Button = Button(_strand);
+            var button:SimpleButton = IChild(_strand).$displayObject as SimpleButton;
+			g.clear();
+			g.lineStyle(1,0x000000);
+			g.beginFill(bgColor);
+			g.drawRect(0, 0, host.width, host.height);
+			g.endFill();
+		}
+		
+		private var hitArea:Shape;
+		
+		/**
+		 *  @copy org.apache.royale.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			
+			drawView(hitArea.graphics, 0xDD0000);
+			drawView(upView.graphics, 0xCCCCCC);
+			drawView(downView.graphics, 0x808080);
+			drawView(overView.graphics, 0xEEEEEE);
+			
+            var button:SimpleButton = IChild(value).$displayObject as SimpleButton;
+			button.upState = upView;
+			button.downState = downView;
+			button.overState = overView;
+			button.hitTestState = hitArea;
+			
+			IEventDispatcher(value).addEventListener("widthChanged",sizeChangeHandler);
+			IEventDispatcher(value).addEventListener("heightChanged",sizeChangeHandler);					
+		}
+		
+		private var upView:Shape;
+		private var downView:Shape;
+		private var overView:Shape;
+		
+		/**
+		 * @private
+		 */
+		private function sizeChangeHandler( event:Event ) : void
+		{
+			drawView(hitArea.graphics, 0xDD0000);
+			drawView(upView.graphics, 0xCCCCCC);
+			drawView(downView.graphics, 0x808080);
+			drawView(overView.graphics, 0xEEEEEE);
+		}
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderView.as
new file mode 100644
index 0000000..c62a3fc
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/SliderView.as
@@ -0,0 +1,172 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads
+{
+	COMPILE::SWF {
+		import flash.display.DisplayObject;
+		import flash.display.Sprite;
+	}
+	
+    import org.apache.royale.html.beads.ISliderView;
+    import org.apache.royale.core.BeadViewBase;
+    import org.apache.royale.core.IBead;
+    import org.apache.royale.core.IBeadLayout;
+    import org.apache.royale.core.IBeadModel;
+    import org.apache.royale.core.IBeadView;
+    import org.apache.royale.core.IRangeModel;
+    import org.apache.royale.core.IStrand;
+    import org.apache.royale.core.IUIBase;
+    import org.apache.royale.core.UIBase;
+    import org.apache.royale.core.ValuesManager;
+    import org.apache.royale.events.Event;
+    import org.apache.royale.events.IEventDispatcher;
+    import org.apache.royale.html.Button;
+    import org.apache.royale.html.TextButton;
+	
+	/**
+	 *  The SliderView class creates the visual elements of the org.apache.royale.html.Slider 
+	 *  component. The Slider has a track and a thumb control which are also created with view beads.
+	 *  
+	 *  @viewbead
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	public class SliderView extends BeadViewBase implements ISliderView, IBeadView
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function SliderView()
+		{
+		}
+		
+		private var rangeModel:IRangeModel;
+		
+		/**
+		 *  @copy org.apache.royale.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			
+			var layout:IBeadLayout = _strand.getBeadByType(IBeadLayout) as IBeadLayout;
+			if (layout == null) {
+				var klass:Class = ValuesManager.valuesImpl.getValue(_strand, "iBeadLayout");
+				_strand.addBead(new klass() as IBead);
+			}
+			
+			COMPILE::SWF {
+				var s:UIBase = UIBase(_strand);
+				
+				_track = new Button();
+				_track.addBead(new (ValuesManager.valuesImpl.getValue(_strand, "iTrackView")) as IBead);
+				_track.className = "SliderTrack";
+				s.addElement(_track);
+				
+				_thumb = new TextButton();
+				_thumb.text = '\u29BF';
+				_thumb.addBead(new (ValuesManager.valuesImpl.getValue(_strand, "iThumbView")) as IBead);
+				_thumb.className = "SliderThumb";
+				s.addElement(_thumb);
+				
+			}
+			COMPILE::JS {
+				_track = new Button();
+				_track.className = "SliderTrack";
+				host.addElement(_track);
+				
+				_thumb = new TextButton();
+				_thumb.className = "SliderThumb";
+				_thumb.text = '\u29BF';
+				host.addElement(_thumb);
+			}
+			
+			rangeModel = _strand.getBeadByType(IBeadModel) as IRangeModel;
+
+			var rm:IEventDispatcher = rangeModel as IEventDispatcher;
+			
+			// listen for changes to the model and adjust the UI accordingly.
+			rm.addEventListener("valueChange",modelChangeHandler);
+			rm.addEventListener("minimumChange",modelChangeHandler);
+			rm.addEventListener("maximumChange",modelChangeHandler);
+			rm.addEventListener("stepSizeChange",modelChangeHandler);
+			rm.addEventListener("snapIntervalChange",modelChangeHandler);
+			
+			(_strand as IEventDispatcher).dispatchEvent(new Event("layoutNeeded"));
+		}
+		
+		private var _track:Button;
+		private var _thumb:TextButton;
+		
+		
+		/**
+		 *  The track component.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get track():IUIBase
+		{
+			return _track;
+		}
+		
+		/**
+		 *  The thumb component.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get thumb():IUIBase
+		{
+			return _thumb;
+		}
+		
+		/**
+		 * @royaleignorecoercion org.apache.royale.core.UIBase
+		 */
+		private function get host():UIBase
+		{
+			return _strand as UIBase;
+		}
+		
+		/**
+		 * @private
+		 */
+		private function modelChangeHandler( event:Event ) : void
+		{
+			(_strand as IEventDispatcher).dispatchEvent(new Event("layoutNeeded"));
+		}
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
new file mode 100644
index 0000000..16950a3
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
@@ -0,0 +1,196 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads.layouts
+{
+	import org.apache.royale.core.IBeadLayout;
+    import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
+	import org.apache.royale.core.ILayoutChild;
+	import org.apache.royale.core.ILayoutView;
+	import org.apache.royale.core.IParentIUIBase;
+	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.IUIBase;
+    import org.apache.royale.core.layout.EdgeData;
+	import org.apache.royale.core.ValuesManager;
+	import org.apache.royale.core.LayoutBase;
+	COMPILE::SWF {
+			import org.apache.royale.core.UIBase;
+	}
+    COMPILE::JS {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
+
+    /**
+     *  The HorizontalLayout class is a simple layout
+     *  bead.  It takes the set of children and lays them out
+     *  horizontally in one row, separating them according to
+     *  CSS layout rules for margin and vertical-align styles.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+	public class HorizontalLayout extends LayoutBase implements IBeadLayout
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function HorizontalLayout()
+		{
+			super();
+		}
+
+        /**
+         *  @copy org.apache.royale.core.IBead#strand
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         *  @royaleignorecoercion HTMLElement
+         *  @royaleignorecoercion org.apache.royale.core.IUIBase
+         */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			
+            COMPILE::JS
+            {
+				var base:IUIBase = value as IUIBase;
+				if (base.element.style.display !== "none") {
+					base.element.style.display = "block";
+				}
+            }
+		}
+
+        /**
+         * @copy org.apache.royale.core.IBeadLayout#layout
+         * @royaleignorecoercion org.apache.royale.core.ILayoutHost
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         */
+		override public function layout():Boolean
+		{
+            COMPILE::SWF
+            {
+				var contentView:ILayoutView = layoutView;
+
+				var n:Number = contentView.numElements;
+				if (n == 0) return false;
+
+				var maxWidth:Number = 0;
+				var maxHeight:Number = 0;
+				var hostWidthSizedToContent:Boolean = host.isWidthSizedToContent();
+				var hostHeightSizedToContent:Boolean = host.isHeightSizedToContent();
+				var hostWidth:Number = host.width;
+				var hostHeight:Number = host.height;
+
+				var ilc:ILayoutChild;
+				var data:Object;
+				var canAdjust:Boolean = false;
+
+				var paddingMetrics:EdgeData = (ValuesManager.valuesImpl as IBorderPaddingMarginValuesImpl).getPaddingMetrics(host);
+				var borderMetrics:EdgeData = (ValuesManager.valuesImpl as IBorderPaddingMarginValuesImpl).getBorderMetrics(host);
+				
+				// adjust the host's usable size by the metrics. If hostSizedToContent, then the
+				// resulting adjusted value may be less than zero.
+				hostWidth -= paddingMetrics.left + paddingMetrics.right + borderMetrics.left + borderMetrics.right;
+				hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
+
+				var xpos:Number = borderMetrics.left + paddingMetrics.left;
+				var ypos:Number = borderMetrics.top + paddingMetrics.top;
+
+				// First pass determines the data about the child.
+				for(var i:int=0; i < n; i++)
+				{
+					var child:IUIBase = contentView.getElementAt(i) as IUIBase;
+					if (child == null || !child.visible) continue;
+					var positions:Object = childPositions(child);
+					var margins:Object = childMargins(child, hostWidth, hostHeight);
+
+					ilc = child as ILayoutChild;
+
+					xpos += margins.left;
+
+					var childYpos:Number = ypos + margins.top; // default y position
+
+					var childHeight:Number = child.height;
+					if (ilc != null && !isNaN(ilc.percentHeight)) {
+						childHeight = hostHeight * ilc.percentHeight/100.0;
+						ilc.setHeight(childHeight);
+					}
+					var valign:Object = ValuesManager.valuesImpl.getValue(child, "vertical-align");
+					if (valign == "middle")
+					{
+						childYpos = hostHeight/2 - (childHeight + margins.top + margins.bottom)/2;
+					}
+	
+					if (ilc) {
+						ilc.setX(xpos);
+						ilc.setY(childYpos);
+
+						if (!isNaN(ilc.percentWidth)) {
+							var newWidth:Number = hostWidth * ilc.percentWidth / 100;
+							ilc.setWidth(newWidth);
+						}
+
+					} else {
+						child.x = xpos;
+						child.y = childYpos;
+					}
+
+					xpos += child.width + margins.right;
+				}
+
+				return true;
+
+            }
+            COMPILE::JS
+            {
+                var children:Array;
+                var i:int;
+                var n:int;
+				var contentView:IParentIUIBase = layoutView as IParentIUIBase;
+				contentView.element.classList.add("layout parent"); //style["white-space"] = "nowrap";
+                children = contentView.internalChildren();
+
+                n = children.length;
+                for (i = 0; i < n; i++)
+                {
+                    var child:WrappedHTMLElement = children[i] as WrappedHTMLElement;
+					if (child == null) continue;
+
+					 child.classList.add("layout horizontal");
+
+					/*child.royale_wrapper.setDisplayStyleForLayout('inline-block');
+					if (child.style.display !== 'none')
+					{
+						child.style.display = 'inline-block';
+					}*/
+				}
+
+                return true;
+            }
+		}
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
new file mode 100644
index 0000000..fab6700
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
@@ -0,0 +1,193 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads.layouts
+{
+	import org.apache.royale.core.LayoutBase;
+	
+	import org.apache.royale.core.IBeadLayout;
+	import org.apache.royale.core.IBeadModel;
+    import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
+	import org.apache.royale.core.ILayoutChild;
+	import org.apache.royale.core.ILayoutHost;
+	import org.apache.royale.core.ILayoutView;
+	import org.apache.royale.core.ILayoutParent;
+	import org.apache.royale.core.IParentIUIBase;
+	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.IUIBase;
+    import org.apache.royale.core.layout.EdgeData;
+	import org.apache.royale.core.ValuesManager;
+	COMPILE::JS
+	{
+		import org.apache.royale.core.WrappedHTMLElement;
+	}
+	import org.apache.royale.events.Event;
+	import org.apache.royale.events.IEventDispatcher;
+	import org.apache.royale.geom.Rectangle;
+	import org.apache.royale.utils.CSSUtils;
+
+	/**
+	 *  The VerticalLayout class is a simple layout
+	 *  bead.  It takes the set of children and lays them out
+	 *  vertically in one column, separating them according to
+	 *  CSS layout rules for margin and horizontal-align styles.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.3
+	 */
+	public class VerticalLayout extends LayoutBase implements IBeadLayout
+	{
+		/**
+		 *  Constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		public function VerticalLayout()
+		{
+			super();
+		}
+
+		/**
+		 *  Layout children vertically
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 *  @royaleignorecoercion org.apache.royale.core.ILayoutHost
+		 *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+		 */
+		override public function layout():Boolean
+		{
+			COMPILE::SWF
+			{
+				var contentView:ILayoutView = layoutView;
+
+				var n:Number = contentView.numElements;
+				if (n == 0) return false;
+
+				var maxWidth:Number = 0;
+				var maxHeight:Number = 0;
+				var hostWidthSizedToContent:Boolean = host.isWidthSizedToContent();
+				var hostHeightSizedToContent:Boolean = host.isHeightSizedToContent();
+				var hostWidth:Number = host.width;
+				var hostHeight:Number = host.height;
+
+				var ilc:ILayoutChild;
+				var data:Object;
+				var canAdjust:Boolean = false;
+
+				var paddingMetrics:EdgeData = (ValuesManager.valuesImpl as IBorderPaddingMarginValuesImpl).getPaddingMetrics(host);
+				var borderMetrics:EdgeData = (ValuesManager.valuesImpl as IBorderPaddingMarginValuesImpl).getBorderMetrics(host);
+				
+				// adjust the host's usable size by the metrics. If hostSizedToContent, then the
+				// resulting adjusted value may be less than zero.
+				hostWidth -= paddingMetrics.left + paddingMetrics.right + borderMetrics.left + borderMetrics.right;
+				hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
+
+				var xpos:Number = borderMetrics.left + paddingMetrics.left;
+				var ypos:Number = borderMetrics.top + paddingMetrics.top;
+
+				// First pass determines the data about the child.
+				for(var i:int=0; i < n; i++)
+				{
+					var child:IUIBase = contentView.getElementAt(i) as IUIBase;
+					if (child == null || !child.visible) continue;
+					var positions:Object = childPositions(child);
+					var margins:Object = childMargins(child, hostWidth, hostHeight);
+
+					ilc = child as ILayoutChild;
+
+					ypos += margins.top;
+
+					var childXpos:Number = xpos + margins.left; // default x position
+
+					var childWidth:Number = child.width;
+					if (ilc != null && !isNaN(ilc.percentWidth)) {
+						childWidth = hostWidth * ilc.percentWidth/100.0;
+						ilc.setWidth(childWidth);
+					}
+					else if (ilc.isWidthSizedToContent() && !margins.auto)
+					{
+						childWidth = hostWidth;
+						ilc.setWidth(childWidth);
+					}
+					if (margins.auto)
+						childXpos = (hostWidth - childWidth) / 2;
+						
+					if (ilc) {
+						ilc.setX(childXpos);
+						ilc.setY(ypos);
+
+						if (!isNaN(ilc.percentHeight)) {
+							var newHeight:Number = hostHeight * ilc.percentHeight / 100;
+							ilc.setHeight(newHeight);
+						}
+
+					} else {
+						child.x = childXpos;
+						child.y = ypos;
+					}
+
+					ypos += child.height + margins.bottom;
+				}
+
+				return true;
+			}
+			COMPILE::JS
+			{
+				var children:Array;
+				var i:int;
+				var n:int;
+				var contentView:IParentIUIBase = layoutView as IParentIUIBase;
+				contentView.element.classList.add("layout parent");//style["vertical-align"] = "top";
+				
+				children = contentView.internalChildren();
+				n = children.length;
+				for (i = 0; i < n; i++)
+				{
+					var child:WrappedHTMLElement = children[i] as WrappedHTMLElement;
+					if (child == null) continue;
+					
+                    child.classList.add("layout vertical");
+
+                    /*child.royale_wrapper.setDisplayStyleForLayout('block');
+					if (child.style.display === 'none')
+					{
+						child.royale_wrapper.setDisplayStyleForLayout('block');
+					}
+					else
+					{
+						// block elements don't measure width correctly so set to inline for a second
+						child.style.display = 'inline-block';
+						child.style.display = 'block';
+					}*/
+					child.royale_wrapper.dispatchEvent('sizeChanged');
+				}
+
+				return true;
+			}
+		}
+
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as
new file mode 100644
index 0000000..f941993
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as
@@ -0,0 +1,341 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.beads.layouts
+{
+	import org.apache.royale.core.LayoutBase;
+	
+	import org.apache.royale.core.IBeadLayout;
+	import org.apache.royale.core.IBeadModel;
+    import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
+	import org.apache.royale.core.ILayoutChild;
+	import org.apache.royale.core.ILayoutHost;
+	import org.apache.royale.core.ILayoutView;
+	import org.apache.royale.core.ILayoutParent;
+	import org.apache.royale.core.IParentIUIBase;
+	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.IUIBase;
+    import org.apache.royale.core.layout.EdgeData;
+	import org.apache.royale.core.ValuesManager;
+	COMPILE::JS
+	{
+		import org.apache.royale.core.WrappedHTMLElement;
+	}
+	import org.apache.royale.events.Event;
+	import org.apache.royale.events.IEventDispatcher;
+	import org.apache.royale.geom.Rectangle;
+	import org.apache.royale.utils.CSSUtils;
+
+	/**
+	 *  The VerticalLayoutWithPaddingAndGap class is a simple layout
+	 *  bead similar to VerticalLayout, but it adds support for
+	 *  padding and gap values.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	public class VerticalLayoutWithPaddingAndGap extends LayoutBase implements IBeadLayout
+	{
+		/**
+		 *  Constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function VerticalLayoutWithPaddingAndGap()
+		{
+			super();
+		}
+
+		/**
+		 *  @private
+		 */
+		private var _paddingTop:Number = 0;
+
+		/**
+		 *  The top padding value.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get paddingTop():Number
+		{
+			return _paddingTop;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set paddingTop(value:Number):void
+		{
+			_paddingTop = value;
+		}
+
+		/**
+		 *  @private
+		 */
+		private var _paddingRight:Number = 0;
+
+		/**
+		 *  The right padding value.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get paddingRight():Number
+		{
+			return _paddingRight;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set paddingRight(value:Number):void
+		{
+			_paddingRight = value;
+		}
+
+		/**
+		 *  @private
+		 */
+		private var _paddingBottom:Number = 0;
+
+		/**
+		 *  The top padding value.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get paddingBottom():Number
+		{
+			return _paddingBottom;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set paddingBottom(value:Number):void
+		{
+			_paddingBottom = value;
+		}
+
+		/**
+		 *  @private
+		 */
+		private var _paddingLeft:Number = 0;
+
+		/**
+		 *  The left padding value.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get paddingLeft():Number
+		{
+			return _paddingLeft;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set paddingLeft(value:Number):void
+		{
+			_paddingLeft = value;
+		}
+
+		/**
+		 *  @private
+		 */
+		private var _gap:Number = 0;
+
+		/**
+		 *  The gap between items.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function get gap():Number
+		{
+			return _gap;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set gap(value:Number):void
+		{
+			_gap = value;
+		}
+
+		/**
+		 *  Layout children vertically
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 *  @royaleignorecoercion org.apache.royale.core.ILayoutHost
+		 *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+		 */
+		override public function layout():Boolean
+		{
+			COMPILE::SWF
+			{
+				var contentView:ILayoutView = layoutView;
+
+				var n:Number = contentView.numElements;
+				if (n == 0) return false;
+
+				var maxWidth:Number = 0;
+				var maxHeight:Number = 0;
+				var hostWidthSizedToContent:Boolean = host.isWidthSizedToContent();
+				var hostHeightSizedToContent:Boolean = host.isHeightSizedToContent();
+				var hostWidth:Number = hostWidthSizedToContent ? 0 : contentView.width;
+				var hostHeight:Number = hostHeightSizedToContent ? 0 : contentView.height;
+
+				var ilc:ILayoutChild;
+				var data:Object;
+				var canAdjust:Boolean = false;
+
+				var paddingMetrics:EdgeData = new EdgeData();
+                paddingMetrics.left = _paddingLeft;
+                paddingMetrics.top  = _paddingTop;
+                paddingMetrics.right = _paddingRight;
+                paddingMetrics.bottom = _paddingBottom;
+				var borderMetrics:EdgeData = (ValuesManager.valuesImpl as IBorderPaddingMarginValuesImpl).getBorderMetrics(host);
+				
+				// adjust the host's usable size by the metrics. If hostSizedToContent, then the
+				// resulting adjusted value may be less than zero.
+				hostWidth -= paddingMetrics.left + paddingMetrics.right + borderMetrics.left + borderMetrics.right;
+				hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
+
+				var xpos:Number = borderMetrics.left + paddingMetrics.left;
+				var ypos:Number = borderMetrics.top + paddingMetrics.top;
+
+				// First pass determines the data about the child.
+				for(var i:int=0; i < n; i++)
+				{
+					var child:IUIBase = contentView.getElementAt(i) as IUIBase;
+					if (child == null || !child.visible) continue;
+					var positions:Object = childPositions(child);
+
+					ilc = child as ILayoutChild;
+
+					var childXpos:Number = xpos; // default x position
+
+					if (!hostWidthSizedToContent) {
+						var childWidth:Number = child.width;
+						if (ilc != null && !isNaN(ilc.percentWidth)) {
+							childWidth = hostWidth * ilc.percentWidth/100.0;
+							ilc.setWidth(childWidth);
+						}
+						// the following code center-aligns the child, but since HTML does not
+						// do this normally, this code is commented. (Use VerticalFlexLayout for
+						// horizontally centered elements in a vertical column).
+						//					childXpos = hostWidth/2 - (childWidth + ml + mr)/2;
+					}
+
+					if (ilc) {
+						ilc.setX(childXpos);
+						ilc.setY(ypos);
+
+						if (!hostHeightSizedToContent && !isNaN(ilc.percentHeight)) {
+							var newHeight:Number = hostHeight * ilc.percentHeight / 100;
+							ilc.setHeight(newHeight);
+						}
+
+					} else {
+						child.x = childXpos;
+						child.y = ypos;
+					}
+
+					ypos += child.height + _gap;
+				}
+
+				return true;
+			}
+			COMPILE::JS
+			{
+				var children:Array;
+				var i:int;
+				var n:int;
+				var contentView:IParentIUIBase = layoutView as IParentIUIBase;
+				contentView.element.style["vertical-align"] = "top";
+				
+				children = contentView.internalChildren();
+				n = children.length;
+				for (i = 0; i < n; i++)
+				{
+					var child:WrappedHTMLElement = children[i];
+
+                    child.className += " vertical-layout-padding-gap";
+
+
+					/*if(i == 0)
+					{
+						child.style.marginTop = _paddingTop + 'px';
+					}
+					else
+					{
+						child.style.marginTop = _gap + 'px';
+					}
+					child.style.marginRight = _paddingRight + 'px';
+					if(i === (n - 1))
+					{
+						child.style.marginBottom = _paddingBottom + 'px';
+					}
+					else
+					{
+						child.style.marginBottom = '0px';
+					}
+					child.style.marginLeft = _paddingLeft + 'px';
+					child.royale_wrapper.setDisplayStyleForLayout('block');
+					if (child.style.display === 'none')
+					{
+						child.royale_wrapper.setDisplayStyleForLayout('block');
+					}
+					else
+					{
+						// block elements don't measure width correctly so set to inline for a second
+						child.style.display = 'inline-block';
+						child.style.display = 'block';
+					}
+                    */
+					child.royale_wrapper.dispatchEvent('sizeChanged');
+				}
+
+				return true;
+			}
+		}
+
+	}
+}
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
new file mode 100644
index 0000000..e1ed050
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/ITextField.as
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+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
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 9.2
+     */
+    public interface ITextField
+    {
+        COMPILE::JS
+        {
+            /**
+            * the textNode
+            *
+            * @langversion 3.0
+            * @playerversion Flash 10.2
+            * @playerversion AIR 2.6
+            * @productversion Royale 0.9.2
+            */
+            function get textNode():Text;
+            function set textNode(value:Text):void;
+
+            /**
+            * the input
+            *
+            * @langversion 3.0
+            * @playerversion Flash 10.2
+            * @playerversion AIR 2.6
+            * @productversion Royale 0.9.2
+            */
+            function get input():HTMLInputElement;
+            function set input(value:HTMLInputElement):void;
+
+            /**
+            * the label
+            *
+            * @langversion 3.0
+            * @playerversion Flash 10.2
+            * @playerversion AIR 2.6
+            * @productversion Royale 0.9.2
+            */
+            function get label():HTMLLabelElement;
+            function set label(value:HTMLLabelElement):void;
+        }
+    }
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/RadioButtonIcon.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/RadioButtonIcon.as
new file mode 100644
index 0000000..4d71794
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/RadioButtonIcon.as
@@ -0,0 +1,117 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.supportClasses
+{
+	COMPILE::JS {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
+
+	/**
+	 *  The RadioButton class is a component that displays a selectable Button. RadioButtons
+	 *  are typically used in groups, identified by the groupName property. RadioButton use
+	 *  the following beads:
+	 *
+	 *  org.apache.royale.core.IBeadModel: the data model, which includes the groupName.
+	 *  org.apache.royale.core.IBeadView:  the bead that constructs the visual parts of the RadioButton..
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	public class RadioButtonIcon
+	{
+		public function RadioButtonIcon()
+		{
+			COMPILE::JS {
+				createElement();
+			}
+
+			className = 'RadioButtonIcon';
+		}
+
+        /**
+         * @private
+         * 
+         * @royalesuppresspublicvarwarning
+         */
+		COMPILE::JS 
+		public var element:WrappedHTMLElement;
+		
+		COMPILE::JS
+		public function get positioner():WrappedHTMLElement
+		{
+			return element;
+		}
+		
+		private var _className:String;
+
+		/**
+		 * @private
+		 */
+		public function get className():String
+		{
+			return _className;
+		}
+		public function set className(value:String):void
+		{
+			_className = value;
+
+			COMPILE::JS {
+				element.className = value;
+			}
+		}
+
+		private var _id:String;
+
+		/**
+		 * @private
+		 */
+		public function get id():String
+		{
+			return _id;
+		}
+		public function set id(value:String):void
+		{
+			_id = value;
+
+			COMPILE::JS {
+				element.id = value;
+			}
+		}
+
+		/**
+		 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+		 * @royaleignorecoercion HTMLInputElement
+		 * @royaleignorecoercion Text
+		 */
+		COMPILE::JS
+ 		protected function createElement():WrappedHTMLElement
+		{
+			//This class does not subclass anything, so these properties must be set explicitly
+			var input:HTMLInputElement = document.createElement('input') as HTMLInputElement;
+			input.type = 'radio';
+
+			element = input as WrappedHTMLElement;
+			element.royale_wrapper = this;
+
+			return element;
+		}
+	}
+}
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/TextFieldBase.as
new file mode 100644
index 0000000..5cb5924
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/TextFieldBase.as
@@ -0,0 +1,154 @@
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+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;
+    
+    COMPILE::JS
+    {
+        import goog.events;
+        import org.apache.royale.core.WrappedHTMLElement;        
+    }
+    
+    /**
+     *  The TextFieldBase class is the base class for TextField 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
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.2
+         */
+		public function TextFieldBase()
+		{
+			super();
+		}
+
+        COMPILE::JS
+        {
+            private var _textNode:Text;
+            /**
+             *  @copy org.apache.royale.jewel.supportClasses.ITextField#textNode
+             *
+             *  @langversion 3.0
+             *  @playerversion Flash 10.2
+             *  @playerversion AIR 2.6
+             *  @productversion Royale 0.9.2
+             */
+            public function get textNode():Text
+            {
+                return _textNode;
+            }
+
+            public function set textNode(value:Text):void
+            {
+                _textNode = value;
+            }
+
+            private var _input:HTMLInputElement;
+            /**
+             *  @copy org.apache.royale.jewel.supportClasses.ITextField#input
+             *
+             *  @langversion 3.0
+             *  @playerversion Flash 10.2
+             *  @playerversion AIR 2.6
+             *  @productversion Royale 0.9.2
+             */
+            public function get input():HTMLInputElement
+            {
+                return _input;
+            }
+
+            public function set input(value:HTMLInputElement):void
+            {
+                _input = value;
+            }
+
+            private var _label:HTMLLabelElement;
+            /**
+             *  @copy org.apache.royale.jewel.supportClasses.ITextField#label
+             *
+             *  @langversion 3.0
+             *  @playerversion Flash 10.2
+             *  @playerversion AIR 2.6
+             *  @productversion Royale 0.9.2
+             */
+            public function get label():HTMLLabelElement
+            {
+                return _label;
+            }
+
+            public function set label(value:HTMLLabelElement):void
+            {
+                _label = value;
+            }
+        }
+
+        COMPILE::JS
+        /**
+		 *  override UIBase to affect positioner instead of element
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+		override protected function setClassName(value:String):void
+		{
+			positioner.className = value;           
+		}
+
+        private var _isInvalid:Boolean = false;
+        /**
+		 *  A boolean flag to activate "is-invalid" effect selector.
+         *  Defines the textfield as invalid on initial load.
+         *  Optional
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.2
+		 */
+        public function get isInvalid():Boolean
+        {
+            return _isInvalid;
+        }
+        public function set isInvalid(value:Boolean):void
+        {
+            _isInvalid = value;
+
+            COMPILE::JS
+            {
+                positioner.classList.toggle("is-invalid", _isInvalid);
+                typeNames = positioner.className;
+            }
+        }
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
new file mode 100644
index 0000000..b98f623
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+@namespace "library://ns.apache.org/royale/jewel"
+
+.layout
+	.horizontal
+		white-space: nowrap
+	.vertical
+		display: block !important
+	
+
+/**
+ * Jewel TextField
+ */
+TextField
+	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");
+
+.vTextField--input
+.vTextField--label
+
+/**
+ * Jewel Slider
+ */
+Slider
+	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel")
+	IBeadView:  ClassReference("org.apache.royale.jewel.beads.SliderView")
+	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout")
+	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController")
+	position: relative
+
+.SliderTrack
+	position: absolute
+
+.SliderThumb
+	position: absolute
+	border-radius: 15px
+
+@media -royale-swf
+	Slider
+		iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView")
+		iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView")
+
+RadioButton
+	IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel")
+	IBeadView:  ClassReference("org.apache.royale.jewel.beads.RadioButtonView")
+	//font-size: 11px
+	//font-family: Arial
diff --git a/frameworks/projects/Jewel/src/main/sass/jewel.sass b/frameworks/projects/Jewel/src/main/sass/jewel.sass
new file mode 100644
index 0000000..598c490
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/sass/jewel.sass
@@ -0,0 +1,35 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+// Variables
+//import "variables"
+//import "mixins"
+//import "functions"
+
+// Global
+@import "global"
+
+// Components
+
+// Button
+//import "button"
+
+// TextButton
+//import "textbutton"
+
+// TextField
+//import "textfield"
\ No newline at end of file
diff --git a/frameworks/projects/pom.xml b/frameworks/projects/pom.xml
index 4a548f3..6545709 100644
--- a/frameworks/projects/pom.xml
+++ b/frameworks/projects/pom.xml
@@ -60,6 +60,7 @@
     <module>Text</module>
     <module>TLF</module>
     <module>RoyaleSite</module>
+    <module>Jewel</module>
   </modules>
 
   <profiles>
diff --git a/frameworks/themes/JewelTheme/.vscode/launch.json b/frameworks/themes/JewelTheme/.vscode/launch.json
new file mode 100644
index 0000000..5dfb672
--- /dev/null
+++ b/frameworks/themes/JewelTheme/.vscode/launch.json
@@ -0,0 +1,21 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch Chrome against debug.html, with sourcemaps",
+            "type": "chrome",
+            "request": "launch",
+            "file": "${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": "mvn"
+        },
+        {
+            "name": "Launch Firefox against debug.html, with sourcemaps",
+            "type": "firefox",
+            "request": "launch",
+            "file": "${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": "mvn"
+        }
+    ]
+}
diff --git a/frameworks/themes/JewelTheme/.vscode/settings.json b/frameworks/themes/JewelTheme/.vscode/settings.json
new file mode 100644
index 0000000..1f5a970
--- /dev/null
+++ b/frameworks/themes/JewelTheme/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+    "nextgenas.sdk.framework": "/Users/carlosrovira/Dev/Royale/Sdks/apache-royale-0.9.2-SNAPSHOT"
+}
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/.vscode/tasks.json b/frameworks/themes/JewelTheme/.vscode/tasks.json
new file mode 100644
index 0000000..5d6198d
--- /dev/null
+++ b/frameworks/themes/JewelTheme/.vscode/tasks.json
@@ -0,0 +1,8 @@
+{
+	// for the documentation about the tasks.json format
+	"version": "0.1.0",
+	"command": "mvn",
+	"args": ["clean", "install", "-DskipTests"],
+	"isShellCommand": true,
+	"showOutput": "always"
+}
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/asconfig.json b/frameworks/themes/JewelTheme/asconfig.json
new file mode 100644
index 0000000..1cb76c0
--- /dev/null
+++ b/frameworks/themes/JewelTheme/asconfig.json
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ {
+    "config": "royale",
+    "type": "lib",
+    "compilerOptions": {
+        "debug": true,
+        "targets": [
+            "JSRoyale",
+            "SWF"
+        ],
+        "include-classes": [
+            "JewelThemeClasses"
+        ],
+        "include-sources": [
+            "src/main/royale"
+        ],
+        "output": "target/JewelTheme.swc"
+    }
+}
diff --git a/frameworks/themes/JewelTheme/build.xml b/frameworks/themes/JewelTheme/build.xml
new file mode 100644
index 0000000..6174e3e
--- /dev/null
+++ b/frameworks/themes/JewelTheme/build.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="JewelTheme" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <!-- doesn't contain compiled files so only need to compile JS version -->
+    <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="compile-js">
+        <!-- doesn't contain compiled files so only need to compile JS version
+        <ant dir="${ROYALE_HOME}/frameworks/js/projects/${ant.project.name}JS/" inheritAll="false" >
+            <property name="ROYALE_SWF_COMPILER_HOME" value="${ROYALE_SWF_COMPILER_HOME}"/>
+            <property name="ROYALE_COMPILER_HOME" value="${ROYALE_COMPILER_HOME}"/>
+            <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+        </ant>
+         -->
+    </target>
+    
+    <target name="copy-swc" if="env.AIR_HOME">
+        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/royale/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" />
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${ROYALE_HOME}/frameworks/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" target="clean"/>
+    </target>
+    
+    <target name="compile" description="Compiles .as files into .swc" if="env.AIR_HOME">
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
+        <echo message="ROYALE_HOME: ${ROYALE_HOME}"/>
+        <echo message="ROYALE_SWF_COMPILER_HOME: ${ROYALE_SWF_COMPILER_HOME}"/>
+        <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
+        
+        <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+royalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-compiler.strict-xml=true" />
+            <arg value="-compiler.targets=SWF" />
+            <arg value="-output=${basedir}/target/${target.name}" />
+            <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" />
+            <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
+            <arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
+        </java>
+    </target>
+    
+    <target name="check-compiler" depends="check-compiler-home,check-transpiler-home">
+        <path id="lib.path">
+            <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-compiler-home"
+        description="Set ROYALE_SWF_COMPILER_HOME to point at the compiler.">
+        
+        <available file="${ROYALE_HOME}/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${ROYALE_HOME}"/>
+        
+        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or the root of a Royale SDK"
+        unless="ROYALE_SWF_COMPILER_HOME"/>
+    </target>
+    
+    <target name="check-transpiler-home"
+        description="Set ROYALE_COMPILER_HOME to point at the cross-compiler.">
+        
+        <available file="${ROYALE_HOME}/js/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${ROYALE_HOME}/js"/>
+        
+        <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK"
+        unless="ROYALE_COMPILER_HOME"/>
+    </target>
+    
+</project>
diff --git a/frameworks/themes/JewelTheme/pom.xml b/frameworks/themes/JewelTheme/pom.xml
new file mode 100644
index 0000000..055a04d
--- /dev/null
+++ b/frameworks/themes/JewelTheme/pom.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.framework</groupId>
+    <artifactId>themes</artifactId>
+    <version>0.9.3-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>JewelTheme</artifactId>
+  <version>0.9.3-SNAPSHOT</version>
+  <packaging>swc</packaging>
+
+  <name>Apache Royale: Framework: Themes: JewelTheme</name>
+
+  <build>
+    <sourceDirectory>src/main/royale</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+        <version>${royale.compiler.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <includeClasses>
+            <includeClass>JewelThemeClasses</includeClass>
+          </includeClasses>
+          <includeFiles>
+            <include-file>
+              <name>assets/*</name>
+              <path>../src/main/resources/assets/*</path>
+            </include-file>
+            <include-file>
+              <name>royale-jewel-blue.css</name>
+              <path>../src/main/resources/royale-jewel-blue.css</path>
+            </include-file>
+          </includeFiles>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>nl.geodienstencentrum.maven</groupId>
+        <artifactId>sass-maven-plugin</artifactId>
+        <version>3.5.2</version>
+        <configuration>
+          <resources>
+              <resource>
+                  <source>
+                      <directory>${basedir}/src/main/sass</directory>
+                      <includes>
+                          <include>**/*.sass</include>
+                      </includes>
+                  </source>
+                  <destination>${basedir}/src/main/resources</destination>
+              </resource>
+          </resources>
+        </configuration>
+        <executions>
+          <execution>
+              <id>generate-css-using-sass</id>
+              <goals>
+                  <goal>update-stylesheets</goal>
+              </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
new file mode 100644
index 0000000..bb3e613
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
@@ -0,0 +1,90 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<royale-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <!-- build both SWF and JS. -->
+        <targets>
+            <target>JSRoyale</target>
+        </targets>
+        <strict-xml>true</strict-xml>
+
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../../../../libs/Binding.swc</path-element>
+            <path-element>../../../../../libs/Core.swc</path-element>
+            <path-element>../../../../../libs/Graphics.swc</path-element>
+            <path-element>../../../../../libs/Basic.swc</path-element>
+            <path-element>../../../../../libs/Collections.swc</path-element>
+            <path-element>../../../../../libs/HTML.swc</path-element>
+        </external-library-path>
+        
+        <allow-subclass-overrides>true</allow-subclass-overrides>
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.royale.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.royale.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <define>
+            <name>COMPILE::SWF</name>
+            <value>true</value>
+        </define>
+        <define>
+            <name>COMPILE::JS</name>
+            <value>true</value>
+        </define>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <source-path>
+            <path-element>../royale</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>defaults.css</name>
+        <path>../resources/defaults.css</path>
+    </include-file>
+
+    <include-lookup-only>true</include-lookup-only>
+    
+    <include-classes>
+        <class>JewelThemeClasses</class>
+    </include-classes>
+    
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</royale-config>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/assets/JewelButton2.svg b/frameworks/themes/JewelTheme/src/main/resources/assets/JewelButton2.svg
new file mode 100644
index 0000000..ad0c128
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/resources/assets/JewelButton2.svg
@@ -0,0 +1,44 @@
+
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+<svg width="152px" height="42px" viewBox="0 0 152 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <defs>
+        <linearGradient x1="50%" y1="3.10307717%" x2="50%" y2="98.2081246%" id="linearGradient-1">
+            <stop stop-color="#3BB0FF" offset="0%"></stop>
+            <stop stop-color="#1E36FA" offset="100%"></stop>
+        </linearGradient>
+        <rect id="path-2" x="0" y="0" width="150" height="40" rx="3"></rect>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="98.2362085%" id="linearGradient-3">
+            <stop stop-color="#8EDEFF" offset="0%"></stop>
+            <stop stop-color="#1D89E6" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="JewelButton">
+            <g id="Background" transform="translate(1.000000, 1.000000)">
+                <g>
+                    <use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"></use>
+                    <rect stroke="#244084" stroke-width="1" x="-0.5" y="-0.5" width="151" height="41" rx="3"></rect>
+                </g>
+                <rect stroke="url(#linearGradient-3)" x="0.5" y="0.5" width="149" height="39" rx="3"></rect>
+            </g>
+        </g>
+    </g>
+</svg>
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/resources/assets/jewel-button.svg b/frameworks/themes/JewelTheme/src/main/resources/assets/jewel-button.svg
new file mode 100644
index 0000000..63bfc72
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/resources/assets/jewel-button.svg
@@ -0,0 +1,37 @@
+
+
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<svg viewBox="0 0 126 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <defs>
+        <rect id="path-1" x="0" y="0" width="126" height="48" rx="4"></rect>
+    </defs>
+    <g id="Jewel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="button/large">
+            <mask id="mask-2" fill="white">
+                <use xlink:href="#path-1"></use>
+            </mask>
+            <use id="mask" fill="#009EF5" fill-rule="evenodd" xlink:href="#path-1"></use>
+            <g id="colors/primary" mask="url(#mask-2)" fill="#006CEB" fill-rule="evenodd">
+                <rect x="0" y="0" width="126" height="48"></rect>
+            </g>
+            <text id="CTA" mask="url(#mask-2)" font-family="Lato-Bold, Lato" font-size="18" font-weight="bold" line-spacing="24" letter-spacing="-0.225000009"></text>
+        </g>
+    </g>
+</svg>
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
new file mode 100644
index 0000000..e642ce7
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
@@ -0,0 +1,263 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+@namespace j "library://ns.apache.org/royale/jewel";
+@namespace "http://www.w3.org/1999/xhtml";
+.royale *, .royale *:before, .royale *:after {
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.royale {
+  padding: 10px;
+  margin: 10px;
+}
+
+/**
+ * Jewel Button
+ */
+.jewel.button, .jewel.button:hover, .jewel.textbutton, .jewel.textbutton:hover {
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border: none;
+  border-radius: 3px;
+}
+
+.jewel.button {
+  background-color: rgba(0, 0, 0, 0.3);
+  transition-duration: 0.4s;
+  color: rgba(0, 0, 0, 0.4);
+}
+.jewel.button:hover {
+  background-color: rgba(15, 15, 15, 0.3);
+}
+.jewel.button:active {
+  background-color: rgba(0, 0, 0, 0.3);
+}
+.jewel.button:focus {
+  outline: 0;
+}
+.jewel.button[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.button.primary {
+  background-color: #006CEB;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.button.primary:hover {
+  background-color: #0b7bff;
+}
+.jewel.button.primary:active {
+  background-color: #005ecc;
+}
+.jewel.button.primary:focus {
+  outline: 0;
+}
+.jewel.button.primary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.button.secondary {
+  background-color: #011833;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.button.secondary:hover {
+  background-color: #022651;
+}
+.jewel.button.secondary:active {
+  background-color: #000a15;
+}
+.jewel.button.secondary:focus {
+  outline: 0;
+}
+.jewel.button.secondary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.button.emphasized {
+  background-color: #1FD348;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.button.emphasized:hover {
+  background-color: #30e158;
+}
+.jewel.button.emphasized:active {
+  background-color: #1bb83f;
+}
+.jewel.button.emphasized:focus {
+  outline: 0;
+}
+.jewel.button.emphasized[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+/**
+ * Jewel TextButton
+ */
+.jewel.textbutton, .jewel.textbutton:hover {
+  /* TextField */
+  font-family: "Lato-Bold", sans-serif;
+  font-style: bold;
+  font-size: 0.7rem;
+  text-transform: uppercase;
+  text-decoration: none;
+}
+.jewel.textbutton [disabled] {
+  text-shadow: unset;
+}
+
+.jewel.textbutton {
+  background-color: rgba(0, 0, 0, 0.3);
+  transition-duration: 0.4s;
+  color: rgba(0, 0, 0, 0.4);
+}
+.jewel.textbutton:hover {
+  background-color: rgba(15, 15, 15, 0.3);
+}
+.jewel.textbutton:active {
+  background-color: rgba(0, 0, 0, 0.3);
+}
+.jewel.textbutton:focus {
+  outline: 0;
+}
+.jewel.textbutton[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.textbutton.primary {
+  background-color: #006CEB;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.textbutton.primary:hover {
+  background-color: #0b7bff;
+}
+.jewel.textbutton.primary:active {
+  background-color: #005ecc;
+}
+.jewel.textbutton.primary:focus {
+  outline: 0;
+}
+.jewel.textbutton.primary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.textbutton.secondary {
+  background-color: #011833;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.textbutton.secondary:hover {
+  background-color: #022651;
+}
+.jewel.textbutton.secondary:active {
+  background-color: #000a15;
+}
+.jewel.textbutton.secondary:focus {
+  outline: 0;
+}
+.jewel.textbutton.secondary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.textbutton.emphasized {
+  background-color: #1FD348;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.textbutton.emphasized:hover {
+  background-color: #30e158;
+}
+.jewel.textbutton.emphasized:active {
+  background-color: #1bb83f;
+}
+.jewel.textbutton.emphasized:focus {
+  outline: 0;
+}
+.jewel.textbutton.emphasized[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+/**
+ * Jewel TextField
+ */
+TextField {
+  position: relative;
+  display: inline-block;
+  box-sizing: border-box;
+  width: 300px;
+  max-width: 100%;
+  margin: 0;
+}
+
+.vTextField--input {
+  font-size: 16px;
+  font-family: "Lato", sans-serif;
+  border: none;
+  border-bottom: 2px solid;
+  border-bottom-color: #ff0000;
+  display: block;
+  margin: 0;
+  padding: 4 0;
+  width: 100px;
+  background: transparent;
+  text-align: left;
+  color: inherit;
+  outline: none;
+}
+
+.vTextField--label {
+  bottom: 0;
+  color: #ff0000;
+  font-size: 13px;
+  left: 0;
+  right: 0;
+  pointer-events: none;
+  position: absolute;
+  display: block;
+  width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-align: left;
+}
+
+/*# sourceMappingURL=royale-jewel-blue.css.map */
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
new file mode 100644
index 0000000..60f16ca
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
@@ -0,0 +1,263 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+@namespace j "library://ns.apache.org/royale/jewel";
+@namespace "http://www.w3.org/1999/xhtml";
+.royale *, .royale *:before, .royale *:after {
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.royale {
+  padding: 10px;
+  margin: 10px;
+}
+
+/**
+ * Jewel Button
+ */
+.jewel.button, .jewel.button:hover, .jewel.textbutton, .jewel.textbutton:hover {
+  cursor: pointer;
+  display: inline-block;
+  margin: 0;
+  padding: 10px 16px;
+  min-width: 74px;
+  min-height: 34px;
+  /* Background: */
+  border: none;
+  border-radius: 3px;
+}
+
+.jewel.button {
+  background-color: rgba(0, 0, 0, 0.2);
+  transition-duration: 0.4s;
+  color: rgba(0, 0, 0, 0.5);
+}
+.jewel.button:hover {
+  background-color: rgba(15, 15, 15, 0.2);
+}
+.jewel.button:active {
+  background-color: rgba(0, 0, 0, 0.2);
+}
+.jewel.button:focus {
+  outline: 0;
+}
+.jewel.button[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.button.primary {
+  background-color: #FF0000;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.button.primary:hover {
+  background-color: #ff1f1f;
+}
+.jewel.button.primary:active {
+  background-color: #e00000;
+}
+.jewel.button.primary:focus {
+  outline: 0;
+}
+.jewel.button.primary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.button.secondary {
+  background-color: #342F30;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.button.secondary:hover {
+  background-color: #443e3f;
+}
+.jewel.button.secondary:active {
+  background-color: #242021;
+}
+.jewel.button.secondary:focus {
+  outline: 0;
+}
+.jewel.button.secondary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.button.emphasized {
+  background-color: #016936;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.button.emphasized:hover {
+  background-color: #018746;
+}
+.jewel.button.emphasized:active {
+  background-color: #014b26;
+}
+.jewel.button.emphasized:focus {
+  outline: 0;
+}
+.jewel.button.emphasized[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+/**
+ * Jewel TextButton
+ */
+.jewel.textbutton, .jewel.textbutton:hover {
+  /* TextField */
+  font-family: "Lato-Bold", sans-serif;
+  font-style: bold;
+  font-size: 0.7rem;
+  text-transform: uppercase;
+  text-decoration: none;
+}
+.jewel.textbutton [disabled] {
+  text-shadow: unset;
+}
+
+.jewel.textbutton {
+  background-color: rgba(0, 0, 0, 0.2);
+  transition-duration: 0.4s;
+  color: rgba(0, 0, 0, 0.5);
+}
+.jewel.textbutton:hover {
+  background-color: rgba(15, 15, 15, 0.2);
+}
+.jewel.textbutton:active {
+  background-color: rgba(0, 0, 0, 0.2);
+}
+.jewel.textbutton:focus {
+  outline: 0;
+}
+.jewel.textbutton[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.textbutton.primary {
+  background-color: #FF0000;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.textbutton.primary:hover {
+  background-color: #ff1f1f;
+}
+.jewel.textbutton.primary:active {
+  background-color: #e00000;
+}
+.jewel.textbutton.primary:focus {
+  outline: 0;
+}
+.jewel.textbutton.primary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.textbutton.secondary {
+  background-color: #342F30;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.textbutton.secondary:hover {
+  background-color: #443e3f;
+}
+.jewel.textbutton.secondary:active {
+  background-color: #242021;
+}
+.jewel.textbutton.secondary:focus {
+  outline: 0;
+}
+.jewel.textbutton.secondary[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+.jewel.textbutton.emphasized {
+  background-color: #016936;
+  transition-duration: 0.4s;
+  color: white;
+}
+.jewel.textbutton.emphasized:hover {
+  background-color: #018746;
+}
+.jewel.textbutton.emphasized:active {
+  background-color: #014b26;
+}
+.jewel.textbutton.emphasized:focus {
+  outline: 0;
+}
+.jewel.textbutton.emphasized[disabled] {
+  background-color: #CCCCCC;
+  color: #888888;
+  cursor: unset;
+}
+
+/**
+ * Jewel TextField
+ */
+TextField {
+  position: relative;
+  display: inline-block;
+  box-sizing: border-box;
+  width: 300px;
+  max-width: 100%;
+  margin: 0;
+}
+
+.vTextField--input {
+  font-size: 16px;
+  font-family: "Lato", sans-serif;
+  border: none;
+  border-bottom: 2px solid;
+  border-bottom-color: #ff0000;
+  display: block;
+  margin: 0;
+  padding: 4 0;
+  width: 100px;
+  background: transparent;
+  text-align: left;
+  color: inherit;
+  outline: none;
+}
+
+.vTextField--label {
+  bottom: 0;
+  color: #ff0000;
+  font-size: 13px;
+  left: 0;
+  right: 0;
+  pointer-events: none;
+  position: absolute;
+  display: block;
+  width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-align: left;
+}
+
+/*# sourceMappingURL=royale-jewel-red.css.map */
diff --git a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
new file mode 100644
index 0000000..3e88523
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
@@ -0,0 +1,36 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+    /**
+     *  @private
+     *  This class is used to link additional classes into JewelTheme.swc
+     *  beyond those that are found by dependecy analysis starting
+     *  from the classes specified in manifest.xml.
+     */
+    internal class JewelThemeClasses
+    {
+        COMPILE::JS
+	    {
+            import org.apache.royale.jewel.JewelThemeFontInject; JewelThemeFontInject;
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as
new file mode 100644
index 0000000..9d5f913
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel
+{
+
+    /**
+     *  @private
+     *  This class is used to link the font in html
+     */
+    public class JewelThemeFontInject
+    {
+        /**
+         *  constructor.
+         *
+		 * <inject_html>
+		 * <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
+     	 * </inject_html>
+	 	 * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.2
+         */
+		public function JewelThemeFontInject()
+		{
+            super();
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_button.sass b/frameworks/themes/JewelTheme/src/main/sass/_button.sass
new file mode 100644
index 0000000..d04d186
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/_button.sass
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Jewel Button
+ */
+%button-def
+	cursor: pointer
+	
+	display: inline-block
+	margin: 0 //1rem
+	padding: 10px 16px //.938em 1.875em
+	min-width: $button-min-width
+	min-height: 34px
+
+	/* Background: */
+	border: none // .094em solid 
+	border-radius: 3px //.625em
+	//box-shadow: 0 .375em .313em -.313em rgba(black,.8), inset 0 .063em $off-wht, inset 0 -.188em rgba(black,.15)
+
+.jewel.button, .jewel.button:hover
+	@extend %button-def
+
+.jewel.button
+	+button-theme($default-color, $default-font-color)
+
+.jewel.button.primary
+	+button-theme($primary-color, $font-color)
+
+.jewel.button.secondary
+	+button-theme($secondary-color, $font-color)
+
+.jewel.button.emphasized
+	+button-theme($emphasized-color, $font-color)
+
+
+//SVGs
+//border:1px; /*without this svg shows scaled and bigger*/
+//border-image-source: url(assets/jewel-button.svg) ;
+//border-image-slice: 4;
+//border-image-width: 4;
+
+//background-image: linear-gradient(#3BB0FF, #1E36FA);
+
+//background-color: #006CEB;
+//background-size: cover;
+//background-repeat: no-repeat;
+//background-clip: padding-box;
+
+//background: url(assets/4slicewithpattern.svg);
+//background-size: cover;
+//width: fit-content;
+//height: fit-content;
+
+//.button:active	
+//box-shadow: #E6431D 0 1px 0 inset;
+//text-shadow: 0 -1px 0 #5F3A29;
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_functions.sass b/frameworks/themes/JewelTheme/src/main/sass/_functions.sass
new file mode 100644
index 0000000..0c6fb82
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/_functions.sass
@@ -0,0 +1,18 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_global.sass b/frameworks/themes/JewelTheme/src/main/sass/_global.sass
new file mode 100644
index 0000000..3a8a0ef
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/_global.sass
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+@namespace j "library://ns.apache.org/royale/jewel"
+@namespace "http://www.w3.org/1999/xhtml"
+
+
+.royale *, .royale *:before, .royale *:after
+	-moz-box-sizing: border-box
+	-webkit-box-sizing: border-box
+	box-sizing: border-box
+	//fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
+
+.royale
+	padding: 10px
+	margin: 10px
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_mixins.sass b/frameworks/themes/JewelTheme/src/main/sass/_mixins.sass
new file mode 100644
index 0000000..f4e7302
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/_mixins.sass
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+=button-theme($button-color, $text-color)
+	//border-color: darken($button-color, 20%)
+	background-color: $button-color
+	transition:
+		duration: 0.4s
+	color: $text-color
+	&:hover
+		background-color: lighten($button-color, 6%)
+		//box-shadow: 0 .125em $off-wht, inset 0 .063em $off-wht, inset 0 -.188em lighten($btn-color, 2%)
+	&:active
+		background-color: darken($button-color, 6%)
+		//box-shadow: 0 .063em $off-wht, inset 0 0 1.094em darken($btn-color, 40%), inset 0 .063em darken($btn-color, 20%),inset 0 -0.188em darken($btn-color, 20%)
+	&:focus
+		outline: 0
+	&[disabled]
+		background-color: $disabled-color
+		color: $font-disabled-color
+		cursor: unset
+
+//=trans($val...)
+//	-webkit-transition: $val
+//	-moz-transition: $val
+//	-o-transition: $val
+//	transition: $val
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass
new file mode 100644
index 0000000..c24dbec
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+ 
+/**
+ * Jewel TextButton
+ */
+%textbutton-def
+	@extend %button-def
+	/* TextField */
+	font:
+		family: $font-stack 
+		style: bold 
+		size: .7rem 
+	//+trans(0.2s ease-in-out)
+	text:
+		transform: uppercase
+		decoration: none 
+		//shadow: 0 .063em rgba(black,.3)
+	[disabled]
+		text:
+			shadow: unset
+
+.jewel.textbutton, .jewel.textbutton:hover
+	@extend %textbutton-def
+
+.jewel.textbutton
+	+button-theme($default-color, $default-font-color)
+
+.jewel.textbutton.primary
+	+button-theme($primary-color, $font-color)
+
+.jewel.textbutton.secondary
+	+button-theme($secondary-color, $font-color)
+
+.jewel.textbutton.emphasized
+	+button-theme($emphasized-color, $font-color)
+
+// /* TextField: */
+//	font-family: $font-stack
+//	font-size: 14px
+//	font-weight: bold
+//	color: $font-normal-color
+//	text-shadow: 0 1px 0 #555
+
+//	padding: 10px 0px
+//	display: inline-block
+//	min-width: 80px
+
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_textfield.sass b/frameworks/themes/JewelTheme/src/main/sass/_textfield.sass
new file mode 100644
index 0000000..84b696c
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/_textfield.sass
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Jewel TextField
+ */
+TextField
+	position: relative
+	display: inline-block
+	box-sizing: border-box
+	width: 300px
+	max-width: 100%
+	margin: 0
+
+.vTextField--input
+	font-size: 16px
+	font-family: 'Lato', sans-serif
+
+	border: none
+	border-bottom: 2px solid
+	border-bottom-color: #ff0000
+	display: block
+	margin: 0
+	padding: 4 0
+	width: 100px
+	background: transparent
+	text-align: left
+	color: inherit
+	outline: none
+
+.vTextField--label
+	bottom: 0
+	color: #ff0000
+	font-size: 13px
+	left: 0
+	right: 0
+	pointer-events: none
+	position: absolute
+	display: block
+	width: 100%
+	overflow: hidden
+	white-space: nowrap
+	text-align: left
+
+//    padding: 5px;
+//    border: solid 1px #666666;
+//    border-radius: 6px;
+//    color: #333333;
+//:hover 
+//    padding: 5px;
+//    background-color: #DFDFDF;
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_variables.sass b/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
new file mode 100644
index 0000000..b1f1f39
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+$font-stack: 'Lato-Bold', sans-serif
+
+// Common Colors
+$white: rgba(white,.9)
+$disabled-color: #CCCCCC
+$font-disabled-color: #888888
+
+// Button variables
+$button-min-width: 74px !default
+
+
+
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass b/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass
new file mode 100644
index 0000000..3bdf08e
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+// Color Themes
+$default-color: rgba(0,0,0,.3)
+$primary-color: #006CEB
+$secondary-color: #011833
+$emphasized-color: #1FD348
+
+$default-font-color: rgba(0, 0, 0, .4)
+$font-color: white
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass b/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
new file mode 100644
index 0000000..b564176
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+// Color Themes
+$default-color: rgba(0,0,0,0.20)
+$primary-color: #FF0000
+$secondary-color: #342F30
+$emphasized-color: #016936
+
+$default-font-color: rgba(0, 0, 0, .5)
+$font-color: white
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass
new file mode 100644
index 0000000..3c82eb7
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass
@@ -0,0 +1,36 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+// Variables
+@import "colors/blue-color-palette"
+@import "variables"
+@import "mixins"
+@import "functions"
+
+// Global
+@import "global"
+
+// Components
+
+// Button
+@import "button"
+
+// TextButton
+@import "textbutton"
+
+// TextField
+@import "textfield"
diff --git a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass
new file mode 100644
index 0000000..54e8f75
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass
@@ -0,0 +1,36 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+// Variables
+@import "colors/red-color-palette"
+@import "variables"
+@import "mixins"
+@import "functions"
+
+// Global
+@import "global"
+
+// Components
+
+// Button
+@import "button"
+
+// TextButton
+@import "textbutton"
+
+// TextField
+@import "textfield"
diff --git a/frameworks/themes/pom.xml b/frameworks/themes/pom.xml
index e674d5f..19fbbe6 100644
--- a/frameworks/themes/pom.xml
+++ b/frameworks/themes/pom.xml
@@ -34,6 +34,7 @@
 
   <modules>
     <module>Basic</module>
+    <module>JewelTheme</module>
   </modules>
 
   <dependencies>

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 04/28: update classList to fix issues. Now work totaly as expected

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit d975764e47f35f22cf36cd7a2de90b2c97b63f47
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Mar 13 16:21:45 2018 +0100

    update classList to fix issues. Now work totaly as expected
---
 .../main/royale/org/apache/royale/core/UIBase.as   | 38 ++++++++++++++++++++--
 .../main/royale/org/apache/royale/jewel/Button.as  |  5 ++-
 .../royale/org/apache/royale/jewel/TextButton.as   |  4 +--
 3 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
index 7abe638..2d279c0 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
@@ -1025,8 +1025,39 @@ package org.apache.royale.core
          * 
          *  @royalesuppresspublicvarwarning
          */
-        public var typeNames:String;
+        private var _typeNames:String;
         
+        /**
+         *  The classname.  Often used for CSS
+         *  class selector lookups.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function get typeNames():String
+		{
+			return _typeNames;
+		}
+
+        /**
+         *  @private
+         */
+        public function set typeNames(value:String):void
+        {
+            if (_typeNames !== value)
+            {
+                _typeNames = value;
+
+                COMPILE::JS
+                {
+                    element.className = "";
+                    setClassName(_typeNames);             
+                }
+            }
+        }
+
         private var _className:String;
 
         /**
@@ -1054,7 +1085,7 @@ package org.apache.royale.core
 
                 COMPILE::JS
                 {
-                    setClassName(_className);             
+                    setClassName(typeNames ? typeNames + " " + _className : _className);             
                 }
                 
                 dispatchEvent(new Event("classNameChanged"));
@@ -1064,7 +1095,8 @@ package org.apache.royale.core
         COMPILE::JS
         protected function setClassName(value:String):void
         {
-            element.classList.add(value);
+            var classes:Array = value.split(" ");
+            element.classList.add.apply(element.classList, classes);
         }
 
         /**
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index 224c789..53f58e4 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -59,9 +59,8 @@ package org.apache.royale.jewel
 		{
 			super();
 
-            COMPILE::JS {
-                element.classList.add("jewel", "button");
-            }
+            
+            typeNames = "jewel button";
 		}
 
         private var _primary:Boolean = false;
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
index 23eb625..67fdcdd 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TextButton.as
@@ -51,9 +51,7 @@ package org.apache.royale.jewel
 		{
 			super();
 
-            COMPILE::JS {
-                element.classList.add("jewel", "textbutton");
-            }
+            typeNames = "jewel textbutton";
 		}
         
         /**

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 02/28: forgotten changes in pom

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 5d797391505cabc6ec2543abeebbe3c91ad2a12c
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Mon Mar 12 22:28:45 2018 +0100

    forgotten changes in pom
---
 pom.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pom.xml b/pom.xml
index 232afe9..9fba592 100644
--- a/pom.xml
+++ b/pom.xml
@@ -150,6 +150,12 @@
           <artifactId>build-helper-maven-plugin</artifactId>
           <version>3.0.0</version>
         </plugin>
+
+        <plugin>
+          <groupId>nl.geodienstencentrum.maven</groupId>
+          <artifactId>sass-maven-plugin</artifactId>
+          <version>3.5.2</version>
+        </plugin>
 <!--
         <plugin>
           <groupId>org.sonarsource.scanner.maven</groupId>
@@ -197,6 +203,8 @@
             <!-- Ignore IntelliJ IDEA project files -->
             <exclude>**/*.iml</exclude>
             <exclude>**/.idea/**</exclude>
+            <!-- SASS cc.map generated files by sass-maven-plugin-->
+            <exclude>**/*.css.map</exclude>
             <!--
                 Exclude any eventually existing content of target directories.
                 Some times when building with a bigger maven reactor and then

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 11/28: Added HorizontalLayoutWithPaddingAndGap and VerticalLayoutWithPaddingAndGap using CSS, but gaps and padding are still in inline style, what can be ok, but can't be modified at runtime, this must be revisited some time later

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 56801c2284512390de820b69d73cea1e9cfe938f
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Mar 14 16:44:54 2018 +0100

    Added HorizontalLayoutWithPaddingAndGap and VerticalLayoutWithPaddingAndGap using CSS, but gaps and padding are still in inline style, what can be ok, but can't be modified at runtime, this must be revisited some time later
---
 .../src/main/royale/ButtonPlayGround.mxml          |  19 +--
 frameworks/projects/Jewel/pom.xml                  |   6 +-
 .../Jewel/src/main/resources/jewel-manifest.xml    |   1 +
 .../projects/Jewel/src/main/royale/JewelClasses.as |   1 +
 ...Gap.as => HorizontalLayoutWithPaddingAndGap.as} | 174 +++++++++------------
 .../royale/jewel/beads/layouts/VerticalLayout.as   |   4 +-
 .../layouts/VerticalLayoutWithPaddingAndGap.as     |  37 +----
 7 files changed, 90 insertions(+), 152 deletions(-)

diff --git a/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
index fd5f879..f89ecaa 100644
--- a/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/ButtonPlayGround.mxml
@@ -32,7 +32,7 @@ limitations under the License.
 	</fx:Script>
 
 	<js:beads>
-		<js:VerticalLayoutWithPaddingAndGap gap="10"/>
+		<j:VerticalLayoutWithPaddingAndGap gap="10"/>
 	</js:beads>
 	
 	<j:Label text="Basic"/>
@@ -41,31 +41,22 @@ limitations under the License.
 
 	<j:Label text="Jewel Button"/>
 	<j:Button primary="true"/>
-
 	<j:Label text="Jewel TextButton"/>
-	
-	<j:TextButton text="DEFAULT"/>
-
+	<j:TextButton text="Default"/>
 	<j:TextButton text="Button With More Text"/>
-
-	<j:TextButton text="PRIMARY" primary="true"/>
-
-	<j:TextButton text="SECONDARY" secondary="true"/>
-
-	<j:TextButton text="EMPHASIZED" emphasized="true"/>
-
+	<j:TextButton text="Primary" primary="true"/>
+	<j:TextButton text="Secondary" secondary="true"/>
+	<j:TextButton text="Emphasized" emphasized="true"/>
 	<j:TextButton text="Disabled" primary="true">
 		<j:beads>
 			<j:Disabled/>
 		</j:beads>
 	</j:TextButton>
-
 	<j:Label text="Jewel Button Sizing (respect min values)"/>
 	<j:Slider id="slider" width="250" value="100" minimum="0" maximum="500"
 				valueChange="onValueChange(event)"/>
 	<j:Slider id="slider_v" width="250" value="40" minimum="0" maximum="300"
 				valueChange="onValueChange(event)"/>
-
 	<j:TextButton id="button" text="Button" width="100" height="40" primary="true"/>
 
 </js:Group>
diff --git a/frameworks/projects/Jewel/pom.xml b/frameworks/projects/Jewel/pom.xml
index 53fb1fc..e7de6c2 100644
--- a/frameworks/projects/Jewel/pom.xml
+++ b/frameworks/projects/Jewel/pom.xml
@@ -60,10 +60,10 @@
               <name>defaults.css</name>
               <path>../src/main/resources/defaults.css</path>
             </include-file>
-            <!-- <include-file>
-              <name>jewel.css</name>
+            <include-file>
+              <name>jewel-framework.css</name>
               <path>../src/main/resources/jewel-framework.css</path>
-            </include-file> -->
+            </include-file>
           </includeFiles>
           <includeLookupOnly>true</includeLookupOnly>
           <!--<allowSubclassOverrides>true</allowSubclassOverrides>-->
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index 96b6b31..b57f9a2 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -33,6 +33,7 @@
 
     <component id="HorizontalLayout" class="org.apache.royale.jewel.beads.layouts.HorizontalLayout"/>
     <component id="VerticalLayout" class="org.apache.royale.jewel.beads.layouts.VerticalLayout"/>
+    <component id="HorizontalLayoutWithPaddingAndGap" class="org.apache.royale.jewel.beads.layouts.HorizontalLayoutWithPaddingAndGap"/>
     <component id="VerticalLayoutWithPaddingAndGap" class="org.apache.royale.jewel.beads.layouts.VerticalLayoutWithPaddingAndGap"/>
     
 </componentPackage>
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index b2dfb99..547acc3 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -41,6 +41,7 @@ package
 
         import org.apache.royale.jewel.beads.layouts.HorizontalLayout; HorizontalLayout;
         import org.apache.royale.jewel.beads.layouts.VerticalLayout; VerticalLayout;
+        import org.apache.royale.jewel.beads.layouts.HorizontalLayoutWithPaddingAndGap; HorizontalLayoutWithPaddingAndGap;
         import org.apache.royale.jewel.beads.layouts.VerticalLayoutWithPaddingAndGap; VerticalLayoutWithPaddingAndGap;
     }
 
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayoutWithPaddingAndGap.as
similarity index 62%
copy from frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as
copy to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayoutWithPaddingAndGap.as
index f941993..95b689d 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayoutWithPaddingAndGap.as
@@ -21,47 +21,39 @@ package org.apache.royale.jewel.beads.layouts
 	import org.apache.royale.core.LayoutBase;
 	
 	import org.apache.royale.core.IBeadLayout;
-	import org.apache.royale.core.IBeadModel;
     import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
 	import org.apache.royale.core.ILayoutChild;
 	import org.apache.royale.core.ILayoutHost;
 	import org.apache.royale.core.ILayoutView;
-	import org.apache.royale.core.ILayoutParent;
 	import org.apache.royale.core.IParentIUIBase;
-	import org.apache.royale.core.IStrand;
 	import org.apache.royale.core.IUIBase;
     import org.apache.royale.core.layout.EdgeData;
 	import org.apache.royale.core.ValuesManager;
-	COMPILE::JS
-	{
-		import org.apache.royale.core.WrappedHTMLElement;
-	}
-	import org.apache.royale.events.Event;
-	import org.apache.royale.events.IEventDispatcher;
-	import org.apache.royale.geom.Rectangle;
-	import org.apache.royale.utils.CSSUtils;
-
-	/**
-	 *  The VerticalLayoutWithPaddingAndGap class is a simple layout
-	 *  bead similar to VerticalLayout, but it adds support for
+	COMPILE::JS {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
+
+    /**
+	 *  The HorizontalLayoutWithPaddingAndGap class is a simple layout
+	 *  bead similar to HorizontalLayout, but it adds support for
 	 *  padding and gap values.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion Royale 0.0
-	 */
-	public class VerticalLayoutWithPaddingAndGap extends LayoutBase implements IBeadLayout
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+	public class HorizontalLayoutWithPaddingAndGap extends LayoutBase implements IBeadLayout
 	{
-		/**
-		 *  Constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 */
-		public function VerticalLayoutWithPaddingAndGap()
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function HorizontalLayoutWithPaddingAndGap()
 		{
 			super();
 		}
@@ -196,20 +188,16 @@ package org.apache.royale.jewel.beads.layouts
 			_gap = value;
 		}
 
-		/**
-		 *  Layout children vertically
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion Royale 0.0
-		 *  @royaleignorecoercion org.apache.royale.core.ILayoutHost
-		 *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
-		 */
+        /**
+         * @copy org.apache.royale.core.IBeadLayout#layout
+         * @royaleignorecoercion org.apache.royale.core.ILayoutHost
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         * @royaleignorecoercion org.apache.royale.core.IBorderPaddingMarginValuesImpl
+         */
 		override public function layout():Boolean
 		{
-			COMPILE::SWF
-			{
+            COMPILE::SWF
+            {
 				var contentView:ILayoutView = layoutView;
 
 				var n:Number = contentView.numElements;
@@ -228,7 +216,7 @@ package org.apache.royale.jewel.beads.layouts
 
 				var paddingMetrics:EdgeData = new EdgeData();
                 paddingMetrics.left = _paddingLeft;
-                paddingMetrics.top  = _paddingTop;
+                paddingMetrics.top = _paddingTop;
                 paddingMetrics.right = _paddingRight;
                 paddingMetrics.bottom = _paddingBottom;
 				var borderMetrics:EdgeData = (ValuesManager.valuesImpl as IBorderPaddingMarginValuesImpl).getBorderMetrics(host);
@@ -250,92 +238,74 @@ package org.apache.royale.jewel.beads.layouts
 
 					ilc = child as ILayoutChild;
 
-					var childXpos:Number = xpos; // default x position
+					var childYpos:Number = ypos; // default y position
 
-					if (!hostWidthSizedToContent) {
-						var childWidth:Number = child.width;
-						if (ilc != null && !isNaN(ilc.percentWidth)) {
-							childWidth = hostWidth * ilc.percentWidth/100.0;
-							ilc.setWidth(childWidth);
+					if (!hostHeightSizedToContent) {
+						var childHeight:Number = child.height;
+						if (ilc != null && !isNaN(ilc.percentHeight)) {
+							childHeight = hostHeight * ilc.percentHeight/100.0;
+							ilc.setHeight(childHeight);
 						}
-						// the following code center-aligns the child, but since HTML does not
-						// do this normally, this code is commented. (Use VerticalFlexLayout for
-						// horizontally centered elements in a vertical column).
-						//					childXpos = hostWidth/2 - (childWidth + ml + mr)/2;
+						// the following code middle-aligns the child, but since HTML does not
+						// do this normally, this code is commented. (Use HorizontalFlexLayout for
+						// vertically centered elements in a horizontal row).
+//						childYpos = hostHeight/2 - (childHeight + mt + mb)/2;
 					}
 
 					if (ilc) {
-						ilc.setX(childXpos);
-						ilc.setY(ypos);
+						ilc.setX(xpos);
+						ilc.setY(childYpos);
 
-						if (!hostHeightSizedToContent && !isNaN(ilc.percentHeight)) {
-							var newHeight:Number = hostHeight * ilc.percentHeight / 100;
-							ilc.setHeight(newHeight);
+						if (!hostWidthSizedToContent && !isNaN(ilc.percentWidth)) {
+							var newWidth:Number = hostWidth * ilc.percentWidth / 100;
+							ilc.setWidth(newWidth);
 						}
 
 					} else {
-						child.x = childXpos;
-						child.y = ypos;
+						child.x = xpos;
+						child.y = childYpos;
 					}
 
-					ypos += child.height + _gap;
+					xpos += child.width + _gap;
 				}
 
 				return true;
-			}
-			COMPILE::JS
-			{
-				var children:Array;
-				var i:int;
-				var n:int;
-				var contentView:IParentIUIBase = layoutView as IParentIUIBase;
-				contentView.element.style["vertical-align"] = "top";
-				
-				children = contentView.internalChildren();
-				n = children.length;
-				for (i = 0; i < n; i++)
-				{
-					var child:WrappedHTMLElement = children[i];
-
-                    child.className += " vertical-layout-padding-gap";
 
+            }
+            COMPILE::JS
+            {
+                var contentView:IParentIUIBase = layoutView as IParentIUIBase;
+				contentView.element.classList.add("layout", "horizontal");
 
-					/*if(i == 0)
-					{
-						child.style.marginTop = _paddingTop + 'px';
-					}
-					else
-					{
-						child.style.marginTop = _gap + 'px';
-					}
-					child.style.marginRight = _paddingRight + 'px';
+				var children:Array = contentView.internalChildren();
+				var i:int;
+				var n:int = children.length;
+				for (i = 0; i < n; i++)
+                {
+                    var child:WrappedHTMLElement = children[i] as WrappedHTMLElement;
+					if (child == null) continue;
+					child.style.marginTop = _paddingTop + 'px';
 					if(i === (n - 1))
 					{
-						child.style.marginBottom = _paddingBottom + 'px';
+						child.style.marginRight = _paddingRight + 'px';
 					}
 					else
 					{
-						child.style.marginBottom = '0px';
+						child.style.marginRight = '0px';
 					}
-					child.style.marginLeft = _paddingLeft + 'px';
-					child.royale_wrapper.setDisplayStyleForLayout('block');
-					if (child.style.display === 'none')
+					child.style.marginBottom = _paddingBottom + 'px';
+					if(i == 0)
 					{
-						child.royale_wrapper.setDisplayStyleForLayout('block');
+						child.style.marginLeft = _paddingLeft + 'px';
 					}
 					else
 					{
-						// block elements don't measure width correctly so set to inline for a second
-						child.style.display = 'inline-block';
-						child.style.display = 'block';
-					}
-                    */
-					child.royale_wrapper.dispatchEvent('sizeChanged');
+						child.style.marginLeft = _gap + 'px';
+					}					
 				}
 
-				return true;
-			}
+                return true;
+            }
 		}
-
 	}
 }
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
index cc217c2..947a7de 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayout.as
@@ -153,10 +153,8 @@ package org.apache.royale.jewel.beads.layouts
 				contentView.element.classList.add("layout", "vertical");
 				
 				var children:Array = contentView.internalChildren();
-				n = children.length;
-
 				var i:int;
-				var n:int;
+				var n:int = children.length;
 				for (i = 0; i < n; i++)
 				{
 					var child:WrappedHTMLElement = children[i] as WrappedHTMLElement;
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as
index f941993..ed602a2 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/VerticalLayoutWithPaddingAndGap.as
@@ -21,14 +21,11 @@ package org.apache.royale.jewel.beads.layouts
 	import org.apache.royale.core.LayoutBase;
 	
 	import org.apache.royale.core.IBeadLayout;
-	import org.apache.royale.core.IBeadModel;
     import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
 	import org.apache.royale.core.ILayoutChild;
 	import org.apache.royale.core.ILayoutHost;
 	import org.apache.royale.core.ILayoutView;
-	import org.apache.royale.core.ILayoutParent;
 	import org.apache.royale.core.IParentIUIBase;
-	import org.apache.royale.core.IStrand;
 	import org.apache.royale.core.IUIBase;
     import org.apache.royale.core.layout.EdgeData;
 	import org.apache.royale.core.ValuesManager;
@@ -36,10 +33,6 @@ package org.apache.royale.jewel.beads.layouts
 	{
 		import org.apache.royale.core.WrappedHTMLElement;
 	}
-	import org.apache.royale.events.Event;
-	import org.apache.royale.events.IEventDispatcher;
-	import org.apache.royale.geom.Rectangle;
-	import org.apache.royale.utils.CSSUtils;
 
 	/**
 	 *  The VerticalLayoutWithPaddingAndGap class is a simple layout
@@ -285,22 +278,17 @@ package org.apache.royale.jewel.beads.layouts
 			}
 			COMPILE::JS
 			{
-				var children:Array;
-				var i:int;
-				var n:int;
 				var contentView:IParentIUIBase = layoutView as IParentIUIBase;
-				contentView.element.style["vertical-align"] = "top";
-				
-				children = contentView.internalChildren();
-				n = children.length;
+				contentView.element.classList.add("layout", "vertical");
+
+				var children:Array = contentView.internalChildren();
+				var i:int;
+				var n:int = children.length;
 				for (i = 0; i < n; i++)
 				{
 					var child:WrappedHTMLElement = children[i];
 
-                    child.className += " vertical-layout-padding-gap";
-
-
-					/*if(i == 0)
+					if(i == 0)
 					{
 						child.style.marginTop = _paddingTop + 'px';
 					}
@@ -318,18 +306,7 @@ package org.apache.royale.jewel.beads.layouts
 						child.style.marginBottom = '0px';
 					}
 					child.style.marginLeft = _paddingLeft + 'px';
-					child.royale_wrapper.setDisplayStyleForLayout('block');
-					if (child.style.display === 'none')
-					{
-						child.royale_wrapper.setDisplayStyleForLayout('block');
-					}
-					else
-					{
-						// block elements don't measure width correctly so set to inline for a second
-						child.style.display = 'inline-block';
-						child.style.display = 'block';
-					}
-                    */
+					
 					child.royale_wrapper.dispatchEvent('sizeChanged');
 				}
 

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 23/28: remove settings

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit c413361aa02154783efa83a5eafda7f288f88aa3
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Mar 17 23:04:28 2018 +0100

    remove settings
---
 examples/royale/JewelExample/.vscode/settings.json | 2 +-
 frameworks/projects/Jewel/.vscode/settings.json    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/royale/JewelExample/.vscode/settings.json b/examples/royale/JewelExample/.vscode/settings.json
index 1f5a970..e79d739 100644
--- a/examples/royale/JewelExample/.vscode/settings.json
+++ b/examples/royale/JewelExample/.vscode/settings.json
@@ -1,3 +1,3 @@
 {
-    "nextgenas.sdk.framework": "/Users/carlosrovira/Dev/Royale/Sdks/apache-royale-0.9.2-SNAPSHOT"
+    "nextgenas.sdk.framework": "/Users/carlosrovira/Dev/Royale/Sdks/apache-royale-snapshot"
 }
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/.vscode/settings.json b/frameworks/projects/Jewel/.vscode/settings.json
index 1f5a970..e79d739 100644
--- a/frameworks/projects/Jewel/.vscode/settings.json
+++ b/frameworks/projects/Jewel/.vscode/settings.json
@@ -1,3 +1,3 @@
 {
-    "nextgenas.sdk.framework": "/Users/carlosrovira/Dev/Royale/Sdks/apache-royale-0.9.2-SNAPSHOT"
+    "nextgenas.sdk.framework": "/Users/carlosrovira/Dev/Royale/Sdks/apache-royale-snapshot"
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 13/28: remove JewelThemeFontInject

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 73a080aa0efcc9425c9750767e316c924a7d480f
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Mar 15 14:15:51 2018 +0100

    remove JewelThemeFontInject
---
 .../src/main/royale/JewelThemeClasses.as           |  5 +--
 .../apache/royale/jewel/JewelThemeFontInject.as    | 46 ----------------------
 2 files changed, 1 insertion(+), 50 deletions(-)

diff --git a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
index 3e88523..20662dc 100644
--- a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
+++ b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
@@ -27,10 +27,7 @@ package
      */
     internal class JewelThemeClasses
     {
-        COMPILE::JS
-	    {
-            import org.apache.royale.jewel.JewelThemeFontInject; JewelThemeFontInject;
-        }
+       
     }
 
 }
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as
deleted file mode 100644
index 9d5f913..0000000
--- a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as
+++ /dev/null
@@ -1,46 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.jewel
-{
-
-    /**
-     *  @private
-     *  This class is used to link the font in html
-     */
-    public class JewelThemeFontInject
-    {
-        /**
-         *  constructor.
-         *
-		 * <inject_html>
-		 * <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
-     	 * </inject_html>
-	 	 * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.2
-         */
-		public function JewelThemeFontInject()
-		{
-            super();
-        }
-    }
-
-}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 20/28: fix new classlist utility methods

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit b315196cdd6c5e07c0d98eb447420c641bde27f8
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Mar 16 16:05:16 2018 +0100

    fix new classlist utility methods
---
 examples/royale/JewelExample/pom.xml                |  4 ++--
 .../apache/royale/utils/cssclasslist/addStyles.as   | 12 ++++++++----
 .../royale/utils/cssclasslist/removeAllStyles.as    | 10 +++++++---
 .../royale/utils/cssclasslist/removeStyles.as       | 12 ++++++++----
 .../apache/royale/utils/cssclasslist/toggleStyle.as | 10 +++++++---
 .../main/royale/org/apache/royale/core/UIBase.as    |  2 +-
 .../main/royale/org/apache/royale/jewel/Button.as   |  6 +++---
 .../Jewel/src/main/sass/jewel-framework.sass        | 21 ---------------------
 .../JewelTheme/src/main/resources/defaults.css      |  1 -
 .../JewelTheme/src/main/sass/components/_label.sass |  2 +-
 10 files changed, 37 insertions(+), 43 deletions(-)

diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml
index 31fd5b8..19f1837 100644
--- a/examples/royale/JewelExample/pom.xml
+++ b/examples/royale/JewelExample/pom.xml
@@ -97,13 +97,13 @@
       <type>swc</type>
       <scope>theme</scope>
     </dependency>
-    <!-- <dependency>
+    <dependency>
       <groupId>org.apache.royale.framework</groupId>
       <artifactId>JewelBlueTheme</artifactId>
       <version>0.9.3-SNAPSHOT</version>
       <type>swc</type>
       <scope>theme</scope>
-    </dependency> -->
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/addStyles.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/addStyles.as
index aa995a0..aa07062 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/addStyles.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/addStyles.as
@@ -18,7 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.utils.cssclasslist
 {
-    import org.apache.royale.core.IUIBase;
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
     
     /**
      *  Add one or more styles to the component. If the specified class already 
@@ -30,17 +33,18 @@ package org.apache.royale.utils.cssclasslist
      *  @langversion 3.0
      *  @productversion Royale 0.9.3
      */
-    public function addStyles(wrapper:IUIBase, value:String):void
+    COMPILE::JS
+    public function addStyles(element:WrappedHTMLElement, value:String):void
     {
         if (value == "") return;
         
         if (value.indexOf(" ") >= 0)
         {
             var classes:Array = value.split(" ");
-            wrapper.element.classList.add.apply(wrapper.element.classList, classes);
+            element.classList.add.apply(element.classList, classes);
         } else
         {
-            wrapper.element.classList.add(value);
+            element.classList.add(value);
         }
     }
 
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeAllStyles.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeAllStyles.as
index 4d19c79..fc34fde 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeAllStyles.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeAllStyles.as
@@ -18,7 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.utils.cssclasslist
 {
-    import org.apache.royale.core.IUIBase;
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
 
     /**
      *  Removes all styles
@@ -28,9 +31,10 @@ package org.apache.royale.utils.cssclasslist
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.9.3
      */
-    public function removeAllStyles(wrapper:IUIBase):void
+    COMPILE::JS
+    public function removeAllStyles(element:WrappedHTMLElement):void
     {
-        var classList:DOMTokenList = wrapper.element.classList;
+        var classList:DOMTokenList = element.classList;
         var i:int;
         for( i = classList.length -1; i > 0; i-- )
         {
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeStyles.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeStyles.as
index 21f59e0..badf5dd 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeStyles.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/removeStyles.as
@@ -18,7 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.utils.cssclasslist
 {
-    import org.apache.royale.core.IUIBase;
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
 
     /**
      *  Removes one or more styles from the component. Removing a class that does not 
@@ -30,17 +33,18 @@ package org.apache.royale.utils.cssclasslist
      *  @langversion 3.0
      *  @productversion Royale 0.9.3
      */
-    public function removeStyles(wrapper:IUIBase, value:String):void
+    COMPILE::JS
+    public function removeStyles(element:WrappedHTMLElement, value:String):void
     {
         if (value == "") return;
 
         if (value.indexOf(" ") >= 0)
         {
             var classes:Array = value.split(" ");
-            wrapper.element.classList.remove.apply(wrapper.element.classList, classes);
+            element.classList.remove.apply(element.classList, classes);
         } else
         {
-            wrapper.element.classList.remove(value);
+            element.classList.remove(value);
         }
     }
 }
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/toggleStyle.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/toggleStyle.as
index 8ef9224..85d7331 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/toggleStyle.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/cssclasslist/toggleStyle.as
@@ -18,7 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.utils.cssclasslist
 {
-    import org.apache.royale.core.IUIBase;
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+    }
 
     /**
      *  Adds or removes a single style. 
@@ -32,8 +35,9 @@ package org.apache.royale.utils.cssclasslist
      *  @langversion 3.0
      *  @productversion Royale 0.9.3
      */
-    public function toggleStyle(wrapper:IUIBase, value:String, force:Boolean = false):Boolean
+    COMPILE::JS
+    public function toggleStyle(element:WrappedHTMLElement, value:String, force:Boolean = false):Boolean
     {
-        return wrapper.element.classList.toggle(value, force);
+        return element.classList.toggle(value, force);
     }
 }
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
index c14e113..7b37fab 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
@@ -1085,7 +1085,7 @@ package org.apache.royale.core
         COMPILE::JS
         protected function setClassName(value:String):void
         {
-            addStyles(this, value);
+            addStyles(element, value);
         }
 
         
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index 4059764..2d5c831 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -88,7 +88,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    toggleStyle(this, "primary", value);
+                    toggleStyle(element, "primary", value);
                 }
             }
         }
@@ -118,7 +118,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    toggleStyle(this, "secondary", value);
+                    toggleStyle(element, "secondary", value);
                 }
             }
         }
@@ -148,7 +148,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    toggleStyle(this, "emphasized", value);
+                    toggleStyle(element, "emphasized", value);
                 }
             }
         }
diff --git a/frameworks/projects/Jewel/src/main/sass/jewel-framework.sass b/frameworks/projects/Jewel/src/main/sass/jewel-framework.sass
deleted file mode 100644
index 10e81d9..0000000
--- a/frameworks/projects/Jewel/src/main/sass/jewel-framework.sass
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-// Variables
-    
-// Global
-@import "global"
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index 9022239..714ec69 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -221,7 +221,6 @@
  * Jewel Label
  */
 .jewel.label {
-  IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead");
   font-family: "Lato", sans-serif;
   font-size: 0.75rem;
 }
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
index 27906d1..bb933f8 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
@@ -22,7 +22,7 @@
  */
 .jewel.label
 	//IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
-	IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead")
+	//IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead")
 	font:
 		family: $font-stack
 		size: $font-size
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 09/28: add TextFieldView;

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 82027d50c31c43f1f5280ef36982623e788700ce
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Mar 13 18:01:55 2018 +0100

    add TextFieldView;
---
 .../projects/Jewel/src/main/royale/JewelClasses.as |  2 +
 .../apache/royale/jewel/beads/TextFieldView.as}    | 57 +++++++++++++---------
 2 files changed, 35 insertions(+), 24 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index 3cb788e..b2dfb99 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -31,6 +31,8 @@ package
 	    
         COMPILE::SWF
 	    {
+            import org.apache.royale.html.beads.TextFieldView; TextFieldView;
+            
             import org.apache.royale.jewel.beads.SliderThumbView; SliderThumbView;
             import org.apache.royale.jewel.beads.SliderTrackView; SliderTrackView;
 
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/TextFieldView.as
similarity index 51%
copy from frameworks/projects/Jewel/src/main/royale/JewelClasses.as
copy to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/TextFieldView.as
index 3cb788e..884d8d6 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/TextFieldView.as
@@ -16,30 +16,39 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package
+package org.apache.royale.jewel.beads
 {
-
+	import flash.text.TextFieldType;
+	
     /**
-     *  @private
-     *  This class is used to link additional classes into jewel.swc
-     *  beyond those that are found by dependecy analysis starting
-     *  from the classes specified in manifest.xml.
+     *  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
+     *  right-to-left text support in this view.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
      */
-    internal class JewelClasses
-    {
-        import org.apache.royale.jewel.beads.SliderView; SliderView;
-	    
-        COMPILE::SWF
-	    {
-            import org.apache.royale.jewel.beads.SliderThumbView; SliderThumbView;
-            import org.apache.royale.jewel.beads.SliderTrackView; SliderTrackView;
-
-            import org.apache.royale.jewel.beads.RadioButtonView; RadioButtonView;
-        }
-
-        import org.apache.royale.jewel.beads.layouts.HorizontalLayout; HorizontalLayout;
-        import org.apache.royale.jewel.beads.layouts.VerticalLayout; VerticalLayout;
-        import org.apache.royale.jewel.beads.layouts.VerticalLayoutWithPaddingAndGap; VerticalLayoutWithPaddingAndGap;
-    }
-
-}
\ No newline at end of file
+	public class TextFieldView extends TextFieldViewBase
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+		public function TextFieldView()
+		{
+			super();
+			
+			textField.selectable = false;
+			textField.type = TextFieldType.DYNAMIC;
+			textField.mouseEnabled = false;
+			textField.autoSize = "left";
+		}
+	}
+}

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 25/28: changes to slider

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit ecd1b9f343b78a4434b7009b591b356095739162
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Mon Mar 19 11:45:14 2018 +0100

    changes to slider
---
 frameworks/projects/Jewel/src/main/resources/defaults.css          | 5 +++++
 .../Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as   | 2 ++
 .../Jewel/src/main/royale/org/apache/royale/jewel/Slider.as        | 7 ++++---
 frameworks/projects/Jewel/src/main/sass/_global.sass               | 4 ++++
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index ece389d..583ef87 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -47,6 +47,11 @@ Slider {
   IBeadView: ClassReference("org.apache.royale.jewel.beads.SliderView");
   IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout");
   IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController");
+}
+
+.jewel.slider {
+  width: 100px;
+  height: 30px;
   position: relative;
 }
 
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
index 05a5b3d..b4a8e91 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/RadioButton.as
@@ -60,6 +60,8 @@ package org.apache.royale.jewel
 		public function RadioButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
 			super(upState, overState, downState, hitTestState);
+
+            typeNames = "jewel radio"
 		}
     }
 
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
index 9d4f6d9..8d52a61 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
@@ -23,6 +23,7 @@ package org.apache.royale.jewel
     COMPILE::JS
     {
         import org.apache.royale.core.WrappedHTMLElement;
+		import org.apache.royale.html.util.addElementToWrapper;
     }
 
 	[Event(name="valueChange", type="org.apache.royale.events.Event")]
@@ -56,17 +57,17 @@ package org.apache.royale.jewel
 		public function Slider()
 		{
 			super();
-		}
 
+			typeNames = "jewel slider"
+		}
 		
-
         /**
          * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
          */
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			return super.createElement();
+			return addElementToWrapper(this,'div');
         }
     }
 }
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index 707946e..4233a68 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -46,6 +46,10 @@ Slider
 	IBeadView:  ClassReference("org.apache.royale.jewel.beads.SliderView")
 	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout")
 	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController")
+
+.jewel.slider
+	width: 100px
+	height: 30px
 	position: relative
 
 .SliderTrack

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 17/28: Refactor new styles API in UIBase to new ClassListUtil

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 50b924cb57f0d28870fb0d2842b835f1c61c9df8
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Mar 15 19:22:50 2018 +0100

    Refactor new styles API in UIBase to new ClassListUtil
---
 .../main/royale/org/apache/royale/core/UIBase.as   |  95 +--------------
 .../main/royale/org/apache/royale/jewel/Button.as  |   8 +-
 .../royale/org/apache/royale/util/ClassListUtil.as | 131 +++++++++++++++++++++
 3 files changed, 139 insertions(+), 95 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
index 1a04fcf..de5e089 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/core/UIBase.as
@@ -37,6 +37,7 @@ package org.apache.royale.core
     {
         import org.apache.royale.html.util.addElementToWrapper;
         import org.apache.royale.utils.CSSUtils;
+        import org.apache.royale.util.ClassListUtil;
     }
 	
 	/**
@@ -1074,6 +1075,7 @@ package org.apache.royale.core
             return  StringUtil.trim((_className ? _className : "") + " " + (typeNames ? typeNames : ""));
 		}
 
+        
         /**
          *  Sets the component styles in JS
          *  
@@ -1083,99 +1085,10 @@ package org.apache.royale.core
         COMPILE::JS
         protected function setClassName(value:String):void
         {
-            addStyles(value);
-        }
-
-        /**
-         *  Add one or more styles to the component. If the specified class already 
-         *  exist, the class will not be added.
-         *  
-         *  @param value, a String with the style (or styles separated by an space) to
-         *  add from the component. If the string is empty doesn't perform any action
-         *  
-         *  @langversion 3.0
-         *  @productversion Royale 0.9.3
-         */
-        COMPILE::JS
-        protected function addStyles(value:String):void
-        {
-            if (value == "") return;
-            
-            if (value.indexOf(" ") >= 0)
-            {
-                var classes:Array = value.split(" ");
-                element.classList.add.apply(element.classList, classes);
-            } else
-            {
-                element.classList.add(value);
-            }
-        }
-
-        /**
-         *  Removes one or more styles from the component. Removing a class that does not 
-         *  exist, does not throw any error
-         * 
-         *  @param value, a String with the style (or styles separated by an space) to 
-         *  remove from the component. If the string is empty doesn't perform any action
-         *  
-         *  @langversion 3.0
-         *  @productversion Royale 0.9.3
-         */
-        COMPILE::JS
-        protected function removeStyles(value:String):void
-        {
-            if (value == "") return;
-
-            if (value.indexOf(" ") >= 0)
-            {
-                var classes:Array = value.split(" ");
-                element.classList.remove.apply(element.classList, classes);
-            } else
-            {
-                element.classList.remove(value);
-            }
-        }
-
-        /**
-         *  Adds or removes a single style. 
-         * 
-         *  The first parameter removes the style from an element, and returns false.
-         *  If the style does not exist, it is added to the element, and the return value is true.
-         * 
-         *  The optional second parameter is a Boolean value that forces the class to be added 
-         *  or removed, regardless of whether or not it already existed.
-         * 
-         *  @langversion 3.0
-         *  @productversion Royale 0.9.3
-         */
-        COMPILE::JS
-        protected function toggleStyle(value:String, force:Boolean = false):Boolean
-        {
-            return element.classList.toggle(value, force);
-        }
-
-        /**
-         *  Removes all styles that are not in typeNames
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
-         */
-        COMPILE::JS
-        protected function removeAllStyles():void
-        {
-            var classList:DOMTokenList = element.classList;
-            var i:int;
-            for( i = classList.length; i > 0; i-- )
-            {
-                if(typeNames.indexOf(classList[i]) != 0)
-                {
-                    classList.remove(classList[i]);
-                }
-            }
+            ClassListUtil.addStyles(this, value);
         }
 
+        
         /**
          *  @copy org.apache.royale.core.IUIBase#element
          *  
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index 1fea4bc..5e4dba9 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -23,7 +23,7 @@ package org.apache.royale.jewel
     COMPILE::JS
     {
         import org.apache.royale.core.WrappedHTMLElement;
-        import org.apache.royale.html.util.addElementToWrapper;
+        import org.apache.royale.util.ClassListUtil;
     }
 
     /**
@@ -88,7 +88,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    toggleStyle("primary", value);
+                    ClassListUtil.toggleStyle(this, "primary", value);
                 }
             }
         }
@@ -118,7 +118,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    toggleStyle("secondary", value);
+                    ClassListUtil.toggleStyle(this, "secondary", value);
                 }
             }
         }
@@ -148,7 +148,7 @@ package org.apache.royale.jewel
 
                 COMPILE::JS
                 {
-                    toggleStyle("emphasized", value);
+                    ClassListUtil.toggleStyle(this, "emphasized", value);
                 }
             }
         }
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/util/ClassListUtil.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/util/ClassListUtil.as
new file mode 100644
index 0000000..abbdee0
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/util/ClassListUtil.as
@@ -0,0 +1,131 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.util
+{
+    /**
+     *  The UIBase class is the base class for most composite user interface
+     *  components.  For the Flash Player, Buttons and Text controls may
+     *  have a different base class and therefore may not extend UIBase.
+     *  However all user interface components should implement IUIBase.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     */
+	public class ClassListUtil
+	{
+        COMPILE::JS
+        {
+            import org.apache.royale.core.UIBase;
+            import org.apache.royale.core.WrappedHTMLElement;
+        }
+
+        /**
+         *  Add one or more styles to the component. If the specified class already 
+         *  exist, the class will not be added.
+         *  
+         *  @param value, a String with the style (or styles separated by an space) to
+         *  add from the component. If the string is empty doesn't perform any action
+         *  
+         *  @langversion 3.0
+         *  @productversion Royale 0.9.3
+         */
+        COMPILE::JS
+        public static function addStyles(wrapper:UIBase, value:String):void
+        {
+            if (value == "") return;
+            
+            if (value.indexOf(" ") >= 0)
+            {
+                var classes:Array = value.split(" ");
+                wrapper.element.classList.add.apply(wrapper.element.classList, classes);
+            } else
+            {
+                wrapper.element.classList.add(value);
+            }
+        }
+
+        /**
+         *  Removes one or more styles from the component. Removing a class that does not 
+         *  exist, does not throw any error
+         * 
+         *  @param value, a String with the style (or styles separated by an space) to 
+         *  remove from the component. If the string is empty doesn't perform any action
+         *  
+         *  @langversion 3.0
+         *  @productversion Royale 0.9.3
+         */
+        COMPILE::JS
+        public static function removeStyles(wrapper:UIBase, value:String):void
+        {
+            if (value == "") return;
+
+            if (value.indexOf(" ") >= 0)
+            {
+                var classes:Array = value.split(" ");
+                wrapper.element.classList.remove.apply(wrapper.element.classList, classes);
+            } else
+            {
+                wrapper.element.classList.remove(value);
+            }
+        }
+
+        /**
+         *  Adds or removes a single style. 
+         * 
+         *  The first parameter removes the style from an element, and returns false.
+         *  If the style does not exist, it is added to the element, and the return value is true.
+         * 
+         *  The optional second parameter is a Boolean value that forces the class to be added 
+         *  or removed, regardless of whether or not it already existed.
+         * 
+         *  @langversion 3.0
+         *  @productversion Royale 0.9.3
+         */
+        COMPILE::JS
+        public static function toggleStyle(wrapper:UIBase, value:String, force:Boolean = false):Boolean
+        {
+            return wrapper.element.classList.toggle(value, force);
+        }
+
+        /**
+         *  Removes all styles that are not in typeNames
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        COMPILE::JS
+        public static function removeAllStyles(wrapper:UIBase):void
+        {
+            var classList:DOMTokenList = wrapper.element.classList;
+            var i:int;
+            for( i = classList.length; i > 0; i-- )
+            {
+                if(wrapper.typeNames.indexOf(classList[i]) != 0)
+                {
+                    classList.remove(classList[i]);
+                }
+            }
+        }
+
+    }
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 07/28: testing Lato font in theme

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 9c1369658b3dda8bbfdaba47f8d30ae4bfcb2730
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Mar 13 17:10:45 2018 +0100

    testing Lato font in theme
---
 frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css | 4 ++--
 frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css  | 4 ++--
 frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass           | 2 +-
 frameworks/themes/JewelTheme/src/main/sass/_variables.sass            | 3 ++-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
index e642ce7..03d06cb 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
@@ -127,9 +127,9 @@
  */
 .jewel.textbutton, .jewel.textbutton:hover {
   /* TextField */
-  font-family: "Lato-Bold", sans-serif;
+  font-family: "Lato", sans-serif;
   font-style: bold;
-  font-size: 0.7rem;
+  font-size: 0.75rem;
   text-transform: uppercase;
   text-decoration: none;
 }
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
index 60f16ca..ef40149 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
@@ -127,9 +127,9 @@
  */
 .jewel.textbutton, .jewel.textbutton:hover {
   /* TextField */
-  font-family: "Lato-Bold", sans-serif;
+  font-family: "Lato", sans-serif;
   font-style: bold;
-  font-size: 0.7rem;
+  font-size: 0.75rem;
   text-transform: uppercase;
   text-decoration: none;
 }
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass b/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass
index c24dbec..b02123a 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/_textbutton.sass
@@ -26,7 +26,7 @@
 	font:
 		family: $font-stack 
 		style: bold 
-		size: .7rem 
+		size: $font-size
 	//+trans(0.2s ease-in-out)
 	text:
 		transform: uppercase
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_variables.sass b/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
index b1f1f39..3a6b64b 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/_variables.sass
@@ -17,7 +17,8 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-$font-stack: 'Lato-Bold', sans-serif
+$font-stack: 'Lato', sans-serif
+$font-size: 0.75rem
 
 // Common Colors
 $white: rgba(white,.9)

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 24/28: viewbeads inlib and theme (commented)

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit de8ee7cab1b3407430b4df8cc01460ad5fd7fdbb
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Mar 17 23:19:21 2018 +0100

    viewbeads inlib and theme  (commented)
---
 .../projects/Jewel/src/main/resources/defaults.css |  5 ++++-
 .../Jewel/src/main/resources/jewel-manifest.xml    |  2 ++
 .../projects/Jewel/src/main/royale/JewelClasses.as |  3 +++
 .../jewel/beads/views/JewelLabelViewBead.mxml}     | 23 ++++++++++---------
 .../projects/Jewel/src/main/sass/_global.sass      |  7 +++---
 frameworks/themes/JewelTheme/pom.xml               | 11 +++++++++
 .../JewelTheme/src/main/resources/defaults.css     |  4 ----
 .../src/main/resources/jeweltheme-as-manifest.xml  | 25 +++++++++++++++++++++
 .../src/main/resources/jeweltheme-manifest.xml     | 26 ++++++++++++++++++++++
 .../src/main/royale/JewelThemeClasses.as           |  2 +-
 .../{ => jewel}/beads/views/LabelViewBead.mxml     |  2 +-
 .../src/main/sass/components/_label.sass           |  9 ++++----
 12 files changed, 93 insertions(+), 26 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index 0c58f7b..ece389d 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -30,8 +30,11 @@
   display: block !important;
 }
 
+Label {
+  iBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
+}
+
 .jewel.label {
-  IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
   white-space: nowrap;
 }
 
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index b57f9a2..c0840b8 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -35,5 +35,7 @@
     <component id="VerticalLayout" class="org.apache.royale.jewel.beads.layouts.VerticalLayout"/>
     <component id="HorizontalLayoutWithPaddingAndGap" class="org.apache.royale.jewel.beads.layouts.HorizontalLayoutWithPaddingAndGap"/>
     <component id="VerticalLayoutWithPaddingAndGap" class="org.apache.royale.jewel.beads.layouts.VerticalLayoutWithPaddingAndGap"/>
+
+    <!-- <component id="JewelLabelViewBead" class="org.apache.royale.jewel.beads.views.JewelLabelViewBead"/> -->
     
 </componentPackage>
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index 547acc3..4f909d2 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -43,6 +43,9 @@ package
         import org.apache.royale.jewel.beads.layouts.VerticalLayout; VerticalLayout;
         import org.apache.royale.jewel.beads.layouts.HorizontalLayoutWithPaddingAndGap; HorizontalLayoutWithPaddingAndGap;
         import org.apache.royale.jewel.beads.layouts.VerticalLayoutWithPaddingAndGap; VerticalLayoutWithPaddingAndGap;
+
+        //import org.apache.royale.jewel.beads.views.JewelLabelViewBead; JewelLabelViewBead;
+
     }
 
 }
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/JewelLabelViewBead.mxml
similarity index 82%
copy from frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml
copy to frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/JewelLabelViewBead.mxml
index 815c4dd..6489b46 100644
--- a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/JewelLabelViewBead.mxml
@@ -18,31 +18,32 @@ limitations under the License.
 
 -->
 <js:MXMLBeadView xmlns:fx="http://ns.adobe.com/mxml/2009"
-                 xmlns:js="library://ns.apache.org/royale/basic">
+                 xmlns:js="library://ns.apache.org/royale/basic"
+                 xmlns:j="library://ns.apache.org/royale/jewel">
 				  
     <fx:Script>
         <![CDATA[
-            // import org.apache.royale.core.ITitleBarModel;
-            // import org.apache.royale.core.UIBase;
-            // import org.apache.royale.events.Event;
-            // import com.transpiledactionscript.puremvc.royale.employeeadmin.model.CustomPanelWithControlBarModel;
-     
+            import org.apache.royale.html.beads.models.TextModel;
+
             // private function clickHandler():void
             // {
             //     var newEvent:org.apache.royale.events.Event = new org.apache.royale.events.Event('close');
             //     UIBase(_strand).dispatchEvent(newEvent);   
             // }
+
         ]]>
     </fx:Script>
 
-    <js:TextButton text="VIEWBEAD!!"/>
-    
-    <!-- <js:beads>
+    <js:beads>
         <js:MXMLBeadViewDataBinding />
-        <js:LayoutChangeNotifier watchedProperty="{titleLabel.text}" />
-        <js:LayoutChangeNotifier watchedProperty="{additionalInfoLabel.text}" />
     </js:beads>
 
+    <j:TextButton id="textButton"  text="A view bead" primary="true"/>
+    
+<!--
+    
+        <js:LayoutChangeNotifier watchedProperty="{additionalInfoLabel.text}" />
+    
     <js:Label id="titleLabel" text="{CustomPanelWithControlBarModel(model).title}" className="TitleBarTitle" >
         <js:style>
             <js:SimpleCSSStyles fontWeight="inherit" marginLeft="5" />
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index c886218..707946e 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -29,10 +29,11 @@
 	> *
 		display: block !important
 
-.jewel.label
-	IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
-	//IBeadView: ClassReference("org.apache.royale.jewel.beads.TextFieldView")
+Label
+	iBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel")
+	//iBeadView: ClassReference("org.apache.royale.jewel.beads.views.JewelLabelViewBead")
 	//iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead")
+.jewel.label	
 	white-space: nowrap
 
 TextField
diff --git a/frameworks/themes/JewelTheme/pom.xml b/frameworks/themes/JewelTheme/pom.xml
index 84e7e1e..4eda5c7 100644
--- a/frameworks/themes/JewelTheme/pom.xml
+++ b/frameworks/themes/JewelTheme/pom.xml
@@ -41,6 +41,17 @@
         <version>${royale.compiler.version}</version>
         <extensions>true</extensions>
         <configuration>
+          <namespaces>
+            <namespace>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              <manifest>${project.basedir}/src/main/resources/jeweltheme-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+              <type>as</type>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              <manifest>${project.basedir}/src/main/resources/jeweltheme-as-manifest.xml</manifest>
+            </namespace>
+          </namespaces>
           <includeClasses>
             <includeClass>JewelThemeClasses</includeClass>
           </includeClasses>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index 9022239..cc10a23 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -217,11 +217,7 @@
   cursor: unset;
 }
 
-/**
- * Jewel Label
- */
 .jewel.label {
-  IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead");
   font-family: "Lato", sans-serif;
   font-size: 0.75rem;
 }
diff --git a/frameworks/themes/JewelTheme/src/main/resources/jeweltheme-as-manifest.xml b/frameworks/themes/JewelTheme/src/main/resources/jeweltheme-as-manifest.xml
new file mode 100644
index 0000000..e38496a
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/resources/jeweltheme-as-manifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    
+</componentPackage>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/jeweltheme-manifest.xml b/frameworks/themes/JewelTheme/src/main/resources/jeweltheme-manifest.xml
new file mode 100644
index 0000000..95e305d
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/resources/jeweltheme-manifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    <!-- <component id="LabelViewBead" class="org.apache.royale.beads.views.LabelViewBead"/> -->
+    
+</componentPackage>
diff --git a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
index cb5d275..433d387 100644
--- a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
+++ b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
@@ -27,7 +27,7 @@ package
      */
     internal class JewelThemeClasses
     {
-       import org.apache.royale.beads.views.LabelViewBead; LabelViewBead;
+       //import org.apache.royale.jewwl.beads.views.LabelViewBead; LabelViewBead;
     }
 
 }
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/beads/views/LabelViewBead.mxml
similarity index 97%
rename from frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml
rename to frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/beads/views/LabelViewBead.mxml
index 815c4dd..e8963bb 100644
--- a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml
+++ b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/beads/views/LabelViewBead.mxml
@@ -35,7 +35,7 @@ limitations under the License.
         ]]>
     </fx:Script>
 
-    <js:TextButton text="VIEWBEAD!!"/>
+    <js:TextButton text="LABELVIEWBEAD!!"/>
     
     <!-- <js:beads>
         <js:MXMLBeadViewDataBinding />
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
index 27906d1..8accaa7 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass
@@ -17,12 +17,11 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-/**
- * Jewel Label
- */
-.jewel.label
+Label
+	//iBeadView: ClassReference("org.apache.royale.jewel.beads.views.LabelViewBead")
 	//IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
-	IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead")
+	
+.jewel.label
 	font:
 		family: $font-stack
 		size: $font-size
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.

[royale-asjs] 15/28: Decouple theme in JewelTheme and JewelBlueTheme

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit a27e7f97b6748e8b3da918e5d633cc07e509b384
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Mar 15 17:13:45 2018 +0100

    Decouple theme in JewelTheme and JewelBlueTheme
---
 examples/royale/JewelExample/pom.xml               |   7 ++
 .../src/main/config/compile-app-config.xml         |   2 +-
 .../resources/jewel-example-index-template.html    |   2 +-
 frameworks/themes/JewelBlueTheme/asconfig.json     |  34 ++++++
 frameworks/themes/JewelBlueTheme/build.xml         | 133 +++++++++++++++++++++
 .../themes/{JewelTheme => JewelBlueTheme}/pom.xml  |   6 +-
 .../src/main/config/compile-swf-config.xml         |  85 +++++++++++++
 .../src/main/resources/assets/JewelButton2.svg     |  44 +++++++
 .../src/main/resources/assets/jewel-button.svg     |  37 ++++++
 .../src/main/resources/royale-jewel-blue.css       |   1 -
 .../src/main/royale/JewelBlueThemeClasses.as}      |  21 ++--
 .../src/main/sass}/_blue-color-palette.sass        |   0
 .../src/main/sass/_functions.sass}                 |   8 --
 .../src/main/sass/_global.sass                     |   2 +-
 .../src/main/sass/_mixins.sass}                    |  35 ++++--
 .../src/main/sass/_variables.sass}                 |  20 ++--
 .../src/main/sass/components/_button.sass          |  73 +++++++++++
 .../src/main/sass/components/_label.sass}          |  15 +--
 .../src/main/sass/components/_textbutton.sass}     |  52 ++++++--
 .../src/main/sass/components/_textfield.sass}      |  55 +++++++--
 .../src/main/sass/royale-jewel-blue.sass}          |   2 +-
 frameworks/themes/JewelTheme/pom.xml               |   4 +-
 .../{royale-jewel-red.css => defaults.css}         |  66 +++++-----
 ...or-palette.sass => _default-color-palette.sass} |  12 +-
 .../themes/JewelTheme/src/main/sass/_global.sass   |   3 +-
 .../sass/{royale-jewel-blue.sass => defaults.sass} |   2 +-
 frameworks/themes/pom.xml                          |   1 +
 27 files changed, 609 insertions(+), 113 deletions(-)

diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml
index 5d0bcc6..19f1837 100644
--- a/examples/royale/JewelExample/pom.xml
+++ b/examples/royale/JewelExample/pom.xml
@@ -97,6 +97,13 @@
       <type>swc</type>
       <scope>theme</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>JewelBlueTheme</artifactId>
+      <version>0.9.3-SNAPSHOT</version>
+      <type>swc</type>
+      <scope>theme</scope>
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/examples/royale/JewelExample/src/main/config/compile-app-config.xml b/examples/royale/JewelExample/src/main/config/compile-app-config.xml
index d81fba3..ccb20e9 100644
--- a/examples/royale/JewelExample/src/main/config/compile-app-config.xml
+++ b/examples/royale/JewelExample/src/main/config/compile-app-config.xml
@@ -23,7 +23,7 @@
     <compiler>
         <theme>
             <filename>../../../../../../frameworks/libs/JewelTheme.swc</filename>
-            <filename>../../../../../../frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css</filename>
+            <filename>../../../../../../frameworks/themes/JewelTheme/src/main/resources/defaults.css</filename>
         </theme>
     </compiler>
 </royale-config>
diff --git a/examples/royale/JewelExample/src/main/resources/jewel-example-index-template.html b/examples/royale/JewelExample/src/main/resources/jewel-example-index-template.html
index cf5ea3c..d98e4cf 100644
--- a/examples/royale/JewelExample/src/main/resources/jewel-example-index-template.html
+++ b/examples/royale/JewelExample/src/main/resources/jewel-example-index-template.html
@@ -22,7 +22,7 @@
     <meta name="Custom Template for injecting custom style CSS">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
     <link rel="stylesheet" type="text/css" href="${application}.css">
-    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
+    <link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet">
 ${head}
 </head>
 <body>
diff --git a/frameworks/themes/JewelBlueTheme/asconfig.json b/frameworks/themes/JewelBlueTheme/asconfig.json
new file mode 100644
index 0000000..b30f1fd
--- /dev/null
+++ b/frameworks/themes/JewelBlueTheme/asconfig.json
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ {
+    "config": "royale",
+    "type": "lib",
+    "compilerOptions": {
+        "debug": true,
+        "targets": [
+            "JSRoyale",
+            "SWF"
+        ],
+        "include-classes": [
+            "JewelBlueThemeClasses"
+        ],
+        "include-sources": [
+            "src/main/royale"
+        ],
+        "output": "target/JewelBlueTheme.swc"
+    }
+}
diff --git a/frameworks/themes/JewelBlueTheme/build.xml b/frameworks/themes/JewelBlueTheme/build.xml
new file mode 100644
index 0000000..d809961
--- /dev/null
+++ b/frameworks/themes/JewelBlueTheme/build.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="JewelBlueTheme" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <!-- doesn't contain compiled files so only need to compile JS version -->
+    <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="compile-js">
+        <!-- doesn't contain compiled files so only need to compile JS version
+        <ant dir="${ROYALE_HOME}/frameworks/js/projects/${ant.project.name}JS/" inheritAll="false" >
+            <property name="ROYALE_SWF_COMPILER_HOME" value="${ROYALE_SWF_COMPILER_HOME}"/>
+            <property name="ROYALE_COMPILER_HOME" value="${ROYALE_COMPILER_HOME}"/>
+            <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+        </ant>
+         -->
+    </target>
+    
+    <target name="copy-swc" if="env.AIR_HOME">
+        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/royale/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" />
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${ROYALE_HOME}/frameworks/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" target="clean"/>
+    </target>
+    
+    <target name="compile" description="Compiles .as files into .swc" if="env.AIR_HOME">
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
+        <echo message="ROYALE_HOME: ${ROYALE_HOME}"/>
+        <echo message="ROYALE_SWF_COMPILER_HOME: ${ROYALE_SWF_COMPILER_HOME}"/>
+        <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
+        
+        <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+royalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-compiler.strict-xml=true" />
+            <arg value="-compiler.targets=SWF,JSRoyale" />
+            <arg value="-output=${basedir}/target/${target.name}" />
+            <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" />
+            <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
+            <arg value="-js-load-config+=${basedir}/../../js/themes/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
+        </java>
+    </target>
+    
+    <target name="check-compiler" depends="check-compiler-home,check-transpiler-home">
+        <path id="lib.path">
+            <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-compiler-home"
+        description="Set ROYALE_SWF_COMPILER_HOME to point at the compiler.">
+        
+        <available file="${ROYALE_HOME}/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${ROYALE_HOME}"/>
+        
+        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or the root of a Royale SDK"
+        unless="ROYALE_SWF_COMPILER_HOME"/>
+    </target>
+    
+    <target name="check-transpiler-home"
+        description="Set ROYALE_COMPILER_HOME to point at the cross-compiler.">
+        
+        <available file="${ROYALE_HOME}/js/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${ROYALE_HOME}/js"/>
+        
+        <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK"
+        unless="ROYALE_COMPILER_HOME"/>
+    </target>
+    
+</project>
diff --git a/frameworks/themes/JewelTheme/pom.xml b/frameworks/themes/JewelBlueTheme/pom.xml
similarity index 94%
copy from frameworks/themes/JewelTheme/pom.xml
copy to frameworks/themes/JewelBlueTheme/pom.xml
index 055a04d..30632ff 100644
--- a/frameworks/themes/JewelTheme/pom.xml
+++ b/frameworks/themes/JewelBlueTheme/pom.xml
@@ -26,11 +26,11 @@
     <version>0.9.3-SNAPSHOT</version>
   </parent>
 
-  <artifactId>JewelTheme</artifactId>
+  <artifactId>JewelBlueTheme</artifactId>
   <version>0.9.3-SNAPSHOT</version>
   <packaging>swc</packaging>
 
-  <name>Apache Royale: Framework: Themes: JewelTheme</name>
+  <name>Apache Royale: Framework: Themes: JewelBlueTheme</name>
 
   <build>
     <sourceDirectory>src/main/royale</sourceDirectory>
@@ -42,7 +42,7 @@
         <extensions>true</extensions>
         <configuration>
           <includeClasses>
-            <includeClass>JewelThemeClasses</includeClass>
+            <includeClass>JewelBlueThemeClasses</includeClass>
           </includeClasses>
           <includeFiles>
             <include-file>
diff --git a/frameworks/themes/JewelBlueTheme/src/main/config/compile-swf-config.xml b/frameworks/themes/JewelBlueTheme/src/main/config/compile-swf-config.xml
new file mode 100644
index 0000000..221a32b
--- /dev/null
+++ b/frameworks/themes/JewelBlueTheme/src/main/config/compile-swf-config.xml
@@ -0,0 +1,85 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<royale-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <!-- build both SWF and JS. -->
+        <targets>
+            <target>JSRoyale</target>
+        </targets>
+        <strict-xml>true</strict-xml>
+
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../../../../libs/Binding.swc</path-element>
+            <path-element>../../../../../libs/Core.swc</path-element>
+            <path-element>../../../../../libs/Graphics.swc</path-element>
+            <path-element>../../../../../libs/Basic.swc</path-element>
+            <path-element>../../../../../libs/Collections.swc</path-element>
+            <path-element>../../../../../libs/HTML.swc</path-element>
+        </external-library-path>
+        
+        <allow-subclass-overrides>true</allow-subclass-overrides>
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.royale.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.royale.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <define>
+            <name>COMPILE::SWF</name>
+            <value>true</value>
+        </define>
+        <define>
+            <name>COMPILE::JS</name>
+            <value>true</value>
+        </define>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <source-path>
+            <path-element>../royale</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-lookup-only>true</include-lookup-only>
+    
+    <include-classes>
+        <class>JewelBlueThemeClasses</class>
+    </include-classes>
+    
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</royale-config>
diff --git a/frameworks/themes/JewelBlueTheme/src/main/resources/assets/JewelButton2.svg b/frameworks/themes/JewelBlueTheme/src/main/resources/assets/JewelButton2.svg
new file mode 100644
index 0000000..ad0c128
--- /dev/null
+++ b/frameworks/themes/JewelBlueTheme/src/main/resources/assets/JewelButton2.svg
@@ -0,0 +1,44 @@
+
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+<svg width="152px" height="42px" viewBox="0 0 152 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <defs>
+        <linearGradient x1="50%" y1="3.10307717%" x2="50%" y2="98.2081246%" id="linearGradient-1">
+            <stop stop-color="#3BB0FF" offset="0%"></stop>
+            <stop stop-color="#1E36FA" offset="100%"></stop>
+        </linearGradient>
+        <rect id="path-2" x="0" y="0" width="150" height="40" rx="3"></rect>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="98.2362085%" id="linearGradient-3">
+            <stop stop-color="#8EDEFF" offset="0%"></stop>
+            <stop stop-color="#1D89E6" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="JewelButton">
+            <g id="Background" transform="translate(1.000000, 1.000000)">
+                <g>
+                    <use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"></use>
+                    <rect stroke="#244084" stroke-width="1" x="-0.5" y="-0.5" width="151" height="41" rx="3"></rect>
+                </g>
+                <rect stroke="url(#linearGradient-3)" x="0.5" y="0.5" width="149" height="39" rx="3"></rect>
+            </g>
+        </g>
+    </g>
+</svg>
\ No newline at end of file
diff --git a/frameworks/themes/JewelBlueTheme/src/main/resources/assets/jewel-button.svg b/frameworks/themes/JewelBlueTheme/src/main/resources/assets/jewel-button.svg
new file mode 100644
index 0000000..63bfc72
--- /dev/null
+++ b/frameworks/themes/JewelBlueTheme/src/main/resources/assets/jewel-button.svg
@@ -0,0 +1,37 @@
+
+
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<svg viewBox="0 0 126 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <defs>
+        <rect id="path-1" x="0" y="0" width="126" height="48" rx="4"></rect>
+    </defs>
+    <g id="Jewel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="button/large">
+            <mask id="mask-2" fill="white">
+                <use xlink:href="#path-1"></use>
+            </mask>
+            <use id="mask" fill="#009EF5" fill-rule="evenodd" xlink:href="#path-1"></use>
+            <g id="colors/primary" mask="url(#mask-2)" fill="#006CEB" fill-rule="evenodd">
+                <rect x="0" y="0" width="126" height="48"></rect>
+            </g>
+            <text id="CTA" mask="url(#mask-2)" font-family="Lato-Bold, Lato" font-size="18" font-weight="bold" line-spacing="24" letter-spacing="-0.225000009"></text>
+        </g>
+    </g>
+</svg>
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css b/frameworks/themes/JewelBlueTheme/src/main/resources/royale-jewel-blue.css
similarity index 98%
rename from frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
rename to frameworks/themes/JewelBlueTheme/src/main/resources/royale-jewel-blue.css
index 91f4512..32894c4 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css
+++ b/frameworks/themes/JewelBlueTheme/src/main/resources/royale-jewel-blue.css
@@ -20,7 +20,6 @@
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
-  fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
 }
 
 .royale {
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass b/frameworks/themes/JewelBlueTheme/src/main/royale/JewelBlueThemeClasses.as
similarity index 76%
copy from frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
copy to frameworks/themes/JewelBlueTheme/src/main/royale/JewelBlueThemeClasses.as
index b564176..fddadba 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/royale/JewelBlueThemeClasses.as
@@ -16,11 +16,18 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-// Color Themes
-$default-color: rgba(0,0,0,0.20)
-$primary-color: #FF0000
-$secondary-color: #342F30
-$emphasized-color: #016936
+package
+{
 
-$default-font-color: rgba(0, 0, 0, .5)
-$font-color: white
\ No newline at end of file
+    /**
+     *  @private
+     *  This class is used to link additional classes into JewelBlueTheme.swc
+     *  beyond those that are found by dependecy analysis starting
+     *  from the classes specified in manifest.xml.
+     */
+    internal class JewelBlueThemeClasses
+    {
+       
+    }
+
+}
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/_blue-color-palette.sass
similarity index 100%
copy from frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass
copy to frameworks/themes/JewelBlueTheme/src/main/sass/_blue-color-palette.sass
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/_functions.sass
similarity index 84%
copy from frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass
copy to frameworks/themes/JewelBlueTheme/src/main/sass/_functions.sass
index 3bdf08e..0c6fb82 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/_functions.sass
@@ -16,11 +16,3 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-// Color Themes
-$default-color: rgba(0,0,0,.3)
-$primary-color: #006CEB
-$secondary-color: #011833
-$emphasized-color: #1FD348
-
-$default-font-color: rgba(0, 0, 0, .4)
-$font-color: white
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_global.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/_global.sass
similarity index 94%
copy from frameworks/themes/JewelTheme/src/main/sass/_global.sass
copy to frameworks/themes/JewelBlueTheme/src/main/sass/_global.sass
index 3a8a0ef..febf662 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_global.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/_global.sass
@@ -25,7 +25,7 @@
 	-moz-box-sizing: border-box
 	-webkit-box-sizing: border-box
 	box-sizing: border-box
-	//fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
+	//fonts: ClassReference("org.apache.royale.jewel.JewelBlueThemeFontInject")
 
 .royale
 	padding: 10px
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_global.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/_mixins.sass
similarity index 55%
copy from frameworks/themes/JewelTheme/src/main/sass/_global.sass
copy to frameworks/themes/JewelBlueTheme/src/main/sass/_mixins.sass
index 3a8a0ef..f4e7302 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_global.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/_mixins.sass
@@ -17,16 +17,27 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-@namespace j "library://ns.apache.org/royale/jewel"
-@namespace "http://www.w3.org/1999/xhtml"
+=button-theme($button-color, $text-color)
+	//border-color: darken($button-color, 20%)
+	background-color: $button-color
+	transition:
+		duration: 0.4s
+	color: $text-color
+	&:hover
+		background-color: lighten($button-color, 6%)
+		//box-shadow: 0 .125em $off-wht, inset 0 .063em $off-wht, inset 0 -.188em lighten($btn-color, 2%)
+	&:active
+		background-color: darken($button-color, 6%)
+		//box-shadow: 0 .063em $off-wht, inset 0 0 1.094em darken($btn-color, 40%), inset 0 .063em darken($btn-color, 20%),inset 0 -0.188em darken($btn-color, 20%)
+	&:focus
+		outline: 0
+	&[disabled]
+		background-color: $disabled-color
+		color: $font-disabled-color
+		cursor: unset
 
-
-.royale *, .royale *:before, .royale *:after
-	-moz-box-sizing: border-box
-	-webkit-box-sizing: border-box
-	box-sizing: border-box
-	//fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
-
-.royale
-	padding: 10px
-	margin: 10px
+//=trans($val...)
+//	-webkit-transition: $val
+//	-moz-transition: $val
+//	-o-transition: $val
+//	transition: $val
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/_variables.sass
similarity index 82%
copy from frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
copy to frameworks/themes/JewelBlueTheme/src/main/sass/_variables.sass
index b564176..3a6b64b 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/_variables.sass
@@ -16,11 +16,17 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-// Color Themes
-$default-color: rgba(0,0,0,0.20)
-$primary-color: #FF0000
-$secondary-color: #342F30
-$emphasized-color: #016936
 
-$default-font-color: rgba(0, 0, 0, .5)
-$font-color: white
\ No newline at end of file
+$font-stack: 'Lato', sans-serif
+$font-size: 0.75rem
+
+// Common Colors
+$white: rgba(white,.9)
+$disabled-color: #CCCCCC
+$font-disabled-color: #888888
+
+// Button variables
+$button-min-width: 74px !default
+
+
+
diff --git a/frameworks/themes/JewelBlueTheme/src/main/sass/components/_button.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_button.sass
new file mode 100644
index 0000000..d04d186
--- /dev/null
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_button.sass
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Jewel Button
+ */
+%button-def
+	cursor: pointer
+	
+	display: inline-block
+	margin: 0 //1rem
+	padding: 10px 16px //.938em 1.875em
+	min-width: $button-min-width
+	min-height: 34px
+
+	/* Background: */
+	border: none // .094em solid 
+	border-radius: 3px //.625em
+	//box-shadow: 0 .375em .313em -.313em rgba(black,.8), inset 0 .063em $off-wht, inset 0 -.188em rgba(black,.15)
+
+.jewel.button, .jewel.button:hover
+	@extend %button-def
+
+.jewel.button
+	+button-theme($default-color, $default-font-color)
+
+.jewel.button.primary
+	+button-theme($primary-color, $font-color)
+
+.jewel.button.secondary
+	+button-theme($secondary-color, $font-color)
+
+.jewel.button.emphasized
+	+button-theme($emphasized-color, $font-color)
+
+
+//SVGs
+//border:1px; /*without this svg shows scaled and bigger*/
+//border-image-source: url(assets/jewel-button.svg) ;
+//border-image-slice: 4;
+//border-image-width: 4;
+
+//background-image: linear-gradient(#3BB0FF, #1E36FA);
+
+//background-color: #006CEB;
+//background-size: cover;
+//background-repeat: no-repeat;
+//background-clip: padding-box;
+
+//background: url(assets/4slicewithpattern.svg);
+//background-size: cover;
+//width: fit-content;
+//height: fit-content;
+
+//.button:active	
+//box-shadow: #E6431D 0 1px 0 inset;
+//text-shadow: 0 -1px 0 #5F3A29;
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_label.sass
similarity index 84%
rename from frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass
rename to frameworks/themes/JewelBlueTheme/src/main/sass/components/_label.sass
index 3bdf08e..63b60c9 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/colors/_blue-color-palette.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_label.sass
@@ -16,11 +16,12 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-// Color Themes
-$default-color: rgba(0,0,0,.3)
-$primary-color: #006CEB
-$secondary-color: #011833
-$emphasized-color: #1FD348
 
-$default-font-color: rgba(0, 0, 0, .4)
-$font-color: white
\ No newline at end of file
+/**
+ * Jewel Label
+ */
+.jewel.label
+	//IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView")
+	font:
+		family: $font-stack
+		size: $font-size
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_global.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_textbutton.sass
similarity index 52%
copy from frameworks/themes/JewelTheme/src/main/sass/_global.sass
copy to frameworks/themes/JewelBlueTheme/src/main/sass/components/_textbutton.sass
index 3a8a0ef..b02123a 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_global.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_textbutton.sass
@@ -16,17 +16,49 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
+ 
+/**
+ * Jewel TextButton
+ */
+%textbutton-def
+	@extend %button-def
+	/* TextField */
+	font:
+		family: $font-stack 
+		style: bold 
+		size: $font-size
+	//+trans(0.2s ease-in-out)
+	text:
+		transform: uppercase
+		decoration: none 
+		//shadow: 0 .063em rgba(black,.3)
+	[disabled]
+		text:
+			shadow: unset
 
-@namespace j "library://ns.apache.org/royale/jewel"
-@namespace "http://www.w3.org/1999/xhtml"
+.jewel.textbutton, .jewel.textbutton:hover
+	@extend %textbutton-def
 
+.jewel.textbutton
+	+button-theme($default-color, $default-font-color)
 
-.royale *, .royale *:before, .royale *:after
-	-moz-box-sizing: border-box
-	-webkit-box-sizing: border-box
-	box-sizing: border-box
-	//fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
+.jewel.textbutton.primary
+	+button-theme($primary-color, $font-color)
+
+.jewel.textbutton.secondary
+	+button-theme($secondary-color, $font-color)
+
+.jewel.textbutton.emphasized
+	+button-theme($emphasized-color, $font-color)
+
+// /* TextField: */
+//	font-family: $font-stack
+//	font-size: 14px
+//	font-weight: bold
+//	color: $font-normal-color
+//	text-shadow: 0 1px 0 #555
+
+//	padding: 10px 0px
+//	display: inline-block
+//	min-width: 80px
 
-.royale
-	padding: 10px
-	margin: 10px
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_global.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_textfield.sass
similarity index 56%
copy from frameworks/themes/JewelTheme/src/main/sass/_global.sass
copy to frameworks/themes/JewelBlueTheme/src/main/sass/components/_textfield.sass
index 3a8a0ef..84b696c 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_global.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/components/_textfield.sass
@@ -17,16 +17,51 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-@namespace j "library://ns.apache.org/royale/jewel"
-@namespace "http://www.w3.org/1999/xhtml"
+/**
+ * Jewel TextField
+ */
+TextField
+	position: relative
+	display: inline-block
+	box-sizing: border-box
+	width: 300px
+	max-width: 100%
+	margin: 0
 
+.vTextField--input
+	font-size: 16px
+	font-family: 'Lato', sans-serif
 
-.royale *, .royale *:before, .royale *:after
-	-moz-box-sizing: border-box
-	-webkit-box-sizing: border-box
-	box-sizing: border-box
-	//fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
+	border: none
+	border-bottom: 2px solid
+	border-bottom-color: #ff0000
+	display: block
+	margin: 0
+	padding: 4 0
+	width: 100px
+	background: transparent
+	text-align: left
+	color: inherit
+	outline: none
+
+.vTextField--label
+	bottom: 0
+	color: #ff0000
+	font-size: 13px
+	left: 0
+	right: 0
+	pointer-events: none
+	position: absolute
+	display: block
+	width: 100%
+	overflow: hidden
+	white-space: nowrap
+	text-align: left
 
-.royale
-	padding: 10px
-	margin: 10px
+//    padding: 5px;
+//    border: solid 1px #666666;
+//    border-radius: 6px;
+//    color: #333333;
+//:hover 
+//    padding: 5px;
+//    background-color: #DFDFDF;
diff --git a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass b/frameworks/themes/JewelBlueTheme/src/main/sass/royale-jewel-blue.sass
similarity index 96%
rename from frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass
rename to frameworks/themes/JewelBlueTheme/src/main/sass/royale-jewel-blue.sass
index 2ecaa8c..f92a6ae 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-red.sass
+++ b/frameworks/themes/JewelBlueTheme/src/main/sass/royale-jewel-blue.sass
@@ -16,7 +16,7 @@
  */
 
 // Variables
-@import "colors/red-color-palette"
+@import "blue-color-palette"
 @import "variables"
 @import "mixins"
 @import "functions"
diff --git a/frameworks/themes/JewelTheme/pom.xml b/frameworks/themes/JewelTheme/pom.xml
index 055a04d..6370b58 100644
--- a/frameworks/themes/JewelTheme/pom.xml
+++ b/frameworks/themes/JewelTheme/pom.xml
@@ -50,8 +50,8 @@
               <path>../src/main/resources/assets/*</path>
             </include-file>
             <include-file>
-              <name>royale-jewel-blue.css</name>
-              <path>../src/main/resources/royale-jewel-blue.css</path>
+              <name>defaults.css</name>
+              <path>../src/main/resources/defaults.css</path>
             </include-file>
           </includeFiles>
         </configuration>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
similarity index 82%
rename from frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
rename to frameworks/themes/JewelTheme/src/main/resources/defaults.css
index f6d83dd..423dc09 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-red.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -43,15 +43,15 @@
 }
 
 .jewel.button {
-  background-color: rgba(0, 0, 0, 0.2);
+  background-color: rgba(0, 0, 0, 0.3);
   transition-duration: 0.4s;
-  color: rgba(0, 0, 0, 0.5);
+  color: rgba(0, 0, 0, 0.4);
 }
 .jewel.button:hover {
-  background-color: rgba(15, 15, 15, 0.2);
+  background-color: rgba(15, 15, 15, 0.3);
 }
 .jewel.button:active {
-  background-color: rgba(0, 0, 0, 0.2);
+  background-color: rgba(0, 0, 0, 0.3);
 }
 .jewel.button:focus {
   outline: 0;
@@ -63,15 +63,15 @@
 }
 
 .jewel.button.primary {
-  background-color: #FF0000;
+  background-color: #dedede;
   transition-duration: 0.4s;
-  color: white;
+  color: black;
 }
 .jewel.button.primary:hover {
-  background-color: #ff1f1f;
+  background-color: #ededed;
 }
 .jewel.button.primary:active {
-  background-color: #e00000;
+  background-color: #cfcfcf;
 }
 .jewel.button.primary:focus {
   outline: 0;
@@ -83,15 +83,15 @@
 }
 
 .jewel.button.secondary {
-  background-color: #342F30;
+  background-color: #011833;
   transition-duration: 0.4s;
-  color: white;
+  color: black;
 }
 .jewel.button.secondary:hover {
-  background-color: #443e3f;
+  background-color: #022651;
 }
 .jewel.button.secondary:active {
-  background-color: #242021;
+  background-color: #000a15;
 }
 .jewel.button.secondary:focus {
   outline: 0;
@@ -103,15 +103,15 @@
 }
 
 .jewel.button.emphasized {
-  background-color: #016936;
+  background-color: #1FD348;
   transition-duration: 0.4s;
-  color: white;
+  color: black;
 }
 .jewel.button.emphasized:hover {
-  background-color: #018746;
+  background-color: #30e158;
 }
 .jewel.button.emphasized:active {
-  background-color: #014b26;
+  background-color: #1bb83f;
 }
 .jewel.button.emphasized:focus {
   outline: 0;
@@ -138,15 +138,15 @@
 }
 
 .jewel.textbutton {
-  background-color: rgba(0, 0, 0, 0.2);
+  background-color: rgba(0, 0, 0, 0.3);
   transition-duration: 0.4s;
-  color: rgba(0, 0, 0, 0.5);
+  color: rgba(0, 0, 0, 0.4);
 }
 .jewel.textbutton:hover {
-  background-color: rgba(15, 15, 15, 0.2);
+  background-color: rgba(15, 15, 15, 0.3);
 }
 .jewel.textbutton:active {
-  background-color: rgba(0, 0, 0, 0.2);
+  background-color: rgba(0, 0, 0, 0.3);
 }
 .jewel.textbutton:focus {
   outline: 0;
@@ -158,15 +158,15 @@
 }
 
 .jewel.textbutton.primary {
-  background-color: #FF0000;
+  background-color: #dedede;
   transition-duration: 0.4s;
-  color: white;
+  color: black;
 }
 .jewel.textbutton.primary:hover {
-  background-color: #ff1f1f;
+  background-color: #ededed;
 }
 .jewel.textbutton.primary:active {
-  background-color: #e00000;
+  background-color: #cfcfcf;
 }
 .jewel.textbutton.primary:focus {
   outline: 0;
@@ -178,15 +178,15 @@
 }
 
 .jewel.textbutton.secondary {
-  background-color: #342F30;
+  background-color: #011833;
   transition-duration: 0.4s;
-  color: white;
+  color: black;
 }
 .jewel.textbutton.secondary:hover {
-  background-color: #443e3f;
+  background-color: #022651;
 }
 .jewel.textbutton.secondary:active {
-  background-color: #242021;
+  background-color: #000a15;
 }
 .jewel.textbutton.secondary:focus {
   outline: 0;
@@ -198,15 +198,15 @@
 }
 
 .jewel.textbutton.emphasized {
-  background-color: #016936;
+  background-color: #1FD348;
   transition-duration: 0.4s;
-  color: white;
+  color: black;
 }
 .jewel.textbutton.emphasized:hover {
-  background-color: #018746;
+  background-color: #30e158;
 }
 .jewel.textbutton.emphasized:active {
-  background-color: #014b26;
+  background-color: #1bb83f;
 }
 .jewel.textbutton.emphasized:focus {
   outline: 0;
@@ -268,4 +268,4 @@ TextField {
   text-align: left;
 }
 
-/*# sourceMappingURL=royale-jewel-red.css.map */
+/*# sourceMappingURL=defaults.css.map */
diff --git a/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass b/frameworks/themes/JewelTheme/src/main/sass/_default-color-palette.sass
similarity index 85%
rename from frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
rename to frameworks/themes/JewelTheme/src/main/sass/_default-color-palette.sass
index b564176..1b331d7 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/colors/_red-color-palette.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/_default-color-palette.sass
@@ -17,10 +17,10 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 // Color Themes
-$default-color: rgba(0,0,0,0.20)
-$primary-color: #FF0000
-$secondary-color: #342F30
-$emphasized-color: #016936
+$default-color: rgba(0,0,0,.3)
+$primary-color: #dedede
+$secondary-color: #011833
+$emphasized-color: #1FD348
 
-$default-font-color: rgba(0, 0, 0, .5)
-$font-color: white
\ No newline at end of file
+$default-font-color: rgba(0, 0, 0, .4)
+$font-color: #000000
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/_global.sass b/frameworks/themes/JewelTheme/src/main/sass/_global.sass
index 3a8a0ef..23fa5ea 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/_global.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/_global.sass
@@ -25,8 +25,7 @@
 	-moz-box-sizing: border-box
 	-webkit-box-sizing: border-box
 	box-sizing: border-box
-	//fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject")
-
+	
 .royale
 	padding: 10px
 	margin: 10px
diff --git a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
similarity index 96%
rename from frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass
rename to frameworks/themes/JewelTheme/src/main/sass/defaults.sass
index 2a9526d..b3bd62e 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/royale-jewel-blue.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
@@ -16,7 +16,7 @@
  */
 
 // Variables
-@import "colors/blue-color-palette"
+@import "default-color-palette"
 @import "variables"
 @import "mixins"
 @import "functions"
diff --git a/frameworks/themes/pom.xml b/frameworks/themes/pom.xml
index 19fbbe6..a30c613 100644
--- a/frameworks/themes/pom.xml
+++ b/frameworks/themes/pom.xml
@@ -35,6 +35,7 @@
   <modules>
     <module>Basic</module>
     <module>JewelTheme</module>
+    <module>JewelBlueTheme</module>
   </modules>
 
   <dependencies>

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.