@ids-group-ltd/ids-design-system 0.15.3 → 1.0.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/CHANGELOG.md +51 -0
- package/agent/forms/ds-autocomplete.md +1 -1
- package/agent/forms/ds-button.md +1 -1
- package/agent/forms/ds-checkbox.md +1 -1
- package/agent/forms/ds-color-picker.md +1 -1
- package/agent/forms/ds-date-picker.md +1 -1
- package/agent/forms/ds-input.md +1 -1
- package/agent/forms/ds-multi-select.md +1 -1
- package/agent/forms/ds-otp-input.md +1 -1
- package/agent/forms/ds-radio-group.md +1 -1
- package/agent/forms/ds-radio.md +1 -1
- package/agent/forms/ds-search.md +1 -1
- package/agent/forms/ds-segmented.md +1 -1
- package/agent/forms/ds-select.md +1 -1
- package/agent/forms/ds-slider.md +1 -1
- package/agent/forms/ds-switch.md +1 -1
- package/agent/forms/ds-textarea.md +1 -1
- package/agent/forms/ds-time-picker.md +1 -1
- package/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
- package/components.md +19 -19
- package/eslint/deprecated-api.json +217 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +15 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +0 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +3 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-submitted.mjs +52 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-submitted.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +0 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +211 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +17 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +56 -42
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/1.0.0.json +374 -0
- package/package.json +9 -1
- package/schematics/check-overrides/surface.json +1 -1
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +1 -2
- package/types/ids-group-ltd-ids-design-system-components-submitted.d.ts +27 -0
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +23 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +23 -20
- package/types/ids-group-ltd-ids-design-system.d.ts +2 -1
|
@@ -415,6 +415,11 @@ type DsFieldErrorsInput = string | DsFieldError | readonly DsFieldError[] | null
|
|
|
415
415
|
* warning state and does NOT make the control invalid.
|
|
416
416
|
*/
|
|
417
417
|
declare const DS_FIELD_WARNING_KIND = "warning";
|
|
418
|
+
/**
|
|
419
|
+
* The submit flag `[dsSubmitted]` provides to the fields inside it: validation errors show only
|
|
420
|
+
* while it reads `true`.
|
|
421
|
+
*/
|
|
422
|
+
declare const DS_SUBMITTED: InjectionToken<Signal<boolean>>;
|
|
418
423
|
/** @internal */
|
|
419
424
|
declare function trimmedText(value: string | null | undefined): string;
|
|
420
425
|
/** The single line a field shows below itself, already resolved.
|
|
@@ -429,15 +434,13 @@ interface DsFieldMessageSources {
|
|
|
429
434
|
warning: Signal<string>;
|
|
430
435
|
error: Signal<string>;
|
|
431
436
|
errors: Signal<readonly DsFieldError[]>;
|
|
437
|
+
/** Errors the control raises itself (an unparseable date), shown on the same terms as `errors`. */
|
|
438
|
+
ownErrors?: Signal<readonly DsFieldError[]>;
|
|
432
439
|
invalid: Signal<boolean>;
|
|
433
440
|
/** The control's own disabled state (a disabled control is not announced as invalid). A getter,
|
|
434
441
|
* not a `Signal`, so a caller can hand it over before its own `isDisabled` is initialised. */
|
|
435
442
|
disabled?: () => boolean;
|
|
436
443
|
success?: Signal<string>;
|
|
437
|
-
/** The field's own touched state, if it tracks one (CVA blur). */
|
|
438
|
-
touchedSelf?: Signal<boolean>;
|
|
439
|
-
/** Bound by signal forms as part of the `FormUiControl` contract. */
|
|
440
|
-
touched?: Signal<boolean>;
|
|
441
444
|
/** Bound by signal forms; an async validator is running. */
|
|
442
445
|
pending?: Signal<boolean>;
|
|
443
446
|
/** Bound by signal forms; the user changed the value. */
|
|
@@ -461,15 +464,17 @@ interface DsFieldMessageResolution {
|
|
|
461
464
|
* Precedence, highest first:
|
|
462
465
|
*
|
|
463
466
|
* 1. `error` - an explicit string. Shown immediately: the consumer decided.
|
|
464
|
-
* 2. `errors` - validation errors. Shown once the
|
|
465
|
-
* `
|
|
467
|
+
* 2. `errors` - validation errors. Shown once the form is submitted: `[dsSubmitted]` reads
|
|
468
|
+
* `true`, or the parent `NgForm` / `FormGroupDirective` was submitted. Never on blur.
|
|
466
469
|
* 3. `warning` - advisory, not blocking.
|
|
467
470
|
* 4. `errors` whose kind is `DS_FIELD_WARNING_KIND` - the same, raised by the form model.
|
|
468
471
|
* 5. `success` - confirmation.
|
|
469
472
|
* 6. `hint` - helper text.
|
|
470
473
|
*
|
|
471
|
-
* Signal forms binds `errors` and `
|
|
472
|
-
* template-driven forms expose the same through `NgControl`, read here.
|
|
474
|
+
* Signal forms binds `errors` and `invalid` by input name (`FormUiControl`); reactive and
|
|
475
|
+
* template-driven forms expose the same through `NgControl`, read here. `invalid` with errors
|
|
476
|
+
* behind it waits for the submit like them; `invalid` alone was set by the consumer and paints
|
|
477
|
+
* immediately.
|
|
473
478
|
*
|
|
474
479
|
* Every rung carries its OWN text; `hint` is never recoloured into another state. `invalid` has
|
|
475
480
|
* no text: it paints the control and sets `aria-invalid`.
|
|
@@ -485,19 +490,19 @@ declare function resolveFieldMessage(sources: DsFieldMessageSources): DsFieldMes
|
|
|
485
490
|
* @internal
|
|
486
491
|
*/
|
|
487
492
|
declare abstract class DsFieldBase extends DsMessageBase {
|
|
488
|
-
/** Validation errors, shown once the
|
|
489
|
-
* reactive
|
|
493
|
+
/** Validation errors, shown once the form is submitted (`[dsSubmitted]`, or `ngSubmit` of a
|
|
494
|
+
* reactive or template-driven form). Bound by signal forms; reactive and template-driven
|
|
495
|
+
* forms are read through `NgControl`. */
|
|
490
496
|
readonly errors: i0.InputSignalWithTransform<readonly DsFieldError[], DsFieldErrorsInput>;
|
|
491
|
-
/** Paints the error state and sets `aria-invalid` WITHOUT a message; use `error` to show text.
|
|
497
|
+
/** Paints the error state and sets `aria-invalid` WITHOUT a message; use `error` to show text.
|
|
498
|
+
* Signal forms binds it alongside `errors`, and then it waits for the submit like them. */
|
|
492
499
|
readonly invalid: i0.InputSignalWithTransform<boolean, unknown>;
|
|
493
|
-
/** Whether the user has interacted with the field. Bound by signal forms; gates `errors`. */
|
|
494
|
-
readonly touched: i0.InputSignalWithTransform<boolean, unknown>;
|
|
495
500
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsFieldBase, never>;
|
|
496
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DsFieldBase, never, never, { "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; };
|
|
501
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsFieldBase, never, never, { "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
497
502
|
}
|
|
498
503
|
/**
|
|
499
504
|
* The form-state inputs of a DS value control: what signal forms binds by name beyond `errors`
|
|
500
|
-
* and `
|
|
505
|
+
* and `invalid`. Reactive and template-driven forms are read through `NgControl` instead.
|
|
501
506
|
* @internal
|
|
502
507
|
*/
|
|
503
508
|
declare abstract class DsFormControlBase extends DsFieldBase {
|
|
@@ -524,7 +529,6 @@ declare abstract class DsFormControlBase extends DsFieldBase {
|
|
|
524
529
|
*/
|
|
525
530
|
declare function valueControlBridge<T>(model: () => ModelSignal<T>): {
|
|
526
531
|
readonly formDisabled: WritableSignal<boolean>;
|
|
527
|
-
readonly touchedSelf: WritableSignal<boolean>;
|
|
528
532
|
markTouched(): void;
|
|
529
533
|
writeValue(next: T): void;
|
|
530
534
|
registerOnChange(fn: (next: T) => void): void;
|
|
@@ -542,13 +546,13 @@ declare abstract class DsControlValueAccessor<T> extends DsFormControlBase imple
|
|
|
542
546
|
/** Hides the control. Inline `display`: the `hidden` attribute loses to each control's `:host` display. */
|
|
543
547
|
readonly hidden: i0.InputSignalWithTransform<boolean, unknown>;
|
|
544
548
|
private readonly hostElement;
|
|
545
|
-
|
|
549
|
+
constructor();
|
|
550
|
+
/** Focuses the control's own input or trigger; `focusBoundControl()` reaches it through the host. */
|
|
546
551
|
focus(options?: FocusOptions): void;
|
|
547
552
|
/** Drops focus from anywhere inside this control; a portaled panel is left alone. */
|
|
548
553
|
blur(): void;
|
|
549
554
|
private readonly bridge;
|
|
550
555
|
protected readonly formDisabled: WritableSignal<boolean>;
|
|
551
|
-
protected readonly touchedSelf: WritableSignal<boolean>;
|
|
552
556
|
protected markTouched(): void;
|
|
553
557
|
writeValue(value: T): void;
|
|
554
558
|
registerOnChange(fn: (value: T) => void): void;
|
|
@@ -573,7 +577,6 @@ declare abstract class DsBooleanControlValueAccessor extends DsFormControlBase i
|
|
|
573
577
|
/** See `DsControlValueAccessor.blur`. */
|
|
574
578
|
blur(): void;
|
|
575
579
|
protected readonly formDisabled: WritableSignal<boolean>;
|
|
576
|
-
protected readonly touchedSelf: WritableSignal<boolean>;
|
|
577
580
|
private onChange;
|
|
578
581
|
private onTouched;
|
|
579
582
|
private synced;
|
|
@@ -1040,5 +1043,5 @@ declare function resolveChartDefaults(inputs: ChartDefaultInputs): {
|
|
|
1040
1043
|
tooltipSwatches: Signal<boolean | "auto">;
|
|
1041
1044
|
};
|
|
1042
1045
|
|
|
1043
|
-
export { CHART_GLIDE_HEAD_START_MS, CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_SKELETON_COUNT, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChartBase, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsFormControlBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, afterTwoFrames, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDelay, chartDwell, chartHoverDelayMs, chartOf, chartRenderGate, chartTiming, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, dimmedBy, disposeWithLeave, domainMinOf, dropdownMinWidth, dropdownOverlay, dsAriaCurrent, dsDestination, dwellHighlight, elementWidth, focusIsInside, focusMark, focusRescue, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, leftMark, linePath, lineSegments, linearScale, listenForEscape, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, moveFocusOutOf, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, prepareOverlayEnter, readOnHostResize, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, skeletonColumnHeights, skeletonFunnelClips, skeletonLineClip, skeletonMarkCount, skeletonWaterfallSteps, staggerDelay, tickValues, trimmedText, tweenMarks, valueControlBridge, watchElementWidth };
|
|
1046
|
+
export { CHART_GLIDE_HEAD_START_MS, CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_SKELETON_COUNT, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DS_SUBMITTED, DsBooleanControlValueAccessor, DsChartBase, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsFormControlBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, afterTwoFrames, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDelay, chartDwell, chartHoverDelayMs, chartOf, chartRenderGate, chartTiming, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, dimmedBy, disposeWithLeave, domainMinOf, dropdownMinWidth, dropdownOverlay, dsAriaCurrent, dsDestination, dwellHighlight, elementWidth, focusIsInside, focusMark, focusRescue, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, leftMark, linePath, lineSegments, linearScale, listenForEscape, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, moveFocusOutOf, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, prepareOverlayEnter, readOnHostResize, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, skeletonColumnHeights, skeletonFunnelClips, skeletonLineClip, skeletonMarkCount, skeletonWaterfallSteps, staggerDelay, tickValues, trimmedText, tweenMarks, valueControlBridge, watchElementWidth };
|
|
1044
1047
|
export type { BandScale, ChartDimmable, ChartDwell, ChartMotionDelay, ChartMotionTiming, ChartStaggered, ChartWithDataTable, ChartWithTooltipTrigger, DsAriaCurrent, DsDestination, DsFieldError, DsFieldErrorsInput, DsFieldMessage, DsLinkModifiers, DsOverlayCloseCause, DsRouterLink, LinePoint, MarkHit, NiceDomain, RovingMarks, SummaryPoint };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DS_FIELD_WARNING_KIND, DsAriaCurrent, DsChipTemplateDirective, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldError, DsFieldErrorsInput, DsGroupLabelTemplateDirective, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsRouterLink, DsStaticPreview, FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';
|
|
1
|
+
export { DS_FIELD_WARNING_KIND, DS_SUBMITTED, DsAriaCurrent, DsChipTemplateDirective, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldError, DsFieldErrorsInput, DsGroupLabelTemplateDirective, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsRouterLink, DsStaticPreview, FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';
|
|
2
2
|
export { ACCORDION, AccordionChevron, AccordionComponent, AccordionContract, AccordionItemComponent, AccordionItemRef } from '@ids-group-ltd/ids-design-system/components/accordion';
|
|
3
3
|
export { AlertComponent, AlertVariant } from '@ids-group-ltd/ids-design-system/components/alert';
|
|
4
4
|
export { AppLayoutComponent, AppLayoutNavigationService, AppLayoutScrollService, DsAppLayoutScrollReset, RailTriggerDirective } from '@ids-group-ltd/ids-design-system/components/app-layout';
|
|
@@ -68,6 +68,7 @@ export { SplitButtonComponent, SplitButtonItem, SplitButtonVariant } from '@ids-
|
|
|
68
68
|
export { StatComponent } from '@ids-group-ltd/ids-design-system/components/stat';
|
|
69
69
|
export { StatusDotComponent } from '@ids-group-ltd/ids-design-system/components/status-dot';
|
|
70
70
|
export { StepperComponent, StepperLabelPosition, StepperOrientation } from '@ids-group-ltd/ids-design-system/components/stepper';
|
|
71
|
+
export { SubmittedDirective } from '@ids-group-ltd/ids-design-system/components/submitted';
|
|
71
72
|
export { SwitchComponent } from '@ids-group-ltd/ids-design-system/components/switch';
|
|
72
73
|
export { CellTemplateContext, CellTemplateDirective, HeaderFilterContext, HeaderFilterDirective, SortChangeEvent, SortDirection, TableCellEditEvent, TableColumn, TableColumnKind, TableComponent, TableExpandMode, TableFilterMode, TableRowAction, TableRowActionEvent, TableSortMode } from '@ids-group-ltd/ids-design-system/components/table';
|
|
73
74
|
export { DsTableColumns } from '@ids-group-ltd/ids-design-system/components/table-columns';
|