ng-hub-ui-forms 22.20.0 → 22.20.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/README.md CHANGED
@@ -257,8 +257,33 @@ outermost on its side. A unit labels the field; the action sits beyond it.
257
257
  </hub-input>
258
258
  ```
259
259
 
260
+ A slot can also hand over a **field**, not only an action. A price and the period it is a price
261
+ of are one statement — "180 € a month" — and splitting them into two separate fields makes the
262
+ reader put it back together on every row.
263
+
264
+ ```html
265
+ <hub-input formControlName="rate" label="Rate" prepend="€">
266
+ <ng-template hubAppend>
267
+ <hub-select
268
+ formControlName="period"
269
+ [items]="periods"
270
+ bindLabel="name"
271
+ bindValue="id"
272
+ [clearable]="false"
273
+ placeholder="per"
274
+ />
275
+ </ng-template>
276
+ </hub-input>
277
+ ```
278
+
279
+ `hub-input`, `hub-select`, `hub-textarea` and `hub-datepicker` are the four that close flush, and
280
+ only as a **direct child** of the template — wrap one in a `<div>` and it falls back to the
281
+ treatment an action gets.
282
+
260
283
  Whatever is projected wears the field's border, radius and height rather than its own, so a
261
- button does not draw a second, thicker seam beside the control.
284
+ button does not draw a second, thicker seam beside the control. A projected field hands that over
285
+ one level deeper — its host gives up the border and the inner control takes the squaring —
286
+ because a field keeps its box on the control rather than on its host.
262
287
 
263
288
  > Import `HubPrependDirective` / `HubAppendDirective` from `ng-hub-ui-forms`.
264
289
  > `[hubSelectSuffix]` is **deprecated** in favour of `[hubAppend]`, which does the same on every
@@ -970,9 +970,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
970
970
 
971
971
  /**
972
972
  * Marks content attached to the **inline-end edge** of a field (right in LTR, left in RTL) —
973
- * an icon, a button, anything richer than the text an `append` string can carry. This is the
974
- * slot for an action that operates on the field's value: search it, calculate it, copy it,
975
- * configure it.
973
+ * an icon, a button, another field, anything richer than the text an `append` string can carry.
974
+ * This is the slot for whatever operates on the field's value: search it, calculate it, copy it,
975
+ * configure it, or say what unit it is in.
976
+ *
977
+ * **A field is allowed too, not only an action.** `hub-input`, `hub-select`, `hub-textarea` and
978
+ * `hub-datepicker` may be projected here and close flush against the host field, which is how a
979
+ * price and the period it is a price of stay one statement — "180 € a month" — instead of two
980
+ * fields the reader has to put back together. It works a level deeper than for a button: a field
981
+ * keeps its box on the control inside it rather than on its host, so the host gives up the border
982
+ * and padding it should never have taken and the inner control takes the squaring. Only those
983
+ * four, and only as a **direct child** of the template — wrap one in a `<div>` and it falls back
984
+ * to the treatment an action gets.
976
985
  *
977
986
  * Works on every field that renders as a box with a value: `<hub-input>`, `<hub-select>`,
978
987
  * `<hub-textarea>` and `<hub-datepicker>`. Composes with the `append` input, which stays the
@@ -1010,7 +1019,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1010
1019
 
1011
1020
  /**
1012
1021
  * Marks content attached to the **inline-start edge** of a field (left in LTR, right in RTL) —
1013
- * an icon, a button, anything richer than the text a `prepend` string can carry.
1022
+ * an icon, a button, another field, anything richer than the text a `prepend` string can carry.
1023
+ *
1024
+ * **A field is allowed too, not only an action.** `hub-input`, `hub-select`, `hub-textarea` and
1025
+ * `hub-datepicker` may be projected here and close flush against the host field, which is how a
1026
+ * price and the period it is a price of stay one statement — "180 € a month" — instead of two
1027
+ * fields the reader has to put back together. It works a level deeper than for a button: a field
1028
+ * keeps its box on the control inside it rather than on its host, so the host gives up the border
1029
+ * and padding it should never have taken and the inner control takes the squaring. Only those
1030
+ * four, and only as a **direct child** of the template — wrap one in a `<div>` and it falls back
1031
+ * to the treatment an action gets.
1014
1032
  *
1015
1033
  * Works on every field that renders as a box with a value: `<hub-input>`, `<hub-select>`,
1016
1034
  * `<hub-textarea>` and `<hub-datepicker>`. Composes with the `prepend` input, which stays the
@@ -1024,7 +1042,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1024
1042
  * around an attached button.
1025
1043
  *
1026
1044
  * Whatever is projected wears the field's border, radius and height rather than its own, so a
1027
- * `hubButton` does not draw a second, thicker seam beside the control.
1045
+ * `hubButton` does not draw a second, thicker seam beside the control — and a projected field
1046
+ * hands that over from its host to the control inside it, for the same reason.
1028
1047
  *
1029
1048
  * ```html
1030
1049
  * <hub-input formControlName="amount" label="Amount">