ng-primitives 0.120.5 → 0.122.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 +72 -94
  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 +75 -122
  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 +91 -151
  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 +66 -110
  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 +50 -90
  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 +57 -83
  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 +33 -30
  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 +406 -403
  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} +46 -36
  99. package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +16 -3
  100. package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
  101. package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +16 -1
  102. package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +22 -9
  103. package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +72 -71
  104. package/types/ng-primitives-pagination.d.ts +502 -0
  105. package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +12 -4
  106. package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +19 -3
  107. package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +61 -60
  108. package/{select/index.d.ts → types/ng-primitives-select.d.ts} +48 -40
  109. package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +59 -58
  110. package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +45 -44
  111. package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +6 -4
  112. package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +69 -68
  113. package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +48 -47
  114. package/types/ng-primitives-tooltip.d.ts +701 -0
  115. package/pagination/index.d.ts +0 -211
  116. package/tooltip/index.d.ts +0 -376
  117. /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
  118. /package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +0 -0
  119. /package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +0 -0
  120. /package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +0 -0
  121. /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
  122. /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
  123. /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
  124. /package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +0 -0
  125. /package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +0 -0
  126. /package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +0 -0
  127. /package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +0 -0
  128. /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
  129. /package/{input/index.d.ts → types/ng-primitives-input.d.ts} +0 -0
  130. /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
  131. /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
  132. /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
  133. /package/{meter/index.d.ts → types/ng-primitives-meter.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.
@@ -228,7 +229,7 @@ interface NgpSelectState<T> {
228
229
  /** The position of the dropdown. */
229
230
  readonly placement: Signal<Placement>;
230
231
  /** The container for the dropdown. */
231
- readonly container: Signal<HTMLElement | string | null>;
232
+ readonly container: WritableSignal<HTMLElement | string | null>;
232
233
  /** Whether the dropdown should flip when there is not enough space. Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options. */
233
234
  readonly flip: Signal<NgpFlip>;
234
235
  /**
@@ -380,6 +381,13 @@ interface NgpSelectState<T> {
380
381
  * `setDisabledState` integration.
381
382
  */
382
383
  setDisabled(disabled: boolean): void;
384
+ /**
385
+ * Set the container in which the dropdown should be attached. Takes effect the
386
+ * next time the dropdown is opened; it does not move a dropdown that is already
387
+ * open.
388
+ * @param container - The new container
389
+ */
390
+ setContainer(container: HTMLElement | string | null): void;
383
391
  /**
384
392
  * Observable that emits whenever the value changes.
385
393
  */
@@ -426,7 +434,7 @@ interface NgpSelectProps<T> {
426
434
  readonly allOptions?: Signal<T[] | undefined>;
427
435
  }
428
436
  declare const NgpSelectStateToken: _angular_core.InjectionToken<WritableSignal<NgpSelectState<unknown>>>;
429
- declare const ngpSelect: <T>({ id, value: _value, multiple, disabled: _disabled, compareWith, placement, container, flip, offset, scrollToOption, allOptions, onValueChange, onOpenChange, }: NgpSelectProps<T>) => NgpSelectState<T>;
437
+ declare const ngpSelect: <T>({ id, value: _value, multiple, disabled: _disabled, compareWith, placement, container: _container, flip, offset, scrollToOption, allOptions, onValueChange, onOpenChange, }: NgpSelectProps<T>) => NgpSelectState<T>;
430
438
  declare const provideSelectState: (opts?: {
431
439
  inherit?: boolean;
432
440
  }) => _angular_core.FactoryProvider;
@@ -494,43 +502,6 @@ declare class NgpSelectPortal implements OnDestroy {
494
502
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpSelectPortal, "[ngpSelectPortal]", ["ngpSelectPortal"], {}, {}, never, never, true, never>;
495
503
  }
496
504
 
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
505
  /**
535
506
  * Ideally we would use a generic type here, unfortunately, unlike in React,
536
507
  * we cannot infer the type based on another input. For example, if multiple
@@ -545,7 +516,7 @@ declare function injectSelectConfig(): NgpSelectConfig;
545
516
  type T = any;
546
517
  declare class NgpSelect {
547
518
  /** Access the select configuration. */
548
- protected readonly config: NgpSelectConfig;
519
+ protected readonly config: ng_primitives_select.NgpSelectConfig;
549
520
  /** The unique id of the select. */
550
521
  readonly id: _angular_core.InputSignal<string>;
551
522
  /** The value of the select. */
@@ -682,5 +653,42 @@ declare class NgpSelect {
682
653
  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
654
  }
684
655
 
656
+ interface NgpSelectConfig {
657
+ /**
658
+ * The default placement for the select dropdown.
659
+ * @default 'bottom'
660
+ */
661
+ placement: Placement;
662
+ /**
663
+ * The container element or selector for the select dropdown.
664
+ * This can be used to control where the dropdown is rendered in the DOM.
665
+ * @default 'body'
666
+ */
667
+ container: HTMLElement | string | null;
668
+ /**
669
+ * Whether the select dropdown should flip when there is not enough space.
670
+ * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.
671
+ * @default true
672
+ */
673
+ flip: NgpFlip;
674
+ /**
675
+ * Define the offset of the select dropdown relative to the trigger.
676
+ * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
677
+ * @default 0
678
+ */
679
+ offset: NgpOffset;
680
+ }
681
+ /**
682
+ * Provide the default Select configuration
683
+ * @param config The Select configuration
684
+ * @returns The provider
685
+ */
686
+ declare function provideSelectConfig(config: Partial<NgpSelectConfig>): Provider[];
687
+ /**
688
+ * Inject the Select configuration
689
+ * @returns The global Select configuration
690
+ */
691
+ declare function injectSelectConfig(): NgpSelectConfig;
692
+
685
693
  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
694
  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,8 @@ interface NgpToastOptions$1 {
47
48
  declare class NgpToast {
48
49
  private readonly manager;
49
50
  private readonly injector;
50
- protected readonly config: NgpToastConfig;
51
+ private readonly elementRef;
52
+ protected readonly config: ng_primitives_toast.NgpToastConfig;
51
53
  /** @internal */
52
54
  readonly options: NgpToastOptions$1;
53
55
  private readonly interactivityChecker;
@@ -107,9 +109,9 @@ declare class NgpToast {
107
109
  */
108
110
  private readonly timer;
109
111
  constructor();
110
- protected onPointerDown(event: PointerEvent): void;
111
- protected onPointerMove(event: PointerEvent): void;
112
- protected onPointerUp(): void;
112
+ private onPointerDown;
113
+ private onPointerMove;
114
+ private onPointerUp;
113
115
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpToast, never>;
114
116
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToast, "[ngpToast]", ["ngpToast"], {}, {}, never, never, true, never>;
115
117
  }