@vectoriox/iox-ui 5.27.0 → 5.29.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 (32) hide show
  1. package/design-core/index.d.ts +186 -7
  2. package/fesm2022/vectoriox-iox-ui-design-core.mjs +201 -11
  3. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  4. package/fesm2022/vectoriox-iox-ui-forms-core.mjs +119 -5
  5. package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +591 -181
  7. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui.mjs +189 -16
  9. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  10. package/forms-core/index.d.ts +59 -3
  11. package/generation-core/index.d.ts +206 -74
  12. package/index.d.ts +30 -3
  13. package/package.json +1 -1
  14. package/src/design-core/contrast-audit.ts +7 -6
  15. package/src/design-core/flavor-spec.generated.ts +170 -5
  16. package/src/design-core/node-links.ts +32 -0
  17. package/src/design-core/public-api.ts +1 -0
  18. package/src/forms-core/collect.ts +3 -1
  19. package/src/forms-core/form-presets.ts +105 -0
  20. package/src/forms-core/options.ts +29 -0
  21. package/src/forms-core/public-api.ts +2 -0
  22. package/src/forms-core/transport.ts +6 -2
  23. package/src/generation-core/baseline-roles.ts +75 -0
  24. package/src/generation-core/compose-site.ts +256 -95
  25. package/src/generation-core/node-baselines.generated.ts +90 -0
  26. package/src/generation-core/patterns.ts +31 -9
  27. package/src/generation-core/public-api.ts +1 -0
  28. package/src/generation-core/serialized-node.ts +13 -2
  29. package/src/generation-core/site-plan.model.ts +4 -3
  30. package/src/generation-core/site-spec.generated.ts +110 -57
  31. package/src/generation-core/validate-site-plan.ts +52 -20
  32. package/styles/iox-forms.css +136 -8
@@ -119,7 +119,8 @@
119
119
  .iox-es-field .iox-field__control:focus-visible {
120
120
  border-color: var(--iox-accent-text);
121
121
  box-shadow: var(--iox-field-focus);
122
- outline: none;
122
+ outline: 2px solid transparent;
123
+ outline-offset: 2px;
123
124
  }
124
125
  .iox-es-field .iox-field__label {
125
126
  font-family: var(--iox-font-body);
@@ -127,6 +128,13 @@
127
128
  font-weight: var(--iox-field-label-weight);
128
129
  color: var(--iox-text);
129
130
  }
131
+ /* A radio's choice reads like the label beside it: the look's body type in the look's text. */
132
+ .iox-es-field .iox-field__option {
133
+ font-family: var(--iox-font-body);
134
+ font-size: var(--iox-size-body);
135
+ color: var(--iox-text);
136
+ cursor: pointer;
137
+ }
130
138
  .iox-es-field .iox-field__help {
131
139
  font-size: var(--iox-size-small);
132
140
  color: var(--iox-text-muted);
@@ -139,21 +147,141 @@
139
147
  border-color: var(--iox-danger);
140
148
  }
141
149
  /* DS9 (contrast audit): the placeholder is themed (the UA's #757575 read 1:1 in a Brand section); the
142
- native controls, the focus edge and the switch read `accent-text` — the accent GATED as text on every
150
+ focus edge, the switch and the range thumb read `accent-text` — the accent GATED as text on every
143
151
  ground — never the `accent` fill (Pop's orange on its yellow panel: 2.13:1); the off track is
144
- `text-muted` under a `bg` thumb (the decorative `line` it wore read 1.06:1). WCAG 1.4.11: 3:1. */
152
+ `text-muted` under a `bg` thumb (the decorative `line` it wore read 1.06:1). WCAG 1.4.11: 3:1.
153
+ Focus: the transparent outline is what forced-colors mode paints once it drops the box-shadow ring. */
145
154
  .iox-es-field .iox-field__control::placeholder {
146
155
  color: var(--iox-text-muted);
147
156
  opacity: 1;
148
157
  }
