@danske/sapphire-angular 2.2.0 → 2.3.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.
Files changed (29) hide show
  1. package/esm2020/lib/radio/public_api.mjs +3 -1
  2. package/esm2020/lib/radio/src/radio-group.component.mjs +22 -159
  3. package/esm2020/lib/radio/src/radio.component.mjs +8 -267
  4. package/esm2020/lib/radio/src/radio.module.mjs +40 -6
  5. package/esm2020/lib/radio/src/segmented/segmented-radio-group.component.mjs +130 -0
  6. package/esm2020/lib/radio/src/segmented/segmented-radio.component.mjs +25 -0
  7. package/esm2020/lib/radio/src/shared/radio-base.mjs +276 -0
  8. package/esm2020/lib/radio/src/shared/radio-group-base.mjs +166 -0
  9. package/esm2020/lib/segmented-tabs/src/segmented-tabs.component.mjs +19 -12
  10. package/esm2020/lib/table/public_api.mjs +2 -1
  11. package/esm2020/lib/table/src/cdk-virtual-scroll-viewport-fix.directive.mjs +61 -0
  12. package/esm2020/lib/table/src/table.module.mjs +7 -2
  13. package/fesm2015/danske-sapphire-angular.mjs +358 -77
  14. package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
  15. package/fesm2020/danske-sapphire-angular.mjs +354 -76
  16. package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
  17. package/lib/radio/public_api.d.ts +2 -0
  18. package/lib/radio/src/radio-group.component.d.ts +5 -60
  19. package/lib/radio/src/radio.component.d.ts +4 -96
  20. package/lib/radio/src/radio.module.d.ts +8 -5
  21. package/lib/radio/src/segmented/segmented-radio-group.component.d.ts +40 -0
  22. package/lib/radio/src/segmented/segmented-radio.component.d.ts +8 -0
  23. package/lib/radio/src/shared/radio-base.d.ts +103 -0
  24. package/lib/radio/src/shared/radio-group-base.d.ts +63 -0
  25. package/lib/segmented-tabs/src/segmented-tabs.component.d.ts +3 -2
  26. package/lib/table/public_api.d.ts +1 -0
  27. package/lib/table/src/cdk-virtual-scroll-viewport-fix.directive.d.ts +25 -0
  28. package/lib/table/src/table.module.d.ts +3 -2
  29. package/package.json +2 -2
@@ -1,3 +1,5 @@
1
1
  export * from './src/radio.component';
2
2
  export * from './src/radio-group.component';
3
3
  export * from './src/radio.module';
4
+ export * from './src/segmented/segmented-radio.component';
5
+ export * from './src/segmented/segmented-radio-group.component';
@@ -1,65 +1,10 @@
1
- import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
- import { RadioComponent, SapphireRadioChange } from './radio.component';
3
- import { ControlValueAccessor } from '@angular/forms';
4
- import { BooleanInput } from '@angular/cdk/coercion';
1
+ import { RadioGroupBase } from './shared/radio-group-base';
5
2
  import { FocusOrigin } from '@angular/cdk/a11y';
6
- import { FieldControl } from '../../field/src/field-control';
7
- import { FieldComponent } from '../../field/src/field.component';
8
3
  import * as i0 from "@angular/core";
9
4
  import * as i1 from "../../theme/src/theme-check.directive";
