@vectoriox/iox-ui 4.29.1 → 4.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "4.29.1",
3
+ "version": "4.30.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -0,0 +1,56 @@
1
+ /* Form state visibility — the ONE copy.
2
+ *
3
+ * Which state block a visitor (or an author on the canvas) sees is decided here, keyed on the form
4
+ * host's `data-iox-state`. That attribute is written by BOTH the builder's canvas state switcher and
5
+ * the runtime's submit lifecycle, so the block an author designs is exactly the block a visitor
6
+ * gets — one mechanism, two drivers, no plumbing down the tree.
7
+ *
8
+ * It lives in a plain CSS asset because THREE renderers need it and none of them share a component:
9
+ * · the SSR engine's string renderer emits plain markup (no Angular components at all),
10
+ * · the engine's component path renders IoxFormComponent,
11
+ * · the builder canvas renders the container twin, which is a different component again.
12
+ * A component-scoped copy in each would be three copies that drift. Consumers add this file to
13
+ * their `angular.json` styles.
14
+ *
15
+ * ⚠️ The selectors deliberately out-specify `.iox-node-{id}` (0,3,0 vs 0,1,0): the state machine owns
16
+ * visibility, the author owns everything else about the block.
17
+ */
18
+
19
+ /* ⚠️ SPECIFICITY IS LOAD-BEARING HERE, and getting it wrong is silent.
20
+ *
21
+ * A node's own rule is `.iox-node-{id} { display: block }` — (0,1,0) — and it is injected into a
22
+ * runtime <style> element that comes AFTER this file. So a bare `.iox-form-success { display: none }`
23
+ * would TIE on specificity and lose on source order, leaving both state blocks permanently visible.
24
+ * Scoping the hide to `.iox-form` makes it (0,2,0), and the reveal (0,3,0) beats that in turn. */
25
+ .iox-form .iox-form-success,
26
+ .iox-form .iox-form-error { display: none; }
27
+
28
+ .iox-form[data-iox-state="success"] .iox-form-success { display: block; }
29
+ .iox-form[data-iox-state="error"] .iox-form-error { display: block; }
30
+
31
+ /* A submitted form hides its inputs: the success message REPLACES them, rather than sitting under a
32
+ form the visitor might fill in and send a second time. An error leaves them alone — the visitor
33
+ has to be able to fix and retry. */
34
+ .iox-form[data-iox-state="success"] .iox-field,
35
+ .iox-form[data-iox-state="success"] .iox-field-group,
36
+ .iox-form[data-iox-state="success"] .iox-submit { display: none; }
37
+
38
+ /* Same trap as above: the builder's canvas hosts carry `.container-root` too, and the node rule
39
+ still wins a tie — these are (0,3,0), so they hold. */
40
+
41
+ /* Structural base styles, shared by the string-rendered markup and both component paths. */
42
+ .iox-form { box-sizing: border-box; }
43
+ .iox-field { box-sizing: border-box; display: block; }
44
+ .iox-field__label { display: block; }
45
+ .iox-field__control { box-sizing: border-box; font: inherit; color: inherit; }
46
+ .iox-field__group { display: flex; flex-direction: column; gap: 4px; }
47
+ .iox-field__option { display: flex; align-items: center; gap: 8px; }
48
+ .iox-field__help { margin: 4px 0 0; }
49
+ .iox-field__error { margin: 4px 0 0; }
50
+ .iox-submit { font: inherit; border: none; cursor: pointer; }
51
+
52
+ /* Visually hidden, still announced — a label may be hidden, never deleted. */
53
+ .iox-field__label--hidden {
54
+ position: absolute; width: 1px; height: 1px; margin: -1px;
55
+ padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
56
+ }