@kanso-labs/kanso-ui 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -7
- package/dist/chip/index.js +24 -4
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/styles.js +13 -5
- package/dist/chip/styles.js.map +1 -1
- package/dist/components/app-bar/index.d.ts +23 -7
- package/dist/components/app-bar/index.js +428 -169
- package/dist/components/app-bar/index.js.map +1 -1
- package/dist/components/autocomplete/index.d.ts +44 -0
- package/dist/components/autocomplete/index.js +44 -0
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/button/index.js +53 -59
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/card/index.d.ts +11 -3
- package/dist/components/card/index.js +23 -1
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/checkbox/index.js +66 -58
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +46 -30
- package/dist/components/chip/index.js +38 -17
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +5 -2
- package/dist/components/chip-group/index.js +8 -2
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +27 -0
- package/dist/components/dialog/index.js +107 -69
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/fab/index.d.ts +1 -1
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/form/index.d.ts +14 -4
- package/dist/components/form/index.js +6 -3
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +15 -1
- package/dist/components/icon-button/index.js +15 -1
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/link/index.d.ts +4 -0
- package/dist/components/link/index.js +4 -0
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/list/index.d.ts +34 -0
- package/dist/components/list/index.js +47 -13
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-detail/index.d.ts +34 -1
- package/dist/components/list-detail/index.js +34 -1
- package/dist/components/list-detail/index.js.map +1 -1
- package/dist/components/list-item/index.d.ts +21 -2
- package/dist/components/list-item/index.js +6 -0
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +6 -3
- package/dist/components/menu/index.js +3 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +4 -0
- package/dist/components/meter/index.js +4 -0
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/navigation-bar/index.d.ts +14 -2
- package/dist/components/navigation-bar/index.js +14 -2
- package/dist/components/navigation-bar/index.js.map +1 -1
- package/dist/components/navigation-tree/index.js +2 -9
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/number-field/index.d.ts +7 -1
- package/dist/components/number-field/index.js +7 -1
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.d.ts +15 -1
- package/dist/components/popover/index.js +15 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/product-icon/index.d.ts +8 -1
- package/dist/components/product-icon/index.js +8 -1
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +12 -6
- package/dist/components/progress-indicator/index.js +57 -46
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/radio-group/index.d.ts +7 -0
- package/dist/components/radio-group/index.js +23 -14
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +13 -4
- package/dist/components/search-field/index.js +10 -4
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-view/index.d.ts +2 -0
- package/dist/components/search-view/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +1 -1
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/separator/index.d.ts +31 -6
- package/dist/components/separator/index.js +30 -6
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +96 -37
- package/dist/components/sheet/index.js +420 -143
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +8 -1
- package/dist/components/snackbar/index.js +7 -0
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/stack/index.d.ts +21 -5
- package/dist/components/stack/index.js +10 -0
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/switch/index.d.ts +12 -0
- package/dist/components/switch/index.js +13 -0
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/text-field/index.d.ts +39 -9
- package/dist/components/text-field/index.js +29 -7
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/time-picker/index.js +37 -41
- package/dist/components/time-picker/index.js.map +1 -1
- package/dist/components/tree/index.js +11 -15
- package/dist/components/tree/index.js.map +1 -1
- package/dist/control/index.js +1 -1
- package/dist/control/index.js.map +1 -1
- package/dist/control/styles.js +0 -1
- package/dist/control/styles.js.map +1 -1
- package/dist/field/index.js +148 -139
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +50 -7
- package/dist/field/styles.js.map +1 -1
- package/dist/hooks/useBottomEdge.js +6 -3
- package/dist/hooks/useBottomEdge.js.map +1 -1
- package/dist/hooks/useRipple.js +217 -193
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +34 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/indicator/styles.js +7 -4
- package/dist/indicator/styles.js.map +1 -1
- package/dist/layout.d.ts +4 -1
- package/dist/layout.js +4 -1
- package/dist/layout.js.map +1 -1
- package/dist/mark/styles.js +11 -5
- package/dist/mark/styles.js.map +1 -1
- package/dist/react-aria.d.ts +2 -2
- package/dist/row/index.js +90 -62
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +8 -2
- package/dist/row/styles.js.map +1 -1
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles/overlay.js +8 -5
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles.css +252 -130
- package/dist/theme-scope.d.ts +14 -2
- package/dist/theme-scope.js +12 -0
- package/dist/theme-scope.js.map +1 -1
- package/package.json +3 -3
- package/dist/overlay/modal.js +0 -7
- package/dist/overlay/modal.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","ProgressBarRenderProps","ProgressBarProps","RACProgressBarProps","stylex","ProgressBar","IndicatorTone","IndicatorLabels","IndicatorLine","indicatorStyles","mergeStatefulStyles","colors","motion","radii","CIRCULAR_SIZE","CIRCULAR_SIZE_PX","THICKNESS","GAP","RADIUS","CIRCUMFERENCE","Math","PI","FORCED_COLORS","ARC_MS","CYCLE_MS","ROTATE_MS","round","RING_EASING","INDETERMINATE_MS","BUFFER_MS","LINE_SLOWDOWN","RING_SLOWDOWN","WAVE_AMPLITUDE","WAVE_WAVELENGTH","INDETERMINATE_WAVELENGTH","WAVE_HEIGHT","WAVE_REACH","DETERMINATE_EASING","WAVE_FROM","WAVE_UNTIL","WAVY_SIZE","WAVY_SIZE_PX","RING_AMPLITUDE","RING_WAVELENGTH","WAVY_RADIUS","WAVY_CIRCUMFERENCE","RING_WAVES","REDUCED_MOTION","TOO_WIDE","DETERMINATE_WAVE","linearWave","INDETERMINATE_WAVE","RING_WAVE","ringWave","primaryTranslate","primaryScale","secondaryTranslate","secondaryScale","buffering","expandArc","travelArc","spin","primaryWaveOffset","primaryWaveLength","secondaryWaveOffset","secondaryWaveLength","_temp","kZKoxP","kzqmXN","_temp2","_temp3","k5rJSQ","styles","activeFade","k1ekBW","$$css","activeUnderWave","kSiTet","arcActive","kjVXCG","arcFade","arcIndeterminate","kkDQuc","k44tkh","ko0y90","kKVMdj","kyAemX","arcMotion","k6CgDc","kIyJzY","kAMwcw","arcTrack","circular","kB7OPa","k1xSpc","k3aq6I","circularIndeterminate","circularSize","size","val","undefined","flatUnderWave","indeterminateBarInner","kWkggS","kaIpWk","kpwlN0","kVAEAm","indeterminateTrack","kjBf7l","kInvED","k3XXqK","kMeerF","primaryBarInner","primaryWave","rootCircular","kXLuUW","secondaryBarInner","secondaryWave","trackBuffered","kmuXW","trackBufferedAt","share","waveAt","percentage","waveFlat","waveMotion","ProgressIndicatorProps","buffer","className","diameter","label","shape","ProgressIndicatorShape","showValue","style","tone","ProgressIndicatorTone","variant","ProgressIndicatorVariant","Omit","Extract","arcsFor","circumference","active","track","max","strokeDasharray","strokeDashoffset","bufferShare","minValue","maxValue","value","range","buffered","remaining","min","CircularTrack","t0","$","isIndeterminate","inherit","wavy","radius","t1","arcs","t2","isWaving","waving","t3","t4","props","t5","inheritTrack","t6","t7","t8","t9","t10","t11","inheritActive","t12","t13","t14","indicatorContent","state","valueText","LinearTrack","Symbol","for","0","1","bars","t15","path","extent","t16","t17","t18","t19","line","wavelength","half","inset","lift","halves","ceil","index","ProgressIndicator","T0","root","points","centre","angle","sin","cos","_c","stylex.props","props"],"sources":["../../../src/components/progress-indicator/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ProgressBarRenderProps, ProgressBarProps as RACProgressBarProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ProgressBar } from 'react-aria-components';\nimport type { IndicatorTone } from '../../indicator/styles';\nimport { IndicatorLabels, IndicatorLine } from '../../indicator';\nimport { indicatorStyles } from '../../indicator/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii } from '../../tokens/design.tokens.stylex';\n\n// The progress indicators page's indicator, as a line or a ring, in either\n// of the page's two shapes, flat and wavy. Both carry the three parts the\n// page's anatomy names — the active indicator in primary, the track in\n// secondary container, and, on the line, the stop indicator in primary at\n// the end — at the page's 4dp thickness, with the 4dp gap its measurements\n// give either side of the track. The flat ring is the page's default 40dp of\n// the four sizes it draws, and the wavy ring the 48dp its wave needs room\n// for.\n//\n// The determinate line is a row of those parts: the active indicator takes\n// the value's share of what the gaps and the stop leave, and the track takes\n// the rest — see `activeAt` in src/indicator/styles.ts. The\n// determinate ring is two arcs of one circle, cut by the dash pattern: the\n// active arc runs from the top for its share of the circumference, and the\n// track picks up 4dp past it and stops 4dp before it comes back round,\n// which is the same gap measured along the curve.\n//\n// The animations are Material's own rather than something assembled from\n// the motion tokens: an indeterminate indicator is a piece of choreography,\n// and one written from scratch reads as a different component beside a\n// Material app. Material Web and Angular Material both descend from the\n// same implementation and agree on every number, so the numbers here are\n// theirs — the line's two bars and their four keyframe sets, the buffer's\n// scrolling dots, the ring's 1333ms arc, its four-arc cycle and its 1568ms\n// rotation, and the 250ms and 500ms a determinate value moves over.\n//\n// Two things are decided differently, both after reading the two of them.\n//\n// The ring is one dashed arc rather than two halves. Material Web draws it\n// as a pair of bordered half-circles, Angular as a pair of clipped SVG\n// circles with a patch over the seam between them; both constructions exist\n// to work around that split, and a single arc whose dash pattern is\n// animated needs neither and shares its geometry with the determinate ring.\n// The three effects it composes are still theirs: the arc grows and shrinks\n// over the arc's duration, its start travels the circle over four of those,\n// and the whole thing turns over the rotation's.\n//\n// Under `prefers-reduced-motion` the motion slows rather than stopping,\n// which is Angular's answer and the better one: an indicator that freezes\n// stops saying the work is going on, and a frozen arc caught at its short\n// end reads as broken. The multipliers are Angular's — two for the line,\n// and a quarter more for the ring. The buffer's dots are the exception and\n// stop: they are drawn on a determinate line, whose value is what says the\n// work is going on, so their movement tells a reader nothing and is only\n// movement.\n//\n// The wavy shape draws the active indicator as a wave and leaves the track\n// and the stop flat, as the page does. Its numbers are Material's own, from\n// its Compose and Android components: on the line a 3dp amplitude, a 40dp\n// wavelength and a 10dp row, with a 20dp wavelength while indeterminate; on\n// the ring a 1.6dp amplitude and a 15dp wavelength, rounded to a whole\n// number of waves so the wave closes on itself. A determinate wave lies flat\n// up to a tenth of the way and from 95% on, which is Material's rule too: a\n// wave too short to hold a crest reads as a wobble, and one about to finish\n// settles into the line it ends as.\n//\n// The wave is drawn over the flat drawing rather than in place of it, and\n// the two are crossfaded as the value crosses those bounds. The flat drawing\n// is also what a reader who has asked for reduced motion sees, since a wave\n// is motion even standing still, and what a line wider than `WAVE_REACH` is\n// drawn as. The line's wave is a path of that fixed length, cut to the value\n// by a dash written against the row's own width in container query units,\n// `100cqi`, so nothing has to measure the row before the wave can be drawn.\n//\n// React Aria's `ProgressBar` is the root: it carries the role, the value and\n// its text, and reports the percentage and whether it is indeterminate as\n// render state, which is what everything here is drawn from.\n\n// The circle the arcs are cut from. The radius is the diameter less the\n// stroke, halved, so the stroke sits inside the 40dp box rather than\n// straddling its edge.\n//\n// The thickness and the gap are the same 4dp the shared line is drawn at,\n// written again rather than imported from `src/indicator/styles`: StyleX\n// evaluates the values inside `stylex.create` and `stylex.keyframes` as it\n// compiles, and will not follow an import to a module that is not a theme\n// to reach one — an imported constant fails the transform outright.\nconst CIRCULAR_SIZE = 40;\n// The same value as a length, hoisted rather than built at the parameter.\n// The compiler has no safe reordering for a template literal, so one written\n// as a default parameter skips the whole component around it — which the\n// panic threshold this lands beside turns into a build failure.\nconst CIRCULAR_SIZE_PX = `${CIRCULAR_SIZE}px`;\nconst THICKNESS = 4;\nconst GAP = 4;\nconst RADIUS = (CIRCULAR_SIZE - THICKNESS) / 2;\nconst CIRCUMFERENCE = 2 * Math.PI * RADIUS;\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The ring's timings. The arc is 1333ms; a full cycle is four of them; and\n// the rotation is the arc scaled by 360/306, which is the arc's start\n// rotation plus the circle less the arc's size.\nconst ARC_MS = 1333;\nconst CYCLE_MS = ARC_MS * 4;\nconst ROTATE_MS = Math.round(ARC_MS * 360 / 306);\nconst RING_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n// The line's own: 2s for an indeterminate pass, and the 250ms the buffer's\n// dots take to scroll one pitch. What a determinate value moves over is the\n// shared line's, since a meter moves the same way.\nconst INDETERMINATE_MS = 2000;\nconst BUFFER_MS = 250;\n\n// What `prefers-reduced-motion` slows each indeterminate shape by.\nconst LINE_SLOWDOWN = 2;\nconst RING_SLOWDOWN = 1.25;\n\n// The wavy line: the wave's amplitude either side of the middle, its two\n// wavelengths, and the row it is drawn in, which is the amplitude either side\n// plus the stroke. `WAVE_REACH` is how far the wave runs, and a row wider\n// than that draws flat. The easing is the shared line's, written again for\n// the reason the thickness is.\nconst WAVE_AMPLITUDE = 3;\nconst WAVE_WAVELENGTH = 40;\nconst INDETERMINATE_WAVELENGTH = 20;\nconst WAVE_HEIGHT = WAVE_AMPLITUDE * 2 + THICKNESS;\nconst WAVE_REACH = 2048;\nconst DETERMINATE_EASING = 'cubic-bezier(0.4, 0, 0.6, 1)';\n\n// Where a determinate wave stands up and where it lies down again, as\n// percentages of the way.\nconst WAVE_FROM = 10;\nconst WAVE_UNTIL = 95;\n\n// The wavy ring: the 48dp box, the amplitude, and the circle the wave runs\n// round, pulled in by the amplitude so its crests stay inside the box. The\n// wave count is the wavelength's share of that circle, rounded — nine.\nconst WAVY_SIZE = 48;\nconst WAVY_SIZE_PX = `${WAVY_SIZE}px`;\nconst RING_AMPLITUDE = 1.6;\nconst RING_WAVELENGTH = 15;\nconst WAVY_RADIUS = (WAVY_SIZE - THICKNESS) / 2 - RING_AMPLITUDE;\nconst WAVY_CIRCUMFERENCE = 2 * Math.PI * WAVY_RADIUS;\nconst RING_WAVES = Math.round(WAVY_CIRCUMFERENCE / RING_WAVELENGTH);\nconst REDUCED_MOTION = '@media (prefers-reduced-motion: reduce)';\nconst TOO_WIDE = `@container (inline-size > ${WAVE_REACH}px)`;\n\n// The paths the waves are drawn along, built once.\nconst DETERMINATE_WAVE = linearWave(WAVE_WAVELENGTH);\nconst INDETERMINATE_WAVE = linearWave(INDETERMINATE_WAVELENGTH);\nconst RING_WAVE = ringWave();\n\n// The two bars of the indeterminate line, translated and scaled at once.\nconst primaryTranslate = \"x1pch1fy-B\";\nconst primaryScale = \"xxyp5q1-B\";\nconst secondaryTranslate = \"xzo9tdn-B\";\nconst secondaryScale = \"x1w7bnrt-B\";\n\n// The buffer's dots scroll by one pitch of the pattern and start again.\nconst buffering = \"x19sykc1-B\";\n\n// The arc's own length, written against a path the circle normalises to 100\n// with `pathLength`, so these are percentages of the circumference rather\n// than lengths StyleX would have to work out.\n//\n// Material contracts to 10 degrees of turn and grows to 270. The 270 is 75\n// of the circumference and is written as it is; the 10 is not, because the\n// page's rounded ends change what a short dash draws. A round cap adds half\n// the stroke at each end, so a 10-degree dash on the 40dp ring is 3px of\n// path inside a 7px capsule of 4px stroke — a dot rather than the sliver\n// Material's square-cut ends give at the same angle. 8 is the shortest the\n// cap still draws as an arc, and it is the floor for that reason rather\n// than because the page names it.\n//\n// Each pattern's dash and gap sum to the circle's 100, at every step of the\n// interpolation between them, so the pattern repeats exactly once round\n// the ring. A dash does not wrap past the start of a closed path, so with a\n// longer period — the dash and a gap of 100 — an arc that had travelled late\n// round the ring was cut off at the path's end, down to a dot, and grew back\n// from somewhere else. And the 100 is what makes `travelArc`'s last offset,\n// -300, the same position as its first, so the loop has no seam.\nconst expandArc = \"x17j028-B\";\n\n// Where the arc starts. Material turns it in eight increments of 135 degrees\n// rather than at a constant rate, each eased with the same curve the arc's\n// growth uses, so it settles at each position and springs to the next; three\n// full turns over the cycle, under the rotation's own single turn. The\n// numbers here are those angles along a path of 100: 135 degrees is 37.5 of\n// it, and 1080 degrees is 300.\nconst travelArc = \"x26nhu8-B\";\nconst spin = \"x1fy8ia8-B\";\n\n// The indeterminate line's two bars, as dashes along the wave. A bar's\n// translation is where its dash starts, so it moves the dash's offset, and\n// its scale is how long the dash is, so it moves the dash's length; both are\n// the bar keyframes above, at their times and on their curves, turned from\n// shares of the row into lengths of it. The offset is the bar's distance\n// before the row's start, which is where its keyframes put it: the primary\n// bar sits 145.167% back and travels 200.611% of the row, the secondary\n// 54.8889% back and travels 160.278%. The gap after the dash is four rows\n// long, so the dash after it never reaches the row.\nconst primaryWaveOffset = \"x1kfhhp5-B\";\nconst primaryWaveLength = \"x1yi1oyw-B\";\nconst secondaryWaveOffset = \"x18qdip-B\";\nconst secondaryWaveLength = \"x1b9nlqo-B\";\nconst _temp = {\n kZKoxP: \"xyq6l7l\",\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nconst _temp2 = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nconst _temp3 = {\n k5rJSQ: \"xqmdeo6\",\n \"$$css\": true\n};\nconst styles = {\n activeFade: {\n k1ekBW: \"x7x1mir\",\n $$css: true\n },\n activeUnderWave: {\n kSiTet: \"xg01cxk x19xn7b2 x16dpw5u\",\n k1ekBW: \"x7x1mir\",\n $$css: true\n },\n arcActive: {\n kjVXCG: \"x1i9vjva xbabvq0\",\n $$css: true\n },\n arcFade: {\n k1ekBW: \"x1t9qjwo\",\n $$css: true\n },\n arcIndeterminate: {\n kkDQuc: \"x12dwrod\",\n k44tkh: \"xxx5gdc\",\n ko0y90: \"x77zgwx\",\n kKVMdj: \"xz09zy6\",\n kyAemX: \"x1582zw4\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n k1ekBW: \"x13b0p5u\",\n $$css: true\n },\n arcMotion: {\n k6CgDc: \"x12w9bfk\",\n kIyJzY: \"xd6oih7\",\n k1ekBW: \"xg0bdzq\",\n kAMwcw: \"x4ognrn\",\n $$css: true\n },\n arcTrack: {\n kjVXCG: \"xynoiew x8jos32\",\n $$css: true\n },\n circular: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x1lliihq\",\n k3aq6I: \"x9tu13d\",\n $$css: true\n },\n circularIndeterminate: {\n kkDQuc: \"x7hzzi\",\n k44tkh: \"x11c9iw4\",\n ko0y90: \"xa4qsjk\",\n kKVMdj: \"xpedhrg\",\n kyAemX: \"x1esw782\",\n k3aq6I: \"x1c071of\",\n $$css: true\n },\n circularSize: (size: string) => [_temp, {\n \"--x-blockSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(size),\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(size)\n }],\n flatUnderWave: {\n kSiTet: \"xg01cxk x16dpw5u\",\n $$css: true\n },\n indeterminateBarInner: {\n kWkggS: \"xnety89 x1jzqe4\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n indeterminateTrack: {\n kWkggS: \"x15dekr4\",\n kaIpWk: \"x1dkaolv\",\n kpwlN0: \"x10a8y8t\",\n kjBf7l: \"x3teovq\",\n kInvED: \"xvr1dqx\",\n k3XXqK: \"x815t2r\",\n kMeerF: \"xcthrzx\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n primaryBarInner: {\n kkDQuc: \"xy02sl2\",\n k44tkh: \"x1c74tu6\",\n ko0y90: \"xa4qsjk\",\n kKVMdj: \"xkj56kq\",\n kyAemX: \"x1esw782\",\n $$css: true\n },\n primaryWave: {\n k44tkh: \"xy7unhy\",\n ko0y90: \"x77zgwx\",\n kKVMdj: \"x15en9ga\",\n kyAemX: \"xlges3w\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n $$css: true\n },\n ringWave: {\n k1xSpc: \"xkio4u3\",\n $$css: true\n },\n rootCircular: {\n k1xSpc: \"x3nfvp2\",\n kzqmXN: \"x14atkfc\",\n kXLuUW: \"xxymvpz\",\n $$css: true\n },\n secondaryBarInner: {\n kkDQuc: \"xy02sl2\",\n k44tkh: \"x1c74tu6\",\n ko0y90: \"xa4qsjk\",\n kKVMdj: \"xnb0dd2\",\n kyAemX: \"x1esw782\",\n $$css: true\n },\n secondaryWave: {\n k44tkh: \"xy7unhy\",\n ko0y90: \"x77zgwx\",\n kKVMdj: \"x1sz9pa8\",\n kyAemX: \"xlges3w\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n $$css: true\n },\n trackBuffered: {\n kWkggS: \"x15dekr4\",\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n trackBufferedAt: (share: number) => [_temp2, {\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(`${share}%`)\n }],\n waveAt: (percentage: number) => [_temp3, {\n \"--x-strokeDasharray\": `max(0px, (100cqi - ${GAP * 2 + THICKNESS}px) * ${percentage / 100} - ${THICKNESS}px) ${WAVE_REACH * 2}px` != null ? `max(0px, (100cqi - ${GAP * 2 + THICKNESS}px) * ${percentage / 100} - ${THICKNESS}px) ${WAVE_REACH * 2}px` : undefined\n }],\n waveFlat: {\n kSiTet: \"xg01cxk\",\n $$css: true\n },\n waveMotion: {\n k6CgDc: \"x12w9bfk\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"xvfbvx2\",\n kAMwcw: \"x16pyfke\",\n $$css: true\n }\n};\ntype ProgressIndicatorProps = {\n /**\n * How far the work is loaded ahead of the value — a video's buffered\n * seconds, a queue's fetched pages. Read on the same scale as `value`: the\n * track is solid up to it and dotted beyond. Ignored while the indicator\n * is indeterminate, and left out for work with nothing to buffer.\n */\n buffer?: number;\n /** A function may compute the class from the indicator's render state. */\n className?: RACProgressBarProps['className'];\n /**\n * How wide the ring is drawn, as a CSS length. Everything inside scales\n * with it, so `1em` gives a ring the size of the type around it. Ignored\n * by the line, which fills the width it is given.\n *\n * A length rather than a step of the size scale: a ring sized to the type\n * around it is what the prop is for, and no fixed scale gives that.\n * @default '40px', or '48px' for the wavy ring\n */\n diameter?: string;\n /**\n * What the work is, shown above the indicator. A screen reader reads it as\n * the indicator's name; an indicator whose surroundings name it takes\n * `aria-label` instead and leaves this out.\n */\n label?: ReactNode;\n /**\n * The page's two shapes. `wavy` draws the active indicator as a wave,\n * which lies flat near either end of a determinate value, and leaves the\n * track and the stop flat; the wavy ring is 48dp across rather than 40.\n * Under `prefers-reduced-motion` a wavy indicator is drawn flat.\n * @default 'flat'\n */\n shape?: ProgressIndicatorShape;\n /**\n * Whether the value is shown at the end of the label's row. Ignored while\n * the indicator is indeterminate, which has no value to show. On a ring\n * the row sits above it, and the indicator is as wide as the wider of the\n * two.\n * @default false\n */\n showValue?: boolean;\n /** A function may compute the style from the indicator's render state. */\n style?: RACProgressBarProps['style'];\n /**\n * Which colours it is drawn in. `primary` is the page's own pair — the\n * active indicator in primary over a secondary container track — and\n * `inherit` takes the colour around it, for an indicator inside something\n * that already has one, such as a button, where primary would be the fill.\n * @default 'primary'\n */\n tone?: ProgressIndicatorTone;\n /**\n * The line the page draws, or the ring: `linear` fills the width it is\n * given, `circular` is 40dp across.\n * @default 'linear'\n */\n variant?: ProgressIndicatorVariant;\n} & Omit<RACProgressBarProps, 'children' | 'className' | 'style'>;\ntype ProgressIndicatorShape = 'flat' | 'wavy';\n\n// The two of the shared line's four tones an indicator draws. The other two\n// say how a measurement reads, which is a meter's business rather than a\n// running task's.\ntype ProgressIndicatorTone = Extract<IndicatorTone, 'inherit' | 'primary'>;\ntype ProgressIndicatorVariant = 'circular' | 'linear';\n\n// The dashes that cut the two arcs out of one circle. The active arc runs\n// from the top for its share of the circumference; the track picks up 4dp\n// after it and stops 4dp before it comes back round, which is the page's gap\n// measured along the curve.\nfunction arcsFor(percentage: number | undefined, circumference: number) {\n const active = (percentage ?? 0) / 100 * circumference;\n const track = Math.max(0, circumference - active - 2 * GAP);\n return {\n active: {\n strokeDasharray: `${active} ${circumference}`,\n strokeDashoffset: 0\n },\n track: {\n strokeDasharray: `${track} ${circumference}`,\n strokeDashoffset: -(active + GAP)\n }\n };\n}\n\n// How much of the track the buffer covers. The buffer is read on the value's\n// scale, and the track holds what the value has not taken, so the solid part\n// is the buffer's share of that remainder.\nfunction bufferShare(buffer: number | undefined, percentage: number | undefined, minValue: number, maxValue: number) {\n if (buffer === undefined) {\n return undefined;\n }\n const value = percentage ?? 0;\n const range = maxValue - minValue;\n const buffered = range === 0 ? 0 : (buffer - minValue) / range * 100;\n const remaining = 100 - value;\n if (remaining <= 0) {\n return 0;\n }\n return Math.min(100, Math.max(0, (buffered - value) / remaining * 100));\n}\nfunction CircularTrack({\n diameter,\n isIndeterminate,\n percentage,\n shape,\n tone\n}: {\n diameter: string;\n isIndeterminate: boolean;\n percentage: number | undefined;\n shape: ProgressIndicatorShape;\n tone: ProgressIndicatorTone;\n}) {\n const inherit = tone === 'inherit';\n const wavy = shape === 'wavy';\n const size = wavy ? WAVY_SIZE : CIRCULAR_SIZE;\n const radius = wavy ? WAVY_RADIUS : RADIUS;\n const circumference = wavy ? WAVY_CIRCUMFERENCE : CIRCUMFERENCE;\n const arcs = arcsFor(percentage, circumference);\n const waving = wavy && (isIndeterminate || isWaving(percentage));\n return <svg aria-hidden=\"true\" viewBox={`0 0 ${size} ${size}`} {...stylex.props(styles.circular, styles.circularSize(diameter), isIndeterminate && styles.circularIndeterminate)}>\n {isIndeterminate ? null : <circle cx={size / 2} cy={size / 2} fill=\"none\" r={radius} strokeDasharray={arcs.track.strokeDasharray} strokeDashoffset={arcs.track.strokeDashoffset} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(styles.arcMotion, styles.arcTrack, inherit && indicatorStyles.inheritTrack)} />}\n <circle cx={size / 2} cy={size / 2} fill=\"none\" pathLength={isIndeterminate ? 100 : undefined} r={radius} strokeDasharray={isIndeterminate ? undefined : arcs.active.strokeDasharray} strokeDashoffset={isIndeterminate ? undefined : arcs.active.strokeDashoffset} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(isIndeterminate ? styles.arcIndeterminate : styles.arcMotion, isIndeterminate ? null : styles.arcActive, inherit && indicatorStyles.inheritActive, wavy && !isIndeterminate && styles.arcFade, waving && styles.flatUnderWave)} />\n {wavy ?\n // The wave, over the flat arc and cut by the same dashes. Measured\n // as the circle it runs round, so a length along it is a share of\n // the way round.\n <path d={RING_WAVE} fill=\"none\" pathLength={isIndeterminate ? 100 : circumference} strokeDasharray={isIndeterminate ? undefined : arcs.active.strokeDasharray} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(isIndeterminate ? styles.arcIndeterminate : styles.arcMotion, isIndeterminate ? null : [styles.arcActive, styles.arcFade], inherit && indicatorStyles.inheritActive, styles.ringWave, !waving && styles.waveFlat)} /> : null}\n </svg>;\n}\n\n// What the indicator draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\nfunction indicatorContent(label: ReactNode, showValue: boolean, variant: ProgressIndicatorVariant, buffer: number | undefined, minValue: number, maxValue: number, diameter: string, shape: ProgressIndicatorShape, tone: ProgressIndicatorTone) {\n return (state: ProgressBarRenderProps) => <>\n <IndicatorLabels label={label} value={showValue && !state.isIndeterminate ? state.valueText : undefined} />\n {variant === 'circular' ? <CircularTrack diameter={diameter} isIndeterminate={state.isIndeterminate} percentage={state.percentage} shape={shape} tone={tone} /> : <LinearTrack buffer={bufferShare(buffer, state.percentage, minValue, maxValue)} isIndeterminate={state.isIndeterminate} percentage={state.percentage} shape={shape} tone={tone} />}\n </>;\n}\n\n// Whether a determinate wave stands at this value — see `WAVE_FROM`.\nfunction isWaving(percentage: number | undefined) {\n const value = percentage ?? 0;\n return value > WAVE_FROM && value < WAVE_UNTIL;\n}\nfunction LinearTrack({\n buffer,\n isIndeterminate,\n percentage,\n shape,\n tone\n}: {\n buffer: number | undefined;\n isIndeterminate: boolean;\n percentage: number | undefined;\n shape: ProgressIndicatorShape;\n tone: ProgressIndicatorTone;\n}) {\n const inherit = tone === 'inherit';\n const wavy = shape === 'wavy';\n if (isIndeterminate) {\n const bars = <div className=\"xqu0tyb x1dkaolv x9f619 xh8yej3 xb3r6kr x1n2onr6 x19axjrm x1c071of\">\n <span {...stylex.props(styles.indeterminateTrack, inherit && indicatorStyles.inheritTrack)} />\n <span {...{\n 0: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x4hg7df x1esw782 xoia761\"\n },\n 1: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x4hg7df x1esw782 xoia761 xg01cxk x19xn7b2 x16dpw5u\"\n }\n }[!!wavy << 0]}>\n <span {...stylex.props(styles.indeterminateBarInner, styles.primaryBarInner, inherit && indicatorStyles.inheritActive)} />\n </span>\n <span {...{\n 0: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x1pdi2bj x1esw782 xnsac6p\"\n },\n 1: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x1pdi2bj x1esw782 xnsac6p xg01cxk x19xn7b2 x16dpw5u\"\n }\n }[!!wavy << 0]}>\n <span {...stylex.props(styles.indeterminateBarInner, styles.secondaryBarInner, inherit && indicatorStyles.inheritActive)} />\n </span>\n </div>;\n if (!wavy) {\n return bars;\n }\n return <div className=\"x6s0dn4 x170jfvy x9f619 x12h1iku x78zum5 xh8yej3 x1n2onr6\">\n {bars}\n <svg aria-hidden=\"true\" className=\"x5yr21d x9f619 x1lliihq x1r7bp8 xkio4u3 xh8yej3 x13vifvy xu96u03 xb3r6kr x47corl x10l6tqk x19axjrm x1c071of\">\n <path d={INDETERMINATE_WAVE.path} fill=\"none\" pathLength={INDETERMINATE_WAVE.extent} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(styles.primaryWave, inherit && indicatorStyles.inheritActive)} />\n <path d={INDETERMINATE_WAVE.path} fill=\"none\" pathLength={INDETERMINATE_WAVE.extent} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(styles.secondaryWave, inherit && indicatorStyles.inheritActive)} />\n </svg>\n </div>;\n }\n const waving = wavy && isWaving(percentage);\n const line = <IndicatorLine activeStyle={waving ? styles.activeUnderWave : wavy ? styles.activeFade : null} percentage={percentage ?? 0} tone={tone}>\n {buffer === undefined ? undefined : <>\n <span {...stylex.props(styles.trackBuffered, styles.trackBufferedAt(buffer), inherit && indicatorStyles.inheritTrack)} />\n <span {...{\n 0: {\n className: \"xs4xyr0 xa4qsjk xwx18z9 x1aquc0h x1esw782 x1d6qlk4 x1w3jsh0 xwj9l49 x5yr21d x9f619 x1iyjqo2 xeuugli\"\n },\n 1: {\n className: \"xs4xyr0 xa4qsjk xwx18z9 x1aquc0h x1esw782 x1w3jsh0 xwj9l49 x5yr21d x9f619 x1iyjqo2 xeuugli x1larodg\"\n }\n }[!!inherit << 0]} />\n </>}\n </IndicatorLine>;\n if (!wavy) {\n return line;\n }\n return <div className=\"x6s0dn4 x170jfvy x9f619 x12h1iku x78zum5 xh8yej3 x1n2onr6\">\n {line}\n <svg aria-hidden=\"true\" className=\"x5yr21d x9f619 x1lliihq x1r7bp8 xkio4u3 xh8yej3 x13vifvy xu96u03 xb3r6kr x47corl x10l6tqk x19axjrm x1c071of\">\n <path d={DETERMINATE_WAVE.path} fill=\"none\" pathLength={DETERMINATE_WAVE.extent} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(styles.waveMotion, styles.waveAt(percentage ?? 0), !waving && styles.waveFlat, inherit && indicatorStyles.inheritActive)} />\n </svg>\n </div>;\n}\n\n// A wave along the line, `wavelength` apart and `WAVE_AMPLITUDE` either side\n// of the middle of its row, from the half stroke a round cap needs at the\n// start to past `WAVE_REACH`. Each half wave is one cubic whose control\n// points sit 4/(3π) of the way in from either end at 4/3 of the amplitude,\n// which crests at the amplitude and leaves the middle at a sine's own slope;\n// `s` mirrors the last control point, so every half wave after the first is\n// the same short command with its sign flipped. `extent` is how far it runs\n// across, which the path is measured in.\nfunction linearWave(wavelength: number) {\n const half = wavelength / 2;\n const inset = round(4 / (3 * Math.PI) * half);\n const lift = round(4 / 3 * WAVE_AMPLITUDE);\n const halves = Math.ceil(WAVE_REACH / half) + 1;\n let path = `M${THICKNESS / 2} ${WAVE_HEIGHT / 2}c${inset} ${-lift} ${round(half - inset)} ${-lift} ${half} 0`;\n for (let index = 1; index < halves; index++) {\n path += `s${round(half - inset)} ${index % 2 === 0 ? -lift : lift} ${half} 0`;\n }\n return {\n extent: halves * half,\n path\n };\n}\n\n/**\n * Progress through a task, as a line or a ring. Its value is React Aria's:\n * pass `value` between `minValue` and `maxValue`, or leave `value` out and\n * set `isIndeterminate` for work whose length is not known. `formatOptions`\n * says how the value reads, in the locale the page is in, and `buffer` marks\n * how far the work is loaded ahead of it.\n *\n * The call site's `className` and `style` land on the indicator as a whole,\n * which is the element a layout positions.\n */\nfunction ProgressIndicator({\n buffer,\n diameter,\n label,\n maxValue = 100,\n minValue = 0,\n shape = 'flat',\n showValue = false,\n tone = 'primary',\n variant = 'linear',\n ...props\n}: ProgressIndicatorProps & RefAttributes<HTMLDivElement>) {\n return <ProgressBar maxValue={maxValue} minValue={minValue} {...props} {...mergeStatefulStyles(stylex.props(indicatorStyles.root, variant === 'circular' && styles.rootCircular), props)}>\n {indicatorContent(label, showValue, variant, buffer, minValue, maxValue, diameter ?? (shape === 'wavy' ? WAVY_SIZE_PX : CIRCULAR_SIZE_PX), shape, tone)}\n </ProgressBar>;\n}\n\n// The wavy ring's path: `RING_WAVES` crests round the circle the wave runs\n// round, as 20 points to a wave, starting at three o'clock and running\n// clockwise as the circle's own dashes do.\nfunction ringWave() {\n const points = RING_WAVES * 20;\n const centre = WAVY_SIZE / 2;\n let path = '';\n for (let index = 0; index < points; index++) {\n const angle = index / points * 2 * Math.PI;\n const radius = WAVY_RADIUS + RING_AMPLITUDE * Math.sin(RING_WAVES * angle);\n path += `${index === 0 ? 'M' : 'L'}${round(centre + radius * Math.cos(angle))} ${round(centre + radius * Math.sin(angle))}`;\n }\n return `${path}Z`;\n}\n\n// Three decimal places, which keeps the paths short without moving a point\n// by anything a screen could show.\nfunction round(value: number) {\n return Math.round(value * 1000) / 1000;\n}\nexport type { ProgressIndicatorProps, ProgressIndicatorShape, ProgressIndicatorTone, ProgressIndicatorVariant };\nexport default ProgressIndicator;"],"mappings":";;;;;;;;;AA0FA,MAAMiB,gBAAgB;AAKtB,MAAMC,mBAAmB,GAAGD,cAAa;AACzC,MAAME,YAAY;AAClB,MAAMC,MAAM;AACZ,MAAMC,SAAS;AACf,MAAMC,gBAAgB,IAAIC,KAAKC,KAAKH;AA+BpC,MAAMc,iBAAiB;AACvB,MAAMC,kBAAkB;AACxB,MAAMC,2BAA2B;AACjC,MAAMC,cAAcH;AACpB,MAAMI,aAAa;AAKnB,MAAME,YAAY;AAClB,MAAMC,aAAa;AAKnB,MAAMC,YAAY;AAClB,MAAMC,eAAe,GAAGD,UAAS;AACjC,MAAME,iBAAiB;AACvB,MAAMC,kBAAkB;AACxB,MAAMC,cAAc;AACpB,MAAMC,qBAAqB,IAAIzB,KAAKC,KAAKuB;AACzC,MAAME,aAAa1B,KAAKM,MAAMmB,qBAAqBF,eAAe;AAKlE,MAAMM,mBAAmBC,WAAWjB,eAAe;AACnD,MAAMkB,qBAAqBD,WAAWhB,wBAAwB;AAC9D,MAAMkB,YAAYC,SAAS;AAuD3B,MAAMa,QAAQ;CACZC,QAAQ;CACRC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,SAAS;CACbD,QAAQ;CACR,SAAS;AACX;AACA,MAAME,SAAS;CACbC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,SAAS;CACbC,YAAY;EACVC,QAAQ;EACRC,OAAO;CACT;CACAC,iBAAiB;EACfC,QAAQ;EACRH,QAAQ;EACRC,OAAO;CACT;CACAG,WAAW;EACTC,QAAQ;EACRJ,OAAO;CACT;CACAK,SAAS;EACPN,QAAQ;EACRC,OAAO;CACT;CACAM,kBAAkB;EAChBC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRL,QAAQ;EACRC,OAAO;CACT;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,IAAIF,KAAK,CAAC,EAAC,GAAI1L,MAAMyL,SAASjD,SAAS9I,KAAKiM,IAAID,KAAK,CAAC;CAC1H;CACA,OAAO,GAAGnB,KAAI;AAChB;AAIA,SAASvK,MAAM6H,OAAe;CAC5B,OAAOnI,KAAKM,MAAM6H,QAAQ,GAAI,IAAI;AACpC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","ProgressBarRenderProps","ProgressBarProps","RACProgressBarProps","stylex","ProgressBar","IndicatorTone","IndicatorLabels","IndicatorLine","indicatorStyles","mergeStatefulStyles","colors","motion","radii","CIRCULAR_SIZE","CIRCULAR_SIZE_PX","THICKNESS","GAP","RADIUS","CIRCUMFERENCE","Math","PI","FORCED_COLORS","ARC_MS","CYCLE_MS","ROTATE_MS","round","RING_EASING","INDETERMINATE_MS","BUFFER_MS","LINE_SLOWDOWN","RING_SLOWDOWN","WAVE_AMPLITUDE","WAVE_WAVELENGTH","INDETERMINATE_WAVELENGTH","WAVE_HEIGHT","WAVE_REACH","DETERMINATE_EASING","WAVE_FROM","WAVE_UNTIL","WAVY_SIZE","WAVY_SIZE_PX","RING_AMPLITUDE","RING_WAVELENGTH","WAVY_RADIUS","WAVY_CIRCUMFERENCE","RING_WAVES","REDUCED_MOTION","TOO_WIDE","DETERMINATE_WAVE","linearWave","INDETERMINATE_WAVE","RING_WAVE","ringWave","primaryTranslate","primaryScale","secondaryTranslate","secondaryScale","buffering","expandArc","travelArc","spin","primaryWaveOffset","primaryWaveLength","secondaryWaveOffset","secondaryWaveLength","_temp","kZKoxP","kzqmXN","_temp2","_temp3","k5rJSQ","styles","activeFade","k1ekBW","$$css","activeUnderWave","kSiTet","arcActive","kjVXCG","arcFade","arcIndeterminate","kkDQuc","k44tkh","ko0y90","kKVMdj","kyAemX","arcMotion","k6CgDc","kIyJzY","kAMwcw","arcTrack","circular","kB7OPa","k1xSpc","k3aq6I","circularIndeterminate","circularSize","size","val","undefined","flatUnderWave","indeterminateBarInner","kWkggS","kaIpWk","kpwlN0","kVAEAm","indeterminateTrack","kjBf7l","kInvED","k3XXqK","kMeerF","primaryBarInner","primaryWave","rootCircular","kXLuUW","secondaryBarInner","secondaryWave","trackBuffered","kmuXW","trackBufferedAt","share","waveAt","percentage","waveFlat","waveMotion","ProgressIndicatorProps","buffer","className","diameter","label","shape","ProgressIndicatorShape","showValue","style","tone","ProgressIndicatorTone","variant","ProgressIndicatorVariant","Omit","Extract","arcsFor","circumference","active","room","min","track","max","strokeDasharray","strokeDashoffset","strokeLinecap","capFor","bufferShare","minValue","maxValue","value","range","buffered","remaining","length","const","CircularTrack","t0","$","isIndeterminate","inherit","wavy","radius","t1","arcs","t2","isWaving","waving","t3","t4","props","t5","inheritTrack","t6","t7","t8","t9","t10","t11","t12","inheritActive","t13","t14","t15","indicatorContent","state","valueText","LinearTrack","Symbol","for","0","1","bars","path","extent","t16","t17","t18","t19","line","wavelength","half","inset","lift","halves","ceil","index","ProgressIndicator","T0","root","points","centre","angle","sin","cos","_c","stylex.props","props"],"sources":["../../../src/components/progress-indicator/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ProgressBarRenderProps, ProgressBarProps as RACProgressBarProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { ProgressBar } from 'react-aria-components';\nimport type { IndicatorTone } from '../../indicator/styles';\nimport { IndicatorLabels, IndicatorLine } from '../../indicator';\nimport { indicatorStyles } from '../../indicator/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii } from '../../tokens/design.tokens.stylex';\n\n// The progress indicators page's indicator, as a line or a ring, in either\n// of the page's two shapes, flat and wavy. Both carry the three parts the\n// page's anatomy names — the active indicator in primary, the track in\n// secondary container, and, on the line, the stop indicator in primary at\n// the end — at the page's 4dp thickness, with the 4dp gap its measurements\n// give either side of the track. The flat ring is the page's default 40dp of\n// the four sizes it draws, and the wavy ring the 48dp its wave needs room\n// for.\n//\n// The determinate line is a row of those parts: the active indicator takes\n// the value's share of what the stop and the gap before it leave, and the\n// track takes the rest — see `activeAt` in src/indicator/styles.ts. The\n// determinate ring is two arcs of one circle, cut by the dash pattern: the\n// active arc runs from the top for its share of the circumference, and the\n// track picks up past it and stops short of coming back round, leaving the\n// line's 4dp between the arcs' round ends — see `arcsFor`.\n//\n// The animations are Material's own rather than something assembled from\n// the motion tokens: an indeterminate indicator is a piece of choreography,\n// and one written from scratch reads as a different component beside a\n// Material app. Material Web and Angular Material both descend from the\n// same implementation and agree on every number, so the numbers here are\n// theirs — the line's two bars and their four keyframe sets, the buffer's\n// scrolling dots, the ring's 1333ms arc, its four-arc cycle and its 1568ms\n// rotation, and the 250ms and 500ms a determinate value moves over.\n//\n// Two things are decided differently, both after reading the two of them.\n//\n// The ring is one dashed arc rather than two halves. Material Web draws it\n// as a pair of bordered half-circles, Angular as a pair of clipped SVG\n// circles with a patch over the seam between them; both constructions exist\n// to work around that split, and a single arc whose dash pattern is\n// animated needs neither and shares its geometry with the determinate ring.\n// The three effects it composes are still theirs: the arc grows and shrinks\n// over the arc's duration, its start travels the circle over four of those,\n// and the whole thing turns over the rotation's.\n//\n// Under `prefers-reduced-motion` the motion slows rather than stopping,\n// which is Angular's answer and the better one: an indicator that freezes\n// stops saying the work is going on, and a frozen arc caught at its short\n// end reads as broken. The multipliers are Angular's — two for the line,\n// and a quarter more for the ring. The buffer's dots are the exception and\n// stop: they are drawn on a determinate line, whose value is what says the\n// work is going on, so their movement tells a reader nothing and is only\n// movement.\n//\n// The wavy shape draws the active indicator as a wave and leaves the track\n// and the stop flat, as the page does. Its numbers are Material's own, from\n// its Compose and Android components: on the line a 3dp amplitude, a 40dp\n// wavelength and a 10dp row, with a 20dp wavelength while indeterminate; on\n// the ring a 1.6dp amplitude and a 15dp wavelength, rounded to a whole\n// number of waves so the wave closes on itself. A determinate wave lies flat\n// up to a tenth of the way and from 95% on, which is Material's rule too: a\n// wave too short to hold a crest reads as a wobble, and one about to finish\n// settles into the line it ends as.\n//\n// The wave is drawn over the flat drawing rather than in place of it, and\n// the two are crossfaded as the value crosses those bounds. The flat drawing\n// is also what a reader who has asked for reduced motion sees, since a wave\n// is motion even standing still, and what a line wider than `WAVE_REACH` is\n// drawn as. The line's wave is a path of that fixed length, cut to the value\n// by a dash written against the row's own width in container query units,\n// `100cqi`, so nothing has to measure the row before the wave can be drawn.\n//\n// React Aria's `ProgressBar` is the root: it carries the role, the value and\n// its text, and reports the percentage and whether it is indeterminate as\n// render state, which is what everything here is drawn from.\n\n// The circle the arcs are cut from. The radius is the diameter less the\n// stroke, halved, so the stroke sits inside the 40dp box rather than\n// straddling its edge.\n//\n// The thickness and the gap are the same 4dp the shared line is drawn at,\n// written again rather than imported from `src/indicator/styles`: StyleX\n// evaluates the values inside `stylex.create` and `stylex.keyframes` as it\n// compiles, and will not follow an import to a module that is not a theme\n// to reach one — an imported constant fails the transform outright.\nconst CIRCULAR_SIZE = 40;\n// The same value as a length, hoisted rather than built at the parameter.\n// The compiler has no safe reordering for a template literal, so one written\n// as a default parameter skips the whole component around it — which the\n// panic threshold this lands beside turns into a build failure.\nconst CIRCULAR_SIZE_PX = `${CIRCULAR_SIZE}px`;\nconst THICKNESS = 4;\nconst GAP = 4;\nconst RADIUS = (CIRCULAR_SIZE - THICKNESS) / 2;\nconst CIRCUMFERENCE = 2 * Math.PI * RADIUS;\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The ring's timings. The arc is 1333ms; a full cycle is four of them; and\n// the rotation is the arc scaled by 360/306, which is the arc's start\n// rotation plus the circle less the arc's size.\nconst ARC_MS = 1333;\nconst CYCLE_MS = ARC_MS * 4;\nconst ROTATE_MS = Math.round(ARC_MS * 360 / 306);\nconst RING_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n// The line's own: 2s for an indeterminate pass, and the 250ms the buffer's\n// dots take to scroll one pitch. What a determinate value moves over is the\n// shared line's, since a meter moves the same way.\nconst INDETERMINATE_MS = 2000;\nconst BUFFER_MS = 250;\n\n// What `prefers-reduced-motion` slows each indeterminate shape by.\nconst LINE_SLOWDOWN = 2;\nconst RING_SLOWDOWN = 1.25;\n\n// The wavy line: the wave's amplitude either side of the middle, its two\n// wavelengths, and the row it is drawn in, which is the amplitude either side\n// plus the stroke. `WAVE_REACH` is how far the wave runs, and a row wider\n// than that draws flat. The easing is the shared line's, written again for\n// the reason the thickness is.\nconst WAVE_AMPLITUDE = 3;\nconst WAVE_WAVELENGTH = 40;\nconst INDETERMINATE_WAVELENGTH = 20;\nconst WAVE_HEIGHT = WAVE_AMPLITUDE * 2 + THICKNESS;\nconst WAVE_REACH = 2048;\nconst DETERMINATE_EASING = 'cubic-bezier(0.4, 0, 0.6, 1)';\n\n// Where a determinate wave stands up and where it lies down again, as\n// percentages of the way.\nconst WAVE_FROM = 10;\nconst WAVE_UNTIL = 95;\n\n// The wavy ring: the 48dp box, the amplitude, and the circle the wave runs\n// round, pulled in by the amplitude so its crests stay inside the box. The\n// wave count is the wavelength's share of that circle, rounded — nine.\nconst WAVY_SIZE = 48;\nconst WAVY_SIZE_PX = `${WAVY_SIZE}px`;\nconst RING_AMPLITUDE = 1.6;\nconst RING_WAVELENGTH = 15;\nconst WAVY_RADIUS = (WAVY_SIZE - THICKNESS) / 2 - RING_AMPLITUDE;\nconst WAVY_CIRCUMFERENCE = 2 * Math.PI * WAVY_RADIUS;\nconst RING_WAVES = Math.round(WAVY_CIRCUMFERENCE / RING_WAVELENGTH);\nconst REDUCED_MOTION = '@media (prefers-reduced-motion: reduce)';\nconst TOO_WIDE = `@container (inline-size > ${WAVE_REACH}px)`;\n\n// The paths the waves are drawn along, built once.\nconst DETERMINATE_WAVE = linearWave(WAVE_WAVELENGTH);\nconst INDETERMINATE_WAVE = linearWave(INDETERMINATE_WAVELENGTH);\nconst RING_WAVE = ringWave();\n\n// The two bars of the indeterminate line, translated and scaled at once.\nconst primaryTranslate = \"x1pch1fy-B\";\nconst primaryScale = \"xxyp5q1-B\";\nconst secondaryTranslate = \"xzo9tdn-B\";\nconst secondaryScale = \"x1w7bnrt-B\";\n\n// The buffer's dots scroll by one pitch of the pattern and start again.\nconst buffering = \"x19sykc1-B\";\n\n// The arc's own length, written against a path the circle normalises to 100\n// with `pathLength`, so these are percentages of the circumference rather\n// than lengths StyleX would have to work out.\n//\n// Material contracts to 10 degrees of turn and grows to 270. The 270 is 75\n// of the circumference and is written as it is; the 10 is not, because the\n// page's rounded ends change what a short dash draws. A round cap adds half\n// the stroke at each end, so a 10-degree dash on the 40dp ring is 3px of\n// path inside a 7px capsule of 4px stroke — a dot rather than the sliver\n// Material's square-cut ends give at the same angle. 8 is the shortest the\n// cap still draws as an arc, and it is the floor for that reason rather\n// than because the page names it.\n//\n// Each pattern's dash and gap sum to the circle's 100, at every step of the\n// interpolation between them, so the pattern repeats exactly once round\n// the ring. A dash does not wrap past the start of a closed path, so with a\n// longer period — the dash and a gap of 100 — an arc that had travelled late\n// round the ring was cut off at the path's end, down to a dot, and grew back\n// from somewhere else. And the 100 is what makes `travelArc`'s last offset,\n// -300, the same position as its first, so the loop has no seam.\nconst expandArc = \"x17j028-B\";\n\n// Where the arc starts. Material turns it in eight increments of 135 degrees\n// rather than at a constant rate, each eased with the same curve the arc's\n// growth uses, so it settles at each position and springs to the next; three\n// full turns over the cycle, under the rotation's own single turn. The\n// numbers here are those angles along a path of 100: 135 degrees is 37.5 of\n// it, and 1080 degrees is 300.\nconst travelArc = \"x26nhu8-B\";\nconst spin = \"x1fy8ia8-B\";\n\n// The indeterminate line's two bars, as dashes along the wave. A bar's\n// translation is where its dash starts, so it moves the dash's offset, and\n// its scale is how long the dash is, so it moves the dash's length; both are\n// the bar keyframes above, at their times and on their curves, turned from\n// shares of the row into lengths of it. The offset is the bar's distance\n// before the row's start, which is where its keyframes put it: the primary\n// bar sits 145.167% back and travels 200.611% of the row, the secondary\n// 54.8889% back and travels 160.278%. The gap after the dash is four rows\n// long, so the dash after it never reaches the row.\nconst primaryWaveOffset = \"x1kfhhp5-B\";\nconst primaryWaveLength = \"x1yi1oyw-B\";\nconst secondaryWaveOffset = \"x18qdip-B\";\nconst secondaryWaveLength = \"x1b9nlqo-B\";\nconst _temp = {\n kZKoxP: \"xyq6l7l\",\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nconst _temp2 = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nconst _temp3 = {\n k5rJSQ: \"xqmdeo6\",\n \"$$css\": true\n};\nconst styles = {\n activeFade: {\n k1ekBW: \"x7x1mir\",\n $$css: true\n },\n activeUnderWave: {\n kSiTet: \"xg01cxk x19xn7b2 x16dpw5u\",\n k1ekBW: \"x7x1mir\",\n $$css: true\n },\n arcActive: {\n kjVXCG: \"x1i9vjva xbabvq0\",\n $$css: true\n },\n arcFade: {\n k1ekBW: \"x1t9qjwo\",\n $$css: true\n },\n arcIndeterminate: {\n kkDQuc: \"x12dwrod\",\n k44tkh: \"xxx5gdc\",\n ko0y90: \"x77zgwx\",\n kKVMdj: \"xz09zy6\",\n kyAemX: \"x1582zw4\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n k1ekBW: \"x13b0p5u\",\n $$css: true\n },\n arcMotion: {\n k6CgDc: \"x12w9bfk\",\n kIyJzY: \"xd6oih7\",\n k1ekBW: \"xg0bdzq\",\n kAMwcw: \"x4ognrn\",\n $$css: true\n },\n arcTrack: {\n kjVXCG: \"xynoiew x8jos32\",\n $$css: true\n },\n circular: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x1lliihq\",\n k3aq6I: \"x9tu13d\",\n $$css: true\n },\n circularIndeterminate: {\n kkDQuc: \"x7hzzi\",\n k44tkh: \"x11c9iw4\",\n ko0y90: \"xa4qsjk\",\n kKVMdj: \"xpedhrg\",\n kyAemX: \"x1esw782\",\n k3aq6I: \"x1c071of\",\n $$css: true\n },\n circularSize: (size: string) => [_temp, {\n \"--x-blockSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(size),\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(size)\n }],\n flatUnderWave: {\n kSiTet: \"xg01cxk x16dpw5u\",\n $$css: true\n },\n indeterminateBarInner: {\n kWkggS: \"xnety89 x1jzqe4\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n indeterminateTrack: {\n kWkggS: \"x15dekr4\",\n kaIpWk: \"x1dkaolv\",\n kpwlN0: \"x10a8y8t\",\n kjBf7l: \"x3teovq\",\n kInvED: \"xvr1dqx\",\n k3XXqK: \"x815t2r\",\n kMeerF: \"xcthrzx\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n primaryBarInner: {\n kkDQuc: \"xy02sl2\",\n k44tkh: \"x1c74tu6\",\n ko0y90: \"xa4qsjk\",\n kKVMdj: \"xkj56kq\",\n kyAemX: \"x1esw782\",\n $$css: true\n },\n primaryWave: {\n k44tkh: \"xy7unhy\",\n ko0y90: \"x77zgwx\",\n kKVMdj: \"x15en9ga\",\n kyAemX: \"xlges3w\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n $$css: true\n },\n ringWave: {\n k1xSpc: \"xkio4u3\",\n $$css: true\n },\n rootCircular: {\n k1xSpc: \"x3nfvp2\",\n kzqmXN: \"x14atkfc\",\n kXLuUW: \"xxymvpz\",\n $$css: true\n },\n secondaryBarInner: {\n kkDQuc: \"xy02sl2\",\n k44tkh: \"x1c74tu6\",\n ko0y90: \"xa4qsjk\",\n kKVMdj: \"xnb0dd2\",\n kyAemX: \"x1esw782\",\n $$css: true\n },\n secondaryWave: {\n k44tkh: \"xy7unhy\",\n ko0y90: \"x77zgwx\",\n kKVMdj: \"x1sz9pa8\",\n kyAemX: \"xlges3w\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n $$css: true\n },\n trackBuffered: {\n kWkggS: \"x15dekr4\",\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n trackBufferedAt: (share: number) => [_temp2, {\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(`${share}%`)\n }],\n waveAt: (percentage: number) => [_temp3, {\n \"--x-strokeDasharray\": `max(0px, (100cqi - ${GAP + THICKNESS}px) * ${percentage / 100} - ${THICKNESS}px) ${WAVE_REACH * 2}px` != null ? `max(0px, (100cqi - ${GAP + THICKNESS}px) * ${percentage / 100} - ${THICKNESS}px) ${WAVE_REACH * 2}px` : undefined\n }],\n waveFlat: {\n kSiTet: \"xg01cxk\",\n $$css: true\n },\n waveMotion: {\n k6CgDc: \"x12w9bfk\",\n kjVXCG: \"x1i9vjva xbabvq0\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"xvfbvx2\",\n kAMwcw: \"x16pyfke\",\n $$css: true\n }\n};\ntype ProgressIndicatorProps = {\n /**\n * How far the work is loaded ahead of the value — a video's buffered\n * seconds, a queue's fetched pages. Read on the same scale as `value`: the\n * track is solid up to it and dotted beyond. Ignored while the indicator\n * is indeterminate, and by the ring, which draws no buffer; left out for\n * work with nothing to buffer.\n */\n buffer?: number;\n /** A function may compute the class from the indicator's render state. */\n className?: RACProgressBarProps['className'];\n /**\n * How wide the ring is drawn, as a CSS length: 40px unless given, or 48px\n * for the wavy ring. Everything inside scales with it, so `1em` gives a\n * ring the size of the type around it. Ignored by the line, which fills\n * the width it is given.\n *\n * A length rather than a step of the size scale: a ring sized to the type\n * around it is what the prop is for, and no fixed scale gives that.\n * @default '40px'\n */\n diameter?: string;\n /**\n * What the work is, shown above the indicator. A screen reader reads it as\n * the indicator's name; an indicator whose surroundings name it takes\n * `aria-label` instead and leaves this out.\n */\n label?: ReactNode;\n /**\n * The page's two shapes. `wavy` draws the active indicator as a wave,\n * which lies flat near either end of a determinate value, and leaves the\n * track and the stop flat; the wavy ring is 48dp across rather than 40.\n * Under `prefers-reduced-motion` a wavy indicator is drawn flat.\n * @default 'flat'\n */\n shape?: ProgressIndicatorShape;\n /**\n * Whether the value is shown at the end of the label's row. Ignored while\n * the indicator is indeterminate, which has no value to show. On a ring\n * the row sits above it, and the indicator is as wide as the wider of the\n * two.\n * @default false\n */\n showValue?: boolean;\n /** A function may compute the style from the indicator's render state. */\n style?: RACProgressBarProps['style'];\n /**\n * Which colours it is drawn in. `primary` is the page's own pair — the\n * active indicator in primary over a secondary container track — and\n * `inherit` takes the colour around it, for an indicator inside something\n * that already has one, such as a button, where primary would be the fill.\n * @default 'primary'\n */\n tone?: ProgressIndicatorTone;\n /**\n * The line the page draws, or the ring: `linear` fills the width it is\n * given, `circular` is 40dp across, or 48dp for the wavy ring.\n * @default 'linear'\n */\n variant?: ProgressIndicatorVariant;\n} & Omit<RACProgressBarProps, 'children' | 'className' | 'style'>;\ntype ProgressIndicatorShape = 'flat' | 'wavy';\n\n// The two of the shared line's four tones an indicator draws. The other two\n// say how a measurement reads, which is a meter's business rather than a\n// running task's.\ntype ProgressIndicatorTone = Extract<IndicatorTone, 'inherit' | 'primary'>;\ntype ProgressIndicatorVariant = 'circular' | 'linear';\n\n// The dashes that cut the two arcs out of one circle. The active arc runs\n// from the top for its share of the circumference; the track picks up after\n// it and stops before it comes back round.\n//\n// Every arc ends in a round cap, which reaches half the stroke past the end\n// of its dash, so two dashes 4dp apart touch. The room between them is the\n// page's gap and a cap either side of it, which is how the gap is measured:\n// between what is drawn, as the line's is between its parts. Compose's ring\n// adds the stroke to its gap for a round cap in the same way.\n//\n// That room is never longer than the active arc, Compose's rule too, so an\n// empty ring is the whole track rather than a track with a dot wedged\n// between its ends. A dash of no length draws its caps all the same, as a\n// dot, so an arc with nothing to draw takes flat caps and draws nothing.\nfunction arcsFor(percentage: number | undefined, circumference: number) {\n const active = (percentage ?? 0) / 100 * circumference;\n const room = Math.min(active, GAP + THICKNESS);\n const track = Math.max(0, circumference - active - 2 * room);\n return {\n active: {\n strokeDasharray: `${active} ${circumference}`,\n strokeDashoffset: 0,\n strokeLinecap: capFor(active)\n },\n track: {\n strokeDasharray: `${track} ${circumference}`,\n strokeDashoffset: -(active + room),\n strokeLinecap: capFor(track)\n }\n };\n}\n\n// How much of the track the buffer covers. The buffer is read on the value's\n// scale, and the track holds what the value has not taken, so the solid part\n// is the buffer's share of that remainder.\nfunction bufferShare(buffer: number | undefined, percentage: number | undefined, minValue: number, maxValue: number) {\n if (buffer === undefined) {\n return undefined;\n }\n const value = percentage ?? 0;\n const range = maxValue - minValue;\n const buffered = range === 0 ? 0 : (buffer - minValue) / range * 100;\n const remaining = 100 - value;\n if (remaining <= 0) {\n return 0;\n }\n return Math.min(100, Math.max(0, (buffered - value) / remaining * 100));\n}\n\n// An arc's caps: round, as the page draws every end, unless the arc has no\n// length to draw — see `arcsFor`.\nfunction capFor(length: number) {\n return length > 0 ? 'round' as const : 'butt' as const;\n}\nfunction CircularTrack({\n diameter,\n isIndeterminate,\n percentage,\n shape,\n tone\n}: {\n diameter: string;\n isIndeterminate: boolean;\n percentage: number | undefined;\n shape: ProgressIndicatorShape;\n tone: ProgressIndicatorTone;\n}) {\n const inherit = tone === 'inherit';\n const wavy = shape === 'wavy';\n const size = wavy ? WAVY_SIZE : CIRCULAR_SIZE;\n const radius = wavy ? WAVY_RADIUS : RADIUS;\n const circumference = wavy ? WAVY_CIRCUMFERENCE : CIRCUMFERENCE;\n const arcs = arcsFor(percentage, circumference);\n const waving = wavy && (isIndeterminate || isWaving(percentage));\n return <svg aria-hidden=\"true\" viewBox={`0 0 ${size} ${size}`} {...stylex.props(styles.circular, styles.circularSize(diameter), isIndeterminate && styles.circularIndeterminate)}>\n {isIndeterminate ? null : <circle cx={size / 2} cy={size / 2} fill=\"none\" r={radius} strokeDasharray={arcs.track.strokeDasharray} strokeDashoffset={arcs.track.strokeDashoffset} strokeLinecap={arcs.track.strokeLinecap} strokeWidth={THICKNESS} {...stylex.props(styles.arcMotion, styles.arcTrack, inherit && indicatorStyles.inheritTrack)} />}\n <circle cx={size / 2} cy={size / 2} fill=\"none\" pathLength={isIndeterminate ? 100 : undefined} r={radius} strokeDasharray={isIndeterminate ? undefined : arcs.active.strokeDasharray} strokeDashoffset={isIndeterminate ? undefined : arcs.active.strokeDashoffset} strokeLinecap={isIndeterminate ? 'round' : arcs.active.strokeLinecap} strokeWidth={THICKNESS} {...stylex.props(isIndeterminate ? styles.arcIndeterminate : styles.arcMotion, isIndeterminate ? null : styles.arcActive, inherit && indicatorStyles.inheritActive, wavy && !isIndeterminate && styles.arcFade, waving && styles.flatUnderWave)} />\n {wavy ?\n // The wave, over the flat arc and cut by the same dashes. Measured\n // as the circle it runs round, so a length along it is a share of\n // the way round.\n <path d={RING_WAVE} fill=\"none\" pathLength={isIndeterminate ? 100 : circumference} strokeDasharray={isIndeterminate ? undefined : arcs.active.strokeDasharray} strokeLinecap={isIndeterminate ? 'round' : arcs.active.strokeLinecap} strokeWidth={THICKNESS} {...stylex.props(isIndeterminate ? styles.arcIndeterminate : styles.arcMotion, isIndeterminate ? null : [styles.arcActive, styles.arcFade], inherit && indicatorStyles.inheritActive, styles.ringWave, !waving && styles.waveFlat)} /> : null}\n </svg>;\n}\n\n// What the indicator draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\nfunction indicatorContent(label: ReactNode, showValue: boolean, variant: ProgressIndicatorVariant, buffer: number | undefined, minValue: number, maxValue: number, diameter: string, shape: ProgressIndicatorShape, tone: ProgressIndicatorTone) {\n return (state: ProgressBarRenderProps) => <>\n <IndicatorLabels label={label} value={showValue && !state.isIndeterminate ? state.valueText : undefined} />\n {variant === 'circular' ? <CircularTrack diameter={diameter} isIndeterminate={state.isIndeterminate} percentage={state.percentage} shape={shape} tone={tone} /> : <LinearTrack buffer={bufferShare(buffer, state.percentage, minValue, maxValue)} isIndeterminate={state.isIndeterminate} percentage={state.percentage} shape={shape} tone={tone} />}\n </>;\n}\n\n// Whether a determinate wave stands at this value — see `WAVE_FROM`.\nfunction isWaving(percentage: number | undefined) {\n const value = percentage ?? 0;\n return value > WAVE_FROM && value < WAVE_UNTIL;\n}\nfunction LinearTrack({\n buffer,\n isIndeterminate,\n percentage,\n shape,\n tone\n}: {\n buffer: number | undefined;\n isIndeterminate: boolean;\n percentage: number | undefined;\n shape: ProgressIndicatorShape;\n tone: ProgressIndicatorTone;\n}) {\n const inherit = tone === 'inherit';\n const wavy = shape === 'wavy';\n if (isIndeterminate) {\n const bars = <div className=\"xqu0tyb x1dkaolv x9f619 xh8yej3 xb3r6kr x1n2onr6 x19axjrm x1c071of\">\n <span {...stylex.props(styles.indeterminateTrack, inherit && indicatorStyles.inheritTrack)} />\n <span {...{\n 0: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x4hg7df x1esw782 xoia761\"\n },\n 1: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x4hg7df x1esw782 xoia761 xg01cxk x19xn7b2 x16dpw5u\"\n }\n }[!!wavy << 0]}>\n <span {...stylex.props(styles.indeterminateBarInner, styles.primaryBarInner, inherit && indicatorStyles.inheritActive)} />\n </span>\n <span {...{\n 0: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x1pdi2bj x1esw782 xnsac6p\"\n },\n 1: {\n className: \"xqu0tyb x9f619 xh8yej3 x13vifvy x10l6tqk x1nf803f xy02sl2 x1c74tu6 xa4qsjk x1pdi2bj x1esw782 xnsac6p xg01cxk x19xn7b2 x16dpw5u\"\n }\n }[!!wavy << 0]}>\n <span {...stylex.props(styles.indeterminateBarInner, styles.secondaryBarInner, inherit && indicatorStyles.inheritActive)} />\n </span>\n </div>;\n if (!wavy) {\n return bars;\n }\n return <div className=\"x6s0dn4 x170jfvy x9f619 x12h1iku x78zum5 xh8yej3 x1n2onr6\">\n {bars}\n <svg aria-hidden=\"true\" className=\"x5yr21d x9f619 x1lliihq x1r7bp8 xkio4u3 xh8yej3 x13vifvy xu96u03 xb3r6kr x47corl x10l6tqk x19axjrm x1c071of\">\n <path d={INDETERMINATE_WAVE.path} fill=\"none\" pathLength={INDETERMINATE_WAVE.extent} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(styles.primaryWave, inherit && indicatorStyles.inheritActive)} />\n <path d={INDETERMINATE_WAVE.path} fill=\"none\" pathLength={INDETERMINATE_WAVE.extent} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(styles.secondaryWave, inherit && indicatorStyles.inheritActive)} />\n </svg>\n </div>;\n }\n const waving = wavy && isWaving(percentage);\n const line = <IndicatorLine activeStyle={waving ? styles.activeUnderWave : wavy ? styles.activeFade : null} percentage={percentage ?? 0} tone={tone}>\n {buffer === undefined ? undefined : <>\n <span {...stylex.props(styles.trackBuffered, styles.trackBufferedAt(buffer), inherit && indicatorStyles.inheritTrack)} />\n <span {...{\n 0: {\n className: \"xs4xyr0 xa4qsjk xwx18z9 x1aquc0h x1esw782 x1d6qlk4 x1w3jsh0 xwj9l49 x5yr21d x9f619 x1iyjqo2 xeuugli\"\n },\n 1: {\n className: \"xs4xyr0 xa4qsjk xwx18z9 x1aquc0h x1esw782 x1w3jsh0 xwj9l49 x5yr21d x9f619 x1iyjqo2 xeuugli x1larodg\"\n }\n }[!!inherit << 0]} />\n </>}\n </IndicatorLine>;\n if (!wavy) {\n return line;\n }\n return <div className=\"x6s0dn4 x170jfvy x9f619 x12h1iku x78zum5 xh8yej3 x1n2onr6\">\n {line}\n <svg aria-hidden=\"true\" className=\"x5yr21d x9f619 x1lliihq x1r7bp8 xkio4u3 xh8yej3 x13vifvy xu96u03 xb3r6kr x47corl x10l6tqk x19axjrm x1c071of\">\n <path d={DETERMINATE_WAVE.path} fill=\"none\" pathLength={DETERMINATE_WAVE.extent} strokeLinecap=\"round\" strokeWidth={THICKNESS} {...stylex.props(styles.waveMotion, styles.waveAt(percentage ?? 0), !waving && styles.waveFlat, inherit && indicatorStyles.inheritActive)} />\n </svg>\n </div>;\n}\n\n// A wave along the line, `wavelength` apart and `WAVE_AMPLITUDE` either side\n// of the middle of its row, from the half stroke a round cap needs at the\n// start to past `WAVE_REACH`. Each half wave is one cubic whose control\n// points sit 4/(3π) of the way in from either end at 4/3 of the amplitude,\n// which crests at the amplitude and leaves the middle at a sine's own slope;\n// `s` mirrors the last control point, so every half wave after the first is\n// the same short command with its sign flipped. `extent` is how far it runs\n// across, which the path is measured in.\nfunction linearWave(wavelength: number) {\n const half = wavelength / 2;\n const inset = round(4 / (3 * Math.PI) * half);\n const lift = round(4 / 3 * WAVE_AMPLITUDE);\n const halves = Math.ceil(WAVE_REACH / half) + 1;\n let path = `M${THICKNESS / 2} ${WAVE_HEIGHT / 2}c${inset} ${-lift} ${round(half - inset)} ${-lift} ${half} 0`;\n for (let index = 1; index < halves; index++) {\n path += `s${round(half - inset)} ${index % 2 === 0 ? -lift : lift} ${half} 0`;\n }\n return {\n extent: halves * half,\n path\n };\n}\n\n/**\n * Progress through a task, as a line or a ring. Its value is React Aria's:\n * pass `value` between `minValue` and `maxValue`, or leave `value` out and\n * set `isIndeterminate` for work whose length is not known. `formatOptions`\n * says how the value reads, in the locale the page is in, and `buffer` marks\n * how far the work is loaded ahead of it.\n *\n * ```tsx\n * <ProgressIndicator label=\"Label\" showValue value={40} />\n * ```\n *\n * The call site's `className` and `style` land on the indicator as a whole,\n * which is the element a layout positions.\n */\nfunction ProgressIndicator({\n buffer,\n diameter,\n label,\n maxValue = 100,\n minValue = 0,\n shape = 'flat',\n showValue = false,\n tone = 'primary',\n variant = 'linear',\n ...props\n}: ProgressIndicatorProps & RefAttributes<HTMLDivElement>) {\n return <ProgressBar maxValue={maxValue} minValue={minValue} {...props} {...mergeStatefulStyles(stylex.props(indicatorStyles.root, variant === 'circular' && styles.rootCircular), props)}>\n {indicatorContent(label, showValue, variant, buffer, minValue, maxValue, diameter ?? (shape === 'wavy' ? WAVY_SIZE_PX : CIRCULAR_SIZE_PX), shape, tone)}\n </ProgressBar>;\n}\n\n// The wavy ring's path: `RING_WAVES` crests round the circle the wave runs\n// round, as 20 points to a wave, starting at three o'clock and running\n// clockwise as the circle's own dashes do.\nfunction ringWave() {\n const points = RING_WAVES * 20;\n const centre = WAVY_SIZE / 2;\n let path = '';\n for (let index = 0; index < points; index++) {\n const angle = index / points * 2 * Math.PI;\n const radius = WAVY_RADIUS + RING_AMPLITUDE * Math.sin(RING_WAVES * angle);\n path += `${index === 0 ? 'M' : 'L'}${round(centre + radius * Math.cos(angle))} ${round(centre + radius * Math.sin(angle))}`;\n }\n return `${path}Z`;\n}\n\n// Three decimal places, which keeps the paths short without moving a point\n// by anything a screen could show.\nfunction round(value: number) {\n return Math.round(value * 1000) / 1000;\n}\nexport type { ProgressIndicatorProps, ProgressIndicatorShape, ProgressIndicatorTone, ProgressIndicatorVariant };\nexport default ProgressIndicator;"],"mappings":";;;;;;;;;AA0FA,MAAMiB,gBAAgB;AAKtB,MAAMC,mBAAmB,GAAGD,cAAa;AACzC,MAAME,YAAY;AAElB,MAAME,SAAS;AACf,MAAMC,gBAAgB,IAAIC,KAAKC,KAAKH;AA+BpC,MAAMc,iBAAiB;AACvB,MAAMC,kBAAkB;AACxB,MAAMC,2BAA2B;AACjC,MAAMC,cAAcH;AACpB,MAAMI,aAAa;AAKnB,MAAME,YAAY;AAClB,MAAMC,aAAa;AAKnB,MAAMC,YAAY;AAClB,MAAMC,eAAe,GAAGD,UAAS;AACjC,MAAME,iBAAiB;AACvB,MAAMC,kBAAkB;AACxB,MAAMC,cAAc;AACpB,MAAMC,qBAAqB,IAAIzB,KAAKC,KA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;EAAA8B,EAAA,MAAAa;EAAAb,EAAA,MAAA5B;EAAA4B,EAAA,MAAA1B;EAAA0B,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,QAAAkD,MAAAlD,EAAA,QAAAK,MAAAL,EAAA,QAAAO,MAAAP,EAAA,QAAAU,MAAAV,EAAA,QAAAW,MAAAX,EAAA,QAAAe,IAAA;EADpJC,KAAA,oBAAC,IAAD;GAAuBzB,UAAAA;GAAoBD,UAAAA;GAAQ,GAAMsB;GAAK,GAAMD;GACtEI,UAAAA;EADc,CAAA;EAEHf,EAAA,MAAAkD;EAAAlD,EAAA,MAAAK;EAAAL,EAAA,MAAAO;EAAAP,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAe;EAAAf,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,OAFTgB;AAES;AAMlB,SAAS9H,WAAW;CAClB,MAAMkK,SAASzK,aAAa;CAC5B,MAAM0K,SAAShL,YAAY;CAC3B,IAAI8J,OAAO;CACX,KAAK,IAAIa,QAAQ,GAAGA,QAAQI,QAAQJ,SAAS;EAC3C,MAAMM,QAAQN,QAAQI,SAAS,IAAInM,KAAKC;EACxC,MAAMkJ,SAAS3H,cAAcF,iBAAiBtB,KAAKsM,IAAI5K,aAAa2K,KAAK;EACzEnB,QAAQ,GAAGa,UAAU,IAAI,MAAM,MAAMzL,MAAM8L,SAASjD,SAASnJ,KAAKuM,IAAIF,KAAK,CAAC,EAAC,GAAI/L,MAAM8L,SAASjD,SAASnJ,KAAKsM,IAAID,KAAK,CAAC;CAC1H;CACA,OAAO,GAAGnB,KAAI;AAChB;AAIA,SAAS5K,MAAMiI,OAAe;CAC5B,OAAOvI,KAAKM,MAAMiI,QAAQ,GAAI,IAAI;AACpC"}
|
|
@@ -56,6 +56,13 @@ declare function Radio({ children, description, ...props }: RadioProps & RefAttr
|
|
|
56
56
|
* read-only and the error state reach every button from here, and
|
|
57
57
|
* `orientation="horizontal"` lays the buttons along a line.
|
|
58
58
|
*
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <RadioGroup defaultValue="first" label="Label">
|
|
61
|
+
* <Radio value="first">First item</Radio>
|
|
62
|
+
* <Radio value="second">Second item</Radio>
|
|
63
|
+
* </RadioGroup>
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
59
66
|
* The call site's `className` and `style` land on the group as a whole,
|
|
60
67
|
* which is the element a layout positions.
|
|
61
68
|
*/
|
|
@@ -76,10 +76,12 @@ function buttonContent(children, ripple) {
|
|
|
76
76
|
...props(controlStyles.disc, styles.control, state.isSelected && styles.toneSelected, !state.isSelected && interactive && active && styles.toneActive, state.isDisabled && styles.toneDisabled, state.isReadOnly && controlStyles.controlReadOnly, state.isDisabled && controlStyles.controlDisabled, interactive && state.isHovered && hoverLayers[tone], interactive && state.isFocusVisible && focusLayers[tone], interactive && state.isPressed && pressedLayers[tone], state.isFocusVisible && focus.ringVisible),
|
|
77
77
|
children: [/* @__PURE__ */ jsx("span", {
|
|
78
78
|
className: "x12w9bfk x6s0dn4 x1qx5ct2 x1r7ld26 x16fbrrb x1y0btm7 xdh2fpr x9f619 x78zum5 xw4jnvo xl56j7k x1qno0dh xshfolx xpc4ca7",
|
|
79
|
-
children:
|
|
80
|
-
0: { className: "xtwfq29 x1jzqe4 x170jfvy x16fbrrb x1fsd2vl" },
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
children: /* @__PURE__ */ jsx("span", { ...{
|
|
80
|
+
0: { className: "x12w9bfk xtwfq29 x1jzqe4 x170jfvy x16fbrrb x1fsd2vl x1f85oc2 x1qno0dh xuo13n2 xpc4ca7" },
|
|
81
|
+
2: { className: "x12w9bfk xtwfq29 x1jzqe4 x170jfvy x16fbrrb x1fsd2vl x1qno0dh xuo13n2 xpc4ca7 x3oybdh" },
|
|
82
|
+
1: { className: "x12w9bfk x170jfvy x16fbrrb x1fsd2vl x1f85oc2 x1qno0dh xuo13n2 xpc4ca7 xtwfq29 x1o55y2u" },
|
|
83
|
+
3: { className: "x12w9bfk x170jfvy x16fbrrb x1fsd2vl x1qno0dh xuo13n2 xpc4ca7 x3oybdh xtwfq29 x1o55y2u" }
|
|
84
|
+
}[!!state.isSelected << 1 | !!state.isDisabled << 0] })
|
|
83
85
|
}), interactive ? ripple.surface : null]
|
|
84
86
|
}), /* @__PURE__ */ jsx(ControlLabel, {
|
|
85
87
|
state,
|
|
@@ -124,10 +126,10 @@ function optionContent(button, description) {
|
|
|
124
126
|
*/
|
|
125
127
|
function Radio(t0) {
|
|
126
128
|
const $ = c(13);
|
|
127
|
-
const { children, description, ...props$
|
|
129
|
+
const { children, description, ...props$2 } = t0;
|
|
128
130
|
const ripple = useRipple();
|
|
129
131
|
const T0 = RadioField;
|
|
130
|
-
const t1 = mergeStatefulStyles(props(controlStyles.field), props$
|
|
132
|
+
const t1 = mergeStatefulStyles(props(controlStyles.field), props$2);
|
|
131
133
|
let t2;
|
|
132
134
|
if ($[0] !== children || $[1] !== ripple) {
|
|
133
135
|
t2 = buttonContent(children, ripple);
|
|
@@ -152,14 +154,14 @@ function Radio(t0) {
|
|
|
152
154
|
$[7] = t4;
|
|
153
155
|
} else t4 = $[7];
|
|
154
156
|
let t5;
|
|
155
|
-
if ($[8] !== T0 || $[9] !== props$
|
|
157
|
+
if ($[8] !== T0 || $[9] !== props$2 || $[10] !== t1 || $[11] !== t4) {
|
|
156
158
|
t5 = /* @__PURE__ */ jsx(T0, {
|
|
157
|
-
...props$
|
|
159
|
+
...props$2,
|
|
158
160
|
...t1,
|
|
159
161
|
children: t4
|
|
160
162
|
});
|
|
161
163
|
$[8] = T0;
|
|
162
|
-
$[9] = props$
|
|
164
|
+
$[9] = props$2;
|
|
163
165
|
$[10] = t1;
|
|
164
166
|
$[11] = t4;
|
|
165
167
|
$[12] = t5;
|
|
@@ -174,12 +176,19 @@ function Radio(t0) {
|
|
|
174
176
|
* read-only and the error state reach every button from here, and
|
|
175
177
|
* `orientation="horizontal"` lays the buttons along a line.
|
|
176
178
|
*
|
|
179
|
+
* ```tsx
|
|
180
|
+
* <RadioGroup defaultValue="first" label="Label">
|
|
181
|
+
* <Radio value="first">First item</Radio>
|
|
182
|
+
* <Radio value="second">Second item</Radio>
|
|
183
|
+
* </RadioGroup>
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
177
186
|
* The call site's `className` and `style` land on the group as a whole,
|
|
178
187
|
* which is the element a layout positions.
|
|
179
188
|
*/
|
|
180
189
|
function RadioGroup$1(t0) {
|
|
181
190
|
const $ = c(16);
|
|
182
|
-
const { children, description, error, label, orientation: t1, ...props$
|
|
191
|
+
const { children, description, error, label, orientation: t1, ...props$1 } = t0;
|
|
183
192
|
const orientation = t1 === void 0 ? "vertical" : t1;
|
|
184
193
|
const validationBehavior = useFieldValidationBehavior();
|
|
185
194
|
const T0 = RadioGroup;
|
|
@@ -189,7 +198,7 @@ function RadioGroup$1(t0) {
|
|
|
189
198
|
$[0] = error;
|
|
190
199
|
$[1] = t2;
|
|
191
200
|
} else t2 = $[1];
|
|
192
|
-
const t3 = mergeStatefulStyles(props(groupStyles.root), props$
|
|
201
|
+
const t3 = mergeStatefulStyles(props(groupStyles.root), props$1);
|
|
193
202
|
const t4 = orientation === "horizontal";
|
|
194
203
|
let t5;
|
|
195
204
|
if ($[2] !== children || $[3] !== description || $[4] !== error || $[5] !== label || $[6] !== t4) {
|
|
@@ -202,18 +211,18 @@ function RadioGroup$1(t0) {
|
|
|
202
211
|
$[7] = t5;
|
|
203
212
|
} else t5 = $[7];
|
|
204
213
|
let t6;
|
|
205
|
-
if ($[8] !== T0 || $[9] !== orientation || $[10] !== props$
|
|
214
|
+
if ($[8] !== T0 || $[9] !== orientation || $[10] !== props$1 || $[11] !== t2 || $[12] !== t3 || $[13] !== t5 || $[14] !== validationBehavior) {
|
|
206
215
|
t6 = /* @__PURE__ */ jsx(T0, {
|
|
207
216
|
isInvalid: t2,
|
|
208
217
|
orientation,
|
|
209
218
|
validationBehavior,
|
|
210
|
-
...props$
|
|
219
|
+
...props$1,
|
|
211
220
|
...t3,
|
|
212
221
|
children: t5
|
|
213
222
|
});
|
|
214
223
|
$[8] = T0;
|
|
215
224
|
$[9] = orientation;
|
|
216
|
-
$[10] = props$
|
|
225
|
+
$[10] = props$1;
|
|
217
226
|
$[11] = t2;
|
|
218
227
|
$[12] = t3;
|
|
219
228
|
$[13] = t5;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","RadioGroupProps","RACRadioGroupProps","RadioButtonRenderProps","RadioFieldProps","RadioFieldRenderProps","RadioGroupRenderProps","stylex","RadioGroup","RACRadioGroup","RadioButton","RadioField","ControlDescription","ControlLabel","controlStyles","FieldLabel","FieldMessage","invalidFrom","useFieldValidationBehavior","groupStyles","fieldGroupStyles","useRipple","focus","mergeStatefulStyles","colors","motion","radii","spacing","stateLayerOpacity","FORCED_COLORS","styles","control","kMwMTN","$$css","itemsHorizontal","k1C7PZ","kXwgrk","kwnvtZ","toneActive","toneDisabled","toneSelected","hoverLayers","selected","kWkggS","unselected","focusLayers","pressedLayers","children","description","error","label","Omit","RadioProps","Ripple","ReturnType","HTMLSpanElement","buttonContent","ripple","state","interactive","isDisabled","isReadOnly","tone","isSelected","active","isHovered","isPressed","isFocusVisible","handlers","props","disc","controlReadOnly","controlDisabled","ringVisible","className","surface","groupContent","horizontal","isRequired","stack","optionContent","button","Radio","t0","$","T0","t1","field","t2","t3","t4","t5","orientation","undefined","validationBehavior","root","t6","stylex.props","_c","props","RadioGroup","RACRadioGroup","fieldGroupStyles"],"sources":["../../../src/components/radio-group/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { RadioGroupProps as RACRadioGroupProps, RadioButtonRenderProps, RadioFieldProps, RadioFieldRenderProps, RadioGroupRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { RadioGroup as RACRadioGroup, RadioButton, RadioField } from 'react-aria-components';\nimport { ControlDescription, ControlLabel } from '../../control';\nimport { controlStyles } from '../../control/styles';\nimport { FieldLabel, FieldMessage } from '../../field';\nimport { invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { groupStyles as fieldGroupStyles } from '../../field/styles';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\n\n// The radio button page: a 20dp ring inside a 40dp state layer, with a 48dp\n// target. Unselected, the ring is 2dp of on surface variant that turns on\n// surface while hovered, pressed or focused; selected, the ring and the 10dp\n// dot inside it are primary. Disabled is on surface at the disabled opacity\n// for both. The state layer is on surface over an unselected button and\n// primary over a selected one while hovered, and the two swap once pressed.\n// The page draws no error state for the button itself: an invalid group\n// says so through its label and message, and the buttons keep their colours.\n//\n// Two components from one module, since neither means anything without the\n// other: a radio button is a member of a group, and the group is what holds\n// the value. React Aria's `RadioGroup` is the group, a div with the label,\n// description and error slots; `RadioField` is one button's root, a div with\n// its description slot; and `RadioButton` is the label around the visually\n// hidden input, whose children draw the button from the render state React\n// Aria hands them. The field is the same two-column grid Checkbox uses, with\n// the label `display: contents` so the description lines up under the text.\n//\n// The adjacent label is body-large on surface, which the page keeps the same\n// whether or not the button is selected.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst styles = {\n control: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n itemsHorizontal: {\n k1C7PZ: \"xpamuu5\",\n kXwgrk: \"x1q0g3np\",\n kwnvtZ: \"x1a02dak\",\n $$css: true\n },\n toneActive: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n toneDisabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n $$css: true\n },\n toneSelected: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n }\n};\n\n// The state layer follows the button: on surface over an unselected one and\n// primary over a selected one while hovered, the two swapped once pressed.\nconst hoverLayers = {\n selected: {\n kWkggS: \"x659ado\",\n $$css: true\n },\n unselected: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n }\n};\n\n// A keyboard's focus draws the hover layer's colour at the focus opacity.\nconst focusLayers = {\n selected: {\n kWkggS: \"x1sog3nf\",\n $$css: true\n },\n unselected: {\n kWkggS: \"xwqhyid\",\n $$css: true\n }\n};\nconst pressedLayers = {\n selected: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n unselected: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n }\n};\ntype RadioGroupProps = {\n /** The radio buttons, each with a `value` of its own. */\n children?: ReactNode;\n /**\n * A hint under the group. Replaced by `error` when there is one, so the\n * two never stack.\n */\n description?: string;\n /**\n * The problem with the current selection, in words. Its presence is what\n * puts the group in its error state — the message, the label's colour and\n * `aria-invalid` on the group all follow from it.\n *\n * Outside a `Form` the message line arrives with the message, so the\n * field grows when this does and moves what is under it. A `Form` holds\n * that space from the start; so does a permanent `description`.\n */\n error?: string;\n /**\n * What the group is for. Required rather than optional: a set of radio\n * buttons with no name is a set a screen reader cannot introduce.\n */\n label: string;\n} & Omit<RACRadioGroupProps, 'children' | 'isInvalid' | 'validationBehavior'>;\ntype RadioProps = Omit<RadioFieldProps, 'children'> & {\n /**\n * The label, beside the button. A button that a row labels some other way\n * leaves it out and passes `aria-label` instead.\n *\n * A link or a button in it acts on its own, as in a native label, and\n * leaves the selection as it was. A press anywhere else in the label\n * selects this option.\n */\n children?: ReactNode;\n /** A hint under the label, read with the button. */\n description?: string;\n};\ntype Ripple = ReturnType<typeof useRipple<HTMLSpanElement>>;\n\n// What the label draws, chosen from the render state React Aria hands it.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs. The ripple's handlers and surface go on the\n// control while the button can change, and are left off while it cannot,\n// since a press that changes nothing should not look like one.\nfunction buttonContent(children: ReactNode, ripple: Ripple) {\n return (state: RadioButtonRenderProps) => {\n const interactive = !state.isDisabled && !state.isReadOnly;\n const tone = state.isSelected ? 'selected' : 'unselected';\n const active = state.isHovered || state.isPressed || state.isFocusVisible;\n return <>\n <span {...interactive ? ripple.handlers : {}} {...stylex.props(controlStyles.disc, styles.control, state.isSelected && styles.toneSelected, !state.isSelected && interactive && active && styles.toneActive, state.isDisabled && styles.toneDisabled, state.isReadOnly && controlStyles.controlReadOnly, state.isDisabled && controlStyles.controlDisabled, interactive && state.isHovered && hoverLayers[tone], interactive && state.isFocusVisible && focusLayers[tone], interactive && state.isPressed && pressedLayers[tone], state.isFocusVisible && focus.ringVisible)}>\n <span className=\"x12w9bfk x6s0dn4 x1qx5ct2 x1r7ld26 x16fbrrb x1y0btm7 xdh2fpr x9f619 x78zum5 xw4jnvo xl56j7k x1qno0dh xshfolx xpc4ca7\">\n {state.isSelected ? <span {...{\n 0: {\n className: \"xtwfq29 x1jzqe4 x170jfvy x16fbrrb x1fsd2vl\"\n },\n 1: {\n className: \"x170jfvy x16fbrrb x1fsd2vl xtwfq29 x1o55y2u\"\n }\n }[!!state.isDisabled << 0]} /> : null}\n </span>\n {interactive ? ripple.surface : null}\n </span>\n <ControlLabel state={state}>{children}</ControlLabel>\n </>;\n };\n}\n\n// The group's parts, from its render state: the label's colour follows\n// disabled and invalid the way a field's follows its box.\nfunction groupContent(label: string, children: ReactNode, description: string | undefined, error: string | undefined, horizontal: boolean) {\n return (state: RadioGroupRenderProps) => <>\n <FieldLabel isRequired={state.isRequired} state={state} variant=\"group\">\n {label}\n </FieldLabel>\n <div {...stylex.props(controlStyles.stack, horizontal && styles.itemsHorizontal)}>\n {children}\n </div>\n <FieldMessage description={description} error={error} inset={false} isDisabled={state.isDisabled} />\n </>;\n}\n\n// The option's button and its description, from the option's render state:\n// the description fades with the option whether the option is disabled by\n// itself or by its group, as its label does.\nfunction optionContent(button: ReactNode, description: string | undefined) {\n return ({\n isDisabled\n }: RadioFieldRenderProps) => <>\n {button}\n <ControlDescription isDisabled={isDisabled}>\n {description}\n </ControlDescription>\n </>;\n}\n\n/**\n * One option of a `RadioGroup`, with its label and optionally a description\n * under it. It names the entry it stands for with `value`; the selection is\n * the group's. Rendered on its own, outside a group, it has no state to\n * belong to.\n *\n * The call site's `className` and `style` land on the option as a whole,\n * which is the element a layout positions.\n */\nfunction Radio({\n children,\n description,\n ...props\n}: RadioProps & RefAttributes<HTMLDivElement>) {\n const ripple = useRipple<HTMLSpanElement>();\n return <RadioField {...props} {...mergeStatefulStyles(stylex.props(controlStyles.field), props)}>\n {optionContent(<RadioButton className=\"xjp7ctv\">\n {buttonContent(children, ripple)}\n </RadioButton>, description)}\n </RadioField>;\n}\n\n/**\n * A labelled set of radio buttons with one selected value between them. The\n * value is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let the group keep its own, and each `Radio` inside\n * names the entry it stands for. Arrow keys move the selection; disabled,\n * read-only and the error state reach every button from here, and\n * `orientation=\"horizontal\"` lays the buttons along a line.\n *\n * The call site's `className` and `style` land on the group as a whole,\n * which is the element a layout positions.\n */\nfunction RadioGroup({\n children,\n description,\n error,\n label,\n orientation = 'vertical',\n ...props\n}: RadioGroupProps & RefAttributes<HTMLDivElement>) {\n const validationBehavior = useFieldValidationBehavior();\n return <RACRadioGroup isInvalid={invalidFrom(error)} orientation={orientation} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldGroupStyles.root), props)}>\n {groupContent(label, children, description, error, orientation === 'horizontal')}\n </RACRadioGroup>;\n}\nexport type { RadioGroupProps, RadioProps };\nexport { Radio };\nexport default RadioGroup;"],"mappings":";;;;;;;;;;;;;;AA2CA,MAAMiC,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,OAAO;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AAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAmF,MAAAK,KAAAlE,oBAAoBhB,MAAaa,YAAgB2E,IAAK,GAAG1B,OAAK;CAC7I,MAAAqB,KAAAE,gBAAgB;CAAY,IAAAD;CAAA,IAAAP,EAAA,OAAArC,YAAAqC,EAAA,OAAApC,eAAAoC,EAAA,OAAAnC,SAAAmC,EAAA,OAAAlC,SAAAkC,EAAA,OAAAM,IAAA;EAA9EC,KAAAf,aAAa1B,OAAOH,UAAUC,aAAaC,OAAOyC,EAA4B;EAACN,EAAA,KAAArC;EAAAqC,EAAA,KAAApC;EAAAoC,EAAA,KAAAnC;EAAAmC,EAAA,KAAAlC;EAAAkC,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAC,MAAAD,EAAA,OAAAQ,eAAAR,EAAA,QAAAf,WAAAe,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,MAAAL,EAAA,QAAAO,MAAAP,EAAA,QAAAU,oBAAA;EAD7EE,KAAA,oBAAC,IAAD;GAA0B,WAAAR;GAAiCI;GAAiCE;GAAkB,GAAMzB;GAAK,GAAMoB;GACjIE,UAAAA;EADgB,CAAA;EAEHP,EAAA,KAAAC;EAAAD,EAAA,KAAAQ;EAAAR,EAAA,MAAAf;EAAAe,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAO;EAAAP,EAAA,MAAAU;EAAAV,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAFXY;AAEW"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","RadioGroupProps","RACRadioGroupProps","RadioButtonRenderProps","RadioFieldProps","RadioFieldRenderProps","RadioGroupRenderProps","stylex","RadioGroup","RACRadioGroup","RadioButton","RadioField","ControlDescription","ControlLabel","controlStyles","FieldLabel","FieldMessage","invalidFrom","useFieldValidationBehavior","groupStyles","fieldGroupStyles","useRipple","focus","mergeStatefulStyles","colors","motion","radii","spacing","stateLayerOpacity","FORCED_COLORS","styles","control","kMwMTN","$$css","itemsHorizontal","k1C7PZ","kXwgrk","kwnvtZ","toneActive","toneDisabled","toneSelected","hoverLayers","selected","kWkggS","unselected","focusLayers","pressedLayers","children","description","error","label","Omit","RadioProps","Ripple","ReturnType","HTMLSpanElement","buttonContent","ripple","state","interactive","isDisabled","isReadOnly","tone","isSelected","active","isHovered","isPressed","isFocusVisible","handlers","props","disc","controlReadOnly","controlDisabled","ringVisible","className","surface","groupContent","horizontal","isRequired","stack","optionContent","button","Radio","t0","$","T0","t1","field","t2","t3","t4","t5","orientation","undefined","validationBehavior","root","t6","stylex.props","_c","props","RadioGroup","RACRadioGroup","fieldGroupStyles"],"sources":["../../../src/components/radio-group/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { RadioGroupProps as RACRadioGroupProps, RadioButtonRenderProps, RadioFieldProps, RadioFieldRenderProps, RadioGroupRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { RadioGroup as RACRadioGroup, RadioButton, RadioField } from 'react-aria-components';\nimport { ControlDescription, ControlLabel } from '../../control';\nimport { controlStyles } from '../../control/styles';\nimport { FieldLabel, FieldMessage } from '../../field';\nimport { invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { groupStyles as fieldGroupStyles } from '../../field/styles';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\n\n// The radio button page: a 20dp ring inside a 40dp state layer, with a 48dp\n// target. Unselected, the ring is 2dp of on surface variant that turns on\n// surface while hovered, pressed or focused; selected, the ring and the 10dp\n// dot inside it are primary. Disabled is on surface at the disabled opacity\n// for both. The state layer is on surface over an unselected button and\n// primary over a selected one while hovered, and the two swap once pressed.\n// The page draws no error state for the button itself: an invalid group\n// says so through its label and message, and the buttons keep their colours.\n//\n// Two components from one module, since neither means anything without the\n// other: a radio button is a member of a group, and the group is what holds\n// the value. React Aria's `RadioGroup` is the group, a div with the label,\n// description and error slots; `RadioField` is one button's root, a div with\n// its description slot; and `RadioButton` is the label around the visually\n// hidden input, whose children draw the button from the render state React\n// Aria hands them. The field is the same two-column grid Checkbox uses, with\n// the label `display: contents` so the description lines up under the text.\n//\n// The adjacent label is body-large on surface, which the page keeps the same\n// whether or not the button is selected.\n//\n// A change of selection moves together: the ring's colour fades, and the dot\n// grows in from nothing or shrinks away, over the same duration and curve.\n// The dot is always drawn, at no size while the button is not selected.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst styles = {\n control: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n itemsHorizontal: {\n k1C7PZ: \"xpamuu5\",\n kXwgrk: \"x1q0g3np\",\n kwnvtZ: \"x1a02dak\",\n $$css: true\n },\n toneActive: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n toneDisabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n $$css: true\n },\n toneSelected: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n }\n};\n\n// The state layer follows the button: on surface over an unselected one and\n// primary over a selected one while hovered, the two swapped once pressed.\nconst hoverLayers = {\n selected: {\n kWkggS: \"x659ado\",\n $$css: true\n },\n unselected: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n }\n};\n\n// A keyboard's focus draws the hover layer's colour at the focus opacity.\nconst focusLayers = {\n selected: {\n kWkggS: \"x1sog3nf\",\n $$css: true\n },\n unselected: {\n kWkggS: \"xwqhyid\",\n $$css: true\n }\n};\nconst pressedLayers = {\n selected: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n unselected: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n }\n};\ntype RadioGroupProps = {\n /** The radio buttons, each with a `value` of its own. */\n children?: ReactNode;\n /**\n * A hint under the group. Replaced by `error` when there is one, so the\n * two never stack.\n */\n description?: string;\n /**\n * The problem with the current selection, in words. Its presence is what\n * puts the group in its error state — the message, the label's colour and\n * `aria-invalid` on the group all follow from it.\n *\n * Outside a `Form` the message line arrives with the message, so the\n * field grows when this does and moves what is under it. A `Form` holds\n * that space from the start; so does a permanent `description`.\n */\n error?: string;\n /**\n * What the group is for. Required rather than optional: a set of radio\n * buttons with no name is a set a screen reader cannot introduce.\n */\n label: string;\n} & Omit<RACRadioGroupProps, 'children' | 'isInvalid' | 'validationBehavior'>;\ntype RadioProps = Omit<RadioFieldProps, 'children'> & {\n /**\n * The label, beside the button. A button that a row labels some other way\n * leaves it out and passes `aria-label` instead.\n *\n * A link or a button in it acts on its own, as in a native label, and\n * leaves the selection as it was. A press anywhere else in the label\n * selects this option.\n */\n children?: ReactNode;\n /** A hint under the label, read with the button. */\n description?: string;\n};\ntype Ripple = ReturnType<typeof useRipple<HTMLSpanElement>>;\n\n// What the label draws, chosen from the render state React Aria hands it.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs. The ripple's handlers and surface go on the\n// control while the button can change, and are left off while it cannot,\n// since a press that changes nothing should not look like one.\nfunction buttonContent(children: ReactNode, ripple: Ripple) {\n return (state: RadioButtonRenderProps) => {\n const interactive = !state.isDisabled && !state.isReadOnly;\n const tone = state.isSelected ? 'selected' : 'unselected';\n const active = state.isHovered || state.isPressed || state.isFocusVisible;\n return <>\n <span {...interactive ? ripple.handlers : {}} {...stylex.props(controlStyles.disc, styles.control, state.isSelected && styles.toneSelected, !state.isSelected && interactive && active && styles.toneActive, state.isDisabled && styles.toneDisabled, state.isReadOnly && controlStyles.controlReadOnly, state.isDisabled && controlStyles.controlDisabled, interactive && state.isHovered && hoverLayers[tone], interactive && state.isFocusVisible && focusLayers[tone], interactive && state.isPressed && pressedLayers[tone], state.isFocusVisible && focus.ringVisible)}>\n <span className=\"x12w9bfk x6s0dn4 x1qx5ct2 x1r7ld26 x16fbrrb x1y0btm7 xdh2fpr x9f619 x78zum5 xw4jnvo xl56j7k x1qno0dh xshfolx xpc4ca7\">\n <span {...{\n 0: {\n className: \"x12w9bfk xtwfq29 x1jzqe4 x170jfvy x16fbrrb x1fsd2vl x1f85oc2 x1qno0dh xuo13n2 xpc4ca7\"\n },\n 2: {\n className: \"x12w9bfk xtwfq29 x1jzqe4 x170jfvy x16fbrrb x1fsd2vl x1qno0dh xuo13n2 xpc4ca7 x3oybdh\"\n },\n 1: {\n className: \"x12w9bfk x170jfvy x16fbrrb x1fsd2vl x1f85oc2 x1qno0dh xuo13n2 xpc4ca7 xtwfq29 x1o55y2u\"\n },\n 3: {\n className: \"x12w9bfk x170jfvy x16fbrrb x1fsd2vl x1qno0dh xuo13n2 xpc4ca7 x3oybdh xtwfq29 x1o55y2u\"\n }\n }[!!state.isSelected << 1 | !!state.isDisabled << 0]} />\n </span>\n {interactive ? ripple.surface : null}\n </span>\n <ControlLabel state={state}>{children}</ControlLabel>\n </>;\n };\n}\n\n// The group's parts, from its render state: the label's colour follows\n// disabled and invalid the way a field's follows its box.\nfunction groupContent(label: string, children: ReactNode, description: string | undefined, error: string | undefined, horizontal: boolean) {\n return (state: RadioGroupRenderProps) => <>\n <FieldLabel isRequired={state.isRequired} state={state} variant=\"group\">\n {label}\n </FieldLabel>\n <div {...stylex.props(controlStyles.stack, horizontal && styles.itemsHorizontal)}>\n {children}\n </div>\n <FieldMessage description={description} error={error} inset={false} isDisabled={state.isDisabled} />\n </>;\n}\n\n// The option's button and its description, from the option's render state:\n// the description fades with the option whether the option is disabled by\n// itself or by its group, as its label does.\nfunction optionContent(button: ReactNode, description: string | undefined) {\n return ({\n isDisabled\n }: RadioFieldRenderProps) => <>\n {button}\n <ControlDescription isDisabled={isDisabled}>\n {description}\n </ControlDescription>\n </>;\n}\n\n/**\n * One option of a `RadioGroup`, with its label and optionally a description\n * under it. It names the entry it stands for with `value`; the selection is\n * the group's. Rendered on its own, outside a group, it has no state to\n * belong to.\n *\n * The call site's `className` and `style` land on the option as a whole,\n * which is the element a layout positions.\n */\nfunction Radio({\n children,\n description,\n ...props\n}: RadioProps & RefAttributes<HTMLDivElement>) {\n const ripple = useRipple<HTMLSpanElement>();\n return <RadioField {...props} {...mergeStatefulStyles(stylex.props(controlStyles.field), props)}>\n {optionContent(<RadioButton className=\"xjp7ctv\">\n {buttonContent(children, ripple)}\n </RadioButton>, description)}\n </RadioField>;\n}\n\n/**\n * A labelled set of radio buttons with one selected value between them. The\n * value is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let the group keep its own, and each `Radio` inside\n * names the entry it stands for. Arrow keys move the selection; disabled,\n * read-only and the error state reach every button from here, and\n * `orientation=\"horizontal\"` lays the buttons along a line.\n *\n * ```tsx\n * <RadioGroup defaultValue=\"first\" label=\"Label\">\n * <Radio value=\"first\">First item</Radio>\n * <Radio value=\"second\">Second item</Radio>\n * </RadioGroup>\n * ```\n *\n * The call site's `className` and `style` land on the group as a whole,\n * which is the element a layout positions.\n */\nfunction RadioGroup({\n children,\n description,\n error,\n label,\n orientation = 'vertical',\n ...props\n}: RadioGroupProps & RefAttributes<HTMLDivElement>) {\n const validationBehavior = useFieldValidationBehavior();\n return <RACRadioGroup isInvalid={invalidFrom(error)} orientation={orientation} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldGroupStyles.root), props)}>\n {groupContent(label, children, description, error, orientation === 'horizontal')}\n </RACRadioGroup>;\n}\nexport type { RadioGroupProps, RadioProps };\nexport { Radio };\nexport default RadioGroup;"],"mappings":";;;;;;;;;;;;;;AA+CA,MAAMiC,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,OAAO;CACT;CACAC,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;EAAYuC,KAAAvE,YAAYgC,KAAK;EAACmC,EAAA,KAAAnC;EAAAmC,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAmF,MAAAK,KAAAlE,oBAAoBhB,MAAaa,YAAgB2E,IAAK,GAAG1B,OAAK;CAC7I,MAAAqB,KAAAE,gBAAgB;CAAY,IAAAD;CAAA,IAAAP,EAAA,OAAArC,YAAAqC,EAAA,OAAApC,eAAAoC,EAAA,OAAAnC,SAAAmC,EAAA,OAAAlC,SAAAkC,EAAA,OAAAM,IAAA;EAA9EC,KAAAf,aAAa1B,OAAOH,UAAUC,aAAaC,OAAOyC,EAA4B;EAACN,EAAA,KAAArC;EAAAqC,EAAA,KAAApC;EAAAoC,EAAA,KAAAnC;EAAAmC,EAAA,KAAAlC;EAAAkC,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAC,MAAAD,EAAA,OAAAQ,eAAAR,EAAA,QAAAf,WAAAe,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,MAAAL,EAAA,QAAAO,MAAAP,EAAA,QAAAU,oBAAA;EAD7EE,KAAA,oBAAC,IAAD;GAA0B,WAAAR;GAAiCI;GAAiCE;GAAkB,GAAMzB;GAAK,GAAMoB;GACjIE,UAAAA;EADgB,CAAA;EAEHP,EAAA,KAAAC;EAAAD,EAAA,KAAAQ;EAAAR,EAAA,MAAAf;EAAAe,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAO;EAAAP,EAAA,MAAAU;EAAAV,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAFXY;AAEW"}
|
|
@@ -41,11 +41,17 @@ type SearchFieldProps$1 = {
|
|
|
41
41
|
/**
|
|
42
42
|
* What the field searches, for a screen reader. The bar draws no label,
|
|
43
43
|
* so this is read and never shown; `placeholder` is what is seen.
|
|
44
|
+
*
|
|
45
|
+
* Write it so it contains the placeholder's words — `Search` beside a
|
|
46
|
+
* `Search` placeholder, or `Search people`. The placeholder is the only
|
|
47
|
+
* text a sighted reader has to call the field by, so it is what someone
|
|
48
|
+
* driving the page by voice says, and a name that does not contain it
|
|
49
|
+
* leaves them nothing to say.
|
|
44
50
|
*/
|
|
45
51
|
label: string;
|
|
46
52
|
/** The supporting text in the empty bar, which is what a person reads. */
|
|
47
53
|
placeholder?: string;
|
|
48
|
-
} & Omit<SearchFieldProps, 'children' | 'isInvalid' | 'validationBehavior'>;
|
|
54
|
+
} & Omit<SearchFieldProps, 'children' | 'enterKeyHint' | 'isInvalid' | 'validationBehavior'>;
|
|
49
55
|
/**
|
|
50
56
|
* A search bar: a keyword typed into a pill, submitted with Enter and
|
|
51
57
|
* cleared with Escape or its button. Its value is React Aria's: pass
|
|
@@ -53,11 +59,14 @@ type SearchFieldProps$1 = {
|
|
|
53
59
|
* its own; `onSubmit` is handed the value on Enter and `onClear` is called
|
|
54
60
|
* when it is emptied.
|
|
55
61
|
*
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <SearchField label="Search" onSubmit={search} placeholder="Search" />
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
56
66
|
* The call site's `className` and `style` land on the field as a whole,
|
|
57
67
|
* which is the element a layout positions. The input and the message are
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* share.
|
|
68
|
+
* drawn as every field in the library draws them; the pill around them is
|
|
69
|
+
* Material Design's search bar rather than the box of its text fields.
|
|
61
70
|
*/
|
|
62
71
|
declare function SearchField$1({ clearLabel, description, enterKeyHint, error, inputRef, isDisabled, label, placeholder, ...props }: RefAttributes<HTMLDivElement> & SearchFieldProps$1): import("react").JSX.Element;
|
|
63
72
|
//#endregion
|
|
@@ -22,7 +22,10 @@ function fieldContent(label, placeholder, clearLabel, description, error, inputR
|
|
|
22
22
|
3: { className: "x12w9bfk x6s0dn4 xs1ryiz x1dkaolv xx61lck x13rsnn2 x9f619 x78zum5 xxj4525 xh8yej3 xwnkcuf x1x84bn5 x12iqurn xi9ts3s x1jrff4x x1glmgrm xtrd051 x1qno0dh x106061f xpc4ca7 xepofeg xmnqt3w x1gnnqk1 x1xj74d8 x1bhcspo x1h6gzvc" }
|
|
23
23
|
}[!!state.isInvalid << 1 | !!state.isDisabled << 0],
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */ jsx(SearchGlyph, {
|
|
25
|
+
/* @__PURE__ */ jsx(SearchGlyph, { ...{
|
|
26
|
+
0: { className: "xxk0z11 x139gbkf x1lliihq x2lah0s xvy4d1p" },
|
|
27
|
+
1: { className: "xxk0z11 x1lliihq x2lah0s xvy4d1p x1heor9g" }
|
|
28
|
+
}[!!state.isDisabled << 0] }),
|
|
26
29
|
/* @__PURE__ */ jsx(FieldInput, {
|
|
27
30
|
placeholder,
|
|
28
31
|
ref: inputRef,
|
|
@@ -48,11 +51,14 @@ function fieldContent(label, placeholder, clearLabel, description, error, inputR
|
|
|
48
51
|
* its own; `onSubmit` is handed the value on Enter and `onClear` is called
|
|
49
52
|
* when it is emptied.
|
|
50
53
|
*
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <SearchField label="Search" onSubmit={search} placeholder="Search" />
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
51
58
|
* The call site's `className` and `style` land on the field as a whole,
|
|
52
59
|
* which is the element a layout positions. The input and the message are
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* share.
|
|
60
|
+
* drawn as every field in the library draws them; the pill around them is
|
|
61
|
+
* Material Design's search bar rather than the box of its text fields.
|
|
56
62
|
*/
|
|
57
63
|
function SearchField$1(t0) {
|
|
58
64
|
const $ = c(18);
|