@opsinjs/react 0.0.0-stage → 0.1.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/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.md +114 -2
- package/dist/components/accordion.d.ts +82 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +154 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-banner.d.ts +291 -0
- package/dist/components/alert-banner.d.ts.map +1 -0
- package/dist/components/alert-banner.js +529 -0
- package/dist/components/alert-banner.js.map +1 -0
- package/dist/components/avatar.d.ts +45 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +159 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +78 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +32 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/body-map.d.ts +51 -0
- package/dist/components/body-map.d.ts.map +1 -0
- package/dist/components/body-map.js +190 -0
- package/dist/components/body-map.js.map +1 -0
- package/dist/components/button.d.ts +260 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +609 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/callout.d.ts +99 -0
- package/dist/components/callout.d.ts.map +1 -0
- package/dist/components/callout.js +285 -0
- package/dist/components/callout.js.map +1 -0
- package/dist/components/card.d.ts +156 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +396 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/care-card.d.ts +182 -0
- package/dist/components/care-card.d.ts.map +1 -0
- package/dist/components/care-card.js +544 -0
- package/dist/components/care-card.js.map +1 -0
- package/dist/components/checkbox.d.ts +58 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +167 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/combobox.d.ts +71 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +204 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/consent-sheet.d.ts +186 -0
- package/dist/components/consent-sheet.d.ts.map +1 -0
- package/dist/components/consent-sheet.js +452 -0
- package/dist/components/consent-sheet.js.map +1 -0
- package/dist/components/dialog.d.ts +108 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +573 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/disclaimer-note.d.ts +144 -0
- package/dist/components/disclaimer-note.d.ts.map +1 -0
- package/dist/components/disclaimer-note.js +486 -0
- package/dist/components/disclaimer-note.js.map +1 -0
- package/dist/components/divider.d.ts +76 -0
- package/dist/components/divider.d.ts.map +1 -0
- package/dist/components/divider.js +101 -0
- package/dist/components/divider.js.map +1 -0
- package/dist/components/dose-tracker.d.ts +137 -0
- package/dist/components/dose-tracker.d.ts.map +1 -0
- package/dist/components/dose-tracker.js +154 -0
- package/dist/components/dose-tracker.js.map +1 -0
- package/dist/components/empty-state.d.ts +171 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +387 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/field.d.ts +195 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +282 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/goal-ring.d.ts +114 -0
- package/dist/components/goal-ring.d.ts.map +1 -0
- package/dist/components/goal-ring.js +254 -0
- package/dist/components/goal-ring.js.map +1 -0
- package/dist/components/icon-button.d.ts +124 -0
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +113 -0
- package/dist/components/icon-button.js.map +1 -0
- package/dist/components/link.d.ts +122 -0
- package/dist/components/link.d.ts.map +1 -0
- package/dist/components/link.js +164 -0
- package/dist/components/link.js.map +1 -0
- package/dist/components/log-sheet.d.ts +259 -0
- package/dist/components/log-sheet.d.ts.map +1 -0
- package/dist/components/log-sheet.js +437 -0
- package/dist/components/log-sheet.js.map +1 -0
- package/dist/components/menu.d.ts +69 -0
- package/dist/components/menu.d.ts.map +1 -0
- package/dist/components/menu.js +190 -0
- package/dist/components/menu.js.map +1 -0
- package/dist/components/metric-tile.d.ts +301 -0
- package/dist/components/metric-tile.d.ts.map +1 -0
- package/dist/components/metric-tile.js +533 -0
- package/dist/components/metric-tile.js.map +1 -0
- package/dist/components/number-field.d.ts +62 -0
- package/dist/components/number-field.d.ts.map +1 -0
- package/dist/components/number-field.js +134 -0
- package/dist/components/number-field.js.map +1 -0
- package/dist/components/popover.d.ts +70 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +174 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +83 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +140 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/questionnaire.d.ts +123 -0
- package/dist/components/questionnaire.d.ts.map +1 -0
- package/dist/components/questionnaire.js +148 -0
- package/dist/components/questionnaire.js.map +1 -0
- package/dist/components/radio-group.d.ts +66 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +186 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/range-bar.d.ts +172 -0
- package/dist/components/range-bar.d.ts.map +1 -0
- package/dist/components/range-bar.js +578 -0
- package/dist/components/range-bar.js.map +1 -0
- package/dist/components/range-legend.d.ts +97 -0
- package/dist/components/range-legend.d.ts.map +1 -0
- package/dist/components/range-legend.js +166 -0
- package/dist/components/range-legend.js.map +1 -0
- package/dist/components/reading-input.d.ts +225 -0
- package/dist/components/reading-input.d.ts.map +1 -0
- package/dist/components/reading-input.js +651 -0
- package/dist/components/reading-input.js.map +1 -0
- package/dist/components/relative-time.d.ts +177 -0
- package/dist/components/relative-time.d.ts.map +1 -0
- package/dist/components/relative-time.js +603 -0
- package/dist/components/relative-time.js.map +1 -0
- package/dist/components/result-card.d.ts +319 -0
- package/dist/components/result-card.d.ts.map +1 -0
- package/dist/components/result-card.js +614 -0
- package/dist/components/result-card.js.map +1 -0
- package/dist/components/scale-input.d.ts +58 -0
- package/dist/components/scale-input.d.ts.map +1 -0
- package/dist/components/scale-input.js +170 -0
- package/dist/components/scale-input.js.map +1 -0
- package/dist/components/score-dial.d.ts +205 -0
- package/dist/components/score-dial.d.ts.map +1 -0
- package/dist/components/score-dial.js +728 -0
- package/dist/components/score-dial.js.map +1 -0
- package/dist/components/scroll-area.d.ts +38 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +138 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/segmented-control.d.ts +69 -0
- package/dist/components/segmented-control.d.ts.map +1 -0
- package/dist/components/segmented-control.js +259 -0
- package/dist/components/segmented-control.js.map +1 -0
- package/dist/components/select.d.ts +72 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +205 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/sheet.d.ts +192 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +952 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.d.ts +104 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +266 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +55 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +170 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/source-citation.d.ts +127 -0
- package/dist/components/source-citation.d.ts.map +1 -0
- package/dist/components/source-citation.js +391 -0
- package/dist/components/source-citation.js.map +1 -0
- package/dist/components/spinner.d.ts +86 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +97 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/status-pill.d.ts +90 -0
- package/dist/components/status-pill.d.ts.map +1 -0
- package/dist/components/status-pill.js +259 -0
- package/dist/components/status-pill.js.map +1 -0
- package/dist/components/stepper.d.ts +99 -0
- package/dist/components/stepper.d.ts.map +1 -0
- package/dist/components/stepper.js +152 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/surface.d.ts +92 -0
- package/dist/components/surface.d.ts.map +1 -0
- package/dist/components/surface.js +261 -0
- package/dist/components/surface.js.map +1 -0
- package/dist/components/switch.d.ts +48 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +152 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/symptom-picker.d.ts +69 -0
- package/dist/components/symptom-picker.d.ts.map +1 -0
- package/dist/components/symptom-picker.js +170 -0
- package/dist/components/symptom-picker.js.map +1 -0
- package/dist/components/tab-bar.d.ts +110 -0
- package/dist/components/tab-bar.d.ts.map +1 -0
- package/dist/components/tab-bar.js +118 -0
- package/dist/components/tab-bar.js.map +1 -0
- package/dist/components/table.d.ts +117 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +65 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +106 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +136 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/term.d.ts +243 -0
- package/dist/components/term.d.ts.map +1 -0
- package/dist/components/term.js +562 -0
- package/dist/components/term.js.map +1 -0
- package/dist/components/textarea.d.ts +157 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +66 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/timeline-entry.d.ts +99 -0
- package/dist/components/timeline-entry.d.ts.map +1 -0
- package/dist/components/timeline-entry.js +47 -0
- package/dist/components/timeline-entry.js.map +1 -0
- package/dist/components/toast.d.ts +80 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +266 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/tooltip.d.ts +48 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +159 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/trend-sparkline.d.ts +188 -0
- package/dist/components/trend-sparkline.d.ts.map +1 -0
- package/dist/components/trend-sparkline.js +796 -0
- package/dist/components/trend-sparkline.js.map +1 -0
- package/dist/components/value.d.ts +150 -0
- package/dist/components/value.d.ts.map +1 -0
- package/dist/components/value.js +402 -0
- package/dist/components/value.js.map +1 -0
- package/dist/components/visually-hidden.d.ts +61 -0
- package/dist/components/visually-hidden.d.ts.map +1 -0
- package/dist/components/visually-hidden.js +172 -0
- package/dist/components/visually-hidden.js.map +1 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/opsinjs.d.ts +443 -0
- package/dist/opsinjs.d.ts.map +1 -0
- package/dist/opsinjs.js +906 -0
- package/dist/opsinjs.js.map +1 -0
- package/dist/status.d.ts +111 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +125 -0
- package/dist/status.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/utils.d.ts +20 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +82 -0
- package/dist/utils.js.map +1 -0
- package/package.json +86 -3
- package/styles/base.css +132 -0
- package/styles/roles.css +412 -0
- package/styles/standalone.css +20 -0
- package/styles/tailwind.css +18 -0
- package/styles/theme.css +309 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RangeBar shows where one reading sits against the range it is being compared
|
|
3
|
+
* with. The sentence is the component; the bar is a drawing of the sentence.
|
|
4
|
+
*
|
|
5
|
+
* WRITE THE SENTENCE FIRST, AND THE PICTURE SECOND. `RangeBar.Summary` is not a
|
|
6
|
+
* caption and not an accessibility afterthought: it is the entire payload, in
|
|
7
|
+
* words, and it is what a printout, a screen reader, a plain-text export and a
|
|
8
|
+
* monochrome screenshot are left holding. If the sentence is right the drawing
|
|
9
|
+
* is decoration; if the sentence is wrong, no amount of drawing repairs it.
|
|
10
|
+
* That is why it is never hidden, never removable, and rendered even when there
|
|
11
|
+
* is no bar to draw at all.
|
|
12
|
+
*
|
|
13
|
+
* IT DERIVES NO VERDICT. Everything this component computes is arithmetic on
|
|
14
|
+
* numbers the product supplied. It computes a position along a line, and the
|
|
15
|
+
* word "within", "above" or "below" for that position against the product's
|
|
16
|
+
* own bounds. `status` is an INPUT. RangeBar never turns "above the range" into
|
|
17
|
+
* "needs attention": that conversion needs a clinician or a validated rule, and
|
|
18
|
+
* it belongs to whoever owns the range. Most people sit outside at least one
|
|
19
|
+
* reference range at any moment, and an interface that treats outside as wrong
|
|
20
|
+
* produces anxiety rather than information.
|
|
21
|
+
*
|
|
22
|
+
* IT SHIPS NO RANGE, EVER. No default range, no population fallback, no range
|
|
23
|
+
* inferred from anybody's own history, not even in its demo,
|
|
24
|
+
* apps/www/registry/demos/range-bar.tsx. `ReferenceRange.source` is required
|
|
25
|
+
* because a band with no author is an assertion nobody signed; a range that
|
|
26
|
+
* arrives without one is reported as OPSIN-0004 and drawn as nothing at all,
|
|
27
|
+
* because a plausible band is worse than no band. The reader cannot tell the
|
|
28
|
+
* two apart. A range is not an interval when neither bound is supplied, or when
|
|
29
|
+
* the bounds run downwards. Such a range is discarded on the same terms, in the
|
|
30
|
+
* sentence as well as in the picture: the word "within" is what arithmetic
|
|
31
|
+
* falls through to, and "within the range" against bounds nobody gave is a
|
|
32
|
+
* reassurance derived from nothing.
|
|
33
|
+
*
|
|
34
|
+
* A BAR NEEDS TWO BOUNDS. A one-sided range ("up to 20") has no width, and a
|
|
35
|
+
* width is what a scale is made of; drawing one would mean inventing the other
|
|
36
|
+
* end. So the track appears only when both bounds are present and there is a
|
|
37
|
+
* reading to put on it. Every other case renders the sentence and no picture,
|
|
38
|
+
* which is the honest output rather than a degraded one.
|
|
39
|
+
*
|
|
40
|
+
* THE TWO AXES SIT ON DIFFERENT ELEMENTS, deliberately. `status` colours the
|
|
41
|
+
* tick and nothing else; `category` tints the label and nothing else. Neither
|
|
42
|
+
* ever reaches the track or the band, and no single element resolves both. A
|
|
43
|
+
* heart-red bar beside an attention-red bar is the collision the two-axis rule
|
|
44
|
+
* exists to prevent, and it is a collision the reader has no way to decode.
|
|
45
|
+
*
|
|
46
|
+
* NOTHING HERE ANIMATES. Not the tick sliding into position on first paint, not
|
|
47
|
+
* the band growing, not the number counting up. A health value that arrives by
|
|
48
|
+
* animation has displayed, for every frame of the journey, a reading that is
|
|
49
|
+
* not true.
|
|
50
|
+
*/
|
|
51
|
+
import { type ClinicalStatus, type HealthCategory, type ReferenceRange } from "../opsinjs.ts";
|
|
52
|
+
export interface RangeBarProps {
|
|
53
|
+
/**
|
|
54
|
+
* What was measured, in the reader's language rather than an internal code.
|
|
55
|
+
* It opens the summary sentence, so it reads as the subject of a sentence:
|
|
56
|
+
* "Morning blood pressure is …".
|
|
57
|
+
*/
|
|
58
|
+
label: string;
|
|
59
|
+
/**
|
|
60
|
+
* The measurement. `null` is a first-class state meaning there is no reading,
|
|
61
|
+
* distinct from `0`, and renders the words rather than a tick at zero. A
|
|
62
|
+
* mark at the bottom of a range is a reading, and a missing one is not.
|
|
63
|
+
*/
|
|
64
|
+
value: number | null;
|
|
65
|
+
/**
|
|
66
|
+
* Display symbol exactly as `tokens/units.json` spells it, as in "kg",
|
|
67
|
+
* "mmol/L" or "mg/dL". Every number this component renders goes through
|
|
68
|
+
* `Value`, which resolves the spoken form from that table, so a listener
|
|
69
|
+
* hears "milligrams per decilitre" rather than an improvised pronunciation.
|
|
70
|
+
*/
|
|
71
|
+
unit: string;
|
|
72
|
+
/**
|
|
73
|
+
* The range this reading is being compared with, and whose it is. Omit it
|
|
74
|
+
* entirely when none is available: the component then draws no band, says so
|
|
75
|
+
* in the summary, and substitutes nothing. `source` is required. A range
|
|
76
|
+
* with an empty one is reported as OPSIN-0004 and not drawn.
|
|
77
|
+
*/
|
|
78
|
+
range?: ReferenceRange;
|
|
79
|
+
/**
|
|
80
|
+
* The level of attention the PRODUCT has assigned to this reading. RangeBar
|
|
81
|
+
* never derives it from position on its own bar: "outside the range" and
|
|
82
|
+
* "needs attention" are different claims. Omitted, the tick is drawn in a
|
|
83
|
+
* neutral tone and no level is stated, which is the correct rendering of "no
|
|
84
|
+
* verdict has been made" rather than a quiet "nothing to see here".
|
|
85
|
+
*/
|
|
86
|
+
status?: ClinicalStatus;
|
|
87
|
+
/**
|
|
88
|
+
* What the reading is ABOUT, for findability in a screen full of readings. It
|
|
89
|
+
* tints the label and nothing else: never the track, the band or the tick.
|
|
90
|
+
* Typed to the six rather than to `string`, because a component that accepts
|
|
91
|
+
* an arbitrary category accepts a seventh ramp that does not exist.
|
|
92
|
+
*/
|
|
93
|
+
category?: HealthCategory;
|
|
94
|
+
/**
|
|
95
|
+
* DECIMAL PLACES, from the precision of the measurement. That is the
|
|
96
|
+
* resolution of the device, or the number of places the laboratory reported.
|
|
97
|
+
* Not significant figures: the same metric shown to a different number of
|
|
98
|
+
* decimal places at different magnitudes cannot be compared at a glance,
|
|
99
|
+
* which is what `health/numbers-units-precision` rule 2 forbids.
|
|
100
|
+
*
|
|
101
|
+
* It applies to the reading and to the two boundary labels alike, because a
|
|
102
|
+
* value and the bound it is being compared with are the same metric. It is
|
|
103
|
+
* required, so a TypeScript caller cannot ship a reading with no stated
|
|
104
|
+
* precision: an unstated precision is default float rendering, which
|
|
105
|
+
* `health/numbers-units-precision` rule 1 forbids anywhere. Required is not the
|
|
106
|
+
* same as defaulted. This component still invents no number of its own, because
|
|
107
|
+
* precision belongs to the metric rather than to the unit and nothing here
|
|
108
|
+
* could supply an honest one. The file ships as source into JavaScript
|
|
109
|
+
* projects, where a required prop is advice rather than a guarantee, so a
|
|
110
|
+
* caller who omits it there still gets the honest fallback, with nothing
|
|
111
|
+
* rounded and nothing padded.
|
|
112
|
+
*/
|
|
113
|
+
precision: number;
|
|
114
|
+
/**
|
|
115
|
+
* When the measurement was taken, ISO 8601. Rendered as a date in the
|
|
116
|
+
* footnote so that a number on a screen is not read as "now". Omitted, the
|
|
117
|
+
* footnote says that nobody knows when the reading was taken rather than
|
|
118
|
+
* saying nothing, because silence about a time is read as now.
|
|
119
|
+
*
|
|
120
|
+
* That is a recency signal, and it is not a staleness treatment. There is no
|
|
121
|
+
* `staleAfterHours` here and there will not be one: how old is too old is
|
|
122
|
+
* clinical, differs by metric, and opsinjs does not own it. A surface that
|
|
123
|
+
* needs a boundary wraps the reading in `RelativeTime`, which takes the
|
|
124
|
+
* boundary from you.
|
|
125
|
+
*
|
|
126
|
+
* A container that already states the instant itself can suppress this
|
|
127
|
+
* footnote sentence with `readingRecency="delegated"`. See that prop.
|
|
128
|
+
*/
|
|
129
|
+
measuredAt?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Who states when the reading was taken. Defaults to `"state"`, which is
|
|
132
|
+
* every existing caller's behaviour without exception: the footnote prints
|
|
133
|
+
* the reading's date, or prints that nobody knows when it was taken.
|
|
134
|
+
*
|
|
135
|
+
* `"delegated"` means the surrounding component states that instant itself,
|
|
136
|
+
* in view and in the accessibility tree, and takes responsibility for doing
|
|
137
|
+
* so; the bar then prints neither reading sentence. This exists to stop one
|
|
138
|
+
* card saying the same thing twice, not to make a number quieter about its
|
|
139
|
+
* age. A caller that passes `"delegated"` and then states nothing has removed
|
|
140
|
+
* a fact from the screen, which is the failure `measuredAt` exists to
|
|
141
|
+
* prevent. The one caller entitled to it is `ResultCard`, whose header
|
|
142
|
+
* carries the instant through `RelativeTime` with the absolute date always on
|
|
143
|
+
* screen. `measuredAt` is still passed under delegation, because it can feed
|
|
144
|
+
* an accessible name a container builds; it simply stops printing here.
|
|
145
|
+
*/
|
|
146
|
+
readingRecency?: "state" | "delegated";
|
|
147
|
+
/**
|
|
148
|
+
* Replaces the generated sentence. Use it for a unit whose phrasing does not
|
|
149
|
+
* fit the template, or for a reader whose language is not English. It cannot
|
|
150
|
+
* remove the sentence: there is no value of this prop that renders the
|
|
151
|
+
* component without one, because the sentence is the component.
|
|
152
|
+
*/
|
|
153
|
+
summary?: string;
|
|
154
|
+
/**
|
|
155
|
+
* BCP 47 locale for number separators, digit shapes and the dates in the
|
|
156
|
+
* footnote. Passed through to every `Value` this component renders, so one
|
|
157
|
+
* bar cannot show two conventions.
|
|
158
|
+
*
|
|
159
|
+
* This component renders on a server and again in a browser. With no locale
|
|
160
|
+
* the server formats with the host process's locale and the browser formats
|
|
161
|
+
* with the reader's, so where the two differ the number separators and the
|
|
162
|
+
* footnote date change under the reader on hydration and React reports a
|
|
163
|
+
* mismatch. Pass the locale the surface is rendered in, taken from wherever
|
|
164
|
+
* that surface already knows it. Omitting it does not hand formatting to the
|
|
165
|
+
* reader's own environment on the server; it hands it to the server's.
|
|
166
|
+
*/
|
|
167
|
+
locale?: string;
|
|
168
|
+
/** Merged onto the root. A class passed here wins where the two conflict. */
|
|
169
|
+
className?: string;
|
|
170
|
+
}
|
|
171
|
+
export declare function RangeBar({ label, value, unit, range, status, category, precision, measuredAt, readingRecency, summary, locale, className, }: RangeBarProps): import("react").JSX.Element;
|
|
172
|
+
//# sourceMappingURL=range-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-bar.d.ts","sourceRoot":"","sources":["../../src/components/range-bar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAMH,OAAO,EAAwG,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAA;AAuJnM,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IACtC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAiOD,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,cAAwB,EACxB,OAAO,EACP,MAAM,EACN,SAAS,GACV,EAAE,aAAa,+BAqhBf"}
|