@radix-ng/primitives 0.30.0 → 0.32.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 (79) hide show
  1. package/config/index.d.ts +2 -0
  2. package/config/src/config.d.ts +21 -0
  3. package/config/src/config.provider.d.ts +10 -0
  4. package/core/index.d.ts +3 -2
  5. package/core/src/kbd-constants.d.ts +40 -0
  6. package/dropdown-menu/src/dropdown-menu-label.directive.d.ts +2 -1
  7. package/dropdown-menu/src/dropdown-menu-separator.directive.d.ts +2 -2
  8. package/fesm2022/radix-ng-primitives-accordion.mjs +19 -19
  9. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +22 -22
  10. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +3 -3
  11. package/fesm2022/radix-ng-primitives-avatar.mjs +16 -16
  12. package/fesm2022/radix-ng-primitives-checkbox.mjs +16 -16
  13. package/fesm2022/radix-ng-primitives-collapsible.mjs +9 -9
  14. package/fesm2022/radix-ng-primitives-config.mjs +54 -0
  15. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -0
  16. package/fesm2022/radix-ng-primitives-context-menu.mjs +34 -34
  17. package/fesm2022/radix-ng-primitives-core.mjs +50 -9
  18. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-dialog.mjs +25 -25
  20. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +38 -43
  21. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-hover-card.mjs +28 -28
  23. package/fesm2022/radix-ng-primitives-label.mjs +7 -10
  24. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-menu.mjs +37 -37
  26. package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
  27. package/fesm2022/radix-ng-primitives-pagination.mjs +327 -0
  28. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -0
  29. package/fesm2022/radix-ng-primitives-popover.mjs +28 -28
  30. package/fesm2022/radix-ng-primitives-progress.mjs +10 -10
  31. package/fesm2022/radix-ng-primitives-radio.mjs +12 -12
  32. package/fesm2022/radix-ng-primitives-roving-focus.mjs +6 -6
  33. package/fesm2022/radix-ng-primitives-select.mjs +34 -34
  34. package/fesm2022/radix-ng-primitives-separator.mjs +21 -9
  35. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-slider.mjs +31 -31
  37. package/fesm2022/radix-ng-primitives-stepper.mjs +473 -0
  38. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -0
  39. package/fesm2022/radix-ng-primitives-switch.mjs +13 -13
  40. package/fesm2022/radix-ng-primitives-tabs.mjs +16 -16
  41. package/fesm2022/radix-ng-primitives-toggle-group.mjs +9 -9
  42. package/fesm2022/radix-ng-primitives-toggle.mjs +6 -6
  43. package/fesm2022/radix-ng-primitives-toolbar.mjs +22 -22
  44. package/fesm2022/radix-ng-primitives-tooltip.mjs +28 -28
  45. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +9 -9
  46. package/hover-card/src/hover-card-root.directive.d.ts +4 -4
  47. package/label/src/label.directive.d.ts +4 -7
  48. package/package.json +1 -1
  49. package/pagination/README.md +1 -0
  50. package/pagination/index.d.ts +23 -0
  51. package/pagination/src/pagination-context.token.d.ts +11 -0
  52. package/pagination/src/pagination-ellipsis.directive.d.ts +5 -0
  53. package/pagination/src/pagination-first.directive.d.ts +8 -0
  54. package/pagination/src/pagination-last.directive.d.ts +8 -0
  55. package/pagination/src/pagination-list-item.directive.d.ts +10 -0
  56. package/pagination/src/pagination-list.directive.d.ts +12 -0
  57. package/pagination/src/pagination-next.directive.d.ts +8 -0
  58. package/pagination/src/pagination-prev.directive.d.ts +8 -0
  59. package/pagination/src/pagination-root.directive.d.ts +18 -0
  60. package/pagination/src/utils.d.ts +9 -0
  61. package/popover/src/popover-root.directive.d.ts +4 -4
  62. package/separator/src/separator.directive.d.ts +4 -1
  63. package/stepper/README.md +1 -0
  64. package/stepper/index.d.ts +22 -0
  65. package/stepper/src/stepper-description.directive.d.ts +6 -0
  66. package/stepper/src/stepper-indicator.directive.d.ts +6 -0
  67. package/stepper/src/stepper-item-context.token.d.ts +13 -0
  68. package/stepper/src/stepper-item.directive.d.ts +21 -0
  69. package/stepper/src/stepper-root-context.token.d.ts +12 -0
  70. package/stepper/src/stepper-root.directive.d.ts +32 -0
  71. package/stepper/src/stepper-separator.directive.d.ts +10 -0
  72. package/stepper/src/stepper-title.directive.d.ts +6 -0
  73. package/stepper/src/stepper-trigger.directive.d.ts +14 -0
  74. package/stepper/src/types.d.ts +1 -0
  75. package/stepper/src/utils/getActiveElement.d.ts +1 -0
  76. package/stepper/src/utils/useArrowNavigation.d.ts +65 -0
  77. package/tooltip/src/tooltip-root.directive.d.ts +4 -4
  78. /package/core/src/{nullish.d.ts → is-nullish.d.ts} +0 -0
  79. /package/core/src/{isNumber.d.ts → is-number.d.ts} +0 -0
