ng-primitives 0.120.5 → 0.121.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 (144) hide show
  1. package/fesm2022/ng-primitives-a11y.mjs +5 -5
  2. package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
  3. package/fesm2022/ng-primitives-accordion.mjs +30 -47
  4. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  5. package/fesm2022/ng-primitives-ai.mjs +39 -52
  6. package/fesm2022/ng-primitives-ai.mjs.map +1 -1
  7. package/fesm2022/ng-primitives-autofill.mjs +4 -4
  8. package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
  9. package/fesm2022/ng-primitives-avatar.mjs +14 -17
  10. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  11. package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
  12. package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
  13. package/fesm2022/ng-primitives-button.mjs +7 -9
  14. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  15. package/fesm2022/ng-primitives-checkbox.mjs +15 -30
  16. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  17. package/fesm2022/ng-primitives-combobox.mjs +60 -92
  18. package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
  19. package/fesm2022/ng-primitives-common.mjs +4 -4
  20. package/fesm2022/ng-primitives-common.mjs.map +1 -1
  21. package/fesm2022/ng-primitives-context-menu.mjs +66 -119
  22. package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
  23. package/fesm2022/ng-primitives-date-picker.mjs +70 -108
  24. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  25. package/fesm2022/ng-primitives-dialog.mjs +33 -49
  26. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  27. package/fesm2022/ng-primitives-file-upload.mjs +26 -53
  28. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  29. package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
  30. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  31. package/fesm2022/ng-primitives-form-field.mjs +39 -44
  32. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  33. package/fesm2022/ng-primitives-input-otp.mjs +30 -43
  34. package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
  35. package/fesm2022/ng-primitives-input.mjs +6 -8
  36. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  37. package/fesm2022/ng-primitives-interactions.mjs +31 -48
  38. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  39. package/fesm2022/ng-primitives-internal.mjs +12 -12
  40. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  41. package/fesm2022/ng-primitives-listbox.mjs +34 -48
  42. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  43. package/fesm2022/ng-primitives-menu.mjs +83 -149
  44. package/fesm2022/ng-primitives-menu.mjs.map +1 -1
  45. package/fesm2022/ng-primitives-meter.mjs +25 -36
  46. package/fesm2022/ng-primitives-meter.mjs.map +1 -1
  47. package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
  48. package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
  49. package/fesm2022/ng-primitives-number-field.mjs +35 -59
  50. package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
  51. package/fesm2022/ng-primitives-pagination.mjs +270 -297
  52. package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
  53. package/fesm2022/ng-primitives-popover.mjs +42 -87
  54. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  55. package/fesm2022/ng-primitives-portal.mjs +81 -57
  56. package/fesm2022/ng-primitives-portal.mjs.map +1 -1
  57. package/fesm2022/ng-primitives-progress.mjs +30 -41
  58. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  59. package/fesm2022/ng-primitives-radio.mjs +20 -30
  60. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  61. package/fesm2022/ng-primitives-resize.mjs +3 -3
  62. package/fesm2022/ng-primitives-resize.mjs.map +1 -1
  63. package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
  64. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  65. package/fesm2022/ng-primitives-search.mjs +9 -9
  66. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  67. package/fesm2022/ng-primitives-select.mjs +50 -81
  68. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  69. package/fesm2022/ng-primitives-separator.mjs +4 -6
  70. package/fesm2022/ng-primitives-separator.mjs.map +1 -1
  71. package/fesm2022/ng-primitives-slider.mjs +63 -100
  72. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  73. package/fesm2022/ng-primitives-state.mjs +3 -3
  74. package/fesm2022/ng-primitives-state.mjs.map +1 -1
  75. package/fesm2022/ng-primitives-switch.mjs +15 -21
  76. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  77. package/fesm2022/ng-primitives-tabs.mjs +31 -41
  78. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  79. package/fesm2022/ng-primitives-textarea.mjs +5 -7
  80. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  81. package/fesm2022/ng-primitives-toast.mjs +19 -19
  82. package/fesm2022/ng-primitives-toast.mjs.map +1 -1
  83. package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
  84. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
  85. package/fesm2022/ng-primitives-toggle.mjs +10 -19
  86. package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
  87. package/fesm2022/ng-primitives-toolbar.mjs +4 -6
  88. package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
  89. package/fesm2022/ng-primitives-tooltip.mjs +401 -402
  90. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  91. package/fesm2022/ng-primitives-utils.mjs +5 -4
  92. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  93. package/package.json +56 -55
  94. package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +15 -14
  95. package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +78 -77
  96. package/{button/index.d.ts → types/ng-primitives-button.d.ts} +21 -20
  97. package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +67 -66
  98. package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
  99. package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
  100. package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +72 -71
  101. package/types/ng-primitives-pagination.d.ts +502 -0
  102. package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +3 -2
  103. package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +19 -3
  104. package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +61 -60
  105. package/{select/index.d.ts → types/ng-primitives-select.d.ts} +39 -38
  106. package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +59 -58
  107. package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +45 -44
  108. package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +2 -1
  109. package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +69 -68
  110. package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +48 -47
  111. package/types/ng-primitives-tooltip.d.ts +691 -0
  112. package/pagination/index.d.ts +0 -211
  113. package/tooltip/index.d.ts +0 -376
  114. /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
  115. /package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +0 -0
  116. /package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +0 -0
  117. /package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +0 -0
  118. /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
  119. /package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +0 -0
  120. /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
  121. /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
  122. /package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +0 -0
  123. /package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +0 -0
  124. /package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +0 -0
  125. /package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +0 -0
  126. /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
  127. /package/{input/index.d.ts → types/ng-primitives-input.d.ts} +0 -0
  128. /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
  129. /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
  130. /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
  131. /package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +0 -0
  132. /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
  133. /package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +0 -0
  134. /package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +0 -0
  135. /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
  136. /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
  137. /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
  138. /package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +0 -0
  139. /package/{state/index.d.ts → types/ng-primitives-state.d.ts} +0 -0
  140. /package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +0 -0
  141. /package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +0 -0
  142. /package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +0 -0
  143. /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
  144. /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
