ng-hub-ui-forms 22.19.1 → 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 +26 -1
- package/fesm2022/ng-hub-ui-forms.mjs +32 -13
- package/fesm2022/ng-hub-ui-forms.mjs.map +1 -1
- package/ng-hub-ui-forms-22.20.1.tgz +0 -0
- package/package.json +1 -1
- package/styles/_group-addons.scss +42 -0
- package/types/ng-hub-ui-forms.d.ts +24 -5
- package/ng-hub-ui-forms-22.19.1.tgz +0 -0
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
|