10
- export declare class RadioGroupComponent implements ControlValueAccessor, FieldControl {
11
- private changeDetectorRef;
12
- _field: FieldComponent;
13
- uniqueId: string;
5
+ export declare class RadioGroupComponent extends RadioGroupBase {
14
6
  orientation: 'vertical' | 'horizontal';
15
- /** Name of the radio button group. All radio buttons inside this group will use this name. */
16
- get name(): string;
17
- set name(value: string);
18
- private _name;
19
- /**
20
- * Event emitted when the group value changes.
21
- * Change events are only emitted when the value changes due to user interaction with
22
- * the radio button (the same behavior as `<input type-"radio">`).
23
- */
24
- readonly change: EventEmitter<SapphireRadioChange>;
25
- get value(): any;
26
- set value(newValue: any);
27
- private _value;
28
- /**
29
- * The currently selected radio button. If set to a new radio button, the radio group value
30
- * will be updated to match the new selected button. */
31
- get selected(): RadioComponent | null;
32
- set selected(selected: RadioComponent | null);
33
- private _selected;
34
- /** Whether the radio group is disabled */
35
- get disabled(): boolean;
36
- set disabled(value: BooleanInput);
37
- private _disabled;
38
- /** Whether the radio group is readonly */
39
- get readonly(): boolean;
40
- set readonly(value: BooleanInput);
41
- private _readonly;
42
- /** Whether the radio group is required */
43
- get required(): boolean;
44
- set required(value: BooleanInput);
45
- private _required;
46
- /** Child radio buttons. */
47
- private radios;
48
- private onTouched;
49
- _controlValueAccessorChangeFn: (value: any) => void;
50
- constructor(changeDetectorRef: ChangeDetectorRef, _field: FieldComponent);
51
- _checkSelectedRadioButton(): void;
52
- /** Dispatch change event with current selection and group value. */
53
- _emitChangeEvent(): void;
54
- writeValue(value: any): void;
55
- registerOnChange(fn: (value: any) => void): void;
56
- registerOnTouched(fn: any): void;
57
- setDisabledState(disabled: boolean): void;
58
- isDisabled(): boolean;
59
- _contentFocusChanged(focusOrigin: FocusOrigin): void;
60
- /** Updates the `selected` radio button from the internal _value state. */
61
- private updateSelectedRadioFromValue;
62
- private updateRadioButtonNames;
63
- static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupComponent, [null, { optional: true; }]>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioGroupComponent, "sp-radio-group", never, { "orientation": "orientation"; "name": "name"; "value": "value"; "selected": "selected"; "disabled": "disabled"; "readonly": "readonly"; "required": "required"; }, { "change": "change"; }, ["radios"], ["*"], false, [{ directive: typeof i1.ThemeCheckDirective; inputs: {}; outputs: {}; }]>;
7
+ _onFocusChange(focusOrigin: FocusOrigin): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioGroupComponent, "sp-radio-group", never, { "orientation": "orientation"; }, {}, never, ["*"], false, [{ directive: typeof i1.ThemeCheckDirective; inputs: {}; outputs: {}; }]>;
65
10
  }
@@ -1,99 +1,7 @@
1
- import { AfterViewInit, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import { BooleanInput } from '@angular/cdk/coercion';
3
- import { CanDisable } from '../../common/disabled';
4
- import { HasTabIndex } from '../../common/tabindex';
5
- import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
6
- import { RadioGroupComponent } from './radio-group.component';
7
- import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
1
+ import { RadioBase } from './shared/radio-base';
8
2
  import * as i0 from "@angular/core";
9
3
  import * as i1 from "../../theme/src/theme-check.directive";
10
- /** Change event object emitted by radio. */
11
- export declare class SapphireRadioChange {
12
- /** The new `checked` value of the radio. */
13
- readonly source: RadioComponent;
14
- /** The source radio of the event. */
15
- readonly value: any;
16
- constructor(
17
- /** The new `checked` value of the radio. */
18
- source: RadioComponent,
19
- /** The source radio of the event. */
20
- value: any);
4
+ export declare class RadioComponent extends RadioBase {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent, "sp-radio", never, { "tabIndex": "tabIndex"; }, {}, never, ["*"], false, [{ directive: typeof i1.ThemeCheckDirective; inputs: {}; outputs: {}; }]>;
21
7
  }
22
- declare const _RadioMixinBase: import("../../common/constructor").Constructor<HasTabIndex> & import("../../common/constructor").AbstractConstructor<HasTabIndex> & import("../../common/constructor").Constructor<CanDisable> & import("../../common/constructor").AbstractConstructor<CanDisable> & {
23
- new (_elementRef: ElementRef): {
24
- _elementRef: ElementRef;
25
- };
26
- };
27
- export declare class RadioComponent extends _RadioMixinBase implements OnInit, AfterViewInit, DoCheck, OnDestroy, CanDisable, HasTabIndex {
28
- readonly radioGroup: RadioGroupComponent;
29
- private _focusMonitor;
30
- private _radioDispatcher;
31
- /**
32
- * Attached to the aria-label attribute of the host element. In most cases,
33
- * aria-labelledby will take precedence so this may be omitted.
34
- */
35
- ariaLabel: string;
36
- /**
37
- * Users can specify the `aria-labelledby` attribute which will be forwarded
38
- * to the input element
39
- */
40
- ariaLabelledby: string | null;
41
- /** The 'aria-describedby' attribute is read after the element's label and field type. */
42
- ariaDescribedby: string;
43
- /** Analog to HTML 'name' attribute used to group radios for unique selection. */
44
- name: string;
45
- /** Analog to HTML 'name' attribute used to group radios for unique selection. */
46
- autofocus: boolean;
47
- _getAriaChecked(): 'true' | 'false';
48
- /** A unique id for the radio input. If none is supplied, it will be auto-generated. */
49
- id: string;
50
- /** Returns the unique id for the visual hidden input. */
51
- get inputId(): string;
52
- /** Previous value of the input's tabindex. */
53
- private previousTabIndex;
54
- /** Unregister function for _radioDispatcher */
55
- private removeUniqueSelectionListener;
56
- /** The native `<input type="radio">` element */
57
- _inputElement: ElementRef<HTMLInputElement>;
58
- /** The value of this radio button. */
59
- get value(): any;
60
- set value(value: any);
61
- private _value;
62
- /** Whether this radio button is checked. */
63
- get checked(): boolean;
64
- set checked(value: BooleanInput);
65
- private _checked;
66
- /** Whether the radio button is disabled. */
67
- get disabled(): boolean;
68
- set disabled(value: BooleanInput);
69
- private _disabled;
70
- /** Whether the radio button is readonly. */
71
- get readonly(): boolean;
72
- set readonly(value: BooleanInput);
73
- private _readonly;
74
- /** Whether the radio button is required. */
75
- get required(): boolean;
76
- set required(value: BooleanInput);
77
- private _required;
78
- /**
79
- * Event emitted when the checked state of this radio button changes.
80
- * Change events are only emitted when the value changes due to user interaction with
81
- * the radio button (the same behavior as `<input type-"radio">`).
82
- */
83
- readonly change: EventEmitter<SapphireRadioChange>;
84
- constructor(radioGroup: RadioGroupComponent, elementRef: ElementRef, tabIndex: string, _focusMonitor: FocusMonitor, _radioDispatcher: UniqueSelectionDispatcher);
85
- ngDoCheck(): void;
86
- ngOnInit(): void;
87
- ngAfterViewInit(): void;
88
- ngOnDestroy(): void;
89
- /** Focuses the radio button. */
90
- focus(options?: FocusOptions, origin?: FocusOrigin): void;
91
- /** Gets the tabindex for the underlying input element. */
92
- private updateTabIndex;
93
- private emitChangeEvent;
94
- /** Triggered when the radio button receives an interaction from the user. */
95
- _onInputInteraction(event: Event): void;
96
- static ɵfac: i0.ɵɵFactoryDeclaration<RadioComponent, [{ optional: true; }, null, { attribute: "tabindex"; }, null, null]>;
97
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent, "sp-radio", never, { "tabIndex": "tabIndex"; "ariaLabel": "aria-label"; "ariaLabelledby": "aria-labelledby"; "ariaDescribedby": "aria-describedby"; "name": "name"; "autofocus": "autofocus"; "id": "id"; "value": "value"; "checked": "checked"; "disabled": "disabled"; "readonly": "readonly"; "required": "required"; }, { "change": "change"; }, never, ["*"], false, [{ directive: typeof i1.ThemeCheckDirective; inputs: {}; outputs: {}; }]>;
98
- }
99
- export {};
@@ -1,12 +1,15 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./radio.component";
3
3
  import * as i2 from "./radio-group.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "../../label/src/label.component";
6
- import * as i5 from "@angular/cdk/a11y";
7
- import * as i6 from "../../field/src/field.module";
4
+ import * as i3 from "./segmented/segmented-radio.component";
5
+ import * as i4 from "./segmented/segmented-radio-group.component";
6
+ import * as i5 from "@angular/common";
7
+ import * as i6 from "../../label/src/label.component";
8
+ import * as i7 from "@angular/cdk/a11y";
9
+ import * as i8 from "../../field/src/field.module";
10
+ import * as i9 from "../../common/sapphire-view-encapsulation";
8
11
  export declare class SapphireRadioModule {
9
12
  static ɵfac: i0.ɵɵFactoryDeclaration<SapphireRadioModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireRadioModule, [typeof i1.RadioComponent, typeof i2.RadioGroupComponent], [typeof i3.CommonModule, typeof i4.LabelComponent, typeof i5.A11yModule, typeof i6.SapphireFieldModule], [typeof i1.RadioComponent, typeof i2.RadioGroupComponent, typeof i6.SapphireFieldModule]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireRadioModule, [typeof i1.RadioComponent, typeof i2.RadioGroupComponent, typeof i3.SegmentedRadioComponent, typeof i4.SegmentedRadioGroupComponent], [typeof i5.CommonModule, typeof i6.LabelComponent, typeof i7.A11yModule, typeof i8.SapphireFieldModule, typeof i9.UseComponentStyles], [typeof i1.RadioComponent, typeof i2.RadioGroupComponent, typeof i3.SegmentedRadioComponent, typeof i4.SegmentedRadioGroupComponent, typeof i8.SapphireFieldModule]>;
11
14
  static ɵinj: i0.ɵɵInjectorDeclaration<SapphireRadioModule>;
12
15
  }
@@ -0,0 +1,40 @@
1
+ import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, OnDestroy } from '@angular/core';
2
+ import { RadioGroupBase } from '../shared/radio-group-base';
3
+ import { FocusOrigin } from '@angular/cdk/a11y';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "../../../theme/src/theme-check.directive";
6
+ export declare class SegmentedRadioGroupComponent extends RadioGroupBase implements AfterViewInit, OnDestroy, AfterViewChecked {
7
+ private zone;
8
+ private changeDetector;
9
+ segmentedControl: ElementRef;
10
+ /**
11
+ * Label (not shown on the screen).
12
+ * Required for accessibility reasons.
13
+ **/
14
+ ariaLabel: string;
15
+ /** Size of tabs */
16
+ size: 'sm' | 'md' | 'lg';
17
+ /**
18
+ * Alignment of tabs' buttons group.
19
+ * @default 'left'
20
+ */
21
+ align?: 'left' | 'center' | 'right' | 'stretch';
22
+ private resizeObserver;
23
+ _gliderStyles: {
24
+ left: string;
25
+ width: string;
26
+ };
27
+ _animationEnabled: boolean;
28
+ _focusVisible: boolean;
29
+ constructor(zone: NgZone, changeDetector: ChangeDetectorRef);
30
+ private skipAnimationFrame;
31
+ private setGliderStyles;
32
+ private getSelectedTabPosition;
33
+ private shouldUpdateGliderStyles;
34
+ ngAfterViewInit(): void;
35
+ ngAfterViewChecked(): void;
36
+ ngOnDestroy(): void;
37
+ _onFocusChange(focusOrigin: FocusOrigin): void;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedRadioGroupComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedRadioGroupComponent, "sp-segmented-radio-group", never, { "ariaLabel": "aria-label"; "size": "size"; "align": "align"; }, {}, never, ["*"], false, [{ directive: typeof i1.ThemeCheckDirective; inputs: {}; outputs: {}; }]>;
40
+ }
@@ -0,0 +1,8 @@
1
+ import { RadioBase } from '../shared/radio-base';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "../../../theme/src/theme-check.directive";
4
+ import * as i2 from "../../../common/sapphire-view-encapsulation";
5
+ export declare class SegmentedRadioComponent extends RadioBase {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedRadioComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedRadioComponent, "sp-segmented-radio", never, { "tabIndex": "tabIndex"; }, {}, never, ["*"], false, [{ directive: typeof i1.ThemeCheckDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.UseComponentStyles; inputs: {}; outputs: {}; }]>;
8
+ }
@@ -0,0 +1,103 @@
1
+ import { AfterViewInit, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
3
+ import { CanDisable } from '../../../common/disabled';
4
+ import { HasTabIndex } from '../../../common/tabindex';
5
+ import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
6
+ import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
7
+ import { RadioGroupBase } from './radio-group-base';
8
+ import * as i0 from "@angular/core";
9
+ /** Change event object emitted by radio. */
10
+ export declare class SapphireRadioChange {
11
+ /** The new `checked` value of the radio. */
12
+ readonly source: RadioBase;
13
+ /** The source radio of the event. */
14
+ readonly value: any;
15
+ constructor(
16
+ /** The new `checked` value of the radio. */
17
+ source: RadioBase,
18
+ /** The source radio of the event. */
19
+ value: any);
20
+ }
21
+ declare const _RadioMixinBase: import("../../../common/constructor").Constructor<HasTabIndex> & import("../../../common/constructor").AbstractConstructor<HasTabIndex> & import("../../../common/constructor").Constructor<CanDisable> & import("../../../common/constructor").AbstractConstructor<CanDisable> & {
22
+ new (_elementRef: ElementRef): {
23
+ _elementRef: ElementRef;
24
+ };
25
+ };
26
+ /**
27
+ * @Directive decorator is just to be able to have a constructor with DI.
28
+ * This class is being extended by other components.
29
+ **/
30
+ export declare class RadioBase extends _RadioMixinBase implements OnInit, AfterViewInit, DoCheck, OnDestroy, CanDisable, HasTabIndex {
31
+ readonly radioGroup: RadioGroupBase;
32
+ elementRef: ElementRef<HTMLLIElement>;
33
+ private _focusMonitor;
34
+ private _radioDispatcher;
35
+ /**
36
+ * Attached to the aria-label attribute of the host element. In most cases,
37
+ * aria-labelledby will take precedence so this may be omitted.
38
+ */
39
+ ariaLabel: string;
40
+ /**
41
+ * Users can specify the `aria-labelledby` attribute which will be forwarded
42
+ * to the input element
43
+ */
44
+ ariaLabelledby: string | null;
45
+ /** The 'aria-describedby' attribute is read after the element's label and field type. */
46
+ ariaDescribedby: string;
47
+ /** Analog to HTML 'name' attribute used to group radios for unique selection. */
48
+ name: string;
49
+ /** Analog to HTML 'name' attribute used to group radios for unique selection. */
50
+ autofocus: boolean;
51
+ _getAriaChecked(): 'true' | 'false';
52
+ /** A unique id for the radio input. If none is supplied, it will be auto-generated. */
53
+ id: string;
54
+ /** Returns the unique id for the visual hidden input. */
55
+ get inputId(): string;
56
+ /** Previous value of the input's tabindex. */
57
+ private previousTabIndex;
58
+ /** Unregister function for _radioDispatcher */
59
+ private removeUniqueSelectionListener;
60
+ /** The native `<input type="radio">` element */
61
+ _inputElement: ElementRef<HTMLInputElement>;
62
+ /** The value of this radio button. */
63
+ get value(): any;
64
+ set value(value: any);
65
+ private _value;
66
+ /** Whether this radio button is checked. */
67
+ get checked(): boolean;
68
+ set checked(value: BooleanInput);
69
+ private _checked;
70
+ /** Whether the radio button is disabled. */
71
+ get disabled(): boolean;
72
+ set disabled(value: BooleanInput);
73
+ private _disabled;
74
+ /** Whether the radio button is readonly. */
75
+ get readonly(): boolean;
76
+ set readonly(value: BooleanInput);
77
+ private _readonly;
78
+ /** Whether the radio button is required. */
79
+ get required(): boolean;
80
+ set required(value: BooleanInput);
81
+ private _required;
82
+ /**
83
+ * Event emitted when the checked state of this radio button changes.
84
+ * Change events are only emitted when the value changes due to user interaction with
85
+ * the radio button (the same behavior as `<input type-"radio">`).
86
+ */
87
+ readonly change: EventEmitter<SapphireRadioChange>;
88
+ constructor(radioGroup: RadioGroupBase, elementRef: ElementRef<HTMLLIElement>, tabIndex: string, _focusMonitor: FocusMonitor, _radioDispatcher: UniqueSelectionDispatcher);
89
+ ngDoCheck(): void;
90
+ ngOnInit(): void;
91
+ ngAfterViewInit(): void;
92
+ ngOnDestroy(): void;
93
+ /** Focuses the radio button. */
94
+ focus(options?: FocusOptions, origin?: FocusOrigin): void;
95
+ /** Gets the tabindex for the underlying input element. */
96
+ private updateTabIndex;
97
+ private emitChangeEvent;
98
+ /** Triggered when the radio button receives an interaction from the user. */
99
+ _onInputInteraction(event: Event): void;
100
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioBase, [{ optional: true; }, null, { attribute: "tabindex"; }, null, null]>;
101
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RadioBase, never, never, { "ariaLabel": "aria-label"; "ariaLabelledby": "aria-labelledby"; "ariaDescribedby": "aria-describedby"; "name": "name"; "autofocus": "autofocus"; "id": "id"; "value": "value"; "checked": "checked"; "disabled": "disabled"; "readonly": "readonly"; "required": "required"; }, { "change": "change"; }, never, never, false, never>;
102
+ }
103
+ export {};
@@ -0,0 +1,63 @@
1
+ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
+ import { RadioComponent } from '../radio.component';
3
+ import { ControlValueAccessor } from '@angular/forms';
4
+ import { BooleanInput } from '@angular/cdk/coercion';
5
+ import { FieldControl } from '../../../field/src/field-control';
6
+ import { SapphireRadioChange } from './radio-base';
7
+ import { FieldComponent } from '../../../field/src/field.component';
8
+ import * as i0 from "@angular/core";
9
+ export declare abstract class RadioGroupBase implements ControlValueAccessor, FieldControl {
10
+ private changeDetectorRef;
11
+ _field: FieldComponent;
12
+ uniqueId: string;
13
+ orientation: 'vertical' | 'horizontal';
14
+ /** Name of the radio button group. All radio buttons inside this group will use this name. */
15
+ get name(): string;
16
+ set name(value: string);
17
+ private _name;
18
+ /**
19
+ * Event emitted when the group value changes.
20
+ * Change events are only emitted when the value changes due to user interaction with
21
+ * the radio button (the same behavior as `<input type-"radio">`).
22
+ */
23
+ readonly change: EventEmitter<SapphireRadioChange>;
24
+ get value(): any;
25
+ set value(newValue: any);
26
+ private _value;
27
+ /**
28
+ * The currently selected radio button. If set to a new radio button, the radio group value
29
+ * will be updated to match the new selected button. */
30
+ get selected(): RadioComponent | null;
31
+ set selected(selected: RadioComponent | null);
32
+ private _selected;
33
+ /** Whether the radio group is disabled */
34
+ get disabled(): boolean;
35
+ set disabled(value: BooleanInput);
36
+ private _disabled;
37
+ /** Whether the radio group is readonly */
38
+ get readonly(): boolean;
39
+ set readonly(value: BooleanInput);
40
+ private _readonly;
41
+ /** Whether the radio group is required */
42
+ get required(): boolean;
43
+ set required(value: BooleanInput);
44
+ private _required;
45
+ /** Child radio buttons. */
46
+ private radios;
47
+ onTouched: () => any;
48
+ _controlValueAccessorChangeFn: (value: any) => void;
49
+ constructor(changeDetectorRef: ChangeDetectorRef, _field: FieldComponent);
50
+ _checkSelectedRadioButton(): void;
51
+ /** Dispatch change event with current selection and group value. */
52
+ _emitChangeEvent(): void;
53
+ writeValue(value: any): void;
54
+ registerOnChange(fn: (value: any) => void): void;
55
+ registerOnTouched(fn: any): void;
56
+ setDisabledState(disabled: boolean): void;
57
+ isDisabled(): boolean;
58
+ /** Updates the `selected` radio button from the internal _value state. */
59
+ private updateSelectedRadioFromValue;
60
+ private updateRadioButtonNames;
61
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupBase, [null, { optional: true; }]>;
62
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RadioGroupBase, never, never, { "orientation": "orientation"; "name": "name"; "value": "value"; "selected": "selected"; "disabled": "disabled"; "readonly": "readonly"; "required": "required"; }, { "change": "change"; }, ["radios"], never, true, never>;
63
+ }
@@ -27,7 +27,7 @@ export declare class SegmentedTabsComponent implements AfterContentInit, AfterVi
27
27
  readonly tabs: QueryList<SegmentedTabComponent>;
28
28
  private _tabIds;
29
29
  private resizeObserver;
30
- _activeTabPosition: {
30
+ _gliderStyles: {
31
31
  left: string;
32
32
  width: string;
33
33
  };
@@ -44,7 +44,8 @@ export declare class SegmentedTabsComponent implements AfterContentInit, AfterVi
44
44
  _getTabContentTemplate(): import("@angular/core").TemplateRef<any> | null;
45
45
  _onFocusChange(origin: FocusOrigin): void;
46
46
  _onKeyDown(event: KeyboardEvent): void;
47
- private setActiveTabPosition;
47
+ private setGliderStyles;
48
+ private getSelectedTabPosition;
48
49
  private onTabsChange;
49
50
  private skipAnimationFrame;
50
51
  private findFocusableIndex;
@@ -9,3 +9,4 @@ export * from './src/table-head.directive';
9
9
  export * from './src/table-sort.directive';
10
10
  export * from './src/table-sort-header.directive';
11
11
  export * from './src/table.module';
12
+ export { CdkVirtualScrollViewportFixDirective } from './src/cdk-virtual-scroll-viewport-fix.directive';
@@ -0,0 +1,25 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * A patch to fix the issue of sticky header position getting affected
6
+ * by transform, which is due to transform making the element
7
+ * a [containing block](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block).
8
+ *
9
+ * It intercepts style assignments on the content wrapper, and converts
10
+ * transform: translateY(value) to top: value, to avoid making the content
11
+ * wrapper a containing block for sticky positioned children.
12
+ *
13
+ * @see
14
+ * https://github.com/angular/components/issues/14833
15
+ * https://github.com/angular/components/issues/18240
16
+ * https://github.com/angular/components/issues/21576
17
+ * https://github.com/angular/components/issues/28584
18
+ */
19
+ export declare class CdkVirtualScrollViewportFixDirective implements OnInit {
20
+ private cdkViewport;
21
+ constructor(cdkViewport: CdkVirtualScrollViewport);
22
+ ngOnInit(): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkVirtualScrollViewportFixDirective, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkVirtualScrollViewportFixDirective, "cdk-virtual-scroll-viewport", never, {}, {}, never, never, true, never>;
25
+ }
@@ -12,9 +12,10 @@ import * as i10 from "./table-sort-header.directive";
12
12
  import * as i11 from "@angular/common";
13
13
  import * as i12 from "../../icon/src/icon.module";
14
14
  import * as i13 from "../../tooltip/src/truncated-with-tooltip.directive";
15
- import * as i14 from "../../common/sapphire-view-encapsulation";
15
+ import * as i14 from "./cdk-virtual-scroll-viewport-fix.directive";
16
+ import * as i15 from "../../common/sapphire-view-encapsulation";
16
17
  export declare class SapphireTableModule {
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<SapphireTableModule, never>;
18
- static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireTableModule, [typeof i1.TableComponent, typeof i2.TableDirective, typeof i3.TableBodyDirective, typeof i4.TableFooterDirective, typeof i5.TableHeadDirective, typeof i6.TableRowDirective, typeof i7.TableHeadCellComponent, typeof i8.TableCellDirective, typeof i9.TableSortDirective, typeof i10.TableSortHeaderDirective], [typeof i11.CommonModule, typeof i12.SapphireIconModule, typeof i13.TruncatedWithTooltipDirective, typeof i14.UseComponentStyles], [typeof i1.TableComponent, typeof i2.TableDirective, typeof i3.TableBodyDirective, typeof i4.TableFooterDirective, typeof i5.TableHeadDirective, typeof i6.TableRowDirective, typeof i7.TableHeadCellComponent, typeof i8.TableCellDirective, typeof i9.TableSortDirective, typeof i10.TableSortHeaderDirective]>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireTableModule, [typeof i1.TableComponent, typeof i2.TableDirective, typeof i3.TableBodyDirective, typeof i4.TableFooterDirective, typeof i5.TableHeadDirective, typeof i6.TableRowDirective, typeof i7.TableHeadCellComponent, typeof i8.TableCellDirective, typeof i9.TableSortDirective, typeof i10.TableSortHeaderDirective], [typeof i11.CommonModule, typeof i12.SapphireIconModule, typeof i13.TruncatedWithTooltipDirective, typeof i14.CdkVirtualScrollViewportFixDirective, typeof i15.UseComponentStyles], [typeof i1.TableComponent, typeof i2.TableDirective, typeof i3.TableBodyDirective, typeof i4.TableFooterDirective, typeof i5.TableHeadDirective, typeof i6.TableRowDirective, typeof i7.TableHeadCellComponent, typeof i8.TableCellDirective, typeof i9.TableSortDirective, typeof i10.TableSortHeaderDirective, typeof i14.CdkVirtualScrollViewportFixDirective]>;
19
20
  static ɵinj: i0.ɵɵInjectorDeclaration<SapphireTableModule>;
20
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-angular",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "The Angular implementation of the Sapphire Design System from Danske Bank A/S",
6
6
  "module": "fesm2015/danske-sapphire-angular.mjs",
@@ -20,7 +20,7 @@
20
20
  "@internationalized/message": "^3.1.5",
21
21
  "tslib": "^2.3.0"
22
22
  },
23
- "gitHead": "5289085e86eb94dc62d1e843364fbbd8f0c1903f",
23
+ "gitHead": "10be74789a9ced77ceebd1636b35c2ff99a115d9",
24
24
  "es2020": "fesm2020/danske-sapphire-angular.mjs",
25
25
  "esm2020": "esm2020/danske-sapphire-angular.mjs",
26
26
  "fesm2020": "fesm2020/danske-sapphire-angular.mjs",