ng-primitives 0.85.0 → 0.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ng-primitives",
3
3
  "description": "Angular Primitives is a low-level headless UI component library with a focus on accessibility, customization, and developer experience. ",
4
4
  "license": "Apache-2.0",
5
- "version": "0.85.0",
5
+ "version": "0.87.0",
6
6
  "keywords": [
7
7
  "angular",
8
8
  "primitives",
@@ -83,14 +83,14 @@
83
83
  "types": "./autofill/index.d.ts",
84
84
  "default": "./fesm2022/ng-primitives-autofill.mjs"
85
85
  },
86
- "./checkbox": {
87
- "types": "./checkbox/index.d.ts",
88
- "default": "./fesm2022/ng-primitives-checkbox.mjs"
89
- },
90
86
  "./button": {
91
87
  "types": "./button/index.d.ts",
92
88
  "default": "./fesm2022/ng-primitives-button.mjs"
93
89
  },
90
+ "./checkbox": {
91
+ "types": "./checkbox/index.d.ts",
92
+ "default": "./fesm2022/ng-primitives-checkbox.mjs"
93
+ },
94
94
  "./combobox": {
95
95
  "types": "./combobox/index.d.ts",
96
96
  "default": "./fesm2022/ng-primitives-combobox.mjs"
@@ -99,22 +99,22 @@
99
99
  "types": "./common/index.d.ts",
100
100
  "default": "./fesm2022/ng-primitives-common.mjs"
101
101
  },
102
- "./date-time-luxon": {
103
- "types": "./date-time-luxon/index.d.ts",
104
- "default": "./fesm2022/ng-primitives-date-time-luxon.mjs"
105
- },
106
102
  "./date-picker": {
107
103
  "types": "./date-picker/index.d.ts",
108
104
  "default": "./fesm2022/ng-primitives-date-picker.mjs"
109
105
  },
