This is an automated email from the ASF dual-hosted git repository. carlosrovira pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push: new 52083c8 jewel-CardExpandedContent: new card section for content that needs to avoid paddings like navigation bars 52083c8 is described below commit 52083c8043ed3debe4861e531186db8a0ce21450 Author: Carlos Rovira <carlos.rov...@apache.org> AuthorDate: Fri Jun 5 18:30:37 2020 +0200 jewel-CardExpandedContent: new card section for content that needs to avoid paddings like navigation bars --- .../projects/Jewel/src/main/resources/defaults.css | 5 ++ .../Jewel/src/main/resources/jewel-manifest.xml | 1 + .../supportClasses/card/CardExpandedContent.as | 53 ++++++++++++++++++++++ .../Jewel/src/main/sass/components/_card.sass | 7 +++ .../src/main/sass/components-primary/_card.sass | 6 ++- 5 files changed, 71 insertions(+), 1 deletion(-) diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css index 21a6db1..88ea16a 100644 --- a/frameworks/projects/Jewel/src/main/resources/defaults.css +++ b/frameworks/projects/Jewel/src/main/resources/defaults.css @@ -359,6 +359,11 @@ j|CardHeader { IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel"); } +j|CardExpandedContent { + IViewport: ClassReference("org.apache.royale.jewel.supportClasses.Viewport"); + IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel"); +} + j|CardPrimaryContent { IViewport: ClassReference("org.apache.royale.jewel.supportClasses.Viewport"); IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel"); diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml index 030cf46..6ad95cb 100644 --- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml +++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml @@ -152,6 +152,7 @@ <component id="Card" class="org.apache.royale.jewel.Card"/> <component id="CardHeader" class="org.apache.royale.jewel.supportClasses.card.CardHeader"/> <component id="CardTitle" class="org.apache.royale.jewel.supportClasses.card.CardTitle"/> + <component id="CardExpandedContent" class="org.apache.royale.jewel.supportClasses.card.CardExpandedContent"/> <component id="CardPrimaryContent" class="org.apache.royale.jewel.supportClasses.card.CardPrimaryContent"/> <component id="CardActions" class="org.apache.royale.jewel.supportClasses.card.CardActions"/> diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/card/CardExpandedContent.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/card/CardExpandedContent.as new file mode 100644 index 0000000..470e503 --- /dev/null +++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/card/CardExpandedContent.as @@ -0,0 +1,53 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.card +{ + import org.apache.royale.jewel.VContainer; + + /** + * The CardExpandedContent class is a container that expand inner content + * removing paddings. This could be convinient for content that needs to + * avoid gaps with the surronding container. + * + * For example a Jewel TabBar or Navigation that needs to fill + * all the available space. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.9.8 + */ + public class CardExpandedContent extends VContainer + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.9.8 + */ + public function CardExpandedContent() + { + super(); + + typeNames = "card-expanded-content"; + } + } +} diff --git a/frameworks/projects/Jewel/src/main/sass/components/_card.sass b/frameworks/projects/Jewel/src/main/sass/components/_card.sass index 3a4a692..7bb6885 100644 --- a/frameworks/projects/Jewel/src/main/sass/components/_card.sass +++ b/frameworks/projects/Jewel/src/main/sass/components/_card.sass @@ -49,6 +49,8 @@ $card-primary-content-minheight: 152px !default text-transform: inherit z-index: 1 + .card-expanded-content + .card-primary-content width: 100% min-height: $card-primary-content-minheight @@ -77,6 +79,11 @@ j|CardHeader IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel") //IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.HorizontalLayout") +j|CardExpandedContent + IViewport: ClassReference("org.apache.royale.jewel.supportClasses.Viewport") + IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel") + //IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.VerticalLayout") + j|CardPrimaryContent IViewport: ClassReference("org.apache.royale.jewel.supportClasses.Viewport") IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel") diff --git a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_card.sass b/frameworks/themes/JewelTheme/src/main/sass/components-primary/_card.sass index 36594ed..62a4649 100644 --- a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_card.sass +++ b/frameworks/themes/JewelTheme/src/main/sass/components-primary/_card.sass @@ -20,6 +20,7 @@ // Jewel Card // Card variables +$card-padding: 20px .jewel.card font: @@ -51,8 +52,11 @@ margin: 0.408rem 0rem letter-spacing: 0.0125em + .card-expanded-content + // margin: -$card-padding -$card-padding $card-padding/2 -$card-padding + .card-primary-content - padding: 20px + padding: $card-padding .card-actions @if $flat