This is an automated email from the ASF dual-hosted git repository.
harbs 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 81bf53a034 Fixed accordion
81bf53a034 is described below
commit 81bf53a03461b7a51c92a6bf5c22a4c1d064a342
Author: Harbs <[email protected]>
AuthorDate: Sun Mar 29 18:44:44 2026 +0300
Fixed accordion
---
.../royale/org/apache/royale/style/AccordionSection.as | 3 ++-
.../apache/royale/style/skins/AccordionSectionSkin.as | 17 +++++++++++++++--
.../apache/royale/style/stylebeads/transform/Rotate.as | 6 +++++-
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/AccordionSection.as
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/AccordionSection.as
index f6c9480dd3..ed913ebdfa 100644
---
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/AccordionSection.as
+++
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/AccordionSection.as
@@ -63,7 +63,8 @@ package org.apache.royale.style
if(value != _disabled){
_disabled = value;
- toggleAttribute("data-disabled", value);
+ toggleAttribute("disabled", value);
+ headerElem.toggleAttribute("disabled", value);
}
}
private var _open:Boolean = false;
diff --git
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/AccordionSectionSkin.as
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/AccordionSectionSkin.as
index 58b5da575f..5230f33639 100644
---
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/AccordionSectionSkin.as
+++
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/AccordionSectionSkin.as
@@ -46,6 +46,7 @@ package org.apache.royale.style.skins
import org.apache.royale.style.stylebeads.spacing.Padding;
import org.apache.royale.style.stylebeads.typography.TextSize;
import org.apache.royale.style.stylebeads.typography.FontWeight;
+ import org.apache.royale.style.stylebeads.states.DisabledState;
public class AccordionSectionSkin extends StyleSkin implements
IAccordionSectionSkin
{
@@ -74,13 +75,21 @@ package org.apache.royale.style.skins
border.bottom = 1;
var lastBorder:BorderWidth = new BorderWidth();
lastBorder.bottom = 0;
+ var padding:Padding = new Padding();
+ padding.inline = 4;
_styles = [
border,
+ padding,
new BorderColor(borderColor),
new BackgroundColor(bgColor),
new TextColor(borderColor),
new LastState([
lastBorder
+ ]),
+ new DisabledState([
+ new
BorderColor(colorSet.getSwatch(ThemeColorSet.NEUTRAL,200)),
+ new
BackgroundColor(colorSet.getSwatch(ThemeColorSet.NEUTRAL,100)),
+ new
TextColor(colorSet.getSwatch(ThemeColorSet.NEUTRAL,200))
])
//TODO dark mode dark:border-slate-700
dark:bg-slate-800
// group border-b border-slate-300 bg-slate-50
px-4 last:border-b-0 dark:border-slate-700 dark:bg-slate-800
@@ -104,7 +113,11 @@ package org.apache.royale.style.skins
new JustifyContent("space-between"),
padding,
new TextSize("sm"),
- new FontWeight("semibold")
+ new FontWeight("semibold"),
+ new DisabledState([
+ new Cursor("default"),
+ new
TextColor(ThemeManager.instance.activeTheme.themeColorSet.getSwatch(ThemeColorSet.NEUTRAL,200))
+ ])
];
// flex cursor-pointer list-none items-center
justify-between py-3 text-sm font-semibold
}
@@ -129,7 +142,7 @@ package org.apache.royale.style.skins
new TextColor(textColor),
new Transition("transform"),
new TransitionDuration(200),
- new DataState("open"[
+ new DataState("open",[
new Rotate(90)
])
diff --git
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/transform/Rotate.as
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/transform/Rotate.as
index a2e34bf544..c0c21dab87 100644
---
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/transform/Rotate.as
+++
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/transform/Rotate.as
@@ -25,7 +25,7 @@ package org.apache.royale.style.stylebeads.transform
{
public function Rotate(value:* = null)
{
- super("rotate", "rotate", value);
+ super("rotate", "transform", value);
}
public function set rotate(value:*):void
@@ -111,5 +111,9 @@ package org.apache.royale.style.stylebeads.transform
assert(false, "Invalid value for rotate: " + value);
return value;
}
+ override public function getSelector():String
+ {
+ return super.getSelector();
+ }
}
}
\ No newline at end of file