@canonical/react-ds-global-form 0.30.0 → 0.32.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 (111) hide show
  1. package/dist/esm/density.css +357 -0
  2. package/dist/esm/docs/examples/density-examples.css +20 -0
  3. package/dist/esm/index.css +110 -12
  4. package/dist/esm/lib/_work_in_progress/DensityTestbed/Testbed.js +77 -0
  5. package/dist/esm/lib/_work_in_progress/DensityTestbed/Testbed.js.map +1 -0
  6. package/dist/esm/lib/_work_in_progress/DensityTestbed/baseline-system.css +81 -0
  7. package/dist/esm/lib/_work_in_progress/DensityTestbed/density.testbed.css +153 -0
  8. package/dist/esm/lib/_work_in_progress/DensityTestbed/mocks.js +23 -0
  9. package/dist/esm/lib/_work_in_progress/DensityTestbed/mocks.js.map +1 -0
  10. package/dist/esm/lib/common/Wrapper/ToggleWrapper.css +33 -4
  11. package/dist/esm/lib/common/Wrapper/ToggleWrapper.js +2 -2
  12. package/dist/esm/lib/common/Wrapper/ToggleWrapper.js.map +1 -1
  13. package/dist/esm/lib/common/Wrapper/styles.css +15 -1
  14. package/dist/esm/lib/common/Wrapper/withToggleWrapper.js +11 -1
  15. package/dist/esm/lib/common/Wrapper/withToggleWrapper.js.map +1 -1
  16. package/dist/esm/lib/common/bindField/bindField.js +15 -8
  17. package/dist/esm/lib/common/bindField/bindField.js.map +1 -1
  18. package/dist/esm/lib/component/ChoicesField/common/Option/Option.js +1 -1
  19. package/dist/esm/lib/component/ChoicesField/common/Option/Option.js.map +1 -1
  20. package/dist/esm/lib/component/ChoicesField/styles.css +55 -15
  21. package/dist/esm/lib/component/DateField/DateField.js +19 -1
  22. package/dist/esm/lib/component/DateField/DateField.js.map +1 -1
  23. package/dist/esm/lib/component/FileUploadField/FileUploadField.js +40 -3
  24. package/dist/esm/lib/component/FileUploadField/FileUploadField.js.map +1 -1
  25. package/dist/esm/lib/component/NumberField/NumberField.js +1 -1
  26. package/dist/esm/lib/component/NumberField/NumberField.js.map +1 -1
  27. package/dist/esm/lib/component/RangeField/RangeField.js +1 -1
  28. package/dist/esm/lib/component/RangeField/RangeField.js.map +1 -1
  29. package/dist/esm/lib/component/SwitchField/SwitchField.js +6 -1
  30. package/dist/esm/lib/component/SwitchField/SwitchField.js.map +1 -1
  31. package/dist/esm/lib/subcomponent/CheckboxInput/styles.css +45 -16
  32. package/dist/esm/lib/subcomponent/DateInput/styles.css +12 -0
  33. package/dist/esm/lib/subcomponent/DateTimeInput/styles.css +13 -0
  34. package/dist/esm/lib/subcomponent/Field/Label/Label.js +1 -3
  35. package/dist/esm/lib/subcomponent/Field/Label/Label.js.map +1 -1
  36. package/dist/esm/lib/subcomponent/Field/Label/styles.css +2 -3
  37. package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js +11 -21
  38. package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js.map +1 -1
  39. package/dist/esm/lib/subcomponent/FileUploadInput/styles.css +3 -3
  40. package/dist/esm/lib/subcomponent/PasswordInput/styles.css +5 -6
  41. package/dist/esm/lib/subcomponent/RadioInput/styles.css +36 -7
  42. package/dist/esm/lib/subcomponent/RangeInput/styles.css +10 -9
  43. package/dist/esm/lib/subcomponent/SelectInput/styles.css +32 -4
  44. package/dist/esm/lib/subcomponent/SwitchInput/styles.css +27 -10
  45. package/dist/esm/lib/subcomponent/TextInput/TextInput.js +1 -1
  46. package/dist/esm/lib/subcomponent/TextInput/TextInput.js.map +1 -1
  47. package/dist/esm/lib/subcomponent/TextareaInput/TextareaInput.js +1 -3
  48. package/dist/esm/lib/subcomponent/TextareaInput/TextareaInput.js.map +1 -1
  49. package/dist/esm/lib/subcomponent/TextareaInput/styles.css +4 -9
  50. package/dist/esm/lib/subcomponent/TimeInput/styles.css +8 -0
  51. package/dist/esm/lib/utils/countries/countries.js +1 -1
  52. package/dist/esm/lib/utils/countries/countries.js.map +1 -1
  53. package/dist/esm/lib/utils/hooks/useFieldError.js +21 -24
  54. package/dist/esm/lib/utils/hooks/useFieldError.js.map +1 -1
  55. package/dist/types/lib/_work_in_progress/DensityTestbed/Testbed.d.ts +42 -0
  56. package/dist/types/lib/_work_in_progress/DensityTestbed/Testbed.d.ts.map +1 -0
  57. package/dist/types/lib/_work_in_progress/DensityTestbed/mocks.d.ts +26 -0
  58. package/dist/types/lib/_work_in_progress/DensityTestbed/mocks.d.ts.map +1 -0
  59. package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts +1 -1
  60. package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts.map +1 -1
  61. package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts +4 -1
  62. package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts.map +1 -1
  63. package/dist/types/lib/common/Wrapper/withWrapper.d.ts +1 -1
  64. package/dist/types/lib/common/Wrapper/withWrapper.d.ts.map +1 -1
  65. package/dist/types/lib/common/bindField/bindField.d.ts.map +1 -1
  66. package/dist/types/lib/common/bindField/types.d.ts +14 -5
  67. package/dist/types/lib/common/bindField/types.d.ts.map +1 -1
  68. package/dist/types/lib/common/types.d.ts +1 -0
  69. package/dist/types/lib/common/types.d.ts.map +1 -1
  70. package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts +1 -0
  71. package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts.map +1 -1
  72. package/dist/types/lib/component/ColorField/ColorField.d.ts +1 -0
  73. package/dist/types/lib/component/ColorField/ColorField.d.ts.map +1 -1
  74. package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts +1 -0
  75. package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts.map +1 -1
  76. package/dist/types/lib/component/DateField/DateField.d.ts +4 -2
  77. package/dist/types/lib/component/DateField/DateField.d.ts.map +1 -1
  78. package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts +1 -0
  79. package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts.map +1 -1
  80. package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts +9 -5
  81. package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts.map +1 -1
  82. package/dist/types/lib/component/HiddenField/HiddenField.d.ts +1 -0
  83. package/dist/types/lib/component/HiddenField/HiddenField.d.ts.map +1 -1
  84. package/dist/types/lib/component/NumberField/NumberField.d.ts +1 -0
  85. package/dist/types/lib/component/NumberField/NumberField.d.ts.map +1 -1
  86. package/dist/types/lib/component/PasswordField/PasswordField.d.ts +1 -0
  87. package/dist/types/lib/component/PasswordField/PasswordField.d.ts.map +1 -1
  88. package/dist/types/lib/component/PhoneField/PhoneField.d.ts +1 -0
  89. package/dist/types/lib/component/PhoneField/PhoneField.d.ts.map +1 -1
  90. package/dist/types/lib/component/RangeField/RangeField.d.ts +1 -0
  91. package/dist/types/lib/component/RangeField/RangeField.d.ts.map +1 -1
  92. package/dist/types/lib/component/RatingField/RatingField.d.ts +1 -0
  93. package/dist/types/lib/component/RatingField/RatingField.d.ts.map +1 -1
  94. package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts +1 -0
  95. package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts.map +1 -1
  96. package/dist/types/lib/component/SelectField/SelectField.d.ts +1 -0
  97. package/dist/types/lib/component/SelectField/SelectField.d.ts.map +1 -1
  98. package/dist/types/lib/component/SwitchField/SwitchField.d.ts +5 -0
  99. package/dist/types/lib/component/SwitchField/SwitchField.d.ts.map +1 -1
  100. package/dist/types/lib/component/TextField/TextField.d.ts +1 -0
  101. package/dist/types/lib/component/TextField/TextField.d.ts.map +1 -1
  102. package/dist/types/lib/component/TextareaField/TextareaField.d.ts +1 -0
  103. package/dist/types/lib/component/TextareaField/TextareaField.d.ts.map +1 -1
  104. package/dist/types/lib/component/TimeField/TimeField.d.ts +1 -0
  105. package/dist/types/lib/component/TimeField/TimeField.d.ts.map +1 -1
  106. package/dist/types/lib/subcomponent/Field/Label/Label.d.ts.map +1 -1
  107. package/dist/types/lib/subcomponent/FileUploadInput/FileUploadInput.d.ts.map +1 -1
  108. package/dist/types/lib/subcomponent/TextareaInput/TextareaInput.d.ts.map +1 -1
  109. package/dist/types/lib/utils/hooks/useFieldError.d.ts +14 -0
  110. package/dist/types/lib/utils/hooks/useFieldError.d.ts.map +1 -1
  111. package/package.json +14 -14
