@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.
Files changed (266) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +21 -0
  3. package/README.md +114 -2
  4. package/dist/components/accordion.d.ts +82 -0
  5. package/dist/components/accordion.d.ts.map +1 -0
  6. package/dist/components/accordion.js +154 -0
  7. package/dist/components/accordion.js.map +1 -0
  8. package/dist/components/alert-banner.d.ts +291 -0
  9. package/dist/components/alert-banner.d.ts.map +1 -0
  10. package/dist/components/alert-banner.js +529 -0
  11. package/dist/components/alert-banner.js.map +1 -0
  12. package/dist/components/avatar.d.ts +45 -0
  13. package/dist/components/avatar.d.ts.map +1 -0
  14. package/dist/components/avatar.js +159 -0
  15. package/dist/components/avatar.js.map +1 -0
  16. package/dist/components/badge.d.ts +78 -0
  17. package/dist/components/badge.d.ts.map +1 -0
  18. package/dist/components/badge.js +32 -0
  19. package/dist/components/badge.js.map +1 -0
  20. package/dist/components/body-map.d.ts +51 -0
  21. package/dist/components/body-map.d.ts.map +1 -0
  22. package/dist/components/body-map.js +190 -0
  23. package/dist/components/body-map.js.map +1 -0
  24. package/dist/components/button.d.ts +260 -0
  25. package/dist/components/button.d.ts.map +1 -0
  26. package/dist/components/button.js +609 -0
  27. package/dist/components/button.js.map +1 -0
  28. package/dist/components/callout.d.ts +99 -0
  29. package/dist/components/callout.d.ts.map +1 -0
  30. package/dist/components/callout.js +285 -0
  31. package/dist/components/callout.js.map +1 -0
  32. package/dist/components/card.d.ts +156 -0
  33. package/dist/components/card.d.ts.map +1 -0
  34. package/dist/components/card.js +396 -0
  35. package/dist/components/card.js.map +1 -0
  36. package/dist/components/care-card.d.ts +182 -0
  37. package/dist/components/care-card.d.ts.map +1 -0
  38. package/dist/components/care-card.js +544 -0
  39. package/dist/components/care-card.js.map +1 -0
  40. package/dist/components/checkbox.d.ts +58 -0
  41. package/dist/components/checkbox.d.ts.map +1 -0
  42. package/dist/components/checkbox.js +167 -0
  43. package/dist/components/checkbox.js.map +1 -0
  44. package/dist/components/combobox.d.ts +71 -0
  45. package/dist/components/combobox.d.ts.map +1 -0
  46. package/dist/components/combobox.js +204 -0
  47. package/dist/components/combobox.js.map +1 -0
  48. package/dist/components/consent-sheet.d.ts +186 -0
  49. package/dist/components/consent-sheet.d.ts.map +1 -0
  50. package/dist/components/consent-sheet.js +452 -0
  51. package/dist/components/consent-sheet.js.map +1 -0
  52. package/dist/components/dialog.d.ts +108 -0
  53. package/dist/components/dialog.d.ts.map +1 -0
  54. package/dist/components/dialog.js +573 -0
  55. package/dist/components/dialog.js.map +1 -0
  56. package/dist/components/disclaimer-note.d.ts +144 -0
  57. package/dist/components/disclaimer-note.d.ts.map +1 -0
  58. package/dist/components/disclaimer-note.js +486 -0
  59. package/dist/components/disclaimer-note.js.map +1 -0
  60. package/dist/components/divider.d.ts +76 -0
  61. package/dist/components/divider.d.ts.map +1 -0
  62. package/dist/components/divider.js +101 -0
  63. package/dist/components/divider.js.map +1 -0
  64. package/dist/components/dose-tracker.d.ts +137 -0
  65. package/dist/components/dose-tracker.d.ts.map +1 -0
  66. package/dist/components/dose-tracker.js +154 -0
  67. package/dist/components/dose-tracker.js.map +1 -0
  68. package/dist/components/empty-state.d.ts +171 -0
  69. package/dist/components/empty-state.d.ts.map +1 -0
  70. package/dist/components/empty-state.js +387 -0
  71. package/dist/components/empty-state.js.map +1 -0
  72. package/dist/components/field.d.ts +195 -0
  73. package/dist/components/field.d.ts.map +1 -0
  74. package/dist/components/field.js +282 -0
  75. package/dist/components/field.js.map +1 -0
  76. package/dist/components/goal-ring.d.ts +114 -0
  77. package/dist/components/goal-ring.d.ts.map +1 -0
  78. package/dist/components/goal-ring.js +254 -0
  79. package/dist/components/goal-ring.js.map +1 -0
  80. package/dist/components/icon-button.d.ts +124 -0
  81. package/dist/components/icon-button.d.ts.map +1 -0
  82. package/dist/components/icon-button.js +113 -0
  83. package/dist/components/icon-button.js.map +1 -0
  84. package/dist/components/link.d.ts +122 -0
  85. package/dist/components/link.d.ts.map +1 -0
  86. package/dist/components/link.js +164 -0
  87. package/dist/components/link.js.map +1 -0
  88. package/dist/components/log-sheet.d.ts +259 -0
  89. package/dist/components/log-sheet.d.ts.map +1 -0
  90. package/dist/components/log-sheet.js +437 -0
  91. package/dist/components/log-sheet.js.map +1 -0
  92. package/dist/components/menu.d.ts +69 -0
  93. package/dist/components/menu.d.ts.map +1 -0
  94. package/dist/components/menu.js +190 -0
  95. package/dist/components/menu.js.map +1 -0
  96. package/dist/components/metric-tile.d.ts +301 -0
  97. package/dist/components/metric-tile.d.ts.map +1 -0
  98. package/dist/components/metric-tile.js +533 -0
  99. package/dist/components/metric-tile.js.map +1 -0
  100. package/dist/components/number-field.d.ts +62 -0
  101. package/dist/components/number-field.d.ts.map +1 -0
  102. package/dist/components/number-field.js +134 -0
  103. package/dist/components/number-field.js.map +1 -0
  104. package/dist/components/popover.d.ts +70 -0
  105. package/dist/components/popover.d.ts.map +1 -0
  106. package/dist/components/popover.js +174 -0
  107. package/dist/components/popover.js.map +1 -0
  108. package/dist/components/progress.d.ts +83 -0
  109. package/dist/components/progress.d.ts.map +1 -0
  110. package/dist/components/progress.js +140 -0
  111. package/dist/components/progress.js.map +1 -0
  112. package/dist/components/questionnaire.d.ts +123 -0
  113. package/dist/components/questionnaire.d.ts.map +1 -0
  114. package/dist/components/questionnaire.js +148 -0
  115. package/dist/components/questionnaire.js.map +1 -0
  116. package/dist/components/radio-group.d.ts +66 -0
  117. package/dist/components/radio-group.d.ts.map +1 -0
  118. package/dist/components/radio-group.js +186 -0
  119. package/dist/components/radio-group.js.map +1 -0
  120. package/dist/components/range-bar.d.ts +172 -0
  121. package/dist/components/range-bar.d.ts.map +1 -0
  122. package/dist/components/range-bar.js +578 -0
  123. package/dist/components/range-bar.js.map +1 -0
  124. package/dist/components/range-legend.d.ts +97 -0
  125. package/dist/components/range-legend.d.ts.map +1 -0
  126. package/dist/components/range-legend.js +166 -0
  127. package/dist/components/range-legend.js.map +1 -0
  128. package/dist/components/reading-input.d.ts +225 -0
  129. package/dist/components/reading-input.d.ts.map +1 -0
  130. package/dist/components/reading-input.js +651 -0
  131. package/dist/components/reading-input.js.map +1 -0
  132. package/dist/components/relative-time.d.ts +177 -0
  133. package/dist/components/relative-time.d.ts.map +1 -0
  134. package/dist/components/relative-time.js +603 -0
  135. package/dist/components/relative-time.js.map +1 -0
  136. package/dist/components/result-card.d.ts +319 -0
  137. package/dist/components/result-card.d.ts.map +1 -0
  138. package/dist/components/result-card.js +614 -0
  139. package/dist/components/result-card.js.map +1 -0
  140. package/dist/components/scale-input.d.ts +58 -0
  141. package/dist/components/scale-input.d.ts.map +1 -0
  142. package/dist/components/scale-input.js +170 -0
  143. package/dist/components/scale-input.js.map +1 -0
  144. package/dist/components/score-dial.d.ts +205 -0
  145. package/dist/components/score-dial.d.ts.map +1 -0
  146. package/dist/components/score-dial.js +728 -0
  147. package/dist/components/score-dial.js.map +1 -0
  148. package/dist/components/scroll-area.d.ts +38 -0
  149. package/dist/components/scroll-area.d.ts.map +1 -0
  150. package/dist/components/scroll-area.js +138 -0
  151. package/dist/components/scroll-area.js.map +1 -0
  152. package/dist/components/segmented-control.d.ts +69 -0
  153. package/dist/components/segmented-control.d.ts.map +1 -0
  154. package/dist/components/segmented-control.js +259 -0
  155. package/dist/components/segmented-control.js.map +1 -0
  156. package/dist/components/select.d.ts +72 -0
  157. package/dist/components/select.d.ts.map +1 -0
  158. package/dist/components/select.js +205 -0
  159. package/dist/components/select.js.map +1 -0
  160. package/dist/components/sheet.d.ts +192 -0
  161. package/dist/components/sheet.d.ts.map +1 -0
  162. package/dist/components/sheet.js +952 -0
  163. package/dist/components/sheet.js.map +1 -0
  164. package/dist/components/skeleton.d.ts +104 -0
  165. package/dist/components/skeleton.d.ts.map +1 -0
  166. package/dist/components/skeleton.js +266 -0
  167. package/dist/components/skeleton.js.map +1 -0
  168. package/dist/components/slider.d.ts +55 -0
  169. package/dist/components/slider.d.ts.map +1 -0
  170. package/dist/components/slider.js +170 -0
  171. package/dist/components/slider.js.map +1 -0
  172. package/dist/components/source-citation.d.ts +127 -0
  173. package/dist/components/source-citation.d.ts.map +1 -0
  174. package/dist/components/source-citation.js +391 -0
  175. package/dist/components/source-citation.js.map +1 -0
  176. package/dist/components/spinner.d.ts +86 -0
  177. package/dist/components/spinner.d.ts.map +1 -0
  178. package/dist/components/spinner.js +97 -0
  179. package/dist/components/spinner.js.map +1 -0
  180. package/dist/components/status-pill.d.ts +90 -0
  181. package/dist/components/status-pill.d.ts.map +1 -0
  182. package/dist/components/status-pill.js +259 -0
  183. package/dist/components/status-pill.js.map +1 -0
  184. package/dist/components/stepper.d.ts +99 -0
  185. package/dist/components/stepper.d.ts.map +1 -0
  186. package/dist/components/stepper.js +152 -0
  187. package/dist/components/stepper.js.map +1 -0
  188. package/dist/components/surface.d.ts +92 -0
  189. package/dist/components/surface.d.ts.map +1 -0
  190. package/dist/components/surface.js +261 -0
  191. package/dist/components/surface.js.map +1 -0
  192. package/dist/components/switch.d.ts +48 -0
  193. package/dist/components/switch.d.ts.map +1 -0
  194. package/dist/components/switch.js +152 -0
  195. package/dist/components/switch.js.map +1 -0
  196. package/dist/components/symptom-picker.d.ts +69 -0
  197. package/dist/components/symptom-picker.d.ts.map +1 -0
  198. package/dist/components/symptom-picker.js +170 -0
  199. package/dist/components/symptom-picker.js.map +1 -0
  200. package/dist/components/tab-bar.d.ts +110 -0
  201. package/dist/components/tab-bar.d.ts.map +1 -0
  202. package/dist/components/tab-bar.js +118 -0
  203. package/dist/components/tab-bar.js.map +1 -0
  204. package/dist/components/table.d.ts +117 -0
  205. package/dist/components/table.d.ts.map +1 -0
  206. package/dist/components/table.js +65 -0
  207. package/dist/components/table.js.map +1 -0
  208. package/dist/components/tabs.d.ts +106 -0
  209. package/dist/components/tabs.d.ts.map +1 -0
  210. package/dist/components/tabs.js +136 -0
  211. package/dist/components/tabs.js.map +1 -0
  212. package/dist/components/term.d.ts +243 -0
  213. package/dist/components/term.d.ts.map +1 -0
  214. package/dist/components/term.js +562 -0
  215. package/dist/components/term.js.map +1 -0
  216. package/dist/components/textarea.d.ts +157 -0
  217. package/dist/components/textarea.d.ts.map +1 -0
  218. package/dist/components/textarea.js +66 -0
  219. package/dist/components/textarea.js.map +1 -0
  220. package/dist/components/timeline-entry.d.ts +99 -0
  221. package/dist/components/timeline-entry.d.ts.map +1 -0
  222. package/dist/components/timeline-entry.js +47 -0
  223. package/dist/components/timeline-entry.js.map +1 -0
  224. package/dist/components/toast.d.ts +80 -0
  225. package/dist/components/toast.d.ts.map +1 -0
  226. package/dist/components/toast.js +266 -0
  227. package/dist/components/toast.js.map +1 -0
  228. package/dist/components/tooltip.d.ts +48 -0
  229. package/dist/components/tooltip.d.ts.map +1 -0
  230. package/dist/components/tooltip.js +159 -0
  231. package/dist/components/tooltip.js.map +1 -0
  232. package/dist/components/trend-sparkline.d.ts +188 -0
  233. package/dist/components/trend-sparkline.d.ts.map +1 -0
  234. package/dist/components/trend-sparkline.js +796 -0
  235. package/dist/components/trend-sparkline.js.map +1 -0
  236. package/dist/components/value.d.ts +150 -0
  237. package/dist/components/value.d.ts.map +1 -0
  238. package/dist/components/value.js +402 -0
  239. package/dist/components/value.js.map +1 -0
  240. package/dist/components/visually-hidden.d.ts +61 -0
  241. package/dist/components/visually-hidden.d.ts.map +1 -0
  242. package/dist/components/visually-hidden.js +172 -0
  243. package/dist/components/visually-hidden.js.map +1 -0
  244. package/dist/index.d.ts +63 -0
  245. package/dist/index.d.ts.map +1 -0
  246. package/dist/index.js +72 -0
  247. package/dist/index.js.map +1 -0
  248. package/dist/opsinjs.d.ts +443 -0
  249. package/dist/opsinjs.d.ts.map +1 -0
  250. package/dist/opsinjs.js +906 -0
  251. package/dist/opsinjs.js.map +1 -0
  252. package/dist/status.d.ts +111 -0
  253. package/dist/status.d.ts.map +1 -0
  254. package/dist/status.js +125 -0
  255. package/dist/status.js.map +1 -0
  256. package/dist/styles.css +2 -0
  257. package/dist/utils.d.ts +20 -0
  258. package/dist/utils.d.ts.map +1 -0
  259. package/dist/utils.js +82 -0
  260. package/dist/utils.js.map +1 -0
  261. package/package.json +86 -3
  262. package/styles/base.css +132 -0
  263. package/styles/roles.css +412 -0
  264. package/styles/standalone.css +20 -0
  265. package/styles/tailwind.css +18 -0
  266. package/styles/theme.css +309 -0