@@ -1,23 +1,20 @@
1
- import { InputSignal } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
2
  /**
4
3
  * @group Components
5
4
  */
6
5
  export declare class RdxLabelDirective {
6
+ private readonly elementRef;
7
7
  /**
8
- * @type string
9
8
  * @default 'rdx-label-{idIterator}'
10
9
  */
11
- readonly id: InputSignal<string>;
12
- protected readonly elementId: import("@angular/core").Signal<string | null>;
10
+ readonly id: import("@angular/core").InputSignal<string>;
13
11
  /**
14
12
  * The id of the element the label is associated with.
15
13
  * @group Props
16
- * @type string
17
14
  * @defaultValue false
18
15
  */
19
- readonly htmlFor: InputSignal<string>;
20
- private readonly elementRef;
16
+ readonly htmlFor: import("@angular/core").InputSignal<string | undefined>;
17
+ protected readonly elementId: import("@angular/core").Signal<string | null>;
21
18
  /**
22
19
  * @ignore
23
20
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ng/primitives",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1 @@
1
+ # @radix-ng/primitives/pagination
@@ -0,0 +1,23 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./src/pagination-root.directive";
3
+ import * as i2 from "./src/pagination-list.directive";
4
+ import * as i3 from "./src/pagination-first.directive";
5
+ import * as i4 from "./src/pagination-prev.directive";
6
+ import * as i5 from "./src/pagination-last.directive";
7
+ import * as i6 from "./src/pagination-next.directive";
8
+ import * as i7 from "./src/pagination-list-item.directive";
9
+ import * as i8 from "./src/pagination-ellipsis.directive";
10
+ export * from './src/pagination-context.token';
11
+ export * from './src/pagination-ellipsis.directive';
12
+ export * from './src/pagination-first.directive';
13
+ export * from './src/pagination-last.directive';
14
+ export * from './src/pagination-list-item.directive';
15
+ export * from './src/pagination-list.directive';
16
+ export * from './src/pagination-next.directive';
17
+ export * from './src/pagination-prev.directive';
18
+ export * from './src/pagination-root.directive';
19
+ export declare class RdxPaginationModule {
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RdxPaginationModule, never, [typeof i1.RdxPaginationRootDirective, typeof i2.RdxPaginationListDirective, typeof i3.RdxPaginationFirstDirective, typeof i4.RdxPaginationPrevDirective, typeof i5.RdxPaginationLastDirective, typeof i6.RdxPaginationNextDirective, typeof i7.RdxPaginationListItemDirective, typeof i8.RdxPaginationEllipsisDirective], [typeof i1.RdxPaginationRootDirective, typeof i2.RdxPaginationListDirective, typeof i3.RdxPaginationFirstDirective, typeof i4.RdxPaginationPrevDirective, typeof i5.RdxPaginationLastDirective, typeof i6.RdxPaginationNextDirective, typeof i7.RdxPaginationListItemDirective, typeof i8.RdxPaginationEllipsisDirective]>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<RdxPaginationModule>;
23
+ }
@@ -0,0 +1,11 @@
1
+ import { computed, InjectionToken, model } from '@angular/core';
2
+ export interface PaginationRootContext {
3
+ page: ReturnType<typeof model<number>>;
4
+ onPageChange: (value: number) => void;
5
+ pageCount: ReturnType<typeof computed<number>>;
6
+ siblingCount: ReturnType<typeof computed<number>>;
7
+ disabled: ReturnType<typeof computed<boolean>>;
8
+ showEdges: ReturnType<typeof computed<boolean>>;
9
+ }
10
+ export declare const PAGINATION_ROOT_CONTEXT: InjectionToken<PaginationRootContext>;
11
+ export declare function injectPaginationRootContext(): PaginationRootContext;
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxPaginationEllipsisDirective {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationEllipsisDirective, never>;
4
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationEllipsisDirective, "[rdxPaginationEllipsis]", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxPaginationFirstDirective {
3
+ private readonly rootContext;
4
+ readonly disabled: import("@angular/core").Signal<boolean>;
5
+ onClick(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationFirstDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationFirstDirective, "[rdxPaginationFirst]", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxPaginationLastDirective {
3
+ private readonly rootContext;
4
+ readonly disabled: import("@angular/core").Signal<boolean>;
5
+ onClick(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationLastDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationLastDirective, "[rdxPaginationLast]", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxPaginationListItemDirective {
3
+ private readonly rootContext;
4
+ readonly value: import("@angular/core").InputSignal<number | undefined>;
5
+ readonly disabled: import("@angular/core").Signal<boolean>;
6
+ readonly isSelected: import("@angular/core").Signal<boolean>;
7
+ onClick(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationListItemDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationListItemDirective, "[rdxPaginationListItem]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxPaginationListDirective {
3
+ private readonly rootContext;
4
+ readonly transformedRange: import("@angular/core").Signal<({
5
+ type: "ellipsis";
6
+ } | {
7
+ type: "page";
8
+ value: number;
9
+ })[]>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationListDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationListDirective, "[rdxPaginationList]", ["rdxPaginationList"], {}, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxPaginationNextDirective {
3
+ private readonly rootContext;
4
+ readonly disabled: import("@angular/core").Signal<boolean>;
5
+ onClick(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationNextDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationNextDirective, "[rdxPaginationNext]", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxPaginationPrevDirective {
3
+ private readonly rootContext;
4
+ readonly disabled: import("@angular/core").Signal<boolean>;
5
+ onClick(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationPrevDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationPrevDirective, "[rdxPaginationPrev]", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,18 @@
1
+ import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RdxPaginationRootDirective {
4
+ readonly defaultPage: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
5
+ readonly page: import("@angular/core").ModelSignal<number>;
6
+ readonly itemsPerPage: import("@angular/core").InputSignalWithTransform<number | undefined, NumberInput>;
7
+ readonly total: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
8
+ readonly siblingCount: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
9
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
10
+ readonly showEdges: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
11
+ readonly updatePage: import("@angular/core").OutputEmitterRef<number>;
12
+ /** @ignore */
13
+ readonly pageCount: import("@angular/core").Signal<number>;
14
+ /** @ignore */
15
+ onPageChange(value: number): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxPaginationRootDirective, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPaginationRootDirective, "[rdxPaginationRoot]", ["rdxPaginationRoot"], { "defaultPage": { "alias": "defaultPage"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "siblingCount": { "alias": "siblingCount"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "showEdges": { "alias": "showEdges"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; "updatePage": "updatePage"; }, never, never, true, never>;
18
+ }
@@ -0,0 +1,9 @@
1
+ type Pages = Array<{
2
+ type: 'ellipsis';
3
+ } | {
4
+ type: 'page';
5
+ value: number;
6
+ }>;
7
+ export declare function transform(items: (string | number)[]): Pages;
8
+ export declare function getRange(currentPage: number, pageCount: number, siblingCount: number, showEdges: boolean): (string | number)[];
9
+ export {};
@@ -70,7 +70,7 @@ export declare class RdxPopoverRootDirective {
70
70
  window: Window & typeof globalThis;
71
71
  primitiveConfigs?: import("./utils/types").PrimitiveConfigs;
72
72
  onDestroyCallbacks: Set<() => void>;
73
- "__#7699@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
73
+ "__#8136@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
74
74
  registerPrimitive<T extends object>(primitiveInstance: T): void;
75
75
  deregisterPrimitive<T extends object>(primitiveInstance: T): void;
76
76
  preventPrimitiveFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): void;
@@ -81,9 +81,9 @@ export declare class RdxPopoverRootDirective {
81
81
  primitivePreventedFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): boolean | undefined;
82
82
  addClickDomRootEventCallback(callback: (event: MouseEvent) => void): void;
83
83
  removeClickDomRootEventCallback(callback: (event: MouseEvent) => void): boolean;
84
- "__#7699@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
85
- "__#7699@#registerOnDestroyCallbacks"(): void;
86
- "__#7699@#listenToClickDomRootEvent"(): void;
84
+ "__#8136@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
85
+ "__#8136@#registerOnDestroyCallbacks"(): void;
86
+ "__#8136@#listenToClickDomRootEvent"(): void;
87
87
  } | null;
88
88
  /** @ignore */
89
89
  readonly destroyRef: DestroyRef;
@@ -42,7 +42,8 @@ export declare class RdxSeparatorRootDirective {
42
42
  *
43
43
  * @ignore
44
44
  */
45
- protected readonly computedRole: import("@angular/core").Signal<"none" | "separator">;
45
+ protected readonly decorativeEffect: import("@angular/core").WritableSignal<boolean>;
46
+ protected readonly orientationEffect: import("@angular/core").WritableSignal<"horizontal" | "vertical">;
46
47
  /**
47
48
  * Computes the `aria-orientation` attribute. It is set to "vertical" only if
48
49
  * the separator is not decorative and the orientation is set to "vertical".
@@ -51,6 +52,8 @@ export declare class RdxSeparatorRootDirective {
51
52
  * @ignore
52
53
  */
53
54
  protected readonly computedAriaOrientation: import("@angular/core").Signal<"vertical" | undefined>;
55
+ updateOrientation(value: Orientation): void;
56
+ updateDecorative(value: boolean): void;
54
57
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxSeparatorRootDirective, never>;
55
58
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSeparatorRootDirective, "div[rdxSeparatorRoot]", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
56
59
  }
@@ -0,0 +1 @@
1
+ # @radix-ng/primitives/stepper
@@ -0,0 +1,22 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./src/stepper-description.directive";
3
+ import * as i2 from "./src/stepper-title.directive";
4
+ import * as i3 from "./src/stepper-separator.directive";
5
+ import * as i4 from "./src/stepper-item.directive";
6
+ import * as i5 from "./src/stepper-indicator.directive";
7
+ import * as i6 from "./src/stepper-root.directive";
8
+ import * as i7 from "./src/stepper-trigger.directive";
9
+ export * from './src/stepper-description.directive';
10
+ export * from './src/stepper-indicator.directive';
11
+ export * from './src/stepper-item.directive';
12
+ export * from './src/stepper-root-context.token';
13
+ export * from './src/stepper-root.directive';
14
+ export * from './src/stepper-separator.directive';
15
+ export * from './src/stepper-title.directive';
16
+ export * from './src/stepper-trigger.directive';
17
+ export * from './src/types';
18
+ export declare class RdxStepperModule {
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperModule, never>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RdxStepperModule, never, [typeof i1.RdxStepperDescriptionDirective, typeof i2.RdxStepperTitleDirective, typeof i3.RdxStepperSeparatorDirective, typeof i4.RdxStepperItemDirective, typeof i5.RdxStepperIndicatorDirective, typeof i6.RdxStepperRootDirective, typeof i7.RdxStepperTriggerDirective], [typeof i1.RdxStepperDescriptionDirective, typeof i2.RdxStepperTitleDirective, typeof i3.RdxStepperSeparatorDirective, typeof i4.RdxStepperItemDirective, typeof i5.RdxStepperIndicatorDirective, typeof i6.RdxStepperRootDirective, typeof i7.RdxStepperTriggerDirective]>;
21
+ static ɵinj: i0.ɵɵInjectorDeclaration<RdxStepperModule>;
22
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxStepperDescriptionDirective {
3
+ readonly itemContext: import("./stepper-item-context.token").StepperItemContext;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperDescriptionDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxStepperDescriptionDirective, "[rdxStepperDescription]", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxStepperIndicatorDirective {
3
+ readonly itemContext: import("./stepper-item-context.token").StepperItemContext;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperIndicatorDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxStepperIndicatorDirective, "[rdxStepperIndicator]", ["rdxStepperIndicator"], {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,13 @@
1
+ import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
2
+ import { InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';
3
+ import { StepperState } from './types';
4
+ export interface StepperItemContext {
5
+ titleId: string;
6
+ descriptionId: string;
7
+ step: InputSignalWithTransform<number, NumberInput>;
8
+ disabled: InputSignalWithTransform<boolean, BooleanInput>;
9
+ isFocusable: Signal<boolean>;
10
+ itemState: Signal<StepperState>;
11
+ }
12
+ export declare const STEPPER_ITEM_CONTEXT: InjectionToken<StepperItemContext>;
13
+ export declare function injectStepperItemContext(): StepperItemContext;
@@ -0,0 +1,21 @@
1
+ import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
2
+ import { StepperItemContext } from './stepper-item-context.token';
3
+ import { StepperState } from './types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class RdxStepperItemDirective implements StepperItemContext {
6
+ protected readonly rootContext: import("./stepper-root-context.token").StepperRootContext;
7
+ /** @ignore */
8
+ readonly titleId: string;
9
+ /** @ignore */
10
+ readonly descriptionId: string;
11
+ readonly step: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
12
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
13
+ /** @ignore */
14
+ readonly completed: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
15
+ /** @ignore */
16
+ readonly itemState: import("@angular/core").Signal<StepperState>;
17
+ /** @ignore */
18
+ readonly isFocusable: import("@angular/core").Signal<boolean>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperItemDirective, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxStepperItemDirective, "[rdxStepperItem]", never, { "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "completed": { "alias": "completed"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
21
+ }
@@ -0,0 +1,12 @@
1
+ import { Direction } from '@angular/cdk/bidi';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
3
+ import { InjectionToken, InputSignal, InputSignalWithTransform, ModelSignal, WritableSignal } from '@angular/core';
4
+ export interface StepperRootContext {
5
+ value: ModelSignal<number | undefined>;
6
+ orientation: InputSignal<'vertical' | 'horizontal'>;
7
+ dir: InputSignal<Direction>;
8
+ linear: InputSignalWithTransform<boolean, BooleanInput>;
9
+ totalStepperItems: WritableSignal<HTMLElement[]>;
10
+ }
11
+ export declare const STEPPER_ROOT_CONTEXT: InjectionToken<StepperRootContext>;
12
+ export declare function injectStepperRootContext(): StepperRootContext;
@@ -0,0 +1,32 @@
1
+ import { Direction } from '@angular/cdk/bidi';
2
+ import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
3
+ import { StepperRootContext } from './stepper-root-context.token';
4
+ import * as i0 from "@angular/core";
5
+ export declare class RdxStepperRootDirective implements StepperRootContext {
6
+ private readonly liveAnnouncer;
7
+ readonly defaultValue: import("@angular/core").InputSignalWithTransform<number | undefined, NumberInput>;
8
+ readonly value: import("@angular/core").ModelSignal<number | undefined>;
9
+ readonly linear: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
10
+ readonly dir: import("@angular/core").InputSignal<Direction>;
11
+ readonly orientation: import("@angular/core").InputSignal<"vertical" | "horizontal">;
12
+ /** @ignore */
13
+ readonly totalStepperItemsArray: import("@angular/core").Signal<HTMLElement[]>;
14
+ /** @ignore */
15
+ readonly isFirstStep: import("@angular/core").Signal<boolean>;
16
+ /** @ignore */
17
+ readonly isLastStep: import("@angular/core").Signal<boolean>;
18
+ /** @ignore */
19
+ readonly totalSteps: import("@angular/core").Signal<number>;
20
+ /** @ignore */
21
+ readonly isNextDisabled: import("@angular/core").Signal<boolean>;
22
+ /** @ignore */
23
+ readonly isPrevDisabled: import("@angular/core").Signal<boolean>;
24
+ /** @ignore */
25
+ readonly totalStepperItems: import("@angular/core").WritableSignal<HTMLElement[]>;
26
+ private readonly nextStepperItem;
27
+ private readonly prevStepperItem;
28
+ constructor();
29
+ goToStep(step: number): void;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperRootDirective, never>;
31
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxStepperRootDirective, "[rdxStepperRoot]", ["rdxStepperRoot"], { "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "linear": { "alias": "linear"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
32
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@radix-ng/primitives/separator";
3
+ export declare class RdxStepperSeparatorDirective {
4
+ protected readonly rootContext: import("./stepper-root-context.token").StepperRootContext;
5
+ protected readonly itemContext: import("./stepper-item-context.token").StepperItemContext;
6
+ private readonly rdxSeparator;
7
+ constructor();
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperSeparatorDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxStepperSeparatorDirective, "[rdxStepperSeparator]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxSeparatorRootDirective; inputs: { "orientation": "orientation"; "decorative": "decorative"; }; outputs: {}; }]>;
10
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RdxStepperTitleDirective {
3
+ readonly itemContext: import("./stepper-item-context.token").StepperItemContext;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperTitleDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxStepperTitleDirective, "[rdxStepperTitle]", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,14 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RdxStepperTriggerDirective implements OnInit, OnDestroy {
4
+ protected readonly rootContext: import("./stepper-root-context.token").StepperRootContext;
5
+ protected readonly itemContext: import("./stepper-item-context.token").StepperItemContext;
6
+ private readonly elementRef;
7
+ readonly stepperItems: import("@angular/core").Signal<HTMLElement[]>;
8
+ ngOnInit(): void;
9
+ ngOnDestroy(): void;
10
+ handleMouseDown(event: MouseEvent): void;
11
+ handleKeyDown(event: KeyboardEvent): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxStepperTriggerDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxStepperTriggerDirective, "button[rdxStepperTrigger]", never, {}, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1 @@
1
+ export type StepperState = 'completed' | 'active' | 'inactive';
@@ -0,0 +1 @@
1
+ export declare function getActiveElement(): Element | null;
@@ -0,0 +1,65 @@
1
+ import { Direction } from '@angular/cdk/bidi';
2
+ type ArrowKeyOptions = 'horizontal' | 'vertical' | 'both';
3
+ interface ArrowNavigationOptions {
4
+ /**
5
+ * The arrow key options to allow navigation
6
+ *
7
+ * @defaultValue "both"
8
+ */
9
+ arrowKeyOptions?: ArrowKeyOptions;
10
+ /**
11
+ * The attribute name to find the collection items in the parent element.
12
+ *
13
+ * @defaultValue "data-reka-collection-item"
14
+ */
15
+ attributeName?: string;
16
+ /**
17
+ * The parent element where contains all the collection items, this will collect every item to be used when nav
18
+ * It will be ignored if attributeName is provided
19
+ *
20
+ * @defaultValue []
21
+ */
22
+ itemsArray?: HTMLElement[];
23
+ /**
24
+ * Allow loop navigation. If false, it will stop at the first and last element
25
+ *
26
+ * @defaultValue true
27
+ */
28
+ loop?: boolean;
29
+ /**
30
+ * The orientation of the collection
31
+ *
32
+ * @defaultValue "ltr"
33
+ */
34
+ dir?: Direction;
35
+ /**
36
+ * Prevent the scroll when navigating. This happens when the direction of the
37
+ * key matches the scroll direction of any ancestor scrollable elements.
38
+ *
39
+ * @defaultValue true
40
+ */
41
+ preventScroll?: boolean;
42
+ /**
43
+ * By default all currentElement would trigger navigation. If `true`, currentElement nodeName in the ignore list will return null
44
+ *
45
+ * @defaultValue false
46
+ */
47
+ enableIgnoredElement?: boolean;
48
+ /**
49
+ * Focus the element after navigation
50
+ *
51
+ * @defaultValue false
52
+ */
53
+ focus?: boolean;
54
+ }
55
+ /**
56
+ * Allow arrow navigation for every html element with data-reka-collection-item tag
57
+ *
58
+ * @param e Keyboard event
59
+ * @param currentElement Event initiator element or any element that wants to handle the navigation
60
+ * @param parentElement Parent element where contains all the collection items, this will collect every item to be used when nav
61
+ * @param options further options
62
+ * @returns the navigated html element or null if none
63
+ */
64
+ export declare function useArrowNavigation(e: KeyboardEvent, currentElement: HTMLElement, parentElement: HTMLElement | undefined, options?: ArrowNavigationOptions): HTMLElement | null;
65
+ export {};
@@ -79,7 +79,7 @@ export declare class RdxTooltipRootDirective {
79
79
  window: Window & typeof globalThis;
80
80
  primitiveConfigs?: import("./utils/types").PrimitiveConfigs;
81
81
  onDestroyCallbacks: Set<() => void>;
82
- "__#11630@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
82
+ "__#13053@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
83
83
  registerPrimitive<T extends object>(primitiveInstance: T): void;
84
84
  deregisterPrimitive<T extends object>(primitiveInstance: T): void;
85
85
  preventPrimitiveFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): void;
@@ -90,9 +90,9 @@ export declare class RdxTooltipRootDirective {
90
90
  primitivePreventedFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): boolean | undefined;
91
91
  addClickDomRootEventCallback(callback: (event: MouseEvent) => void): void;
92
92
  removeClickDomRootEventCallback(callback: (event: MouseEvent) => void): boolean;
93
- "__#11630@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
94
- "__#11630@#registerOnDestroyCallbacks"(): void;
95
- "__#11630@#listenToClickDomRootEvent"(): void;
93
+ "__#13053@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
94
+ "__#13053@#registerOnDestroyCallbacks"(): void;
95
+ "__#13053@#listenToClickDomRootEvent"(): void;
96
96
  } | null;
97
97
  /** @ignore */
98
98
  readonly destroyRef: DestroyRef;
File without changes
File without changes