0.9.1-alpha.55
Alpha@xaui/native@0.9.1-alpha.55
Patch Changes
-
5c63340: feat(progress):
ProgressBarandProgressCircle— how far along something isThe
Steppershipped announcingprogressbarto a screen reader with no visual progress component anywhere beside it. These are the two, and they are two rather than one with ashapeprop because they share no geometry at all: a bar is aViewthat grows, and a ring is an SVG path whose dash offset moves. What they do share — the five variants, the clamped range,formatOptions, the 240ms — they share to the number.There is no
isIndeterminateon either. An unknown duration is aSpinner. That is the split the legacyIndicatorwas two components pretending to be one, and a bar that runs a loop across itself is a spinner drawn as a line.The bar's fill is a child of the rail, not a layer over it. It grows to a percentage of the width and the rail clips it, so one
radiusrounds both — an overlay would have needed a corner of its own and would have got it wrong at 100%. Itssizeis the rail's thickness and never its width, for theButton's reason.The circle's
radiusis a number, and it is the one place in this library where the word means what it means in geometry: a circle has no corner to round. It is raw, so it sits outside the style cache and wins oversizethe way a rawcolorwins over a variant's token — R6 keeps the ladder a vocabulary, and the escape hatch gets its own name. So doesstrokeWidth, and both are clamped: a stroke thicker than the ring is wide draws a path with a negative radius, which renders nothing on one platform with no error anywhere.The arc is a dash offset on one path rather than a shape rebuilt per value, which is what keeps one rounded cap at each end while it sweeps, and it moves as an animated prop rather than an animated style because
strokeDashoffsetis an SVG attribute. The turn to twelve o'clock is on the wrapper:Circle's ownoriginX/originY/rotationemit an invalid DOM property on web.ProgressCircle.Indicatoris the first file in the library to importreact-native-svg, which stays an optional peer — the component is its own subpath export, so a project that never renders a ring never pays for it.Five variants, not ten.
tertiaryandghostare gone because a fill with no fill is not a progress bar, and the*-softpairs because the rail already is the soft half of every one of them. The rail is the same neutral under all five: it is the room left to go, and that is not success, warning or danger.utils/progress.tsis new and tested: the clamp, and the formatting. Which numberformatOptionsformats follows the style — the fraction for a percentage, the value for anything else — because formatting the fraction as euros reports a 1 250 € goal as 0,63 €.Intlmissing from a Hermes build without ICU falls back to a plain number rather than throwing.