@@ -0,0 +1,357 @@
1
+ /* @canonical/react-ds-global-form — density & baseline alignment (FORM APPLICATION)
2
+ *
3
+ * The GENERIC density primitives — the context/density modifier families
4
+ * (.app/.site/.docs × .comfortable/.dense) and their --density-* outputs
5
+ * (--density-line-height(-effective), --density-target-baseline-px,
6
+ * --density-padding-inline, --density-space-sm/-md/-lg) — now live in
7
+ * @canonical/styles (`modifiers.density.css`), so EVERY package can read them
8
+ * (ds-global's Accordion as well as this form package). See that file for the
9
+ * 2×3 matrix and the value table.
10
+ *
11
+ * THIS file is the FORM APPLICATION layer: it applies those primitives to the
12
+ * form's own controls (`.ds.input`, `.ds.field-label/description/error`, the
13
+ * textarea) — sizing their boxes to the density cell and seating their text on the
14
+ * 4px grid. The --form-* token mapping lives in index.css.
15
+ *
16
+ * NB the BUTTON is a ds-global component, so its density seat lives in ds-global
17
+ * (Button/styles.css), reading the same shared --density-* primitives — an app
18
+ * that ships ds-global without the form package still gets a seated button.
19
+ *
20
+ * Text baseline sits on the density target — round(nearest, height × 2/3) — so
21
+ * every control shares one baseline index. Controls use the INTRINSIC seat from
22
+ * @canonical/styles (--control-seat-line/-basis): no fixed heights; border +
23
+ * seat pads + line-height add up to the density cell. Zero-JS (cap-unit
24
+ * approximation); holds to the cap tolerance.
25
+ */
26
+
27
+ /* ── TRANSITIONAL: the fixed-height box (direct date/time chromes only) ──────
28
+ * The ORIGINAL density box: a FIXED grid-multiple height with border-box so the
29
+ * border is absorbed into the height. The composite text family, the select and
30
+ * the textarea have all moved OFF this rule onto the intrinsic seat (their
31
+ * equal-specificity rules further down override it); it still governs the
32
+ * remaining direct chromes — date, time, datetime — whose multi-part UA
33
+ * internals need their own measured pass before they join.
34
+ *
35
+ * Controls no longer carry `.p` — the density system supplies the body font tier
36
+ * (font-size / weight / family) here. */
37
+ /* NB `.ds.input.textarea` is EXCLUDED: the textarea seats intrinsically (its own
38
+ * rule below) and must keep its multi-row min-height. */
39
+ :is(.comfortable, .dense, .app, .site, .docs) .ds.input:not(.textarea) {
40
+ box-sizing: border-box;
41
+ /* Same effective line-height the target-baseline uses (single source of the
42
+ fallback chain), so a bare context class keeps a valid box height too. */
43
+ --density-box-height: var(--density-line-height-effective);
44
+ block-size: var(--density-box-height);
45
+ min-block-size: var(--density-box-height);
46
+ align-items: flex-start;
47
+ justify-content: flex-start;
48
+ /* Kill the UA BOTTOM padding only. Do NOT zero padding-block-start here: this
49
+ selector is more specific (0,4,0) than the placement rule below (0,2,0), so a
50
+ `padding-block: 0` shorthand would out-specify and WIPE the placement's
51
+ `padding-block-start: var(--space-before)` — leaving the label pinned to the
52
+ box top (off the baseline). The placement rule owns the start. */
53
+ padding-block-end: 0;
54
+
55
+ /* Body font tier — what `.p` used to supply. */
56
+ font-size: var(--typography-text-primary-font-size);
57
+ font-family: var(--typography-text-primary-font-family);
58
+ }
59
+
60
+ /* The input WRAPPER is the box (like the button element): don't stretch its
61
+ * child, top-reference it so the input's own space-before governs. Needs to beat
62
+ * the TextInput's `.ds.input.text { align-items: stretch }` (0,3,0). */
63
+ :is(.comfortable, .dense, .app, .site, .docs) .ds.input.text,
64
+ :is(.comfortable, .dense, .app, .site, .docs) .ds.input {
65
+ align-items: flex-start;
66
+ }
67
+
68
+ /* The <input> is the text carrier — treat it exactly like the button label:
69
+ * same body font tier, and normalised so only the space-before (below) positions
70
+ * its text. (It's content-box with an intrinsic height, so reset that.) */
71
+ :is(.comfortable, .dense, .app, .site, .docs) .ds.input > input {
72
+ box-sizing: border-box;
73
+ min-block-size: 0;
74
+ block-size: auto;
75
+ margin-block: 0;
76
+ font-size: var(--typography-text-primary-font-size);
77
+ font-family: var(--typography-text-primary-font-family);
78
+ }
79
+
80
+ /* ── Baseline placement: `.baseline` nudge + `--space-before` ───────────────
81
+ * Two parts, the combination that put controls ON the grid:
82
+ *
83
+ * 1. NUDGE (the DS.01 `.baseline` mechanism): --bl-start-nudge snaps the text's
84
+ * first baseline onto the NEAREST grid line, computed from the element's own
85
+ * font (1cap + line-height) — font-relative, so it's exact at any size and
86
+ * needs no per-element fudge. This is what lands text exactly on a line.
87
+ *
88
+ * 2. --space-before: whole baselines added to move that snapped baseline DOWN to
89
+ * the density TARGET line (round-up of the remaining distance), less the box's
90
+ * own top border.
91
+ *
92
+ * padding-block-start = bl-start-nudge + space-before − border-top
93
+ * space-before = round(up, target − bl-start-nudge − border-top, baseline)
94
+ *
95
+ * Applies to the button, the input, and the field label/description/error — i.e.
96
+ * CONTROL-like text only. Bare prose (p / .p / h1–h6) is DELIBERATELY NOT here:
97
+ * running text belongs to the typography engine, which already seats it on the
98
+ * grid (snapped --computed-line-height + --start/--end-nudge) and lets `.editorial`
99
+ * add its inter-block margins. Density crushing prose to line-height:1 fought that
100
+ * engine (and only ever put the FIRST line on-grid — wrapped lines drifted). By
101
+ * partitioning prose OUT, density and the engine write to disjoint element sets,
102
+ * so `.editorial` composes with density with no specificity war. `:is()` (not
103
+ * `:where()`) still gives the control seat the specificity to beat a control's own
104
+ * centring (e.g. the Button's `align-items: center`). */
105
+ /* Body font tier for the field label/description/error, which lost `.p`. Scoped
106
+ to just these (NOT the headings, which keep their own tier). */
107
+ :is(.comfortable, .dense, .app, .site, .docs)
108
+ :is(.ds.field-label, .ds.field-description, .ds.field-error) {
109
+ font-size: var(--typography-text-primary-font-size);
110
+ font-family: var(--typography-text-primary-font-family);
111
+ }
112
+
113
+ :is(.comfortable, .dense, .app, .site, .docs)
114
+ :is(.ds.field-label, .ds.field-description, .ds.field-error) {
115
+ line-height: 1;
116
+ /* Baseline within a line-height:1 box (font-relative cap approximation). */
117
+ --natural-baseline: calc((1em + 1cap) / 2);
118
+ /* Pad the top so the baseline lands at the density target, less the box's own
119
+ top border. */
120
+ --space-before: max(
121
+ 0px,
122
+ calc(
123
+ var(--density-target-baseline-px, 0px) -
124
+ var(--natural-baseline) -
125
+ var(--border-top-width, 0px)
126
+ )
127
+ );
128
+ padding-block-start: var(--space-before);
129
+ padding-block-end: 0;
130
+ }
131
+
132
+ /* ── Intrinsic control seat: the composite text-input family ─────────────────
133
+ * The single-line <input> no longer uses the line-height:1 crush + space-before
134
+ * padding above (that rule is now labels-only). Instead it consumes the SHARED
135
+ * control seat from @canonical/styles (modifiers.density.css): the input's own
136
+ * line box (cell − 2 baselines) is the control interior, `--control-seat-before`
137
+ * seats its baseline on the density target, and the CHROME closes the box with
138
+ * `--control-seat-after` — so the chrome's height is INTRINSIC (no fixed
139
+ * block-size) yet lands exactly on the density cell, both edges on the grid.
140
+ *
141
+ * Placed AFTER the fixed-height box rule above so this (equal-specificity)
142
+ * rule wins for the text family. Direct chromes (select/date/time) and the
143
+ * textarea keep the previous model until their own cutover pass. */
144
+ :is(.comfortable, .dense, .app, .site, .docs)
145
+ .ds.input:is(.text, .number, .password, .phone) {
146
+ /* The COMPOSITE chrome family — every wrapper with an inner <input> leaf
147
+ (text, number, password, phone). One selector, one seat: the wrapper is
148
+ the box, the leaf carries the line. */
149
+
150
+ /* NO drift term here — deliberately. The old ~2px "native input renders low"
151
+ compensation was an artifact of the line-height:1 crush structure: give the
152
+ <input> a real line box (--control-seat-line below) and it renders its text
153
+ exactly like a <span> (measured; see the drift note at the end of this
154
+ file). Subtracting the stale 2px lifted the text 2px too high. */
155
+
156
+ /* The UA enforces a line-height FLOOR of `normal` (1.2em for Ubuntu) on a
157
+ single-line <input> — a specified line-height below it is silently clamped
158
+ (measured: dense's 16px line rendered 16.8px tall, pushing the chrome to
159
+ 24.8). So the seat computes with the FLOORED line the UA will actually
160
+ use; the box then closes to the cell exactly in every density cell. */
161
+ --seat-line-floored: max(var(--control-seat-line), 1.2em);
162
+
163
+ /* The chrome's border folds in HERE (a var() inside a custom property
164
+ substitutes at its declaring element, so the shared layer cannot read it).
165
+ Derived from the target directly — not --control-seat-basis — because the
166
+ basis assumes the unfloored line. Both the leaf's top pad and the chrome's
167
+ closing pad read this SAME `--seat-before`, keeping the complement
168
+ consistent. Rounded to ¼px so the pad is exactly representable in 1/64px
169
+ layout units (the fractional 1cap term otherwise leaves ~1/60px residues
170
+ on the box height). */
171
+ --seat-before: round(
172
+ nearest,
173
+ max(
174
+ 0px,
175
+ calc(
176
+ var(--density-target-baseline-px, 0px) -
177
+ (var(--seat-line-floored) + 1cap) /
178
+ 2 -
179
+ var(--form-input-border-width, 0px)
180
+ )
181
+ ),
182
+ 0.25px
183
+ );
184
+ --seat-after: max(
185
+ 0px,
186
+ calc(
187
+ var(--density-line-height-effective) -
188
+ var(--seat-line-floored) -
189
+ var(--seat-before) -
190
+ 2 *
191
+ var(--form-input-border-width, 0px)
192
+ )
193
+ );
194
+
195
+ block-size: auto;
196
+ min-block-size: 0;
197
+ padding-block-end: var(--seat-after);
198
+ /* Stretch (not the box rule's flex-start): a prefix/suffix — the password's
199
+ reveal-toggle, the number's unit affix — spans the leaf's column and its
200
+ own `align-items: center` centres its icon on the TEXT, which is the
201
+ optical pairing (centring on the box would float it into the asymmetric
202
+ closing pad). The old fixed-height model needed flex-start to top-pin the
203
+ crushed leaf; the intrinsic leaf seats itself, so stretch is safe again. */
204
+ align-items: stretch;
205
+ }
206
+ :is(.comfortable, .dense, .app, .site, .docs)
207
+ .ds.input:is(.text, .number, .password, .phone)
208
+ > input {
209
+ line-height: var(--seat-line-floored);
210
+ padding-block-start: var(--seat-before);
211
+ padding-block-end: 0;
212
+ }
213
+
214
+ /* ── Textarea: many rows of the SAME intrinsic seat ──────────────────────────
215
+ * The textarea is a single element (it carries the chrome itself), so it seats
216
+ * like the button: the interior line box is `--control-seat-line` — which is a
217
+ * WHOLE baseline multiple in every cell (cell − 2 bU) — so EVERY row advances
218
+ * one grid interval, not just the first. The complement pad closes the box so
219
+ * border + seat-before + N·line + seat-after + border ends on a grid line for
220
+ * ANY row count N: the N-independent part equals (cell − line) ≡ 0 (mod 1 bU).
221
+ * One seat, no multi-line special case.
222
+ *
223
+ * Two deliberate differences from the single-line input:
224
+ * · NO line-height floor — the UA's `normal` clamp is specific to single-line
225
+ * <input>; a textarea honours its specified line-height, and a floored
226
+ * 16.8px line would knock every dense row off the grid.
227
+ * · NO drift term — like the single-line input, the old ~2px knob was an
228
+ * artifact of the crush-era structure (see the drift note below).
229
+ *
230
+ * The previous revision seated the first row via --td-space-before ON TOP of
231
+ * the chrome's 8px block padding, targeting the OLD round(up) table; under the
232
+ * round(nearest) targets that formula clamps to zero in every cell (the full
233
+ * cell line-height puts the natural baseline below the target), which left the
234
+ * textarea unseated entirely. The interior line box makes the target reachable
235
+ * again. */
236
+ :is(.comfortable, .dense, .app, .site, .docs) .ds.input.textarea {
237
+ line-height: var(--control-seat-line);
238
+ font-size: var(--typography-text-primary-font-size);
239
+ font-family: var(--typography-text-primary-font-family);
240
+
241
+ --seat-before: round(
242
+ nearest,
243
+ max(
244
+ 0px,
245
+ calc(var(--control-seat-basis) - var(--form-input-border-width, 0px))
246
+ ),
247
+ 0.25px
248
+ );
249
+ --seat-after: max(
250
+ 0px,
251
+ calc(
252
+ var(--density-line-height-effective) -
253
+ var(--control-seat-line) -
254
+ var(--seat-before) -
255
+ 2 *
256
+ var(--form-input-border-width, 0px)
257
+ )
258
+ );
259
+
260
+ block-size: auto;
261
+ padding-block: var(--seat-before) var(--seat-after);
262
+ /* Five whole rows + the closing geometry (border-box), so the default box
263
+ ends on-grid with the last row fully visible: 4·line + cell. */
264
+ min-block-size: calc(
265
+ 4 *
266
+ var(--control-seat-line) +
267
+ var(--density-line-height-effective)
268
+ );
269
+ }
270
+
271
+ /* ── Select: a single-element direct chrome on the intrinsic seat ────────────
272
+ * The <select> IS the chrome (border and text on one element), so it seats
273
+ * like the button: interior line box + seat pads, height emerging as exactly
274
+ * the density cell. Replaces the old fixed-height + 8px-block-padding path,
275
+ * which never seated the option text at all and CLIPPED it in apps/dense
276
+ * (24px fixed box − 8px pad left too little room for the line).
277
+ * The line is floored like the single-line input's: a <select> shows one line,
278
+ * so if the UA imposes a `normal` floor the formula already matches it, and if
279
+ * it does not the specified floor is simply what renders — correct either way
280
+ * (unlike the textarea, where flooring would break the multi-row rhythm).
281
+ * Remaining direct chromes (date/time/datetime) stay on the previous model
282
+ * until their own pass — their multi-part UA internals need their own
283
+ * measurement. */
284
+ :is(.comfortable, .dense, .app, .site, .docs) .ds.input.select {
285
+ --seat-line-floored: max(var(--control-seat-line), 1.2em);
286
+ line-height: var(--seat-line-floored);
287
+
288
+ --seat-before: round(
289
+ nearest,
290
+ max(
291
+ 0px,
292
+ calc(
293
+ var(--density-target-baseline-px, 0px) -
294
+ (var(--seat-line-floored) + 1cap) /
295
+ 2 -
296
+ var(--form-input-border-width, 0px)
297
+ )
298
+ ),
299
+ 0.25px
300
+ );
301
+ --seat-after: max(
302
+ 0px,
303
+ calc(
304
+ var(--density-line-height-effective) -
305
+ var(--seat-line-floored) -
306
+ var(--seat-before) -
307
+ 2 *
308
+ var(--form-input-border-width, 0px)
309
+ )
310
+ );
311
+
312
+ block-size: auto;
313
+ min-block-size: 0;
314
+ padding-block: var(--seat-before) var(--seat-after);
315
+ }
316
+
317
+ /* ── Bottom rhythm: density-seated flow text only (NOT prose) ─────────────────
318
+ * A BORDERED control (button, input wrapper) has a fixed `block-size` that is
319
+ * already a whole baseline multiple, so its bottom rhythm is the box height —
320
+ * no bottom padding needed (and it would be inert against the fixed height).
321
+ *
322
+ * The field label/description/error are density-seated with line-height:1, so
323
+ * their box ends at the text descender; with `padding-block-end: 0` a following
324
+ * grid/flow sibling (e.g. the textarea below a field label) resumes off-grid.
325
+ * Fill the box out to a whole density line-height so its bottom lands on a grid
326
+ * line. The `- 1em` term is correct precisely because these are line-height:1.
327
+ *
328
+ * Bare prose (p / .p / h1–h6) is NOT here: it is no longer density-seated (see the
329
+ * partition above), so its box is its OWN snapped line-height and the engine's
330
+ * --end-nudge already lands its bottom on the grid. Adding a density fill on top
331
+ * would double-pad. Prose bottom rhythm belongs to the engine / `.editorial`. */
332
+ :is(.comfortable, .dense, .app, .site, .docs)
333
+ :is(.ds.field-label, .ds.field-description, .ds.field-error) {
334
+ padding-block-end: max(
335
+ 0px,
336
+ calc(
337
+ var(
338
+ --density-line-height,
339
+ var(--density-lh-comfy, calc(var(--baseline-height) * 8))
340
+ ) -
341
+ var(--space-before) -
342
+ 1em
343
+ )
344
+ );
345
+ }
346
+
347
+ /* ── The native-control text drift — RESOLVED for single-line inputs ──────────
348
+ * The old ~2px "native <input> renders its text lower than a <span> at
349
+ * byte-identical CSS" compensation (--control-text-drift-AVOID-USAGE) turned
350
+ * out to be an artifact of the line-height:1 crush structure, NOT an inherent
351
+ * UA quirk: with a real line box (line-height: --control-seat-line, the
352
+ * intrinsic seat above) the <input> positions its text exactly like a <span>
353
+ * (measured: input baseline == label baseline to 0.01px with no drift term).
354
+ * That answers TODO(#15)'s "find the structural cause and delete it": the
355
+ * intrinsic seat carries NO drift anywhere — the textarea's local copy went
356
+ * with its old parallel seat when it joined the intrinsic model. The knob no
357
+ * longer exists in this file. */
@@ -0,0 +1,20 @@
1
+ /* Layout for the density/baseline doc examples. Minimal: an inline row of
2
+ * controls (so their baselines can be read against the overlay together) and a
3
+ * vertical stack for comparing two cells. No overrides that would shift text off
4
+ * the grid — the examples must show the real seating. */
5
+
6
+ .density-example__row {
7
+ display: flex;
8
+ flex-wrap: nowrap;
9
+ align-items: flex-start; /* controls are top-referenced; the seat is internal */
10
+ gap: calc(var(--baseline-height, 0.25rem) * 3); /* 12px */
11
+ overflow-x: auto;
12
+ }
13
+
14
+ .density-example__stack {
15
+ display: flex;
16
+ flex-direction: column;
17
+ /* One field-block gap between the compared cells, so the stack itself stays on
18
+ the grid. */
19
+ gap: calc(var(--baseline-height, 0.25rem) * 6); /* 24px */
20
+ }
@@ -9,6 +9,9 @@
9
9
  * inline = horizontal axis (inline-start = left in LTR, right in RTL)
10
10
  */
11
11
 
12
+ /* Density & baseline alignment (context × density → control height + baseline). */
13
+ @import url("./density.css");
14
+
12
15
  :root {
13
16
  /* ── Form grid layout ───────────────────────────────────────────── */
14
17
  /* Forms are subgrids: they inherit columns from a parent .grid */
@@ -32,15 +35,29 @@
32
35
  /* ── Field layout spacing ───────────────────────────────────────── */
33
36
  /* Container-owned: the form/field wrapper controls all spacing. */
34
37
 
35
- --form-field-block-gap: var(
36
- --container-gap-loose
37
- ); /* 24px — block-direction (vertical) gap between fields */
38
- --form-field-inline-gap: var(
39
- --container-gap-default
40
- ); /* 16px — inline-direction (horizontal) gap: label ↔ input */
38
+ /* Gaps are split by AXIS so no token spans both directions (a density tier can
39
+ then tune each axis independently, and the names stay honest):
40
+ BLOCK (vertical): field-block-gap · field-label-gap · group-gap
41
+ INLINE (horizontal): field-inline-gap */
42
+ /* No-density-class defaults — mirror the density matrix's app/comfortable cell
43
+ (F-O4, 15/07 review). The density-scoped block further down re-derives these
44
+ per cell when a context/density class is present. */
45
+ --form-field-block-gap: calc(
46
+ var(--baseline-height) *
47
+ 10
48
+ ); /* 40px — block: gap BETWEEN fields */
49
+ --form-field-label-gap: var(
50
+ --space-100
51
+ ); /* 8px — block: gap from a field's LABEL down to its control */
52
+ --form-field-label-description-gap: var(
53
+ --space-050
54
+ ); /* 4px — block: gap from a LABEL down to a leading description */
41
55
  --form-group-gap: var(
42
56
  --space-100
43
- ); /* 8px — block-direction gap: desc/error ↔ input */
57
+ ); /* 8px — block: gap from desc/error to the input */
58
+ --form-field-inline-gap: var(
59
+ --container-gap-default
60
+ ); /* 16px — inline: label↔input, prefix/suffix (HORIZONTAL only) */
44
61
 
45
62
  /* ── Input chrome ───────────────────────────────────────────────── */
46
63
  /* Component-owned: internal padding regardless of context. */
@@ -99,7 +116,8 @@
99
116
 
100
117
  /* ── Label ──────────────────────────────────────────────────────── */
101
118
 
102
- --form-label-font-weight: var(--typography-text-primary-bold-font-weight);
119
+ /* Field labels use regular paragraph weight, not bold (per design review). */
120
+ --form-label-font-weight: var(--typography-text-primary-font-weight);
103
121
  --form-label-font-size: var(--typography-text-primary-font-size);
104
122
  --form-label-color: var(--color-text);
105
123
  /* --form-label-padding-block: … ; */ /* block padding for label */
@@ -112,7 +130,10 @@
112
130
 
113
131
  /* ── Description ────────────────────────────────────────────────── */
114
132
 
115
- --form-description-font-size: var(--typography-text-primary-font-size);
133
+ /* Description reads the SECONDARY type ramp (design review): it is subordinate
134
+ supporting text, so it takes the smaller secondary size, not the primary
135
+ body size. Colour is already the muted token. */
136
+ --form-description-font-size: var(--typography-text-secondary-font-size);
116
137
  --form-description-color: var(--color-text-muted);
117
138
 
118
139
  /* ── Error ──────────────────────────────────────────────────────── */