@@ -0,0 +1,58 @@
1
+ export interface ScaleInputProps {
2
+ /**
3
+ * Required. What is being rated, applied as the `aria-label` on the radiogroup
4
+ * so a screen-reader user hears the question before its points. Name the thing
5
+ * the reader is rating, "Comfort right now" rather than "1 to 10". There is no
6
+ * default, because a guessed name would describe the wrong thing on most
7
+ * screens, and a radiogroup with no accessible name is a set of radios a reader
8
+ * cannot place.
9
+ */
10
+ label: string;
11
+ /**
12
+ * How many points the scale has, supplied by the product from whichever
13
+ * instrument it uses. The points are numbered 1 to `points`. There is no
14
+ * default: opsinjs ships no scale length of its own, because the number of
15
+ * points is part of what makes a rating comparable over time and belongs to the
16
+ * product. Fewer than two points is not a scale, and it renders nothing with a
17
+ * development warning.
18
+ */
19
+ points: number;
20
+ /**
21
+ * The chosen point, from 1 to `points`, or `null` for no answer yet. This is a
22
+ * controlled component with no internal selection state: the product stores the
23
+ * value and passes it back. `null` draws the scale with nothing chosen rather
24
+ * than defaulting to a middle point, so an unanswered scale is honestly empty
25
+ * and the product can tell it from any real rating. A number outside 1 to
26
+ * `points` draws nothing chosen and warns in development.
27
+ */
28
+ value: number | null;
29
+ /**
30
+ * Called with the point the reader chose, from 1 to `points`. The product
31
+ * stores it and passes it back as `value`; the scale keeps no state of its own
32
+ * and derives nothing from the number.
33
+ */
34
+ onValueChange: (value: number) => void;
35
+ /**
36
+ * The word for the low end of the scale, supplied by the product, shown under
37
+ * the first point and read to a screen-reader user as part of that point. Omit
38
+ * it for a bare numeric scale with no end words. opsinjs ships no anchor words,
39
+ * because the end words belong to the product's instrument.
40
+ */
41
+ minLabel?: string;
42
+ /**
43
+ * The word for the high end of the scale, supplied by the product, shown under
44
+ * the last point and read to a screen-reader user as part of that point. Omit
45
+ * it for a bare numeric scale with no end words.
46
+ */
47
+ maxLabel?: string;
48
+ /**
49
+ * Merged onto the root. Width, margin and place in a layout belong here. It is
50
+ * the one route by which colour can reach the scale, and the two-colour-axes
51
+ * rule applies to it in full: a rating scale takes neither a status nor a
52
+ * category tint, because a self-report is on neither axis. A class you pass wins
53
+ * over the root's own where the two conflict, because it is merged last.
54
+ */
55
+ className?: string;
56
+ }
57
+ export declare function ScaleInput({ label, points, value, onValueChange, minLabel, maxLabel, className, }: ScaleInputProps): import("react").JSX.Element | null;
58
+ //# sourceMappingURL=scale-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scale-input.d.ts","sourceRoot":"","sources":["../../src/components/scale-input.tsx"],"names":[],"mappings":"AAwIA,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;;;OAIG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,eAAe,sCAyFjB"}
@@ -0,0 +1,170 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * ScaleInput is a row of numbered points for a self-report the product reads:
5
+ * a rating between two ends, where the reader taps one point to say where they
6
+ * sit. Its home is a single question a product asks over and over so a reader
7
+ * can watch it move, a comfort rating or a mood rating being the shape it was
8
+ * built for, where the same scale on Monday and on Friday is the whole value.
9
+ *
10
+ * IT SHIPS NO SCALE OF ITS OWN, AND THAT IS THE REASON THE ROSTER DECLINED IT
11
+ * FOR SO LONG. A rating scale is only comparable over time when its number of
12
+ * points and its end words stay fixed, and those belong to whichever validated
13
+ * instrument the consuming product has chosen rather than to a component
14
+ * library. So this component ships no anchor words, no default number of points,
15
+ * no scale, no scoring and no reading of what a point means. The reader is
16
+ * rating something the product names through `label`; the scale runs across as
17
+ * many points as the product passes through `points`; and the two end words, if
18
+ * there are any, arrive through `minLabel` and `maxLabel`. opsinjs supplies the
19
+ * chrome and the keyboard behaviour and nothing a clinician would recognise.
20
+ *
21
+ * IT RECORDS A SELF-REPORT AND DERIVES NOTHING FROM IT. The value is the point
22
+ * the reader chose, handed straight back to the product through `onValueChange`.
23
+ * This component adds no total, no band, no verdict and no interpretation on top
24
+ * of it. A rating is what the reader says about themselves, so the product owns
25
+ * what the number means and what, if anything, happens next.
26
+ *
27
+ * IT IS BUILT ON BASE UI'S RadioGroup, AND IT IS ONE TAB STOP. A rating is a
28
+ * single choice from N points, so the tested pattern is a radio group: the group
29
+ * takes one tab stop, each point is a `role="radio"` with `aria-checked`, and the
30
+ * Arrow keys move a roving focus along the row while selection follows focus.
31
+ * That is the WAI-ARIA radio group pattern rather than a bespoke one nobody has
32
+ * listened to, and it is the same primitive `radio-group.tsx` and
33
+ * `segmented-control.tsx` are built on. A row of ten separate buttons would be
34
+ * ten tab stops, which is exactly the contract this control exists to refuse.
35
+ *
36
+ * NEITHER COLOUR AXIS, AND THE SELECTED POINT IS PRIMARY EMPHASIS RATHER THAN A
37
+ * STATUS. The chosen point is filled with the neutral primary role, the same
38
+ * fill `checkbox.tsx` uses for a ticked box, and it is deliberately not painted
39
+ * from the clinical status axis. A rating is a self-report, not a verdict, so a
40
+ * point at the far end must not be dressed as urgent by the component: whether a
41
+ * high rating matters is the product's to say through its own status surfaces,
42
+ * with the word and the glyph those surfaces carry. This component therefore
43
+ * writes neither `data-status` nor `data-category` and draws only neutral chrome.
44
+ *
45
+ * NULL IS AN HONEST EMPTY STATE. Before the reader answers, `value` is `null` and
46
+ * the row draws with no point chosen rather than defaulting to a middle point the
47
+ * reader never picked. A rating library that guessed a starting answer would put
48
+ * words in the reader's mouth, so the empty scale stays empty until it is
49
+ * answered, and the product can tell "no answer yet" from any real point.
50
+ */
51
+ import { Radio } from "@base-ui/react/radio";
52
+ import { RadioGroup as BaseRadioGroup } from "@base-ui/react/radio-group";
53
+ import { isDevelopment } from "../opsinjs.js";
54
+ import { cn } from "../utils.js";
55
+ /**
56
+ * The root, spelled once. A vertical stack that holds the row of points and,
57
+ * beneath it, the two end words. It draws colour from neither axis and sets no
58
+ * surface of its own, so the points sit on whatever ground the product provides.
59
+ */
60
+ const ROOT = "flex w-full flex-col gap-opsin-2";
61
+ /**
62
+ * The row of points, spelled once. It wraps rather than scrolls sideways, so a
63
+ * ten point scale on a narrow phone folds onto a second line where every point
64
+ * still clears the target floor, instead of shrinking below it to stay on one
65
+ * row.
66
+ */
67
+ const TRACK = "flex w-full flex-wrap gap-opsin-1";
68
+ /**
69
+ * One point, spelled once.
70
+ *
71
+ * The chosen point is carried four ways so none of them is load-bearing alone:
72
+ * `aria-checked` for assistive technology, the accent fill for a sighted reader,
73
+ * and the loss of the resting hairline as the fill takes over for greyscale. Under
74
+ * `forced-colors: active` the fill is flattened and a transparent border would
75
+ * leave the chosen point unmarked, so the point repaints to the system `Highlight`
76
+ * with `HighlightText` ink and a `Highlight` border, the same repair `button.tsx`
77
+ * makes on its primary control, which keeps the selection distinct in that mode.
78
+ * The fill is the accent fill, `--brand` inside its `--brand-edge` rim (ADR 0029),
79
+ * rather than a status colour, because the point is a rating the reader gave, not
80
+ * a level the component reached.
81
+ *
82
+ * The ink is written as the arbitrary property `[color:var(--foreground)]` and
83
+ * the selected ink as `[color:var(--brand-foreground)]`, not `text-foreground`
84
+ * or a `text-*` colour, for the reason `button.tsx` records at length:
85
+ * tailwind-merge files a `text-*` colour in the same group as the `text-opsin-*`
86
+ * type step and drops one of them, so the arbitrary property keeps both the size
87
+ * and the ink. A disabled point drops to the measured muted ink rather than an
88
+ * opacity wash, so the number stays legible while it reads as unavailable, and
89
+ * the Arrow keys skip it.
90
+ *
91
+ * The focus ring is carried here rather than left to the product stylesheet, so a
92
+ * project installed without that sheet does not lose it, and the target floors at
93
+ * `--opsin-target-minimum` in rem on both axes so a 44pt point survives and grows
94
+ * with the reader's text size rather than pinning at a device pixel.
95
+ */
96
+ const POINT = "relative inline-flex flex-1 select-none items-center justify-center " +
97
+ "min-h-(--opsin-target-minimum,2.75rem) min-w-(--opsin-target-minimum,2.75rem) " +
98
+ "cursor-pointer rounded-opsin-md border border-border bg-card align-middle " +
99
+ "text-opsin-headline font-medium [color:var(--foreground)] " +
100
+ "transition-colors duration-(--opsin-duration-fast) ease-opsin-standard " +
101
+ "data-[unchecked]:hover:bg-state-hover " +
102
+ "data-[checked]:border-brand-edge data-[checked]:bg-brand data-[checked]:[color:var(--brand-foreground)] " +
103
+ "data-[checked]:forced-colors:[background-color:Highlight] data-[checked]:forced-colors:[color:HighlightText] data-[checked]:forced-colors:border-[Highlight] data-[checked]:forced-colors:forced-color-adjust-none " +
104
+ "data-[disabled]:cursor-not-allowed data-[disabled]:[color:var(--muted-foreground)] data-[disabled]:hover:bg-transparent " +
105
+ "focus-visible:outline-[length:var(--opsin-border-focus,2px)] focus-visible:outline-offset-[var(--opsin-border-focus-offset,2px)] focus-visible:outline-ring";
106
+ /**
107
+ * The two end words row, spelled once. `justify-between` pins the minimum word
108
+ * under the first point and the maximum word under the last, and the words sit in
109
+ * the muted ink a couple of steps quieter than the points, because they name the
110
+ * ends of the scale rather than competing with the reader's answer.
111
+ */
112
+ const ANCHORS = "flex w-full items-start justify-between gap-opsin-4 text-opsin-footnote [color:var(--muted-foreground)]";
113
+ /**
114
+ * Development warnings, said once per distinct offender. Nothing here has an
115
+ * `OpsinErrorCode`: the codes in `tokens/errors.json` describe mistakes a
116
+ * consumer makes with the clinical API, and a rating scale asserts nothing
117
+ * clinical of its own. `radio-group.tsx` and `segmented-control.tsx` keep the
118
+ * same small set for the same reason.
119
+ */
120
+ const warned = new Set();
121
+ function warnDev(key, message) {
122
+ if (!isDevelopment() || warned.has(key))
123
+ return;
124
+ warned.add(key);
125
+ console.warn(message);
126
+ }
127
+ export function ScaleInput({ label, points, value, onValueChange, minLabel, maxLabel, className, }) {
128
+ const count = Number.isInteger(points) ? points : 0;
129
+ if (isDevelopment()) {
130
+ if (!Number.isInteger(points) || points < 2) {
131
+ warnDev("points", "[opsinjs] <ScaleInput> needs `points` to be a whole number of two or " +
132
+ "more. A rating with one point is not a scale, and opsinjs ships no " +
133
+ "scale length of its own: pass the number of points from the instrument " +
134
+ "the product uses.");
135
+ }
136
+ if (typeof label !== "string" || label.trim() === "") {
137
+ warnDev("no-label", "[opsinjs] <ScaleInput> was rendered with no `label`. The row is a " +
138
+ "radiogroup and needs an accessible name: without one a screen-reader " +
139
+ "user hears a set of radios with no idea what they rate. Pass `label` " +
140
+ 'with the thing being rated, such as "Comfort right now".');
141
+ }
142
+ if (value !== null && (!Number.isInteger(value) || value < 1 || value > count)) {
143
+ warnDev(`value-out-of-range:${String(value)}`, `[opsinjs] <ScaleInput value={${String(value)}}> is outside 1 to ${String(count)}, ` +
144
+ "so the row renders with nothing chosen. This is a controlled component: " +
145
+ "pass a whole number from 1 to `points`, or `null` for no answer yet.");
146
+ }
147
+ }
148
+ if (!Number.isInteger(points) || points < 2) {
149
+ return null;
150
+ }
151
+ const chosen = value !== null && Number.isInteger(value) && value >= 1 && value <= count;
152
+ const groupValue = chosen ? value : null;
153
+ const hasAnchors = (typeof minLabel === "string" && minLabel.trim() !== "") ||
154
+ (typeof maxLabel === "string" && maxLabel.trim() !== "");
155
+ const anchorFor = (point) => {
156
+ if (point === 1 && typeof minLabel === "string" && minLabel.trim() !== "") {
157
+ return `${point}, ${minLabel}`;
158
+ }
159
+ if (point === count && typeof maxLabel === "string" && maxLabel.trim() !== "") {
160
+ return `${point}, ${maxLabel}`;
161
+ }
162
+ return undefined;
163
+ };
164
+ return (_jsxs(BaseRadioGroup, { "data-slot": "scale-input", "aria-label": label, value: groupValue, onValueChange: (next) => onValueChange(Number(next)), className: cn(ROOT, className), children: [_jsx("div", { "data-slot": "scale-input-track", className: TRACK, children: Array.from({ length: count }, (_, index) => {
165
+ const point = index + 1;
166
+ const spoken = anchorFor(point);
167
+ return (_jsx(Radio.Root, { value: point, "aria-label": spoken, "data-slot": "scale-input-option", className: POINT, children: _jsx("span", { "data-slot": "scale-input-option-label", children: point }) }, point));
168
+ }) }), hasAnchors ? (_jsxs("div", { className: ANCHORS, children: [_jsx("span", { "data-slot": "scale-input-anchor", children: minLabel ?? "" }), _jsx("span", { "data-slot": "scale-input-anchor", className: "text-right", children: maxLabel ?? "" })] })) : null] }));
169
+ }
170
+ //# sourceMappingURL=scale-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scale-input.js","sourceRoot":"","sources":["../../src/components/scale-input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC;;;;GAIG;AACH,MAAM,IAAI,GAAG,kCAAkC,CAAA;AAE/C;;;;;GAKG;AACH,MAAM,KAAK,GAAG,mCAAmC,CAAA;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,KAAK,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A;QAChC,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC,CAAA;IAED,OAAO,CACL,MAAC,cAAc,iBACH,aAAa,gBACX,KAAK,EACjB,KAAK,EAAE,UAAU,EACjB,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EACpD,SAAS,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,aAE9B,2BAAe,mBAAmB,EAAC,SAAS,EAAE,KAAK,YAChD,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;oBAC1C,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,CAAA;oBACvB,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;oBAC/B,OAAO,CACL,KAAC,KAAK,CAAC,IAAI,IAET,KAAK,EAAE,KAAK,gBACA,MAAM,eACR,oBAAoB,EAC9B,SAAS,EAAE,KAAK,YAEhB,4BAAgB,0BAA0B,YAAE,KAAK,GAAQ,IANpD,KAAK,CAOC,CACd,CAAA;gBACH,CAAC,CAAC,GACE,EACL,UAAU,CAAC,CAAC,CAAC,CACZ,eAAK,SAAS,EAAE,OAAO,aACrB,4BAAgB,oBAAoB,YAAE,QAAQ,IAAI,EAAE,GAAQ,EAC5D,4BAAgB,oBAAoB,EAAC,SAAS,EAAC,YAAY,YACxD,QAAQ,IAAI,EAAE,GACV,IACH,CACP,CAAC,CAAC,CAAC,IAAI,IACO,CAClB,CAAA;AACH,CAAC"}
@@ -0,0 +1,205 @@
1
+ /**
2
+ * ScoreDial is a composite number somebody's product calculated, drawn as an
3
+ * arc, with the band it falls in named in words and a sentence saying what the
4
+ * number is made of.
5
+ *
6
+ * THE RING IS THE DANGEROUS PART, and everything below is arranged around it. A
7
+ * number inside a ring reads as authoritative, complete and personal however
8
+ * thin the evidence behind it is, and a ring that fills up reads as a mark out
9
+ * of a maximum. So the arc is never the message: it is a picture of where a
10
+ * number the product supplied sits between two bounds the product supplied, and
11
+ * the words beside it carry everything a reader needs. Cover the arc with your
12
+ * hand and nothing is lost.
13
+ *
14
+ * OPSINJS SHIPS NO BANDS, NO SCALES AND NO CUT-OFFS. `bands` is a required prop
15
+ * and it is the caller's: their boundaries, their names, and the name of
16
+ * whoever chose them. Handed none, this component renders the number and says
17
+ * in words that it has no band for it, because a default band set would be a
18
+ * score interpretation with no clinical owner. That is the single worst thing
19
+ * this file could contain. The zero-prop demo,
20
+ * apps/www/registry/demos/score-dial.tsx, therefore has no bands at all, since
21
+ * a developer who copies it would copy the bands with it.
22
+ *
23
+ * IT ASSIGNS NO LEVEL. Band membership is arithmetic and it selects a NAME.
24
+ * That is the product's own word for a stretch of its own scale. It never
25
+ * selects a clinical status: `status` is a top-level prop, it is the product's
26
+ * verdict on this reading, and this component has no rule anywhere of the shape
27
+ * "if the score is past here then it is serious". An earlier version of this
28
+ * file hung `status` off each band and let the comparison pick one, which meant
29
+ * a rendering component was deciding what somebody's number meant. It no longer
30
+ * does. `CLINICAL_STATUS_META.watch.assignedBy` is "The consuming product, from
31
+ * a reference range it owns", and that is now literally who assigned it.
32
+ *
33
+ * AND IT PLACES NOTHING IT CANNOT PLACE HONESTLY. A score outside the scale it
34
+ * was given gets no mark at all and a sentence saying so, rather than a mark
35
+ * pinned to the end of the arc. A clamped indicator draws 140 and 100 in the
36
+ * same place, which is the picture saying something definite and false while
37
+ * the words say something true.
38
+ *
39
+ * WHY `role="img"` AND NOT `meter`. `meter` is exactly the role a dial looks
40
+ * like it wants and exactly the one it must not have: it announces a value
41
+ * within a range, which is the assertion this component is not entitled to
42
+ * make, and it carries no band vocabulary. `progressbar` is worse. It implies
43
+ * a task advancing towards completion, and a score is something that happened
44
+ * to a person rather than something they are part-way through. `slider` implies
45
+ * a value they can change. So: a labelled image, never focusable, never in the
46
+ * tab order, with a mandatory visible text twin beside it.
47
+ *
48
+ * THE TWIN IS NOT AN OPTION AND NO PROP OF THIS COMPONENT TURNS IT OFF.
49
+ * `ScoreDial.BandName` and `ScoreDial.Derivation` always render, visibly, in
50
+ * the document. The one way a caller can still lose them is `className`. A
51
+ * class that clips or hides wins the merge, and the doc comment on that prop
52
+ * says so. The measured CVD audit in `tokens/color.json` is why a graphic is
53
+ * worse than a pill here: four ordered levels cannot be made mutually
54
+ * distinguishable by hue for every form of colour vision, and an arc has no
55
+ * word in it at all.
56
+ *
57
+ * NOTHING ANIMATES. Not on first paint, not on a change, not under any prop.
58
+ * `health/motion-in-health-ui` names the dial sweep specifically, and a sweep
59
+ * has displayed, for every frame of its travel, a score that is not true.
60
+ */
61
+ import { type HealthCategory } from "../opsinjs.ts";
62
+ /**
63
+ * The two levels a dial may carry, and the two it refuses.
64
+ *
65
+ * `attention` "always carries a named action" and `urgent` puts the action in
66
+ * the first line. That is `health/clinical-status-semantics`, not a house
67
+ * style. This component has nowhere to put an action: it renders a number, a
68
+ * band name and a sentence about arithmetic, and a bare "Urgent" beside a
69
+ * composite score is a level with no route to a person attached to it. So the
70
+ * two upper levels are refused rather than rendered flat, and the refusal is
71
+ * reported. A score that needs somebody to act belongs in a CareCard, which has
72
+ * the action, or an AlertBanner, which has the assertive live region.
73
+ */
74
+ declare const DIAL_STATUSES: readonly ["steady", "watch"];
75
+ type DialStatus = (typeof DIAL_STATUSES)[number];
76
+ /**
77
+ * One named region of the scale, defined by the consuming product.
78
+ *
79
+ * Half-open: `from` is inclusive and `to` is exclusive, so contiguous bands can
80
+ * be written without a gap and without an overlap. The one exception is the top
81
+ * of the scale. A score exactly equal to `max` falls in the band whose `to` is
82
+ * `max`, because otherwise the highest score a scale allows would belong to no
83
+ * band at all.
84
+ */
85
+ export interface ScoreBand {
86
+ /** Inclusive lower bound, on the score's own scale. */
87
+ from: number;
88
+ /** Exclusive upper bound, on the score's own scale. */
89
+ to: number;
90
+ /**
91
+ * The band in words, in the reader's language. Required: a band with no name
92
+ * cannot be read aloud, cannot survive a black-and-white printout, and cannot
93
+ * be told from its neighbour by anybody who does not see the colour.
94
+ */
95
+ name: string;
96
+ /**
97
+ * Whose band this is, named for the reader: a published instrument, a
98
+ * guideline body, your own clinical review. Required, and rendered on screen
99
+ * beneath the band list.
100
+ *
101
+ * Two numbers that define an interval somebody is compared against are a
102
+ * comparison a person chose, exactly like a reference range, and OPSIN-0004
103
+ * says the thing to do about one with nobody's name on it. A band set carries
104
+ * more weight than a bare range rather than less, because it comes with a
105
+ * word for each interval. In an example this is `EXAMPLE_SOURCE`.
106
+ */
107
+ source: string;
108
+ }
109
+ export interface ScoreDialProps {
110
+ /** What the score is called, in the reader's language. Not an internal code. */
111
+ label: string;
112
+ /**
113
+ * The score. `null` renders the no-score state, which is not a score of zero:
114
+ * zero is a real result on many scales and an absent one is not a result. A
115
+ * value that is not a finite number is a third state again. It is a
116
+ * calculation that ran and failed, and it is announced as one.
117
+ */
118
+ value: number | null;
119
+ /** The scale's lower bound. Required: an unbounded dial is unreadable. */
120
+ min: number;
121
+ /** The scale's upper bound. Required, and it is stated to the reader. */
122
+ max: number;
123
+ /**
124
+ * The product's bands: contiguous, non-overlapping, covering the whole scale,
125
+ * each named and each with a source. opsinjs ships none and never supplies a
126
+ * default. An empty list renders the number with no band and says so, rather
127
+ * than inventing one.
128
+ */
129
+ bands: ScoreBand[];
130
+ /**
131
+ * The level of attention this reading needs, assigned by the product from a
132
+ * reference range or a threshold the product owns. An INPUT, never a
133
+ * derivation: this component does not compare the score with anything and
134
+ * decide what it means, because it does not know the reader.
135
+ *
136
+ * Only `steady` and `watch` are accepted. `attention` and `urgent` are
137
+ * refused and reported, because both are defined as carrying a named action
138
+ * and a dial has nowhere to put one. Use CareCard or AlertBanner, which do.
139
+ */
140
+ status?: DialStatus;
141
+ /**
142
+ * One sentence saying what went into the score and over what window.
143
+ * Required, and always rendered. A dial that cannot explain itself is a
144
+ * decorative authority claim, and Value is the honest component instead.
145
+ */
146
+ derivation: string;
147
+ /**
148
+ * Decimal places for the score, from the product, and required here rather
149
+ * than optional as it is on Value. A composite score is arithmetic, so a
150
+ * fractional double is the ordinary case rather than the edge, and with
151
+ * nothing stated one IEEE 754 double prints as many as seventeen digits in a
152
+ * single tabular token that has no break opportunity, which is wider than a
153
+ * phone column at 200 percent text. Precision belongs to the metric and
154
+ * opsinjs invents no default, which is why the prop is required here rather
155
+ * than defaulted. The file ships as source into JavaScript projects, where a
156
+ * required prop is advice rather than a guarantee: a caller who omits it gets
157
+ * one console report and the number keeps the digits it arrived with.
158
+ */
159
+ precision: number;
160
+ /**
161
+ * How much of the expected input the score was actually calculated from, as
162
+ * in `{ available: 4, expected: 6 }`. When it is short the dial says so on
163
+ * its face, because a reader has no other way to know that today's number
164
+ * rests on a third of the usual evidence. What was counted is the derivation
165
+ * sentence's job to name: this component does not know whether they were
166
+ * nights, readings or days.
167
+ */
168
+ coverage?: {
169
+ available: number;
170
+ expected: number;
171
+ };
172
+ /**
173
+ * Tints the label, and nothing else. Never the track, the bands or the
174
+ * indicator. Those belong to the status axis, and one surface carries one
175
+ * axis.
176
+ */
177
+ category?: HealthCategory;
178
+ /**
179
+ * When the score was calculated, ISO 8601. It renders on its own labelled
180
+ * line, and a dial that has a score but no instant says in words that nobody
181
+ * knows when it was calculated. It gets no staleness treatment and no relative phrasing: a
182
+ * relative phrase needs the instant to measure against, which this API does
183
+ * not carry, and a staleness window is a number opsinjs does not own for any
184
+ * metric. A caller who needs "2 hours ago", or needs an old score to LOOK
185
+ * old, renders a RelativeTime beside the dial and passes it one `now` for the
186
+ * whole screen. This prop is not `measuredAt`: nothing here was measured.
187
+ */
188
+ calculatedAt?: string;
189
+ /** BCP 47 locale for every number and the date. Omitted, the reader's own environment decides. */
190
+ locale?: string;
191
+ /**
192
+ * Merged onto the root, and a class passed here WINS over the component's own
193
+ * where the two conflict.
194
+ *
195
+ * That includes `truncate`, `sr-only`, a zeroed type size and any fixed
196
+ * height. The band name, the scale and the derivation are mandatory content
197
+ * that no prop of this component removes, and a class that clips or hides
198
+ * them is the one way left to remove them anyway. The accessible sentence on
199
+ * the arc would survive; the words a sighted reader needs would not.
200
+ */
201
+ className?: string;
202
+ }
203
+ export declare function ScoreDial({ label, value, min, max, bands, status, derivation, coverage, category, calculatedAt, precision: declaredPrecision, locale, className, }: ScoreDialProps): import("react").JSX.Element;
204
+ export {};
205
+ //# sourceMappingURL=score-dial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score-dial.d.ts","sourceRoot":"","sources":["../../src/components/score-dial.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAKH,OAAO,EAA6H,KAAK,cAAc,EAAE,MAAM,eAAe,CAAA;AAmD9K;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,aAAa,8BAA+B,CAAA;AAElD,KAAK,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAiQhD;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAA;IACV;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;;;;OAUG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,0EAA0E;IAC1E,GAAG,EAAE,MAAM,CAAA;IACX,yEAAyE;IACzE,GAAG,EAAE,MAAM,CAAA;IACX;;;;;OAKG;IACH,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;;;;;;;OAWG;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