Skip to content

v1.9.0 feature bump#12

Merged
tobitege merged 1 commit intomainfrom
alpha
Feb 7, 2026
Merged

v1.9.0 feature bump#12
tobitege merged 1 commit intomainfrom
alpha

Conversation

@tobitege
Copy link
Owner

@tobitege tobitege commented Feb 7, 2026

Pull Request: Port features from Flowery.Uno to Flowery.NET

Summary

This PR ports several missing controls from the Flowery.Uno implementation to Flowery.NET (Avalonia), ensuring they follow established Flowery.NET patterns including IScalableControl, design tokens from DaisyTokens.axaml, and centralized icon management.

New Controls Added

  • DaisyClock - A comprehensive clock control with three modes:

    • Clock mode: Displays current time (12h/24h format)
    • Timer mode: Countdown timer with events
    • Stopwatch mode: Elapsed time with lap recording
    • Multiple display styles: Segmented (uses DaisyCountdown), Flip, Text
  • DaisyProductThemeDropdown - A dropdown for selecting product palettes (themes). It can register missing product palettes into DaisyThemeManager and applies the selected theme, while staying synced to external theme changes.

  • DaisyIconText - A control that displays an icon and/or text with proper scaling. Supports icon placement (Left, Right, Top, Bottom), size presets, and variant colors.

  • DaisyPasswordBox - A themed password input control. Features include:

    • Password masking with configurable mask character
    • Reveal button to toggle password visibility
    • Label support with Required/Optional indicators
    • Start/End icons
    • Helper/Hint text
    • Multiple variants (Bordered, Ghost, Filled, Primary, etc.)
  • DaisySlideToConfirm - A slide-to-confirm interaction control requiring users to drag a handle to complete an action. Features include:

    • Visual feedback with color transitions during slide
    • Multiple variant colors (Primary, Success, Error, Warning, Info)
    • Auto-reset option with configurable delay
    • Size variants
    • 3D depth styling options
  • DaisyPatternedCard - A decorative card control extending DaisyCard with configurable background patterns and corner ornaments. Supports generated-tile patterns and themed asset-based rendering.