@@ -126,7 +147,10 @@
126
147
  --form-input-border-color-error: var(--color-border-error);
127
148
  --form-input-background-disabled: var(--color-foreground-input-disabled);
128
149
  --form-input-color-disabled: var(--disabled--color-text);
129
- --form-input-border-color-disabled: var(--disabled--color-border);
150
+ /* Design review (15/07): a disabled control shows no border. Default the
151
+ * disabled border to transparent; a theme wanting a visible disabled border
152
+ * can still override this token (e.g. back to `--disabled--color-border`). */
153
+ --form-input-border-color-disabled: transparent;
130
154
 
131
155
  /* ── Focus ring ─────────────────────────────────────────────────── */
132
156
 
@@ -136,6 +160,45 @@
136
160
  /* --form-focus-ring-offset: … ; */ /* focus ring offset from border */
137
161
  }
138
162
 
163
+ /* ── Density → form channel mapping ──────────────────────────────────────────
164
+ * The FORM layer decides which generic density primitive (density.css exposes
165
+ * --density-line-height, --density-padding-inline, and the neutral vertical rungs
166
+ * --density-space-sm/-md/-lg) each of its own tokens follows. Density knows
167
+ * nothing about "field"; this is where the form makes that choice.
168
+ *
169
+ * Scoped to the density classes so a plain form (no density class) keeps the
170
+ * :root defaults above. The var() fallbacks keep values sane if only a CONTEXT
171
+ * class (.app/.site/.docs) is present without a density class.
172
+ *
173
+ * INLINE (horizontal): control padding + label↔input / prefix-suffix gap
174
+ * → --density-padding-inline
175
+ * BLOCK (vertical), by magnitude:
176
+ * between-fields → --density-space-lg (widest structural gap, 40px app)
177
+ * label → control → --density-space-md (label to its own control, 8px app)
178
+ * desc/error → input → --density-space-sm (tight annotation gap, 8px)
179
+ * label → description → --density-space-xs (tightest, 4px)
180
+ * All rungs are whole baseline multiples, so vertical rhythm holds.
181
+ * (space-md/-lg were retuned + space-xs added per the 15/07 review — F-O4;
182
+ * the density matrix now carries Diana's numbers directly, so the form maps
183
+ * straight onto the rungs rather than pinning literals.) */
184
+ :where(.comfortable, .dense, .app, .site, .docs) {
185
+ --form-input-padding-inline: var(--density-padding-inline, var(--space-200));
186
+ --form-field-inline-gap: var(--density-padding-inline, var(--space-200));
187
+ --form-field-block-gap: var(
188
+ --density-space-lg,
189
+ calc(var(--baseline-height) * 10)
190
+ );
191
+ --form-field-label-gap: var(
192
+ --density-space-md,
193
+ calc(var(--baseline-height) * 2)
194
+ );
195
+ --form-group-gap: var(--density-space-sm, calc(var(--baseline-height) * 2));
196
+ --form-field-label-description-gap: var(
197
+ --density-space-xs,
198
+ calc(var(--baseline-height) * 1)
199
+ );
200
+ }
201
+
139
202
  /* ── .ds.input.chrome — shared input chrome ─────────────────────────
140
203
  * Applied on native <textarea>/<select> directly, and on the
141
204
  * composite .ds.input.text wrapper for <input> + prefix/suffix.
@@ -224,11 +287,18 @@
224
287
  box-shadow: 0 0 0 1px var(--form-focus-ring-color);
225
288
  }
226
289
 
290
+ /* Disabled — per design review (15/07): a disabled control needs no border.
291
+ * The border BOX is kept (transparent) so the border-box height is unchanged
292
+ * and a disabled control lines up with an enabled one; only the paint is
293
+ * dropped. `--form-input-border-color-disabled` defaults to transparent (see
294
+ * :root) but stays a themeable override point. The background + muted text
295
+ * carry the disabled affordance instead. */
227
296
  &:disabled,
228
297
  &:has(input:disabled) {
229
298
  border-color: var(--form-input-border-color-disabled);
230
299
  border-top-color: var(--form-input-border-color-disabled);
231
300
  border-right-color: var(--form-input-border-color-disabled);
301
+ border-bottom-color: var(--form-input-border-color-disabled);
232
302
  border-left-color: var(--form-input-border-color-disabled);
233
303
  background-color: var(--form-input-background-disabled);
234
304
  color: var(--form-input-color-disabled);
@@ -236,9 +306,37 @@
236
306
  }
237
307
  }
238
308
 
239
- /* ── Danger — bottom border only (matches normal theme); focus shows all four */
309
+ /* ── Danger ──────────────────────────────────────────────────────────
310
+ * Per design review (15/07): a validation colour change must be confined to the
311
+ * validation MESSAGE and the input's BOTTOM border — it must not repaint the
312
+ * label or the full box outline. So the general label recolour is gone; the
313
+ * error signal on a normal bordered input is carried by its bottom border alone
314
+ * (below), and the FieldError message carries the error colour in its own text.
315
+ *
316
+ * EXCEPTION — the borderless choices fieldset. A choices group (radios/checkboxes)
317
+ * has no single input border to paint (each option is its own borderless control),
318
+ * so its `<legend>` (a `.ds.field-label`) is the ONLY place an error can be shown
319
+ * without lighting up every option box. Such a group renders its Wrapper label as
320
+ * a `<legend>` (the `mockLabel` path), so the recolour is SCOPED to a legend
321
+ * label — a normal field's `<label>` is untouched. */
322
+ .danger > legend.ds.field-label {
323
+ color: var(--form-error-color);
324
+
325
+ /* The required "*" marker recolours WITH the label (it pins its own colour to
326
+ * `--form-label-color` by default, so it must be overridden here). The
327
+ * "(optional)" hint keeps its muted colour — it is subordinate, not an error
328
+ * signal — via its own explicit `color` in the Label styles. */
329
+ &[data-required]::before {
330
+ color: var(--form-error-color);
331
+ }
332
+ }
333
+
334
+ /* Input chrome: recolour ONLY the bottom border (the base theme keeps the other
335
+ * three sides transparent). Setting the bottom-border override token — not the
336
+ * four-side `border-color` shorthand — means the error signal cannot bleed onto
337
+ * the top/right/left sides. Focus still lights all four (below). */
240
338
  .danger > .payload .ds.input.chrome {
241
- border-color: var(--form-input-border-color-error);
339
+ --form-input-border-color-bottom: var(--form-input-border-color-error);
242
340
  }
