ng-hub-ui-forms 22.47.0 → 22.47.2

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": "ng-hub-ui-forms",
3
- "version": "22.47.0",
3
+ "version": "22.47.2",
4
4
  "license": "MIT",
5
5
  "description": "Accessible, signal-based form fields for Angular (input, textarea, slider, segmented, select, datepicker, file input with drag & drop and upload progress) with automatic error display for controls, FormGroups and FormArrays. Reactive Forms today, Signal Forms ready. Part of the ng-hub-ui family.",
6
6
  "author": "Carlos Morcillo Fernández <carlos.morcillo@me.com> (https://www.carlosmorcillo.com)",
@@ -83,6 +83,42 @@
83
83
  }
84
84
  }
85
85
 
86
+ // ── One focus ring for the whole group ────────────────────────────────
87
+ //
88
+ // The ring used to be each box's own, so focusing the number beside a currency select
89
+ // drew a halo around the number and cut it off at the seam, as though the select were a
90
+ // separate field. A group with something attached is one field to the reader, so the ring
91
+ // moves to the group and the boxes inside give theirs up. Only groups that actually carry
92
+ // attached content: the same wrapper also holds inner affixes and the counter, where the
93
+ // control already is the whole field.
94
+ //
95
+ // `:is()` keeps the group at two classes, so each rule below outranks the box's own focus
96
+ // rule by one: `.hub-field__control:focus` and its invalid variant are two classes, the
97
+ // select's focused container is four.
98
+ .hub-#{$field}__group:is(.hub-#{$field}__group--has-prepend, .hub-#{$field}__group--has-append) {
99
+ border-radius: #{$radius};
100
+ transition: var(--hub-input-transition);
101
+
102
+ .hub-field__control:focus,
103
+ .hub-#{$field}__control:focus,
104
+ .ng-select.ng-select-focused .ng-select-container,
105
+ .ng-select.ng-select-opened .ng-select-container {
106
+ box-shadow: none;
107
+ }
108
+
109
+ &:focus-within {
110
+ box-shadow: var(--hub-#{$field}-focus-box-shadow, var(--hub-input-focus-box-shadow));
111
+ }
112
+
113
+ &:has(.hub-field__control--invalid, .hub-#{$field}__control--invalid):focus-within {
114
+ box-shadow: 0 0 0 var(--hub-form-focus-ring-width) var(--hub-form-invalid-focus-ring-color);
115
+ }
116
+
117
+ &:has(.hub-field__control--valid, .hub-#{$field}__control--valid):focus-within {
118
+ box-shadow: 0 0 0 var(--hub-form-focus-ring-width) var(--hub-form-valid-focus-ring-color);
119
+ }
120
+ }
121
+
86
122
  // ── Static addons (`prepend` / `append` strings) ──────────────────────
87
123
  .hub-#{$field}__addon {
88
124
  display: flex;