ng-primitives 0.120.4 → 0.120.5
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/a11y/index.d.ts +3 -10
- package/accordion/index.d.ts +8 -22
- package/autofill/index.d.ts +3 -10
- package/avatar/index.d.ts +7 -30
- package/breadcrumbs/index.d.ts +15 -70
- package/button/index.d.ts +3 -10
- package/checkbox/index.d.ts +4 -11
- package/context-menu/index.d.ts +2 -1
- package/dialog/index.d.ts +7 -2
- package/example-theme/index.css +9 -0
- package/fesm2022/ng-primitives-accordion.mjs +4 -4
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +2 -2
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +21 -7
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +2 -2
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +27 -23
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +2 -2
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +174 -143
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +7 -2
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +710 -579
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +11 -4
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/file-upload/index.d.ts +5 -20
- package/focus-trap/index.d.ts +3 -10
- package/form-field/index.d.ts +9 -40
- package/input/index.d.ts +3 -10
- package/menu/index.d.ts +17 -63
- package/navigation-menu/index.d.ts +15 -70
- package/number-field/index.d.ts +9 -40
- package/package.json +1 -1
- package/popover/index.d.ts +243 -57
- package/portal/index.d.ts +3 -10
- package/progress/index.d.ts +3 -10
- package/roving-focus/index.d.ts +5 -20
- package/schematics/ng-generate/templates/select/select.__fileSuffix@dasherize__.ts.template +48 -48
- package/select/index.d.ts +430 -140
- package/separator/index.d.ts +3 -10
- package/slider/index.d.ts +17 -80
- package/state/index.d.ts +26 -21
- package/switch/index.d.ts +5 -20
- package/tabs/index.d.ts +9 -40
- package/textarea/index.d.ts +3 -10
- package/toast/index.d.ts +11 -0
- package/toggle/index.d.ts +4 -11
- package/toggle-group/index.d.ts +6 -21
- package/toolbar/index.d.ts +3 -10
- package/tooltip/index.d.ts +2 -10
package/a11y/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
3
4
|
|
|
4
5
|
interface NgpActiveDescendantManagerProps {
|
|
5
6
|
/**
|
|
@@ -117,16 +118,8 @@ declare const NgpVisuallyHiddenStateToken: _angular_core.InjectionToken<_angular
|
|
|
117
118
|
declare const ngpVisuallyHidden: ({ hidden: _hidden }: NgpVisuallyHiddenProps) => NgpVisuallyHiddenState;
|
|
118
119
|
declare const injectVisuallyHiddenState: {
|
|
119
120
|
(): Signal<NgpVisuallyHiddenState>;
|
|
120
|
-
(options:
|
|
121
|
-
|
|
122
|
-
optional?: boolean;
|
|
123
|
-
skipSelf?: boolean;
|
|
124
|
-
}): Signal<NgpVisuallyHiddenState | null>;
|
|
125
|
-
(options?: {
|
|
126
|
-
hoisted?: boolean;
|
|
127
|
-
optional?: boolean;
|
|
128
|
-
skipSelf?: boolean;
|
|
129
|
-
}): Signal<NgpVisuallyHiddenState> | Signal<NgpVisuallyHiddenState | null>;
|
|
121
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<NgpVisuallyHiddenState | null>;
|
|
122
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<NgpVisuallyHiddenState> | Signal<NgpVisuallyHiddenState | null>;
|
|
130
123
|
};
|
|
131
124
|
declare const provideVisuallyHiddenState: (opts?: {
|
|
132
125
|
inherit?: boolean;
|
package/accordion/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, WritableSignal, Provider } from '@angular/core';
|
|
3
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
4
|
+
import { StateInjectionOptions } from 'ng-primitives/state';
|
|
3
5
|
import { NgpOrientation } from 'ng-primitives/common';
|
|
4
6
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
7
|
|
|
@@ -38,18 +40,10 @@ declare const injectAccordionContentState: {
|
|
|
38
40
|
(): Signal<{
|
|
39
41
|
id: Signal<string>;
|
|
40
42
|
}>;
|
|
41
|
-
(options: {
|
|
42
|
-
hoisted: true;
|
|
43
|
-
optional?: boolean;
|
|
44
|
-
skipSelf?: boolean;
|
|
45
|
-
}): Signal<{
|
|
43
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
46
44
|
id: Signal<string>;
|
|
47
45
|
} | null>;
|
|
48
|
-
(options?: {
|
|
49
|
-
hoisted?: boolean;
|
|
50
|
-
optional?: boolean;
|
|
51
|
-
skipSelf?: boolean;
|
|
52
|
-
}): Signal<{
|
|
46
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
53
47
|
id: Signal<string>;
|
|
54
48
|
}> | Signal<{
|
|
55
49
|
id: Signal<string>;
|
|
@@ -131,7 +125,7 @@ declare const provideAccordionState: (opts?: {
|
|
|
131
125
|
inherit?: boolean;
|
|
132
126
|
}) => _angular_core.FactoryProvider;
|
|
133
127
|
type NgpAccordionType = 'single' | 'multiple';
|
|
134
|
-
declare function injectAccordionState<T>(): Signal<NgpAccordionState<T>>;
|
|
128
|
+
declare function injectAccordionState<T>(options?: StateInjectionOptions): Signal<NgpAccordionState<T>>;
|
|
135
129
|
|
|
136
130
|
/**
|
|
137
131
|
* Apply the `ngpAccordionItem` directive to an element that represents an accordion item.
|
|
@@ -237,7 +231,7 @@ declare const ngpAccordionItem: <T>({ value, disabled: _disabled }: NgpAccordion
|
|
|
237
231
|
declare const provideAccordionItemState: (opts?: {
|
|
238
232
|
inherit?: boolean;
|
|
239
233
|
}) => _angular_core.FactoryProvider;
|
|
240
|
-
declare function injectAccordionItemState<T>(): Signal<NgpAccordionItemState<T>>;
|
|
234
|
+
declare function injectAccordionItemState<T>(options?: StateInjectionOptions): Signal<NgpAccordionItemState<T>>;
|
|
241
235
|
|
|
242
236
|
/**
|
|
243
237
|
* Apply the `ngpAccordionTrigger` directive to an element that represents the trigger for an accordion item, such as a button.
|
|
@@ -374,19 +368,11 @@ declare const injectAccordionTriggerState: {
|
|
|
374
368
|
id: Signal<string>;
|
|
375
369
|
toggle: () => void;
|
|
376
370
|
}>;
|
|
377
|
-
(options: {
|
|
378
|
-
hoisted: true;
|
|
379
|
-
optional?: boolean;
|
|
380
|
-
skipSelf?: boolean;
|
|
381
|
-
}): Signal<{
|
|
371
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
382
372
|
id: Signal<string>;
|
|
383
373
|
toggle: () => void;
|
|
384
374
|
} | null>;
|
|
385
|
-
(options?: {
|
|
386
|
-
hoisted?: boolean;
|
|
387
|
-
optional?: boolean;
|
|
388
|
-
skipSelf?: boolean;
|
|
389
|
-
}): Signal<{
|
|
375
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
390
376
|
id: Signal<string>;
|
|
391
377
|
toggle: () => void;
|
|
392
378
|
}> | Signal<{
|
package/autofill/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Apply the `ngpAutofill` directive to an element to detect browser autofill.
|
|
@@ -43,18 +44,10 @@ declare const injectAutofillState: {
|
|
|
43
44
|
(): Signal<{
|
|
44
45
|
autofilled: _angular_core.WritableSignal<boolean>;
|
|
45
46
|
}>;
|
|
46
|
-
(options: {
|
|
47
|
-
hoisted: true;
|
|
48
|
-
optional?: boolean;
|
|
49
|
-
skipSelf?: boolean;
|
|
50
|
-
}): Signal<{
|
|
47
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
51
48
|
autofilled: _angular_core.WritableSignal<boolean>;
|
|
52
49
|
} | null>;
|
|
53
|
-
(options?: {
|
|
54
|
-
hoisted?: boolean;
|
|
55
|
-
optional?: boolean;
|
|
56
|
-
skipSelf?: boolean;
|
|
57
|
-
}): Signal<{
|
|
50
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
58
51
|
autofilled: _angular_core.WritableSignal<boolean>;
|
|
59
52
|
}> | Signal<{
|
|
60
53
|
autofilled: _angular_core.WritableSignal<boolean>;
|
package/avatar/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, Provider } from '@angular/core';
|
|
3
3
|
import { NumberInput } from '@angular/cdk/coercion';
|
|
4
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Apply the `ngpAvatarFallback` directive to an element that represents the user in the absence of an image. This is typically the user's initials.
|
|
@@ -32,16 +33,8 @@ declare const NgpAvatarFallbackStateToken: _angular_core.InjectionToken<_angular
|
|
|
32
33
|
declare const ngpAvatarFallback: ({ delay }: NgpAvatarFallbackProps) => {};
|
|
33
34
|
declare const injectAvatarFallbackState: {
|
|
34
35
|
(): Signal<{}>;
|
|
35
|
-
(options: {
|
|
36
|
-
|
|
37
|
-
optional?: boolean;
|
|
38
|
-
skipSelf?: boolean;
|
|
39
|
-
}): Signal<{} | null>;
|
|
40
|
-
(options?: {
|
|
41
|
-
hoisted?: boolean;
|
|
42
|
-
optional?: boolean;
|
|
43
|
-
skipSelf?: boolean;
|
|
44
|
-
}): Signal<{}> | Signal<{} | null>;
|
|
36
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{} | null>;
|
|
37
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{}> | Signal<{} | null>;
|
|
45
38
|
};
|
|
46
39
|
declare const provideAvatarFallbackState: (opts?: {
|
|
47
40
|
inherit?: boolean;
|
|
@@ -64,16 +57,8 @@ declare const NgpAvatarImageStateToken: _angular_core.InjectionToken<_angular_co
|
|
|
64
57
|
declare const ngpAvatarImage: ({}: NgpAvatarImageProps) => {};
|
|
65
58
|
declare const injectAvatarImageState: {
|
|
66
59
|
(): _angular_core.Signal<{}>;
|
|
67
|
-
(options: {
|
|
68
|
-
|
|
69
|
-
optional?: boolean;
|
|
70
|
-
skipSelf?: boolean;
|
|
71
|
-
}): _angular_core.Signal<{} | null>;
|
|
72
|
-
(options?: {
|
|
73
|
-
hoisted?: boolean;
|
|
74
|
-
optional?: boolean;
|
|
75
|
-
skipSelf?: boolean;
|
|
76
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
60
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
61
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
77
62
|
};
|
|
78
63
|
declare const provideAvatarImageState: (opts?: {
|
|
79
64
|
inherit?: boolean;
|
|
@@ -104,19 +89,11 @@ declare const injectAvatarState: {
|
|
|
104
89
|
status: _angular_core.WritableSignal<NgpAvatarStatus>;
|
|
105
90
|
setStatus: (newStatus: NgpAvatarStatus) => void;
|
|
106
91
|
}>;
|
|
107
|
-
(options: {
|
|
108
|
-
hoisted: true;
|
|
109
|
-
optional?: boolean;
|
|
110
|
-
skipSelf?: boolean;
|
|
111
|
-
}): Signal<{
|
|
92
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
112
93
|
status: _angular_core.WritableSignal<NgpAvatarStatus>;
|
|
113
94
|
setStatus: (newStatus: NgpAvatarStatus) => void;
|
|
114
95
|
} | null>;
|
|
115
|
-
(options?: {
|
|
116
|
-
hoisted?: boolean;
|
|
117
|
-
optional?: boolean;
|
|
118
|
-
skipSelf?: boolean;
|
|
119
|
-
}): Signal<{
|
|
96
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
120
97
|
status: _angular_core.WritableSignal<NgpAvatarStatus>;
|
|
121
98
|
setStatus: (newStatus: NgpAvatarStatus) => void;
|
|
122
99
|
}> | Signal<{
|
package/breadcrumbs/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Apply `ngpBreadcrumbEllipsis` to elements that represent collapsed breadcrumb items.
|
|
@@ -71,16 +72,8 @@ declare const NgpBreadcrumbsStateToken: _angular_core.InjectionToken<_angular_co
|
|
|
71
72
|
declare const ngpBreadcrumbs: ({}: NgpBreadcrumbsProps) => {};
|
|
72
73
|
declare const injectBreadcrumbsState: {
|
|
73
74
|
(): _angular_core.Signal<{}>;
|
|
74
|
-
(options: {
|
|
75
|
-
|
|
76
|
-
optional?: boolean;
|
|
77
|
-
skipSelf?: boolean;
|
|
78
|
-
}): _angular_core.Signal<{} | null>;
|
|
79
|
-
(options?: {
|
|
80
|
-
hoisted?: boolean;
|
|
81
|
-
optional?: boolean;
|
|
82
|
-
skipSelf?: boolean;
|
|
83
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
75
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
76
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
84
77
|
};
|
|
85
78
|
declare const provideBreadcrumbsState: (opts?: {
|
|
86
79
|
inherit?: boolean;
|
|
@@ -94,16 +87,8 @@ declare const NgpBreadcrumbListStateToken: _angular_core.InjectionToken<_angular
|
|
|
94
87
|
declare const ngpBreadcrumbList: ({}: NgpBreadcrumbListProps) => {};
|
|
95
88
|
declare const injectBreadcrumbListState: {
|
|
96
89
|
(): _angular_core.Signal<{}>;
|
|
97
|
-
(options: {
|
|
98
|
-
|
|
99
|
-
optional?: boolean;
|
|
100
|
-
skipSelf?: boolean;
|
|
101
|
-
}): _angular_core.Signal<{} | null>;
|
|
102
|
-
(options?: {
|
|
103
|
-
hoisted?: boolean;
|
|
104
|
-
optional?: boolean;
|
|
105
|
-
skipSelf?: boolean;
|
|
106
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
90
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
91
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
107
92
|
};
|
|
108
93
|
declare const provideBreadcrumbListState: (opts?: {
|
|
109
94
|
inherit?: boolean;
|
|
@@ -117,16 +102,8 @@ declare const NgpBreadcrumbItemStateToken: _angular_core.InjectionToken<_angular
|
|
|
117
102
|
declare const ngpBreadcrumbItem: ({}: NgpBreadcrumbItemProps) => {};
|
|
118
103
|
declare const injectBreadcrumbItemState: {
|
|
119
104
|
(): _angular_core.Signal<{}>;
|
|
120
|
-
(options: {
|
|
121
|
-
|
|
122
|
-
optional?: boolean;
|
|
123
|
-
skipSelf?: boolean;
|
|
124
|
-
}): _angular_core.Signal<{} | null>;
|
|
125
|
-
(options?: {
|
|
126
|
-
hoisted?: boolean;
|
|
127
|
-
optional?: boolean;
|
|
128
|
-
skipSelf?: boolean;
|
|
129
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
105
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
106
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
130
107
|
};
|
|
131
108
|
declare const provideBreadcrumbItemState: (opts?: {
|
|
132
109
|
inherit?: boolean;
|
|
@@ -140,16 +117,8 @@ declare const NgpBreadcrumbLinkStateToken: _angular_core.InjectionToken<_angular
|
|
|
140
117
|
declare const ngpBreadcrumbLink: ({}: NgpBreadcrumbLinkProps) => {};
|
|
141
118
|
declare const injectBreadcrumbLinkState: {
|
|
142
119
|
(): _angular_core.Signal<{}>;
|
|
143
|
-
(options: {
|
|
144
|
-
|
|
145
|
-
optional?: boolean;
|
|
146
|
-
skipSelf?: boolean;
|
|
147
|
-
}): _angular_core.Signal<{} | null>;
|
|
148
|
-
(options?: {
|
|
149
|
-
hoisted?: boolean;
|
|
150
|
-
optional?: boolean;
|
|
151
|
-
skipSelf?: boolean;
|
|
152
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
120
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
121
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
153
122
|
};
|
|
154
123
|
declare const provideBreadcrumbLinkState: (opts?: {
|
|
155
124
|
inherit?: boolean;
|
|
@@ -163,16 +132,8 @@ declare const NgpBreadcrumbPageStateToken: _angular_core.InjectionToken<_angular
|
|
|
163
132
|
declare const ngpBreadcrumbPage: ({}: NgpBreadcrumbPageProps) => {};
|
|
164
133
|
declare const injectBreadcrumbPageState: {
|
|
165
134
|
(): _angular_core.Signal<{}>;
|
|
166
|
-
(options: {
|
|
167
|
-
|
|
168
|
-
optional?: boolean;
|
|
169
|
-
skipSelf?: boolean;
|
|
170
|
-
}): _angular_core.Signal<{} | null>;
|
|
171
|
-
(options?: {
|
|
172
|
-
hoisted?: boolean;
|
|
173
|
-
optional?: boolean;
|
|
174
|
-
skipSelf?: boolean;
|
|
175
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
135
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
136
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
176
137
|
};
|
|
177
138
|
declare const provideBreadcrumbPageState: (opts?: {
|
|
178
139
|
inherit?: boolean;
|
|
@@ -186,16 +147,8 @@ declare const NgpBreadcrumbSeparatorStateToken: _angular_core.InjectionToken<_an
|
|
|
186
147
|
declare const ngpBreadcrumbSeparator: ({}: NgpBreadcrumbSeparatorProps) => {};
|
|
187
148
|
declare const injectBreadcrumbSeparatorState: {
|
|
188
149
|
(): _angular_core.Signal<{}>;
|
|
189
|
-
(options: {
|
|
190
|
-
|
|
191
|
-
optional?: boolean;
|
|
192
|
-
skipSelf?: boolean;
|
|
193
|
-
}): _angular_core.Signal<{} | null>;
|
|
194
|
-
(options?: {
|
|
195
|
-
hoisted?: boolean;
|
|
196
|
-
optional?: boolean;
|
|
197
|
-
skipSelf?: boolean;
|
|
198
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
150
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
151
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
199
152
|
};
|
|
200
153
|
declare const provideBreadcrumbSeparatorState: (opts?: {
|
|
201
154
|
inherit?: boolean;
|
|
@@ -209,16 +162,8 @@ declare const NgpBreadcrumbEllipsisStateToken: _angular_core.InjectionToken<_ang
|
|
|
209
162
|
declare const ngpBreadcrumbEllipsis: ({}: NgpBreadcrumbEllipsisProps) => {};
|
|
210
163
|
declare const injectBreadcrumbEllipsisState: {
|
|
211
164
|
(): _angular_core.Signal<{}>;
|
|
212
|
-
(options: {
|
|
213
|
-
|
|
214
|
-
optional?: boolean;
|
|
215
|
-
skipSelf?: boolean;
|
|
216
|
-
}): _angular_core.Signal<{} | null>;
|
|
217
|
-
(options?: {
|
|
218
|
-
hoisted?: boolean;
|
|
219
|
-
optional?: boolean;
|
|
220
|
-
skipSelf?: boolean;
|
|
221
|
-
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
165
|
+
(options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>;
|
|
166
|
+
(options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
222
167
|
};
|
|
223
168
|
declare const provideBreadcrumbEllipsisState: (opts?: {
|
|
224
169
|
inherit?: boolean;
|
package/button/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { Signal } from '@angular/core';
|
|
3
4
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
@@ -15,16 +16,8 @@ interface NgpButtonProps {
|
|
|
15
16
|
declare const ngpButton: ({ disabled: _disabled }: NgpButtonProps) => NgpButtonState;
|
|
16
17
|
declare const injectButtonState: {
|
|
17
18
|
(): Signal<NgpButtonState>;
|
|
18
|
-
(options:
|
|
19
|
-
|
|
20
|
-
optional?: boolean;
|
|
21
|
-
skipSelf?: boolean;
|
|
22
|
-
}): Signal<NgpButtonState | null>;
|
|
23
|
-
(options?: {
|
|
24
|
-
hoisted?: boolean;
|
|
25
|
-
optional?: boolean;
|
|
26
|
-
skipSelf?: boolean;
|
|
27
|
-
}): Signal<NgpButtonState> | Signal<NgpButtonState | null>;
|
|
19
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<NgpButtonState | null>;
|
|
20
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<NgpButtonState> | Signal<NgpButtonState | null>;
|
|
28
21
|
};
|
|
29
22
|
declare const provideButtonState: (opts?: {
|
|
30
23
|
inherit?: boolean;
|
package/checkbox/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
2
|
+
import { SetterOptions } from 'ng-primitives/state';
|
|
1
3
|
import * as _angular_core from '@angular/core';
|
|
2
4
|
import { Signal, WritableSignal } from '@angular/core';
|
|
3
|
-
import { SetterOptions } from 'ng-primitives/state';
|
|
4
5
|
import { Observable } from 'rxjs';
|
|
5
6
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
7
|
|
|
@@ -89,16 +90,8 @@ interface NgpCheckboxProps {
|
|
|
89
90
|
declare const ngpCheckbox: ({ id, checked: _checked, defaultChecked: _defaultChecked, indeterminate: _indeterminate, disabled: _disabled, onCheckedChange, onIndeterminateChange, }: NgpCheckboxProps) => NgpCheckboxState;
|
|
90
91
|
declare const injectCheckboxState: {
|
|
91
92
|
(): Signal<NgpCheckboxState>;
|
|
92
|
-
(options:
|
|
93
|
-
|
|
94
|
-
optional?: boolean;
|
|
95
|
-
skipSelf?: boolean;
|
|
96
|
-
}): Signal<NgpCheckboxState | null>;
|
|
97
|
-
(options?: {
|
|
98
|
-
hoisted?: boolean;
|
|
99
|
-
optional?: boolean;
|
|
100
|
-
skipSelf?: boolean;
|
|
101
|
-
}): Signal<NgpCheckboxState> | Signal<NgpCheckboxState | null>;
|
|
93
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<NgpCheckboxState | null>;
|
|
94
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<NgpCheckboxState> | Signal<NgpCheckboxState | null>;
|
|
102
95
|
};
|
|
103
96
|
declare const provideCheckboxState: (opts?: {
|
|
104
97
|
inherit?: boolean;
|
package/context-menu/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { NgpOffset, NgpFlip, NgpShift, NgpOverlayContent, NgpOffsetInput, NgpFli
|
|
|
4
4
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
5
5
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
6
|
import { NgpMenuPlacement } from 'ng-primitives/menu';
|
|
7
|
+
import { StateInjectionOptions } from 'ng-primitives/state';
|
|
7
8
|
|
|
8
9
|
interface NgpContextMenuConfig {
|
|
9
10
|
/**
|
|
@@ -278,7 +279,7 @@ declare const ngpContextMenuTrigger: <T>({ disabled: _disabled, menu: _menu, off
|
|
|
278
279
|
declare const provideContextMenuTriggerState: (opts?: {
|
|
279
280
|
inherit?: boolean;
|
|
280
281
|
}) => _angular_core.FactoryProvider;
|
|
281
|
-
declare function injectContextMenuTriggerState(): Signal<NgpContextMenuTriggerState>;
|
|
282
|
+
declare function injectContextMenuTriggerState(options?: StateInjectionOptions): Signal<NgpContextMenuTriggerState>;
|
|
282
283
|
|
|
283
284
|
export { NgpContextMenu, NgpContextMenuItem, NgpContextMenuItemCheckbox, NgpContextMenuItemIndicator, NgpContextMenuItemRadio, NgpContextMenuItemRadioGroup, NgpContextMenuSubmenuTrigger, NgpContextMenuTrigger, injectContextMenuTriggerState, ngpContextMenuTrigger, provideContextMenuConfig, provideContextMenuTriggerState };
|
|
284
285
|
export type { NgpContextMenuConfig, NgpContextMenuTriggerProps, NgpContextMenuTriggerState };
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { ViewContainerRef, Injector, Provider, OnDestroy, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { ViewContainerRef, Injector, Provider, OnDestroy, InjectOptions, TemplateRef, Type } from '@angular/core';
|
|
3
3
|
import { NgpDismissGuard, ScrollStrategy, NgpOverlayRef, NgpDismissGuardInput } from 'ng-primitives/portal';
|
|
4
4
|
import * as i1 from 'ng-primitives/internal';
|
|
5
5
|
import { Subject, Observable } from 'rxjs';
|
|
@@ -181,7 +181,12 @@ declare class NgpDialogRef<T = unknown, R = unknown> implements NgpOverlayRef {
|
|
|
181
181
|
*/
|
|
182
182
|
getElements(): HTMLElement[];
|
|
183
183
|
}
|
|
184
|
-
declare function injectDialogRef<T = unknown, R = unknown>(
|
|
184
|
+
declare function injectDialogRef<T = unknown, R = unknown>(options?: InjectOptions & {
|
|
185
|
+
optional?: false;
|
|
186
|
+
}): NgpDialogRef<T, R>;
|
|
187
|
+
declare function injectDialogRef<T = unknown, R = unknown>(options: InjectOptions & {
|
|
188
|
+
optional: true;
|
|
189
|
+
}): NgpDialogRef<T, R> | null;
|
|
185
190
|
|
|
186
191
|
/**
|
|
187
192
|
* Originally based on Angular CDK Dialog service.
|
package/example-theme/index.css
CHANGED
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
--ngp-background-blue: #dbeafe;
|
|
27
27
|
--ngp-background-success: oklch(84.1% 0.238 128.85);
|
|
28
28
|
|
|
29
|
+
--ngp-primary: #f01e2b;
|
|
30
|
+
--ngp-primary-hover: #d81825;
|
|
31
|
+
--ngp-primary-active: #c1141f;
|
|
32
|
+
--ngp-primary-text: var(--ngp-white);
|
|
33
|
+
|
|
29
34
|
--ngp-border: rgba(0, 0, 0, 0.1);
|
|
30
35
|
--ngp-border-secondary: var(--ngp-gray-300);
|
|
31
36
|
--ngp-border-blue: #3b82f6;
|
|
@@ -65,6 +70,10 @@
|
|
|
65
70
|
--ngp-background-disabled: var(--ngp-gray-900);
|
|
66
71
|
--ngp-background-blue: rgba(95, 160, 246, 0.274);
|
|
67
72
|
|
|
73
|
+
--ngp-primary: #ff4651;
|
|
74
|
+
--ngp-primary-hover: #ff5d67;
|
|
75
|
+
--ngp-primary-active: #f0303c;
|
|
76
|
+
|
|
68
77
|
--ngp-border: var(--ngp-gray-800);
|
|
69
78
|
--ngp-border-secondary: var(--ngp-gray-700);
|
|
70
79
|
--ngp-border-blue: #1980ff;
|
|
@@ -69,8 +69,8 @@ const [NgpAccordionStateToken, ngpAccordion, _injectAccordionState, provideAccor
|
|
|
69
69
|
toggle,
|
|
70
70
|
};
|
|
71
71
|
});
|
|
72
|
-
function injectAccordionState() {
|
|
73
|
-
return _injectAccordionState();
|
|
72
|
+
function injectAccordionState(options) {
|
|
73
|
+
return _injectAccordionState(options);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const [NgpAccordionItemStateToken, ngpAccordionItem, _injectAccordionItemState, provideAccordionItemState,] = createPrimitive('NgpAccordionItem', ({ value, disabled: _disabled = signal(false) }) => {
|
|
@@ -106,8 +106,8 @@ const [NgpAccordionItemStateToken, ngpAccordionItem, _injectAccordionItemState,
|
|
|
106
106
|
setContent,
|
|
107
107
|
};
|
|
108
108
|
});
|
|
109
|
-
function injectAccordionItemState() {
|
|
110
|
-
return _injectAccordionItemState();
|
|
109
|
+
function injectAccordionItemState(options) {
|
|
110
|
+
return _injectAccordionItemState(options);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
const [NgpAccordionContentStateToken, ngpAccordionContent, injectAccordionContentState, provideAccordionContentState,] = createPrimitive('NgpAccordionContent', ({ id = signal(uniqueId('ngp-accordion-content')) }) => {
|