ng-hub-ui-forms 22.41.0 → 22.42.0

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.41.0",
3
+ "version": "22.42.0",
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)",
@@ -615,6 +615,8 @@
615
615
  --hub-select-dropdown-border-color: var(--hub-sys-border-color-default, #dee2e6);
616
616
  --hub-select-dropdown-border-radius: var(--hub-ref-radius-md, 0.375rem);
617
617
  --hub-select-dropdown-box-shadow: var(--hub-sys-shadow, 0 0.5rem 1rem rgba(0, 0, 0, 0.15));
618
+ // How far a list may grow past its control to show its options whole.
619
+ --hub-select-dropdown-max-width: 24rem;
618
620
  // Dropdown panel stacking. The vendored ng-select hard-codes `z-index: 1050` on
619
621
  // `.ng-dropdown-panel` — one below HubModal (`--hub-sys-zindex-modal`, 1055) — so a
620
622
  // select opened inside a modal was clipped underneath it. Sit a few layers above
@@ -3430,6 +3430,50 @@ declare class HubAutoresizeDirective implements OnInit {
3430
3430
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubAutoresizeDirective, "textarea[hubAutoresize]", never, { "hubAutoresize": { "alias": "hubAutoresize"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
3431
3431
  }
3432
3432
 
3433
+ /**
3434
+ * Takes the person to what is wrong, on the button that found it.
3435
+ *
3436
+ * Put it on a submit or «Next» button. It answers for the button's own form (the one it sits in,
3437
+ * or the one its `form` attribute names), or for the element you give it. Each press that leaves errors on screen scrolls to the next one and focuses its
3438
+ * control, so a long form with three mistakes is walked in three presses instead of hunted by
3439
+ * eye; after the last one it starts again from the first.
3440
+ *
3441
+ * It reads the page and not a form model, because errors come from several places: reactive
3442
+ * controls, fields drawn from a schema, the cells of a sheet. What counts as an error is the
3443
+ * hub fields' own invalid state plus whatever `hubScrollToErrorSelector` adds, so a product can
3444
+ * teach it its own error marks without forking it.
3445
+ *
3446
+ * It runs after the button's own handler has had a frame to paint the errors, and does nothing
3447
+ * when there are none, so it never stands in the way of a valid submit. Scrolling is instant
3448
+ * when the reader asks for reduced motion.
3449
+ *
3450
+ * @example
3451
+ * ```html
3452
+ * <form id="customer" hubForm [formGroup]="group" (submit)="save()">…</form>
3453
+ * <button hubButton type="submit" form="customer" hubScrollToError>Save</button>
3454
+ *
3455
+ * <!-- Another block of the page, with a product's own error marks as well -->
3456
+ * <section #sheet>…</section>
3457
+ * <button [hubScrollToError]="sheet" hubScrollToErrorSelector=".my-error, .hub-spreadsheet__cell--invalid">
3458
+ * ```
3459
+ */
3460
+ declare class HubScrollToErrorDirective {
3461
+ #private;
3462
+ /**
3463
+ * The block of the page whose errors this button walks. Left empty, the button's own form:
3464
+ * a template reference on `<form hubForm>` names the component, not the element, so the
3465
+ * form is reached through the button instead.
3466
+ */
3467
+ readonly hubScrollToError: _angular_core.InputSignal<"" | HTMLElement | ElementRef<HTMLElement>>;
3468
+ /** More CSS selectors that read as an error, added to the hub fields' own. */
3469
+ readonly hubScrollToErrorSelector: _angular_core.InputSignal<string>;
3470
+ protected onClick(): void;
3471
+ /** Scrolls to the next error on screen and focuses it; a no-op when there is none. */
3472
+ goToNextError(): void;
3473
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubScrollToErrorDirective, never>;
3474
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubScrollToErrorDirective, "[hubScrollToError]", never, { "hubScrollToError": { "alias": "hubScrollToError"; "required": false; "isSignal": true; }; "hubScrollToErrorSelector": { "alias": "hubScrollToErrorSelector"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
3475
+ }
3476
+
3433
3477
  /**
3434
3478
  * Marks content attached to the **inline-start edge** of a field (left in LTR, right in RTL) —
3435
3479
  * an icon, a button, another field, anything richer than the text a `prepend` string can carry.
@@ -4101,5 +4145,5 @@ interface HubFormControlAdapter {
4101
4145
  */
4102
4146
  declare const hubFormControlAdapter: HubFormControlAdapter;
4103
4147
 
4104
- export { FormTextTypes, HUB_COLOR_PALETTES, HUB_FILE_UPLOADER, HUB_FORMS_CONFIG, HubAppendDirective, HubAutoresizeDirective, HubDatepickerComponent, HubFieldControl, HubFieldsetComponent, HubFileDropDirective, HubFileDropOverlayComponent, HubFileDropzoneNoticeDirective, HubFileIconDirective, HubFileInputComponent, HubFilePreviewDirective, HubFormComponent, HubFormControl, HubFormTextDirective, HubGroupControl, HubInputComponent, HubInputFormats, HubInputPrefixDirective, HubInputSuffixDirective, HubInvertColorPipe, HubJoinButLastPipe, HubLabelTypes, HubLegendComponent, HubLegendDirective, HubMapPipe, HubOtpInputComponent, HubPrependDirective, HubSafeUrlPipe, HubSegmentedComponent, HubSegmentedOptionDirective, HubSelectClearButtonDirective, HubSelectComponent, HubSelectFooterDirective, HubSelectFormats, HubSelectHeaderDirective, HubSelectLabelDirective, HubSelectLoadingSpinnerDirective, HubSelectLoadingTextDirective, HubSelectMultiLabelDirective, HubSelectNotFoundDirective, HubSelectOptgroupDirective, HubSelectOptionDirective, HubSelectSuffixDirective, HubSelectTagDirective, HubSelectTypeToSearchDirective, HubSliderComponent, HubSnakeUpperPipe, HubTextareaComponent, HubTimepickerComponent, HubUcfirstPipe, HubValidationErrorDirective, NgClearButtonTemplateDirective, NgFooterTemplateDirective, NgHeaderTemplateDirective, NgLabelTemplateDirective, NgLoadingSpinnerTemplateDirective, NgLoadingTextTemplateDirective, NgMultiLabelTemplateDirective, NgNotFoundTemplateDirective, NgOptgroupTemplateDirective, NgOptionComponent, NgOptionTemplateDirective, NgSelectConfig, NgTagTemplateDirective, NgTypeToSearchTemplateDirective, applyMask, areEqual, camelToSnakeUpper, controlHasMinOrMaxValidator, defaultHubColorConfig, defaultHubDatepickerConfig, defaultHubDatepickerLabels, defaultHubFileInputLabels, defaultHubFormsConfig, defaultHubPasswordLabels, defaultInvalidFeedback, fileKey, fileKind, formatFileSize, get, getActiveElement, getMinOrMaxValueFromValidator, hubAcceptedFiles, hubAreEqual, hubFormControlAdapter, hubMaxFileSize, hubMaxFiles, hubMaxTotalSize, hubMinFileSize, hubMinFiles, isDefined, isMaskActive, isString, joinButLast, matchesAccept, provideHubFileUploader, provideHubForms, runInZone, scorePasswordStrength, toFileArray, uuid };
4148
+ export { FormTextTypes, HUB_COLOR_PALETTES, HUB_FILE_UPLOADER, HUB_FORMS_CONFIG, HubAppendDirective, HubAutoresizeDirective, HubDatepickerComponent, HubFieldControl, HubFieldsetComponent, HubFileDropDirective, HubFileDropOverlayComponent, HubFileDropzoneNoticeDirective, HubFileIconDirective, HubFileInputComponent, HubFilePreviewDirective, HubFormComponent, HubFormControl, HubFormTextDirective, HubGroupControl, HubInputComponent, HubInputFormats, HubInputPrefixDirective, HubInputSuffixDirective, HubInvertColorPipe, HubJoinButLastPipe, HubLabelTypes, HubLegendComponent, HubLegendDirective, HubMapPipe, HubOtpInputComponent, HubPrependDirective, HubSafeUrlPipe, HubScrollToErrorDirective, HubSegmentedComponent, HubSegmentedOptionDirective, HubSelectClearButtonDirective, HubSelectComponent, HubSelectFooterDirective, HubSelectFormats, HubSelectHeaderDirective, HubSelectLabelDirective, HubSelectLoadingSpinnerDirective, HubSelectLoadingTextDirective, HubSelectMultiLabelDirective, HubSelectNotFoundDirective, HubSelectOptgroupDirective, HubSelectOptionDirective, HubSelectSuffixDirective, HubSelectTagDirective, HubSelectTypeToSearchDirective, HubSliderComponent, HubSnakeUpperPipe, HubTextareaComponent, HubTimepickerComponent, HubUcfirstPipe, HubValidationErrorDirective, NgClearButtonTemplateDirective, NgFooterTemplateDirective, NgHeaderTemplateDirective, NgLabelTemplateDirective, NgLoadingSpinnerTemplateDirective, NgLoadingTextTemplateDirective, NgMultiLabelTemplateDirective, NgNotFoundTemplateDirective, NgOptgroupTemplateDirective, NgOptionComponent, NgOptionTemplateDirective, NgSelectConfig, NgTagTemplateDirective, NgTypeToSearchTemplateDirective, applyMask, areEqual, camelToSnakeUpper, controlHasMinOrMaxValidator, defaultHubColorConfig, defaultHubDatepickerConfig, defaultHubDatepickerLabels, defaultHubFileInputLabels, defaultHubFormsConfig, defaultHubPasswordLabels, defaultInvalidFeedback, fileKey, fileKind, formatFileSize, get, getActiveElement, getMinOrMaxValueFromValidator, hubAcceptedFiles, hubAreEqual, hubFormControlAdapter, hubMaxFileSize, hubMaxFiles, hubMaxTotalSize, hubMinFileSize, hubMinFiles, isDefined, isMaskActive, isString, joinButLast, matchesAccept, provideHubFileUploader, provideHubForms, runInZone, scorePasswordStrength, toFileArray, uuid };
4105
4149
  export type { FormTextType, HubColorConfig, HubColorPaletteName, HubColorSwatch, HubColorSwatchInput, HubCurrentFile, HubDateRange, HubDateValue, HubDatepickerConfig, HubDatepickerGranularity, HubDatepickerLabels, HubDatepickerMode, HubDatepickerValueFormat, HubFileConstraints, HubFileDropScope, HubFileIconContext, HubFileInputAppearance, HubFileInputLabels, HubFileItem, HubFileKind, HubFilePreview, HubFilePreviewContext, HubFileRejection, HubFileRejectionReason, HubFileStatus, HubFileUploadEvent, HubFileUploader, HubFileValue, HubFormControlAdapter, HubFormControlConfig, HubFormControlHandle, HubFormControlOption, HubFormsConfig, HubGroupErrorTrigger, HubInputFormat, HubLabelType, HubMaskResult, HubOtpMode, HubPasswordLabels, HubPasswordStrengthScore, HubSegmentedOption, HubSegmentedOptionContext, HubSegmentedSize, HubSelectFormat, HubSliderValue };