243
341
 
244
342
  .danger > .payload .ds.input.chrome:focus-visible,
@@ -0,0 +1,77 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from "@canonical/react-ds-global";
3
+ import { Label } from "../../subcomponent/Field/Label/index.js";
4
+ import { TextInput } from "../../subcomponent/TextInput/index.js";
5
+ import { SpikeBox, SpikeRows } from "./mocks.js";
6
+ import "./density.testbed.css";
7
+ import "./baseline-system.css";
8
+ /**
9
+ * Baseline-alignment spike harness (WORK IN PROGRESS)
10
+ *
11
+ * Line-based: each bucket renders as ONE horizontal line (its own story), with
12
+ * a few letters of paragraph-style text at the start (the baseline reference)
13
+ * followed by the components inline. No cards, no labels. The 4px baseline grid
14
+ * is supplied by the styles-debug plugin (story parameter).
15
+ */
16
+ /**
17
+ * A bucket = a short prose prefix + the components, laid out inline with the
18
+ * NORMAL component structure (no flattening, no overrides) so what we see is what
19
+ * ships. `align-items: baseline` lines them up; nothing else is customised.
20
+ */
21
+ const Line = ({ lead, children }) => (_jsx("div", { className: "density-testbed", children: _jsxs("div", { className: "density-testbed__row", children: [_jsx("p", { className: "p density-testbed__lead", children: lead }), children] }) }));
22
+ /** Controls bucket — real Button + a standalone Label and TextInput (used
23
+ * separately, so there's no stacked Field grid to flatten). */
24
+ export const ControlsLine = () => (_jsxs(Line, { lead: "Sample", children: [_jsx(Button, { importance: "primary", children: "Re" }), _jsx(Button, { importance: "secondary", children: "Se" }), _jsx(Label, { name: "n", children: "Label" }), _jsx(TextInput, { name: "n", placeholder: "In" })] }));
25
+ /** Navigation bucket — tab / side-nav item stand-ins on one line. */
26
+ export const NavigationLine = () => (_jsxs(Line, { lead: "Ov", children: [_jsx(SpikeBox, { children: "Ov" }), _jsx(SpikeBox, { children: "In" }), _jsx(SpikeBox, { children: "St" }), _jsx(SpikeBox, { children: "Ne" })] }));
27
+ /** Lists bucket — list/table rows (shared border) on one line. */
28
+ export const ListsLine = () => (_jsx(Line, { lead: "Ro", children: _jsx(SpikeRows, { rows: ["n1", "n2", "n3"] }) }));
29
+ const PROSE = "The quick brown fox jumps over the lazy dog. Pack my box with five dozen " +
30
+ "liquor jugs, and watch how each line of real prose seats itself on the 4px " +
31
+ "baseline grid as the size changes.";
32
+ /** The real typography tiers the engine styles — h1..h6 + p (mapper.css). No
33
+ * custom size classes: each tag IS its tier. */
34
+ const TIERS = ["h1", "h2", "h3", "h4", "h5", "h6", "p"];
35
+ /**
36
+ * Typography bucket — pure engine output, using the package's own tags (h1..h6,
37
+ * p). First an inline row of each tier side by side (to compare their baselines),
38
+ * then full stacked paragraphs of each tier (to witness how a real prose block
39
+ * of each tier sits on the 4px grid).
40
+ */
41
+ export const TypographyLine = () => (_jsxs("div", { className: "density-testbed", children: [_jsx("div", { className: "density-testbed__type", children: TIERS.map((Tag) => (_jsx(Tag, { children: "The quick brown fox" }, Tag))) }), _jsx("div", { className: "density-testbed__prose", children: TIERS.map((Tag) => (_jsx(Tag, { children: PROSE }, Tag))) })] }));
42
+ const EDITORIAL_BODY = "Running prose belongs to the typography engine, not the density system. Each " +
43
+ "line keeps its tier's snapped line-height, so every baseline lands on the 4px " +
44
+ "grid — and, unlike a line-height:1 crush, WRAPPED lines stay on the grid too.";
45
+ /**
46
+ * Editorial bucket — a real `.editorial` prose document (mixed headings + body)
47
+ * rendered INSIDE the density scope the story toolbar applies. This witnesses the
48
+ * DS.04 composition: density seats controls, but leaves prose to the engine, so
49
+ * `.editorial` here keeps its natural multi-line leading, seats every line on the
50
+ * grid, AND gets its whole-baseline inter-block margins (--space-after) — with no
51
+ * density override fighting it. Flip context/density in the toolbar: the prose
52
+ * rhythm must NOT change (it is engine-owned), proving density and editorial
53
+ * compose rather than collide.
54
+ */
55
+ export const EditorialLine = () => (_jsx("div", { className: "density-testbed", children: _jsxs("article", { className: "editorial density-testbed__prose", children: [_jsx("h2", { children: "Editorial composes with density" }), _jsx("p", { children: EDITORIAL_BODY }), _jsx("h3", { children: "Inter-block rhythm" }), _jsx("p", { children: PROSE }), _jsx("p", { children: "A second paragraph, so the `--space-after` margin between blocks is visible: each block still opens and closes on a grid line." })] }) }));
56
+ /** Deliberately off-scale sizes — none is a tier. Each is only a `.baseline`
57
+ * element with an inline font-size; if they all seat on the grid, `.baseline`
58
+ * is genuinely size-agnostic (DS.01). */
59
+ const OFF_SCALE = [19, 27, 35, 43, 53, 61];
60
+ /**
61
+ * DS.01 proof — the size-agnostic `.baseline` class. A row of arbitrary,
62
+ * off-scale font sizes, each snapped to the 4px grid by `.baseline` alone (no
63
+ * tier, no engine size class). The tags h1..h6/p are untouched and still nudge
64
+ * by default — this is additive.
65
+ */
66
+ export const BaselineProofLine = () => (_jsx("div", { className: "density-testbed", children: _jsx("div", { className: "baseline-proof", children: OFF_SCALE.map((px) => (_jsxs("span", { className: "baseline", style: { fontSize: `${px}px` }, children: [px, "px"] }, px))) }) }));
67
+ /** Mixed sizes in the density box, at both densities. Kept within what a dense
68
+ * (24px) / comfortable (32px) line-height can hold without clipping. */
69
+ const BOXED_SIZES = [16, 18, 20, 22];
70
+ /**
71
+ * DS.02 proof — `.spike-baseline-boxed` (PROTOTYPE, not core API). Two density
72
+ * line-heights: dense (24px) and comfortable (32px). Each box snaps to the grid
73
+ * via the existing start/end nudge; top-referenced, so the boxes share the top
74
+ * rhythm (a fixed baseline-from-bottom is NOT what the existing calc produces).
75
+ */
76
+ export const BoxedProofLine = () => (_jsx("div", { className: "density-testbed", children: ["is-dense", "is-comfortable"].map((density) => (_jsx("div", { className: `boxed-proof ${density}`, children: BOXED_SIZES.map((px) => (_jsx("span", { className: "baseline spike-baseline-boxed", style: { fontSize: `${px}px` }, children: px }, px))) }, density))) }));
77
+ //# sourceMappingURL=Testbed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Testbed.js","sourceRoot":"","sources":["../../../../../src/lib/_work_in_progress/DensityTestbed/Testbed.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,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