@@ -1,9 +1,68 @@
1
- import * as ng_primitives_state from 'ng-primitives/state';
1
+ import * as ng_primitives_roving_focus from 'ng-primitives/roving-focus';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { Signal, ElementRef, InjectionToken, Type, FactoryProvider } from '@angular/core';
4
4
  import { FocusOrigin } from '@angular/cdk/a11y';
5
- import { NgpOrientation } from 'ng-primitives/common';
6
5
  import { BooleanInput } from '@angular/cdk/coercion';
6
+ import { NgpOrientation } from 'ng-primitives/common';
7
+ import * as ng_primitives_state from 'ng-primitives/state';
8
+
9
+ /**
10
+ * Apply the `ngpRovingFocusItem` directive to an element within a roving focus group to automatically manage focus.
11
+ */
12
+ declare class NgpRovingFocusItem {
13
+ /**
14
+ * Define if the item is disabled.
15
+ */
16
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
17
+ private readonly state;
18
+ /**
19
+ * Expose the internal id of the roving focus item.
20
+ * @internal
21
+ */
22
+ readonly id: _angular_core.Signal<string>;
23
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpRovingFocusItem, never>;
24
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpRovingFocusItem, "[ngpRovingFocusItem]", ["ngpRovingFocusItem"], { "disabled": { "alias": "ngpRovingFocusItemDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
25
+ }
26
+
27
+ /**
28
+ * Apply the `ngpRovingFocusGroup` directive to an element to manage focus for a group of child elements.
29
+ */
30
+ declare class NgpRovingFocusGroup {
31
+ /**
32
+ * Determine the orientation of the roving focus group.
33
+ * @default 'vertical'
34
+ */
35
+ readonly orientation: _angular_core.InputSignal<NgpOrientation>;
36
+ /**
37
+ * Determine if focus should wrap when the end or beginning is reached.
38
+ */
39
+ readonly wrap: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
40
+ /**
41
+ * Determine if the home and end keys should navigate to the first and last items.
42
+ */
43
+ readonly homeEnd: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
44
+ /**
45
+ * Determine if the roving focus group is disabled.
46
+ */
47
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
48
+ /**
49
+ * Store the active item in the roving focus group.
50
+ * @internal
51
+ */
52
+ readonly activeItem: _angular_core.WritableSignal<NgpRovingFocusItem | null>;
53
+ /**
54
+ * The state of the roving focus group.
55
+ */
56
+ readonly state: ng_primitives_roving_focus.NgpRovingFocusGroupState;
57
+ /**
58
+ * Activate an item in the roving focus group.
59
+ * @param item The item to activate
60
+ * @param origin The origin of the focus change
61
+ */
62
+ setActiveItem(item: NgpRovingFocusItem | null, origin?: FocusOrigin): void;
63
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpRovingFocusGroup, never>;
64
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpRovingFocusGroup, "[ngpRovingFocusGroup]", ["ngpRovingFocusGroup"], { "orientation": { "alias": "ngpRovingFocusGroupOrientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "ngpRovingFocusGroupWrap"; "required": false; "isSignal": true; }; "homeEnd": { "alias": "ngpRovingFocusGroupHomeEnd"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpRovingFocusGroupDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
65
+ }
7
66
 
8
67
  /**
9
68
  * The state interface for the RovingFocusItem pattern.
@@ -143,64 +202,6 @@ declare const provideRovingFocusGroupState: (opts?: {
143
202
  inherit?: boolean;
144
203
  }) => _angular_core.FactoryProvider;
145
204
 
146
- /**
147
- * Apply the `ngpRovingFocusItem` directive to an element within a roving focus group to automatically manage focus.
148
- */
149
- declare class NgpRovingFocusItem {
150
- /**
151
- * Define if the item is disabled.
152
- */
153
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
154
- private readonly state;
155
- /**
156
- * Expose the internal id of the roving focus item.
157
- * @internal
158
- */
159
- readonly id: _angular_core.Signal<string>;
160
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpRovingFocusItem, never>;
161
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpRovingFocusItem, "[ngpRovingFocusItem]", ["ngpRovingFocusItem"], { "disabled": { "alias": "ngpRovingFocusItemDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
162
- }
163
-
164
- /**
165
- * Apply the `ngpRovingFocusGroup` directive to an element to manage focus for a group of child elements.
166
- */
167
- declare class NgpRovingFocusGroup {
168
- /**
169
- * Determine the orientation of the roving focus group.
170
- * @default 'vertical'
171
- */
172
- readonly orientation: _angular_core.InputSignal<NgpOrientation>;
173
- /**
174
- * Determine if focus should wrap when the end or beginning is reached.
175
- */
176
- readonly wrap: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
177
- /**
178
- * Determine if the home and end keys should navigate to the first and last items.
179
- */
180
- readonly homeEnd: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
181
- /**
182
- * Determine if the roving focus group is disabled.
183
- */
184
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
185
- /**
186
- * Store the active item in the roving focus group.
187
- * @internal
188
- */
189
- readonly activeItem: _angular_core.WritableSignal<NgpRovingFocusItem | null>;
190
- /**
191
- * The state of the roving focus group.
192
- */
193
- readonly state: NgpRovingFocusGroupState;
194
- /**
195
- * Activate an item in the roving focus group.
196
- * @param item The item to activate
197
- * @param origin The origin of the focus change
198
- */
199
- setActiveItem(item: NgpRovingFocusItem | null, origin?: FocusOrigin): void;
200
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpRovingFocusGroup, never>;
201
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpRovingFocusGroup, "[ngpRovingFocusGroup]", ["ngpRovingFocusGroup"], { "orientation": { "alias": "ngpRovingFocusGroupOrientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "ngpRovingFocusGroupWrap"; "required": false; "isSignal": true; }; "homeEnd": { "alias": "ngpRovingFocusGroupHomeEnd"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpRovingFocusGroupDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
202
- }
203
-
204
205
  declare const NgpRovingFocusGroupToken: InjectionToken<NgpRovingFocusGroup>;
205
206
  /**
206
207
  * Inject the RovingFocusGroup directive instance
@@ -9,6 +9,7 @@ import { activeDescendantManager } from 'ng-primitives/a11y';
9
9
  import * as ng_primitives_portal from 'ng-primitives/portal';
10
10
  import { NgpOverlay, NgpFlip, NgpOffset, NgpFlipInput, NgpOffsetInput } from 'ng-primitives/portal';
11
11
  import { Observable } from 'rxjs';
12
+ import * as ng_primitives_select from 'ng-primitives/select';
12
13
 
13
14
  /**
14
15
  * Apply the `ngpNativeSelect` directive to a select element that you want to enhance.
@@ -494,43 +495,6 @@ declare class NgpSelectPortal implements OnDestroy {
494
495
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpSelectPortal, "[ngpSelectPortal]", ["ngpSelectPortal"], {}, {}, never, never, true, never>;
495
496
  }
496
497
 
497
- interface NgpSelectConfig {
498
- /**
499
- * The default placement for the select dropdown.
500
- * @default 'bottom'
501
- */
502
- placement: Placement;
503
- /**
504
- * The container element or selector for the select dropdown.
505
- * This can be used to control where the dropdown is rendered in the DOM.
506
- * @default 'body'
507
- */
508
- container: HTMLElement | string | null;
509
- /**
510
- * Whether the select dropdown should flip when there is not enough space.
511
- * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.
512
- * @default true
513
- */
514
- flip: NgpFlip;
515
- /**
516
- * Define the offset of the select dropdown relative to the trigger.
517
- * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
518
- * @default 0
519
- */
520
- offset: NgpOffset;
521
- }
522
- /**
523
- * Provide the default Select configuration
524
- * @param config The Select configuration
525
- * @returns The provider
526
- */
527
- declare function provideSelectConfig(config: Partial<NgpSelectConfig>): Provider[];
528
- /**
529
- * Inject the Select configuration
530
- * @returns The global Select configuration
531
- */
532
- declare function injectSelectConfig(): NgpSelectConfig;
533
-
534
498
  /**
535
499
  * Ideally we would use a generic type here, unfortunately, unlike in React,
536
500
  * we cannot infer the type based on another input. For example, if multiple
@@ -545,7 +509,7 @@ declare function injectSelectConfig(): NgpSelectConfig;
545
509
  type T = any;
546
510
  declare class NgpSelect {
547
511
  /** Access the select configuration. */
548
- protected readonly config: NgpSelectConfig;
512
+ protected readonly config: ng_primitives_select.NgpSelectConfig;
549
513
  /** The unique id of the select. */
550
514
  readonly id: _angular_core.InputSignal<string>;
551
515
  /** The value of the select. */
@@ -682,5 +646,42 @@ declare class NgpSelect {
682
646
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpSelect, "[ngpSelect]", ["ngpSelect"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "ngpSelectValue"; "required": false; "isSignal": true; }; "multiple": { "alias": "ngpSelectMultiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpSelectDisabled"; "required": false; "isSignal": true; }; "compareWith": { "alias": "ngpSelectCompareWith"; "required": false; "isSignal": true; }; "placement": { "alias": "ngpSelectDropdownPlacement"; "required": false; "isSignal": true; }; "container": { "alias": "ngpSelectDropdownContainer"; "required": false; "isSignal": true; }; "flip": { "alias": "ngpSelectDropdownFlip"; "required": false; "isSignal": true; }; "offset": { "alias": "ngpSelectDropdownOffset"; "required": false; "isSignal": true; }; "scrollToOption": { "alias": "ngpSelectScrollToOption"; "required": false; "isSignal": true; }; "allOptions": { "alias": "ngpSelectOptions"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpSelectValueChange"; "openChange": "ngpSelectOpenChange"; }, never, never, true, never>;
683
647
  }
684
648
 
649
+ interface NgpSelectConfig {
650
+ /**
651
+ * The default placement for the select dropdown.
652
+ * @default 'bottom'
653
+ */
654
+ placement: Placement;
655
+ /**
656
+ * The container element or selector for the select dropdown.
657
+ * This can be used to control where the dropdown is rendered in the DOM.
658
+ * @default 'body'
659
+ */
660
+ container: HTMLElement | string | null;
661
+ /**
662
+ * Whether the select dropdown should flip when there is not enough space.
663
+ * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.
664
+ * @default true
665
+ */
666
+ flip: NgpFlip;
667
+ /**
668
+ * Define the offset of the select dropdown relative to the trigger.
669
+ * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
670
+ * @default 0
671
+ */
672
+ offset: NgpOffset;
673
+ }
674
+ /**
675
+ * Provide the default Select configuration
676
+ * @param config The Select configuration
677
+ * @returns The provider
678
+ */
679
+ declare function provideSelectConfig(config: Partial<NgpSelectConfig>): Provider[];
680
+ /**
681
+ * Inject the Select configuration
682
+ * @returns The global Select configuration
683
+ */
684
+ declare function injectSelectConfig(): NgpSelectConfig;
685
+
685
686
  export { NgpNativeSelect, NgpSelect, NgpSelectDropdown, NgpSelectDropdownStateToken, NgpSelectOption, NgpSelectOptionStateToken, NgpSelectPortal, NgpSelectPortalStateToken, NgpSelectStateToken, injectNativeSelectState, injectSelectConfig, injectSelectDropdownState, injectSelectOptionState, injectSelectPortalState, injectSelectState, ngpSelect, ngpSelectDropdown, ngpSelectOption, ngpSelectPortal, provideNativeSelectState, provideSelectConfig, provideSelectDropdownState, provideSelectOptionState, provideSelectPortalState, provideSelectState };
686
687
  export type { NgpSelectConfig };
@@ -2,9 +2,10 @@ import * as _angular_core from '@angular/core';
2
2
  import { Signal, WritableSignal, ElementRef } from '@angular/core';
3
3
  import * as ng_primitives_state from 'ng-primitives/state';
4
4
  import { FocusOrigin } from '@angular/cdk/a11y';
5
+ import * as ng_primitives_slider from 'ng-primitives/slider';
6
+ import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
5
7
  import { NgpOrientation } from 'ng-primitives/common';
6
8
  import { Observable } from 'rxjs';
7
- import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
8
9
 
9
10
  /**
10
11
  * Apply the `ngpSliderRange` directive to an element that represents the range of the slider.
@@ -117,6 +118,63 @@ declare const provideSliderTrackState: (opts?: {
117
118
  inherit?: boolean;
118
119
  }) => _angular_core.FactoryProvider;
119
120
 
121
+ /**
122
+ * Apply the `ngpSlider` directive to an element that represents the slider and contains the track, range, and thumb.
123
+ */
124
+ declare class NgpSlider {
125
+ /**
126
+ * The id of the slider. If not provided, a unique id will be generated.
127
+ */
128
+ readonly id: _angular_core.InputSignal<string>;
129
+ /**
130
+ * The value of the slider.
131
+ */
132
+ readonly value: _angular_core.InputSignalWithTransform<number, NumberInput>;
133
+ /**
134
+ * Emits when the value changes.
135
+ */
136
+ readonly valueChange: _angular_core.OutputEmitterRef<number>;
137
+ /**
138
+ * The minimum value of the slider.
139
+ */
140
+ readonly min: _angular_core.InputSignalWithTransform<number, NumberInput>;
141
+ /**
142
+ * The maximum value of the slider.
143
+ */
144
+ readonly max: _angular_core.InputSignalWithTransform<number, NumberInput>;
145
+ /**
146
+ * The step value of the slider.
147
+ */
148
+ readonly step: _angular_core.InputSignalWithTransform<number, NumberInput>;
149
+ /**
150
+ * The orientation of the slider.
151
+ */
152
+ readonly orientation: _angular_core.InputSignal<NgpOrientation>;
153
+ /**
154
+ * The disabled state of the slider.
155
+ */
156
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
157
+ /**
158
+ * The state of the slider. We use this for the slider state rather than relying on the inputs.
159
+ * @internal
160
+ */
161
+ protected readonly state: ng_primitives_slider.NgpSliderState;
162
+ /**
163
+ * Set the value of the slider.
164
+ */
165
+ setValue(value: number): void;
166
+ /**
167
+ * Set the disabled state.
168
+ */
169
+ setDisabled(disabled: boolean): void;
170
+ /**
171
+ * Set the orientation.
172
+ */
173
+ setOrientation(orientation: NgpOrientation): void;
174
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpSlider, never>;
175
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpSlider, "[ngpSlider]", ["ngpSlider"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "ngpSliderValue"; "required": false; "isSignal": true; }; "min": { "alias": "ngpSliderMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpSliderMax"; "required": false; "isSignal": true; }; "step": { "alias": "ngpSliderStep"; "required": false; "isSignal": true; }; "orientation": { "alias": "ngpSliderOrientation"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpSliderDisabled"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpSliderValueChange"; }, never, never, true, never>;
176
+ }
177
+
120
178
  /**
121
179
  * Public state surface for the Slider primitive.
122
180
  */
@@ -237,63 +295,6 @@ declare const provideSliderState: (opts?: {
237
295
  inherit?: boolean;
238
296
  }) => _angular_core.FactoryProvider;
239
297
 
240
- /**
241
- * Apply the `ngpSlider` directive to an element that represents the slider and contains the track, range, and thumb.
242
- */
243
- declare class NgpSlider {
244
- /**
245
- * The id of the slider. If not provided, a unique id will be generated.
246
- */
247
- readonly id: _angular_core.InputSignal<string>;
248
- /**
249
- * The value of the slider.
250
- */
251
- readonly value: _angular_core.InputSignalWithTransform<number, NumberInput>;
252
- /**
253
- * Emits when the value changes.
254
- */
255
- readonly valueChange: _angular_core.OutputEmitterRef<number>;
256
- /**
257
- * The minimum value of the slider.
258
- */
259
- readonly min: _angular_core.InputSignalWithTransform<number, NumberInput>;
260
- /**
261
- * The maximum value of the slider.
262
- */
263
- readonly max: _angular_core.InputSignalWithTransform<number, NumberInput>;
264
- /**
265
- * The step value of the slider.
266
- */
267
- readonly step: _angular_core.InputSignalWithTransform<number, NumberInput>;
268
- /**
269
- * The orientation of the slider.
270
- */
271
- readonly orientation: _angular_core.InputSignal<NgpOrientation>;
272
- /**
273
- * The disabled state of the slider.
274
- */
275
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
276
- /**
277
- * The state of the slider. We use this for the slider state rather than relying on the inputs.
278
- * @internal
279
- */
280
- protected readonly state: NgpSliderState;
281
- /**
282
- * Set the value of the slider.
283
- */
284
- setValue(value: number): void;
285
- /**
286
- * Set the disabled state.
287
- */
288
- setDisabled(disabled: boolean): void;
289
- /**
290
- * Set the orientation.
291
- */
292
- setOrientation(orientation: NgpOrientation): void;
293
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpSlider, never>;
294
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpSlider, "[ngpSlider]", ["ngpSlider"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "ngpSliderValue"; "required": false; "isSignal": true; }; "min": { "alias": "ngpSliderMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpSliderMax"; "required": false; "isSignal": true; }; "step": { "alias": "ngpSliderStep"; "required": false; "isSignal": true; }; "orientation": { "alias": "ngpSliderOrientation"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpSliderDisabled"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpSliderValueChange"; }, never, never, true, never>;
295
- }
296
-
297
298
  /**
298
299
  * Apply the `ngpRangeSliderRange` directive to an element that represents the range between the low and high values.
299
300
  */
@@ -1,8 +1,9 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Signal, WritableSignal } from '@angular/core';
3
3
  import * as ng_primitives_state from 'ng-primitives/state';
4
- import { Observable } from 'rxjs';
4
+ import * as ng_primitives_switch from 'ng-primitives/switch';
5
5
  import { BooleanInput } from '@angular/cdk/coercion';
6
+ import { Observable } from 'rxjs';
6
7
 
7
8
  /**
8
9
  * Apply the `ngpSwitchThumb` directive to an element within a switch to represent the thumb.
@@ -41,6 +42,49 @@ declare const provideSwitchThumbState: (opts?: {
41
42
  inherit?: boolean;
42
43
  }) => _angular_core.FactoryProvider;
43
44
 
45
+ /**
46
+ * Apply the `ngpSwitch` directive to an element to manage the checked state.
47
+ */
48
+ declare class NgpSwitch {
49
+ /**
50
+ * The id of the switch. If not provided, a unique id will be generated.
51
+ */
52
+ readonly id: _angular_core.InputSignal<string>;
53
+ /**
54
+ * Determine if the switch is checked.
55
+ * @default false
56
+ */
57
+ readonly checked: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
58
+ /**
59
+ * Emits when the checked state changes.
60
+ */
61
+ readonly checkedChange: _angular_core.OutputEmitterRef<boolean>;
62
+ /**
63
+ * Determine if the switch is disabled.
64
+ * @default false
65
+ */
66
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
67
+ /**
68
+ * The switch state.
69
+ * @internal
70
+ */
71
+ readonly state: ng_primitives_switch.NgpSwitchState;
72
+ /**
73
+ * Toggle the checked state.
74
+ */
75
+ toggle(): void;
76
+ /**
77
+ * Update the checked value.
78
+ */
79
+ setChecked(value: boolean): void;
80
+ /**
81
+ * Update the disabled value.
82
+ */
83
+ setDisabled(value: boolean): void;
84
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpSwitch, never>;
85
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpSwitch, "[ngpSwitch]", ["ngpSwitch"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "ngpSwitchChecked"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpSwitchDisabled"; "required": false; "isSignal": true; }; }, { "checkedChange": "ngpSwitchCheckedChange"; }, never, never, true, never>;
86
+ }
87
+
44
88
  /**
45
89
  * Public state surface for the Switch primitive.
46
90
  */
@@ -105,48 +149,5 @@ declare const provideSwitchState: (opts?: {
105
149
  inherit?: boolean;
106
150
  }) => _angular_core.FactoryProvider;
107
151
 
108
- /**
109
- * Apply the `ngpSwitch` directive to an element to manage the checked state.
110
- */
111
- declare class NgpSwitch {
112
- /**
113
- * The id of the switch. If not provided, a unique id will be generated.
114
- */
115
- readonly id: _angular_core.InputSignal<string>;
116
- /**
117
- * Determine if the switch is checked.
118
- * @default false
119
- */
120
- readonly checked: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
121
- /**
122
- * Emits when the checked state changes.
123
- */
124
- readonly checkedChange: _angular_core.OutputEmitterRef<boolean>;
125
- /**
126
- * Determine if the switch is disabled.
127
- * @default false
128
- */
129
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
130
- /**
131
- * The switch state.
132
- * @internal
133
- */
134
- readonly state: NgpSwitchState;
135
- /**
136
- * Toggle the checked state.
137
- */
138
- toggle(): void;
139
- /**
140
- * Update the checked value.
141
- */
142
- setChecked(value: boolean): void;
143
- /**
144
- * Update the disabled value.
145
- */
146
- setDisabled(value: boolean): void;
147
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpSwitch, never>;
148
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpSwitch, "[ngpSwitch]", ["ngpSwitch"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "ngpSwitchChecked"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpSwitchDisabled"; "required": false; "isSignal": true; }; }, { "checkedChange": "ngpSwitchCheckedChange"; }, never, never, true, never>;
149
- }
150
-
151
152
  export { NgpSwitch, NgpSwitchThumb, injectSwitchState, injectSwitchThumbState, ngpSwitch, ngpSwitchThumb, provideSwitchState, provideSwitchThumbState };
152
153
  export type { NgpSwitchProps, NgpSwitchState, NgpSwitchThumbProps, NgpSwitchThumbState };
@@ -1,6 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Signal, Provider, TemplateRef, Type } from '@angular/core';
3
3
  import * as ng_primitives_internal from 'ng-primitives/internal';
4
+ import * as ng_primitives_toast from 'ng-primitives/toast';
4
5
  import { NgpPortal } from 'ng-primitives/portal';
5
6
 
6
7
  interface NgpToastOptions$1 {
@@ -47,7 +48,7 @@ interface NgpToastOptions$1 {
47
48
  declare class NgpToast {
48
49
  private readonly manager;
49
50
  private readonly injector;
50
- protected readonly config: NgpToastConfig;
51
+ protected readonly config: ng_primitives_toast.NgpToastConfig;
51
52
  /** @internal */
52
53
  readonly options: NgpToastOptions$1;
53
54
  private readonly interactivityChecker;
@@ -4,6 +4,7 @@ import { NgpOrientation } from 'ng-primitives/common';
4
4
  import { BooleanInput } from '@angular/cdk/coercion';
5
5
  import * as ng_primitives_state from 'ng-primitives/state';
6
6
  import { SetterOptions } from 'ng-primitives/state';
7
+ import * as ng_primitives_toggle_group from 'ng-primitives/toggle-group';
7
8
  import { NgpRovingFocusGroupState } from 'ng-primitives/roving-focus';
8
9
  import { Observable } from 'rxjs';
9
10
 
@@ -82,6 +83,74 @@ declare const provideToggleGroupItemState: (opts?: {
82
83
  inherit?: boolean;
83
84
  }) => _angular_core.FactoryProvider;
84
85
 
86
+ declare class NgpToggleGroup {
87
+ /**
88
+ * Access the global toggle group configuration.
89
+ */
90
+ private readonly config;
91
+ /**
92
+ * The orientation of the toggle group.
93
+ */
94
+ readonly orientation: _angular_core.InputSignal<NgpOrientation>;
95
+ /**
96
+ * Whether focus should wrap around when reaching the end of the toggle group.
97
+ * @default true
98
+ */
99
+ readonly wrap: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
100
+ /**
101
+ * Whether toggle buttons can be deselected. If set to `false`, clicking a selected toggle button will not deselect it.
102
+ * @default true
103
+ */
104
+ readonly allowDeselection: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
105
+ /**
106
+ * The type of the toggle group, whether only one item can be selected or multiple.
107
+ */
108
+ readonly type: _angular_core.InputSignal<"single" | "multiple">;
109
+ /**
110
+ * The selected value(s) of the toggle group.
111
+ */
112
+ readonly value: _angular_core.InputSignal<string[] | undefined>;
113
+ /**
114
+ * The default selected value(s) for uncontrolled usage.
115
+ * @default []
116
+ */
117
+ readonly defaultValue: _angular_core.InputSignal<string[]>;
118
+ /**
119
+ * Emits when the value of the toggle group changes.
120
+ */
121
+ readonly valueChange: _angular_core.OutputEmitterRef<string[]>;
122
+ /**
123
+ * Whether the toggle group is disabled.
124
+ */
125
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
126
+ /**
127
+ * The state of the toggle group.
128
+ */
129
+ protected readonly state: ng_primitives_toggle_group.NgpToggleGroupState;
130
+ /**
131
+ * Toggle a value in the toggle group.
132
+ */
133
+ toggle(value: string): void;
134
+ /**
135
+ * Set the value(s) of the toggle group.
136
+ */
137
+ setValue(newValue: string[], options?: SetterOptions): void;
138
+ /**
139
+ * Set the default value(s) of the toggle group.
140
+ */
141
+ setDefaultValue(defaultValue: string[]): void;
142
+ /**
143
+ * Set the disabled state of the toggle group.
144
+ */
145
+ setDisabled(isDisabled: boolean): void;
146
+ /**
147
+ * Set the orientation of the toggle group.
148
+ */
149
+ setOrientation(newOrientation: NgpOrientation): void;
150
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpToggleGroup, never>;
151
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToggleGroup, "[ngpToggleGroup]", ["ngpToggleGroup"], { "orientation": { "alias": "ngpToggleGroupOrientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "ngpToggleGroupWrap"; "required": false; "isSignal": true; }; "allowDeselection": { "alias": "ngpToggleGroupAllowDeselection"; "required": false; "isSignal": true; }; "type": { "alias": "ngpToggleGroupType"; "required": false; "isSignal": true; }; "value": { "alias": "ngpToggleGroupValue"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "ngpToggleGroupDefaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpToggleGroupDisabled"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpToggleGroupValueChange"; }, never, never, true, never>;
152
+ }
153
+
85
154
  /**
86
155
  * The state interface for the ToggleGroup pattern.
87
156
  */
@@ -182,73 +251,5 @@ declare const provideToggleGroupState: (opts?: {
182
251
  inherit?: boolean;
183
252
  }) => _angular_core.FactoryProvider;
184
253
 
185
- declare class NgpToggleGroup {
186
- /**
187
- * Access the global toggle group configuration.
188
- */
189
- private readonly config;
190
- /**
191
- * The orientation of the toggle group.
192
- */
193
- readonly orientation: _angular_core.InputSignal<NgpOrientation>;
194
- /**
195
- * Whether focus should wrap around when reaching the end of the toggle group.
196
- * @default true
197
- */
198
- readonly wrap: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
199
- /**
200
- * Whether toggle buttons can be deselected. If set to `false`, clicking a selected toggle button will not deselect it.
201
- * @default true
202
- */
203
- readonly allowDeselection: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
204
- /**
205
- * The type of the toggle group, whether only one item can be selected or multiple.
206
- */
207
- readonly type: _angular_core.InputSignal<"single" | "multiple">;
208
- /**
209
- * The selected value(s) of the toggle group.
210
- */
211
- readonly value: _angular_core.InputSignal<string[] | undefined>;
212
- /**
213
- * The default selected value(s) for uncontrolled usage.
214
- * @default []
215
- */
216
- readonly defaultValue: _angular_core.InputSignal<string[]>;
217
- /**
218
- * Emits when the value of the toggle group changes.
219
- */
220
- readonly valueChange: _angular_core.OutputEmitterRef<string[]>;
221
- /**
222
- * Whether the toggle group is disabled.
223
- */
224
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
225
- /**
226
- * The state of the toggle group.
227
- */
228
- protected readonly state: NgpToggleGroupState;
229
- /**
230
- * Toggle a value in the toggle group.
231
- */
232
- toggle(value: string): void;
233
- /**
234
- * Set the value(s) of the toggle group.
235
- */
236
- setValue(newValue: string[], options?: SetterOptions): void;
237
- /**
238
- * Set the default value(s) of the toggle group.
239
- */
240
- setDefaultValue(defaultValue: string[]): void;
241
- /**
242
- * Set the disabled state of the toggle group.
243
- */
244
- setDisabled(isDisabled: boolean): void;
245
- /**
246
- * Set the orientation of the toggle group.
247
- */
248
- setOrientation(newOrientation: NgpOrientation): void;
249
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpToggleGroup, never>;
250
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToggleGroup, "[ngpToggleGroup]", ["ngpToggleGroup"], { "orientation": { "alias": "ngpToggleGroupOrientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "ngpToggleGroupWrap"; "required": false; "isSignal": true; }; "allowDeselection": { "alias": "ngpToggleGroupAllowDeselection"; "required": false; "isSignal": true; }; "type": { "alias": "ngpToggleGroupType"; "required": false; "isSignal": true; }; "value": { "alias": "ngpToggleGroupValue"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "ngpToggleGroupDefaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpToggleGroupDisabled"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpToggleGroupValueChange"; }, never, never, true, never>;
251
- }
252
-
253
254
  export { NgpToggleGroup, NgpToggleGroupItem, injectToggleGroupItemState, injectToggleGroupState, ngpToggleGroup, ngpToggleGroupItem, provideToggleGroupConfig, provideToggleGroupItemState, provideToggleGroupState };
254
255
  export type { NgpToggleGroupConfig, NgpToggleGroupItemProps, NgpToggleGroupItemState, NgpToggleGroupProps, NgpToggleGroupState };