110
- "./dialog": {
111
- "types": "./dialog/index.d.ts",
112
- "default": "./fesm2022/ng-primitives-dialog.mjs"
106
+ "./date-time-luxon": {
107
+ "types": "./date-time-luxon/index.d.ts",
108
+ "default": "./fesm2022/ng-primitives-date-time-luxon.mjs"
113
109
  },
114
110
  "./date-time": {
115
111
  "types": "./date-time/index.d.ts",
116
112
  "default": "./fesm2022/ng-primitives-date-time.mjs"
117
113
  },
114
+ "./dialog": {
115
+ "types": "./dialog/index.d.ts",
116
+ "default": "./fesm2022/ng-primitives-dialog.mjs"
117
+ },
118
118
  "./file-upload": {
119
119
  "types": "./file-upload/index.d.ts",
120
120
  "default": "./fesm2022/ng-primitives-file-upload.mjs"
@@ -155,6 +155,10 @@
155
155
  "types": "./pagination/index.d.ts",
156
156
  "default": "./fesm2022/ng-primitives-pagination.mjs"
157
157
  },
158
+ "./popover": {
159
+ "types": "./popover/index.d.ts",
160
+ "default": "./fesm2022/ng-primitives-popover.mjs"
161
+ },
158
162
  "./portal": {
159
163
  "types": "./portal/index.d.ts",
160
164
  "default": "./fesm2022/ng-primitives-portal.mjs"
@@ -163,10 +167,6 @@
163
167
  "types": "./progress/index.d.ts",
164
168
  "default": "./fesm2022/ng-primitives-progress.mjs"
165
169
  },
166
- "./popover": {
167
- "types": "./popover/index.d.ts",
168
- "default": "./fesm2022/ng-primitives-popover.mjs"
169
- },
170
170
  "./radio": {
171
171
  "types": "./radio/index.d.ts",
172
172
  "default": "./fesm2022/ng-primitives-radio.mjs"
@@ -179,33 +179,33 @@
179
179
  "types": "./roving-focus/index.d.ts",
180
180
  "default": "./fesm2022/ng-primitives-roving-focus.mjs"
181
181
  },
182
- "./separator": {
183
- "types": "./separator/index.d.ts",
184
- "default": "./fesm2022/ng-primitives-separator.mjs"
182
+ "./search": {
183
+ "types": "./search/index.d.ts",
184
+ "default": "./fesm2022/ng-primitives-search.mjs"
185
185
  },
186
186
  "./select": {
187
187
  "types": "./select/index.d.ts",
188
188
  "default": "./fesm2022/ng-primitives-select.mjs"
189
189
  },
190
- "./search": {
191
- "types": "./search/index.d.ts",
192
- "default": "./fesm2022/ng-primitives-search.mjs"
190
+ "./separator": {
191
+ "types": "./separator/index.d.ts",
192
+ "default": "./fesm2022/ng-primitives-separator.mjs"
193
193
  },
194
194
  "./slider": {
195
195
  "types": "./slider/index.d.ts",
196
196
  "default": "./fesm2022/ng-primitives-slider.mjs"
197
197
  },
198
- "./tabs": {
199
- "types": "./tabs/index.d.ts",
200
- "default": "./fesm2022/ng-primitives-tabs.mjs"
198
+ "./state": {
199
+ "types": "./state/index.d.ts",
200
+ "default": "./fesm2022/ng-primitives-state.mjs"
201
201
  },
202
202
  "./switch": {
203
203
  "types": "./switch/index.d.ts",
204
204
  "default": "./fesm2022/ng-primitives-switch.mjs"
205
205
  },
206
- "./state": {
207
- "types": "./state/index.d.ts",
208
- "default": "./fesm2022/ng-primitives-state.mjs"
206
+ "./tabs": {
207
+ "types": "./tabs/index.d.ts",
208
+ "default": "./fesm2022/ng-primitives-tabs.mjs"
209
209
  },
210
210
  "./textarea": {
211
211
  "types": "./textarea/index.d.ts",
@@ -1,4 +1,4 @@
1
- import { Injector, TemplateRef, Type, ViewContainerRef } from '@angular/core';
1
+ import { type ApplicationRef, Injector, TemplateRef, Type, ViewContainerRef } from '@angular/core';
2
2
  export declare abstract class NgpPortal {
3
3
  protected readonly viewContainerRef: ViewContainerRef;
4
4
  protected readonly injector: Injector;
@@ -24,6 +24,16 @@ export declare abstract class NgpPortal {
24
24
  * Detach the portal from the DOM.
25
25
  */
26
26
  abstract detach(): Promise<void>;
27
+ /**
28
+ * Angular v20 removes `_unusedComponentFactoryResolver` and `_document` from DomPortalOutlet's
29
+ * constructor signature as they have been deprecated since v18, and replaced with optional
30
+ * `_appRef` and `_defaultInjector` params.
31
+ * This temporary change ensures consistent behaviour for consumers using ng v20+.
32
+ * @see {@link https://github.com/angular/components/pull/24504 The implementing PR} for the new implementation.
33
+ * @see {@link https://github.com/angular/components/blob/732a0d7ab69ec25925cc06a0fb17b0fb16a4b0ae/src/cdk/portal/dom-portal-outlet.ts#L27 The latest v20 version comments}
34
+ * describe the importance of passing the `_appRef` and `_defaultInjector` when it comes to component portals
35
+ */
36
+ protected _getDomPortalOutletCtorParamsCompat(): (ApplicationRef | Injector | undefined | any)[];
27
37
  }
28
38
  export declare class NgpComponentPortal<T> extends NgpPortal {
29
39
  private readonly componentPortal;
@@ -7,6 +7,10 @@ export declare class NgpSliderThumb {
7
7
  * Access the slider state.
8
8
  */
9
9
  protected readonly state: import("@angular/core").Signal<import("ng-primitives/state").State<import("ng-primitives/slider").NgpSlider>>;
10
+ /**
11
+ * Access the thumb element.
12
+ */
13
+ private readonly elementRef;
10
14
  /**
11
15
  * Store the dragging state.
12
16
  */