149
- /* Native-appearance controls (checkbox, radio, range — and the switch, a checkbox) draw themselves:
150
- the box baseline must not frame them. `:where()` keeps this at the baseline's specificity, so the
151
- switch rules below still paint the track. */
152
- .iox-es-field .iox-field__control:where([type='checkbox'], [type='radio'], [type='range']) {
158
+ .iox-es-field .iox-field__control:disabled {
159
+ opacity: 0.55;
160
+ cursor: not-allowed;
161
+ }
162
+ /* The switch and the range draw themselves: the box baseline must not frame them. `:where()` keeps this
163
+ at the baseline's specificity, so the switch rules below still paint the track. */
164
+ .iox-es-field .iox-field__control:where(.iox-field__control--switch, [type='range']) {
153
165
  border: none;
154
166
  padding: 0;
155
167
  background: transparent;
156
- accent-color: var(--iox-accent-text);
168
+ }
169
+ /* Checkbox and radio, drawn by the look (2026-10-19 — `accent-color` only TINTED the browser's own box,
170
+ so every flavor showed a browser default). 1.25em of the control's own size (the body step) · the
171
+ field's edge width in `line-strong` (≥ 3:1 on every ground) · the surface fill · `radius-xs` (a radio
172
+ is round) · checked: the `accent` fill, an `accent-text` edge and a mark in `accent-ink` (≥ 4.5:1 on
173
+ the fill). The mark is a BORDER — a rotated corner, a radio's dot a zero-size circle of border — so
174
+ forced-colors mode repaints it in the system ink (a background mark would vanish). Not mirrored in
175
+ RTL: a check mark is not a direction. Every motion reads dur-fast, which reduced motion sets to 0ms. */
176
+ .iox-es-field .iox-field__control:where([type='checkbox']:not(.iox-field__control--switch), [type='radio']) {
177
+ appearance: none;
178
+ -webkit-appearance: none;
179
+ display: inline-grid;
180
+ place-content: center;
181
+ flex-shrink: 0;
182
+ margin: 0;
183
+ padding: 0;
184
+ inline-size: 1.25em;
185
+ block-size: 1.25em;
186
+ vertical-align: middle;
187
+ cursor: pointer;
188
+ background: var(--iox-surface);
189
+ border-color: var(--iox-line-strong);
190
+ border-radius: var(--iox-radius-xs);
191
+ transition: background var(--iox-dur-fast) var(--iox-ease-standard), border-color var(--iox-dur-fast) var(--iox-ease-standard), box-shadow var(--iox-dur-fast) var(--iox-ease-standard);
192
+ }
193
+ .iox-es-field .iox-field__control[type='radio'] {
194
+ border-radius: 50%;
195
+ }
196
+ .iox-es-field .iox-field__control:where([type='checkbox']:not(.iox-field__control--switch), [type='radio'])::before {
197
+ content: '';
198
+ inline-size: 0.28em;
199
+ block-size: 0.56em;
200
+ border-style: solid;
201
+ border-color: var(--iox-accent-ink);
202
+ border-width: 0 0.14em 0.14em 0;
203
+ transform: translateY(-0.08em) rotate(45deg) scale(0);
204
+ transition: transform var(--iox-dur-fast) var(--iox-ease-standard);
205
+ }
206
+ .iox-es-field .iox-field__control[type='radio']::before {
207
+ inline-size: 0;
208
+ block-size: 0;
209
+ border-width: 0.25em;
210
+ border-radius: 50%;
211
+ transform: scale(0);
212
+ }
213
+ .iox-es-field .iox-field__control:where([type='checkbox']:not(.iox-field__control--switch), [type='radio']):hover {
214
+ border-color: var(--iox-accent-text);
215
+ }
216
+ .iox-es-field .iox-field__control:where([type='checkbox']:not(.iox-field__control--switch), [type='radio']):checked {
217
+ background: var(--iox-accent);
218
+ border-color: var(--iox-accent-text);
219
+ }
220
+ .iox-es-field .iox-field__control:where([type='checkbox']:not(.iox-field__control--switch), [type='radio']):checked:hover {
221
+ background: var(--iox-accent-hover);
222
+ }
223
+ .iox-es-field .iox-field__control:where([type='checkbox']:not(.iox-field__control--switch), [type='radio']):checked::before {
224
+ transform: translateY(-0.08em) rotate(45deg) scale(1);
225
+ }
226
+ .iox-es-field .iox-field__control[type='radio']:checked::before {
227
+ transform: scale(1);
228
+ }
229
+ .iox-es-field .iox-field__control:where([type='checkbox']:not(.iox-field__control--switch), [type='radio']):focus-visible {
230
+ box-shadow: var(--iox-focus-ring);
231
+ }
232
+ /* Range: the track is `line-strong`, the thumb `accent-text` on a `bg` ring, the focus ring on the THUMB.
233
+ One rule per vendor pseudo-element — a selector list mixing -webkit- and -moz- is dropped whole by
234
+ the engine that does not know the other. */
235
+ .iox-es-field .iox-field__control:where([type='range']) {
236
+ appearance: none;
237
+ -webkit-appearance: none;
238
+ inline-size: 100%;
239
+ block-size: 1.25em;
240
+ cursor: pointer;
241
+ }
242
+ .iox-es-field .iox-field__control:where([type='range'])::-webkit-slider-runnable-track {
243
+ block-size: 0.25em;
244
+ border-radius: var(--iox-radius-pill);
245
+ background: var(--iox-line-strong);
246
+ outline: 1px solid transparent;
247
+ }
248
+ .iox-es-field .iox-field__control:where([type='range'])::-moz-range-track {
249
+ block-size: 0.25em;
250
+ border-radius: var(--iox-radius-pill);
251
+ background: var(--iox-line-strong);
252
+ outline: 1px solid transparent;
253
+ }
254
+ .iox-es-field .iox-field__control:where([type='range'])::-webkit-slider-thumb {
255
+ appearance: none;
256
+ -webkit-appearance: none;
257
+ inline-size: 1.25em;
258
+ block-size: 1.25em;
259
+ border-radius: 50%;
260
+ background: var(--iox-accent-text);
261
+ border: 2px solid var(--iox-bg);
262
+ box-sizing: border-box;
263
+ cursor: pointer;
264
+ margin-block-start: -0.5em;
265
+ }
266
+ .iox-es-field .iox-field__control:where([type='range'])::-moz-range-thumb {
267
+ appearance: none;
268
+ -webkit-appearance: none;
269
+ inline-size: 1.25em;
270
+ block-size: 1.25em;
271
+ border-radius: 50%;
272
+ background: var(--iox-accent-text);
273
+ border: 2px solid var(--iox-bg);
274
+ box-sizing: border-box;
275
+ cursor: pointer;
276
+ }
277
+ .iox-es-field .iox-field__control:where([type='range']):focus-visible {
278
+ box-shadow: none;
279
+ }
280
+ .iox-es-field .iox-field__control:where([type='range']):focus-visible::-webkit-slider-thumb {
281
+ box-shadow: var(--iox-focus-ring);
282
+ }
283
+ .iox-es-field .iox-field__control:where([type='range']):focus-visible::-moz-range-thumb {
284
+ box-shadow: var(--iox-focus-ring);
157
285
  }
158
286
  .iox-es-field .iox-field__control--switch {
159
287
  background: var(--iox-text-muted);