Enhancements to Existing Controls

  • DaisyButtonGroup - Added selection support with SelectedIndex (Single mode) and SelectedIndices (Multiple mode), plus items/lifecycle change handling to keep the button-group-active visual state in sync.

  • DaisyCarousel - Port/refactor toward Flowery.Uno parity:

    • Switched from inheriting Carousel to ContentControl with an internal slide container
    • Added slide/navigation behavior (SelectedIndex, ShowNavigation, WrapAround, Orientation)
    • Added slideshow configuration (Mode, SlideInterval) and a SlideChanged event hook via FlowerySlideshowController (reusable timer-driven controller supporting sequential + non-repeating random modes)
    • Introduced SlideEffect/SlideTransition/TransitionDuration properties (visual transitions currently minimal/placeholder)
  • DaisyCountdown - Added Size (DaisySize) styled property + CLR wrapper (default Medium), with corresponding AXAML styles for size-based font scaling

  • DaisyDivider - Expanded capabilities beyond the basic divider:

    • Added new styling options (DividerStyle, Ornament, Size, LineThickness, TextBackground) and wired them into rendering/templating.
    • Implemented dynamic visuals for advanced styles (e.g. gradient line brushes, glow animation).
    • Moved divider enums into shared Flowery.Enums for reuse/consistency.
  • DaisyDrawer - Ported Flowery.Uno fixes: added DrawerWidth, DrawerSide, IsDrawerOpen, OverlayMode, ResponsiveMode, and ResponsiveThreshold styled properties with SplitView sync, plus Open/Close/Toggle helpers; updated the template so Inline mode pushes content while Overlay mode uses the scrim/slide-in behavior, added edge-swipe open plus pane swipe-to-close gestures for touch scenarios, and exposed SwipeThreshold/EdgeSwipeZone for gesture tuning (keeps IsPaneOpen/OpenPaneLength compatibility for existing Avalonia usage).

  • DaisyExpandableCard - Major "Batteries-Included" enhancements:

    • Added UseBatteriesIncludedMode to auto-generate card UI from 14 new convenience properties (Title, Subtitle, Gradient, ExpandedText, IconData, etc.).
    • Implemented dynamic corner radius adjustment during expansion/collapse (sharpens right corners when expanded to connect seamlessly with the expanded panel).
    • Added configurable AnimationDuration property (default 300ms).
    • Wired into DaisyButton and semantic theme brushes for professional programmatic UI generation.
  • DaisyIndicator - Ported Uno-style marker behavior: added Marker, MarkerPosition, and MarkerAlignment, moved positioning to template + code for inside/edge/outside placement (with a 3px inset for inside), and kept legacy Badge* properties for compatibility.

  • DaisyJoin - Added active item highlighting support via ActiveIndex plus optional ActiveBackground/ActiveForeground brushes; applies theme-resource fallbacks and re-applies styling on lifecycle attach and children changes.

  • DaisyLoading - Added 15 new animation variants (42 total) - ✅ Reviewed and tested:

    • Business Variants (11): Professional animations for enterprise applications
      • DocumentFlipOn - Document pages sliding in (opening)
      • DocumentFlipOff - Document pages sliding out (closing)
      • MailSend - Letter sliding into envelope
      • CloudUpload - Cloud with rising arrow
      • CloudDownload - Cloud with falling arrow
      • DocumentStamp - Document with "OK" approval stamp
      • DocumentReject - Document with "X" rejection stamp
      • ChartPulse - Bar chart with pulsing columns
      • CalendarTick - Calendar with checkmark animation
      • ApprovalFlow - Three workflow nodes pulsing in sequence
      • BriefcaseSpin - Briefcase with wobble animation
    • Win95 Retro Variants (4): Nostalgic Windows 95 file operation animations
      • Win95FileCopy - Papers flying between folders
      • Win95Search - Flashlight sweeping across folders
      • Win95Delete - Papers flying into recycle bin
      • Win95EmptyRecycle - Papers flying out of recycle bin
  • DaisyPagination - Enhanced pagination control with automatic page generation (TotalPages, MaxVisiblePages, CenterVisiblePages), optional navigation buttons (prev/next, first/last, jump), ellipsis truncation, mouse-wheel navigation, and press-and-hold repeat on nav buttons.

  • DaisyStatusIndicator - Refactored into multiple partial classes for maintainability:

    • DaisyStatusIndicator.cs - Core control logic and properties
    • DaisyStatusIndicator.Animations.cs - Animation helpers and timing
    • DaisyStatusIndicator.StatusGlyphs.cs - Status glyph definitions
    • DaisyStatusIndicator.Overlays.cs - Overlay rendering logic
    • Added glyph-based variants with corresponding properties:
      • Battery using BatteryChargePercent (0-100)
      • TrafficLight* using TrafficLightActive
      • WifiSignal / CellularSignal using SignalStrength (0-3 / 0-5)
    • Updated accessibility text generation for glyph variants and refreshes when variant/glyph-related properties change
    • Expanded DaisyStatusIndicator.Motion.axaml to cover a much broader set of animation variants (keyframe-based transforms/opacity)
    • Expanded DaisyStatusIndicator.Effects.axaml with additional effect-oriented variants (multi-ellipse rings/sweeps and related transforms)
  • DaisySteps - Added JSON-driven steps via JsonSteps (usable from XAML and C#), restored visible default circle border, and aligned circle/line/font sizes to new design tokens.

  • DaisyThemeManager - Extended theme infrastructure to support registering themes at runtime via palette factories (instead of only loading built-in AXAML palettes), enabling large sets of additional themes (e.g. product palette/classifier themes) to be added and applied through the same ThemeChanged flow.

    • DaisyPaletteFactory builds an Avalonia ResourceDictionary (matching existing Daisy*Color/Daisy*Brush keys) from a ThemePalette, avoiding the need to generate many AXAML palette files for product themes.
    • ProductPaletteFactory defines a set of product-category palettes (with keyword matching) and converts them into ThemePalette/ResourceDictionary via DaisyPaletteFactory; also includes a generator for precompiled palette code to avoid runtime conversion overhead.
    • ProductPalettes.Generated.cs contains the generated precompiled ThemePalette dictionary used by product theme selection (so runtime conversion can be skipped).
  • DaisyTabs - Standardized header container/border sizing on design tokens and ensured non-ghost variants show a default theme-colored border (bordered underline, boxed/lifted outlines) with tokenized thickness values.

Helpers

  • Helper: DaisyControlLifecycle - New composition helper to centralize theme + global size subscription/unsubscription via attach/detach lifecycle, and to apply global DaisySize only after load so XAML-set values win.

  • Helper: FloweryAlarmHelpers - Added alarm scheduling helpers (AlarmRepeat flags, Alarm model, AlarmScheduler) with repeat patterns, snooze/dismiss handling, and events (AlarmTriggered/AlarmSnoozed/AlarmDismissed) driven by a ManagedTimer.

  • Helper: FloweryAnimationHelpers - Added shared Avalonia animation utilities (zoom/pan/combined transforms, pulse, fade, rotation) plus higher-level slide effects (PanAndZoom, Breath, Throw, Drift) using FlowerySlideEffect/FlowerySlideEffectParams.

  • Helper: FloweryColorHelpers - Added color utility helpers for parsing hex/named colors, luminance/contrast detection, lighten/darken/brightness adjustment, blending, opacity, and hex formatting.

  • Helper: FloweryPathHelpers - Added programmatic Path/Geometry helpers with a library of common icon path data (including weather icons and various Daisy icon keys) and utility methods for parsing/creating geometries (with fallbacks).

  • Helper: FloweryPatternSvgLoader - Added pattern asset loader for DaisyPatternedCard, selecting black/white pattern asset variants based on current theme and building a tiled Canvas of Image tiles.

  • Helper: FloweryPatternTileGenerator - Added generators for seamless pattern tiling (Canvas + SVG) for DaisyCardPattern variants (carbon fiber, dots, grid, stripes, honeycomb, circuit, twill, diamond plate, mesh, perforated, bumps, scales, etc.).

  • Helper: FlowerySlideClasses - Added shared slideshow/transition/effect parameter types + parsers (FlowerySlideEffectParams, FlowerySlideTransitionParams, *Parser) and FlowerySlideChangedEventArgs.

  • Helper: FlowerySlideEffects - Added attached properties to apply FlowerySlideEffect animations to any Control (auto-start/stop on attach/detach, duration/intensity parameters), delegating to FloweryAnimationHelpers.

  • Helper: FlowerySlideTransitionHelpers - Added transition helper for switching slides (fade/slide/push/zoom + random selection) between two Controls in a Grid, delegating animation primitives to FloweryAnimationHelpers.

  • Helper: FloweryTextFillEffects - Added attached properties for filling TextBlock text with an ImageBrush (image source + optional auto-start behavior on attach/detach).

  • Helper: FloweryTimeHelpers - Added time/duration formatting + parsing helpers (localized unit labels/AM-PM, numeric/label formats, next-occurrence helpers, and ISO-8601 duration/timestamp exchange).

  • Helper: FloweryTimerHelpers - Added ManagedTimer (pause/resume wrapper around DispatcherTimer) plus TimerPool/ScheduledAction utilities and Control extensions for pooled timers with automatic unload cleanup.

Pattern Compliance

New/ported controls follow Flowery.NET established patterns:

  1. IScalableControl Implementation (where applicable)

    • Controls that participate in global scaling implement ApplyScaleFactor(double scaleFactor) for FloweryScaleManager integration.
    • Examples: DaisyClock, DaisyIconText, DaisyPasswordBox, DaisySlideToConfirm.
    • DaisyProductThemeDropdown intentionally remains a ComboBox-derived selector without custom scaling hooks.
  2. Design Token Usage

    • Theme files reference tokens from DaisyTokens.axaml for heights, padding, font sizes, corner radii
    • Examples: DaisySizeMediumHeight, DaisyInputMediumPadding, DaisySizeMediumCornerRadius
  3. Centralized Icon Management

    • Added icons to DaisyIcons.axaml:
      • DaisyIconPowerOff (for DaisySlideToConfirm)
      • DaisyIconEyeOpen (for DaisyPasswordBox)
      • DaisyIconEyeClosed (for DaisyPasswordBox)
  4. Theme Integration

    • New control templates/styles are integrated through DaisyUITheme.axaml and related theme includes.
    • Variant styles use semantic color brushes (DaisyPrimaryBrush, DaisySuccessBrush, etc.)

Files Changed

Note: This section highlights notable control/theme/theming files and is not exhaustive.

New Files (Notable)

  • Flowery.NET/Controls/DaisyIconText.cs
  • Flowery.NET/Controls/DaisyPasswordBox.cs
  • Flowery.NET/Controls/DaisyProductThemeDropdown.cs
  • Flowery.NET/Controls/DaisySlideToConfirm.cs
  • Flowery.NET/Controls/DaisyClock.cs
  • Flowery.NET/Controls/DaisyPatternedCard.cs
  • Flowery.NET/Controls/DaisyStatusIndicator.Animations.cs
  • Flowery.NET/Controls/DaisyStatusIndicator.StatusGlyphs.cs
  • Flowery.NET/Controls/DaisyStatusIndicator.Overlays.cs
  • Flowery.NET/Themes/DaisyIconText.axaml
  • Flowery.NET/Themes/DaisyPasswordBox.axaml
  • Flowery.NET/Themes/DaisyProductThemeDropdown.axaml
  • Flowery.NET/Themes/DaisySlideToConfirm.axaml
  • Flowery.NET/Themes/DaisyClock.axaml
  • Flowery.NET/Themes/DaisyPatternedCard.axaml
  • Flowery.NET/Themes/DaisyLoading/DaisyLoading.Business.axaml
  • Flowery.NET/Themes/DaisyLoading/DaisyLoading.Win95.axaml
  • Flowery.NET/Themes/DaisyStatusIndicator/DaisyStatusIndicator.Glyphs.axaml
  • Flowery.NET/Theming/DaisyPaletteFactory.cs
  • Flowery.NET/Theming/ProductPaletteFactory.cs
  • Flowery.NET/Theming/ProductPalettes.Generated.cs

Modified Files (Notable)

  • Flowery.NET/Controls/DaisyCarousel.cs - Ported/refactored carousel slide management + navigation/slideshow properties
  • Flowery.NET/Controls/DaisyExpandableCard.cs - Added "Batteries-Included" mode, dynamic corner radius, and configurable animation duration
  • Flowery.NET/Controls/DaisyCountdown.cs - Added Size (DaisySize) styled property + CLR wrapper (default Medium)
  • Flowery.NET/Controls/DaisySteps.cs - Fixed JSON-driven items update hook and null-safety on JsonSteps
  • Flowery.NET/Controls/DaisyLoading.cs - Added 15 new enum values for Business and Win95 variants
  • Flowery.NET/Controls/DaisyThemeManager.cs - Added runtime theme registration (palette factories) and refactored theme storage/listing to support many additional themes
  • Flowery.NET/Controls/DaisyStatusIndicator.cs - Core control (refactored)
  • Flowery.NET/Themes/DaisyCountdown.axaml - Added size-based styles
  • Flowery.NET/Themes/DaisyLoading.axaml - Included new Business and Win95 theme files
  • Flowery.NET/Themes/DaisyIcons.axaml - Added new icons
  • Flowery.NET/Themes/DaisySteps.axaml - Added default outline and moved sizing to design tokens
  • Flowery.NET/Themes/DaisyTabs.axaml - Tokenized container/border sizing and default borders for non-ghost variants
  • Flowery.NET/Themes/DaisyTokens.axaml - Added DaisyTabs container/border tokens and DaisySteps sizing tokens
  • Flowery.NET/DaisyUITheme.axaml - Registered new control themes
  • Flowery.NET.Gallery/Examples/FeedbackExamples.axaml - Added examples for Business and Win95 loading variants
  • llms-static/DaisyLoading.md - Updated documentation with new variants (42 total)
  • llms-static/DaisySteps.md - Added JSON usage examples (XAML and C#)
  • llms-static/DesignTokens.md - Documented new DaisyTabs and DaisySteps tokens

@tobitege tobitege merged commit 774e10e into main Feb 7, 2026
10 checks passed
@tobitege tobitege deleted the alpha branch February 7, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant