ng-hub-ui-forms 22.23.1 → 22.23.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 +1 -1
- package/styles/_field.scss +13 -0
- package/styles/_tokens.scss +6 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-hub-ui-forms",
|
|
3
|
-
"version": "22.23.
|
|
3
|
+
"version": "22.23.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 <carlos.morcillo@me.com> (https://www.carlosmorcillo.com)",
|
package/styles/_field.scss
CHANGED
|
@@ -15,6 +15,19 @@ hub-select,
|
|
|
15
15
|
hub-textarea,
|
|
16
16
|
hub-datepicker,
|
|
17
17
|
hub-timepicker {
|
|
18
|
+
/*
|
|
19
|
+
* The space a field leaves under itself when fields are written one under another.
|
|
20
|
+
*
|
|
21
|
+
* Zero by default, which is what every form has always got: the gap between fields has
|
|
22
|
+
* been the container's to give, through its own `gap` or margins. The token exists so a
|
|
23
|
+
* form can hand that job to the fields instead — and, more to the point, so a control
|
|
24
|
+
* created INTO another component's chrome can opt out of it. `hubFormControlAdapter`
|
|
25
|
+
* zeroes it on every control it builds, because a search box inside a table's toolbar
|
|
26
|
+
* is not in a stack and must not reserve room below itself.
|
|
27
|
+
*
|
|
28
|
+
* The default is the fallback here, not a `:root` declaration. A declaration would beat
|
|
29
|
+
* a consumer that sets the token, decided by import order alone.
|
|
30
|
+
*/
|
|
18
31
|
margin-bottom: var(--hub-field-stack-gap, 0);
|
|
19
32
|
}
|
|
20
33
|
|
package/styles/_tokens.scss
CHANGED
|
@@ -10,15 +10,12 @@
|
|
|
10
10
|
:root {
|
|
11
11
|
// ── Shared form contract (used by every field) ──────────────────────────
|
|
12
12
|
--hub-form-field-gap: var(--hub-ref-space-1, 0.25rem); // label ↔ control
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
// zeroes it on every control it builds, because a search box inside a table's toolbar is
|
|
20
|
-
// not in a stack and must not reserve room below itself.
|
|
21
|
-
--hub-field-stack-gap: 0;
|
|
13
|
+
// `--hub-field-stack-gap` is deliberately NOT declared here. Its default lives in the
|
|
14
|
+
// rule that reads it (`var(--hub-field-stack-gap, 0)`, see _field.scss), because a
|
|
15
|
+
// declaration in this block would silently beat a consumer that sets the token — the
|
|
16
|
+
// winner being whichever stylesheet the application happens to import last. One did:
|
|
17
|
+
// an application declaring `1rem` had every stacked field come out touching, because
|
|
18
|
+
// its own token file was imported before this one.
|
|
22
19
|
--hub-form-row-gap: var(--hub-ref-space-3, 1rem); // horizontal label gutter
|
|
23
20
|
--hub-form-fieldset-padding-x: var(--hub-ref-space-3, 1rem);
|
|
24
21
|
--hub-form-fieldset-padding-y: var(--hub-ref-space-3, 1rem);
|