ng-primitives 0.93.0 → 0.95.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/a11y/index.d.ts +2 -0
- package/accordion/index.d.ts +22 -0
- package/autofill/index.d.ts +2 -0
- package/avatar/index.d.ts +6 -0
- package/breadcrumbs/index.d.ts +14 -0
- package/button/index.d.ts +21 -3
- package/checkbox/index.d.ts +14 -0
- package/collection.json +6 -0
- package/fesm2022/ng-primitives-accordion.mjs +24 -0
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +18 -4
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +18 -0
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +2 -2
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +10 -2
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +313 -352
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +15 -7
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +22 -4
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +12 -6
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +12 -0
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +6 -0
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +7 -0
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +18 -0
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +12 -0
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +2 -2
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/file-upload/index.d.ts +12 -8
- package/focus-trap/index.d.ts +2 -0
- package/form-field/index.d.ts +10 -2
- package/input/index.d.ts +13 -0
- package/menu/index.d.ts +247 -120
- package/package.json +1 -1
- package/roving-focus/index.d.ts +82 -10
- package/schematics/mcp-setup/README.md +180 -0
- package/schematics/mcp-setup/index.d.ts +3 -0
- package/schematics/mcp-setup/index.js +188 -0
- package/schematics/mcp-setup/index.js.map +1 -0
- package/schematics/mcp-setup/schema.d.ts +3 -0
- package/schematics/mcp-setup/schema.json +46 -0
- package/schematics/ng-add/index.d.ts +2 -1
- package/schematics/ng-add/index.js +32 -15
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -1
- package/schematics/ng-add/schema.json +39 -1
- package/separator/index.d.ts +1 -0
- package/slider/index.d.ts +20 -0
- package/state/index.d.ts +9 -0
- package/switch/index.d.ts +12 -0
- package/tabs/index.d.ts +12 -0
- package/textarea/index.d.ts +7 -0
- package/toggle/index.d.ts +7 -0
- package/toggle-group/index.d.ts +16 -0
- package/toolbar/index.d.ts +2 -0
package/a11y/index.d.ts
CHANGED
|
@@ -72,10 +72,12 @@ declare const injectVisuallyHiddenState: {
|
|
|
72
72
|
(options: {
|
|
73
73
|
hoisted: true;
|
|
74
74
|
optional?: boolean;
|
|
75
|
+
skipSelf?: boolean;
|
|
75
76
|
}): Signal<NgpVisuallyHiddenState | null>;
|
|
76
77
|
(options?: {
|
|
77
78
|
hoisted?: boolean;
|
|
78
79
|
optional?: boolean;
|
|
80
|
+
skipSelf?: boolean;
|
|
79
81
|
}): Signal<NgpVisuallyHiddenState> | Signal<NgpVisuallyHiddenState | null>;
|
|
80
82
|
};
|
|
81
83
|
declare const provideVisuallyHiddenState: (opts?: {
|
package/accordion/index.d.ts
CHANGED
|
@@ -35,10 +35,12 @@ declare const injectAccordionContentState: {
|
|
|
35
35
|
(options: {
|
|
36
36
|
hoisted: true;
|
|
37
37
|
optional?: boolean;
|
|
38
|
+
skipSelf?: boolean;
|
|
38
39
|
}): Signal<{} | null>;
|
|
39
40
|
(options?: {
|
|
40
41
|
hoisted?: boolean;
|
|
41
42
|
optional?: boolean;
|
|
43
|
+
skipSelf?: boolean;
|
|
42
44
|
}): Signal<{}> | Signal<{} | null>;
|
|
43
45
|
};
|
|
44
46
|
declare const provideAccordionContentState: (opts?: {
|
|
@@ -284,7 +286,25 @@ declare class NgpAccordion<T> {
|
|
|
284
286
|
* @internal
|
|
285
287
|
*/
|
|
286
288
|
isOpen(value: T): boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Set the value of the accordion.
|
|
291
|
+
* @param value The value to set.
|
|
292
|
+
*/
|
|
293
|
+
setValue(value: T | T[] | null): void;
|
|
294
|
+
/**
|
|
295
|
+
* @param value The value to toggle.
|
|
296
|
+
*/
|
|
287
297
|
toggle(value: T): void;
|
|
298
|
+
/**
|
|
299
|
+
* Set the disabled state of the accordion.
|
|
300
|
+
* @param value The disabled state.
|
|
301
|
+
*/
|
|
302
|
+
setDisabled(value: boolean): void;
|
|
303
|
+
/**
|
|
304
|
+
* Set the orientation of the accordion.
|
|
305
|
+
* @param value The orientation.
|
|
306
|
+
*/
|
|
307
|
+
setOrientation(value: NgpOrientation): void;
|
|
288
308
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpAccordion<any>, never>;
|
|
289
309
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpAccordion<any>, "[ngpAccordion]", ["ngpAccordion"], { "type": { "alias": "ngpAccordionType"; "required": false; "isSignal": true; }; "collapsible": { "alias": "ngpAccordionCollapsible"; "required": false; "isSignal": true; }; "value": { "alias": "ngpAccordionValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpAccordionDisabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "ngpAccordionOrientation"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpAccordionValueChange"; }, never, never, true, never>;
|
|
290
310
|
}
|
|
@@ -345,6 +365,7 @@ declare const injectAccordionTriggerState: {
|
|
|
345
365
|
(options: {
|
|
346
366
|
hoisted: true;
|
|
347
367
|
optional?: boolean;
|
|
368
|
+
skipSelf?: boolean;
|
|
348
369
|
}): Signal<{
|
|
349
370
|
id: Signal<string>;
|
|
350
371
|
toggle: () => void;
|
|
@@ -352,6 +373,7 @@ declare const injectAccordionTriggerState: {
|
|
|
352
373
|
(options?: {
|
|
353
374
|
hoisted?: boolean;
|
|
354
375
|
optional?: boolean;
|
|
376
|
+
skipSelf?: boolean;
|
|
355
377
|
}): Signal<{
|
|
356
378
|
id: Signal<string>;
|
|
357
379
|
toggle: () => void;
|
package/autofill/index.d.ts
CHANGED
|
@@ -46,12 +46,14 @@ declare const injectAutofillState: {
|
|
|
46
46
|
(options: {
|
|
47
47
|
hoisted: true;
|
|
48
48
|
optional?: boolean;
|
|
49
|
+
skipSelf?: boolean;
|
|
49
50
|
}): Signal<{
|
|
50
51
|
autofilled: _angular_core.WritableSignal<boolean>;
|
|
51
52
|
} | null>;
|
|
52
53
|
(options?: {
|
|
53
54
|
hoisted?: boolean;
|
|
54
55
|
optional?: boolean;
|
|
56
|
+
skipSelf?: boolean;
|
|
55
57
|
}): Signal<{
|
|
56
58
|
autofilled: _angular_core.WritableSignal<boolean>;
|
|
57
59
|
}> | Signal<{
|
package/avatar/index.d.ts
CHANGED
|
@@ -35,10 +35,12 @@ declare const injectAvatarFallbackState: {
|
|
|
35
35
|
(options: {
|
|
36
36
|
hoisted: true;
|
|
37
37
|
optional?: boolean;
|
|
38
|
+
skipSelf?: boolean;
|
|
38
39
|
}): Signal<{} | null>;
|
|
39
40
|
(options?: {
|
|
40
41
|
hoisted?: boolean;
|
|
41
42
|
optional?: boolean;
|
|
43
|
+
skipSelf?: boolean;
|
|
42
44
|
}): Signal<{}> | Signal<{} | null>;
|
|
43
45
|
};
|
|
44
46
|
declare const provideAvatarFallbackState: (opts?: {
|
|
@@ -65,10 +67,12 @@ declare const injectAvatarImageState: {
|
|
|
65
67
|
(options: {
|
|
66
68
|
hoisted: true;
|
|
67
69
|
optional?: boolean;
|
|
70
|
+
skipSelf?: boolean;
|
|
68
71
|
}): _angular_core.Signal<{} | null>;
|
|
69
72
|
(options?: {
|
|
70
73
|
hoisted?: boolean;
|
|
71
74
|
optional?: boolean;
|
|
75
|
+
skipSelf?: boolean;
|
|
72
76
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
73
77
|
};
|
|
74
78
|
declare const provideAvatarImageState: (opts?: {
|
|
@@ -103,6 +107,7 @@ declare const injectAvatarState: {
|
|
|
103
107
|
(options: {
|
|
104
108
|
hoisted: true;
|
|
105
109
|
optional?: boolean;
|
|
110
|
+
skipSelf?: boolean;
|
|
106
111
|
}): Signal<{
|
|
107
112
|
status: _angular_core.WritableSignal<NgpAvatarStatus>;
|
|
108
113
|
setStatus: (newStatus: NgpAvatarStatus) => void;
|
|
@@ -110,6 +115,7 @@ declare const injectAvatarState: {
|
|
|
110
115
|
(options?: {
|
|
111
116
|
hoisted?: boolean;
|
|
112
117
|
optional?: boolean;
|
|
118
|
+
skipSelf?: boolean;
|
|
113
119
|
}): Signal<{
|
|
114
120
|
status: _angular_core.WritableSignal<NgpAvatarStatus>;
|
|
115
121
|
setStatus: (newStatus: NgpAvatarStatus) => void;
|
package/breadcrumbs/index.d.ts
CHANGED
|
@@ -74,10 +74,12 @@ declare const injectBreadcrumbsState: {
|
|
|
74
74
|
(options: {
|
|
75
75
|
hoisted: true;
|
|
76
76
|
optional?: boolean;
|
|
77
|
+
skipSelf?: boolean;
|
|
77
78
|
}): _angular_core.Signal<{} | null>;
|
|
78
79
|
(options?: {
|
|
79
80
|
hoisted?: boolean;
|
|
80
81
|
optional?: boolean;
|
|
82
|
+
skipSelf?: boolean;
|
|
81
83
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
82
84
|
};
|
|
83
85
|
declare const provideBreadcrumbsState: (opts?: {
|
|
@@ -95,10 +97,12 @@ declare const injectBreadcrumbListState: {
|
|
|
95
97
|
(options: {
|
|
96
98
|
hoisted: true;
|
|
97
99
|
optional?: boolean;
|
|
100
|
+
skipSelf?: boolean;
|
|
98
101
|
}): _angular_core.Signal<{} | null>;
|
|
99
102
|
(options?: {
|
|
100
103
|
hoisted?: boolean;
|
|
101
104
|
optional?: boolean;
|
|
105
|
+
skipSelf?: boolean;
|
|
102
106
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
103
107
|
};
|
|
104
108
|
declare const provideBreadcrumbListState: (opts?: {
|
|
@@ -116,10 +120,12 @@ declare const injectBreadcrumbItemState: {
|
|
|
116
120
|
(options: {
|
|
117
121
|
hoisted: true;
|
|
118
122
|
optional?: boolean;
|
|
123
|
+
skipSelf?: boolean;
|
|
119
124
|
}): _angular_core.Signal<{} | null>;
|
|
120
125
|
(options?: {
|
|
121
126
|
hoisted?: boolean;
|
|
122
127
|
optional?: boolean;
|
|
128
|
+
skipSelf?: boolean;
|
|
123
129
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
124
130
|
};
|
|
125
131
|
declare const provideBreadcrumbItemState: (opts?: {
|
|
@@ -137,10 +143,12 @@ declare const injectBreadcrumbLinkState: {
|
|
|
137
143
|
(options: {
|
|
138
144
|
hoisted: true;
|
|
139
145
|
optional?: boolean;
|
|
146
|
+
skipSelf?: boolean;
|
|
140
147
|
}): _angular_core.Signal<{} | null>;
|
|
141
148
|
(options?: {
|
|
142
149
|
hoisted?: boolean;
|
|
143
150
|
optional?: boolean;
|
|
151
|
+
skipSelf?: boolean;
|
|
144
152
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
145
153
|
};
|
|
146
154
|
declare const provideBreadcrumbLinkState: (opts?: {
|
|
@@ -158,10 +166,12 @@ declare const injectBreadcrumbPageState: {
|
|
|
158
166
|
(options: {
|
|
159
167
|
hoisted: true;
|
|
160
168
|
optional?: boolean;
|
|
169
|
+
skipSelf?: boolean;
|
|
161
170
|
}): _angular_core.Signal<{} | null>;
|
|
162
171
|
(options?: {
|
|
163
172
|
hoisted?: boolean;
|
|
164
173
|
optional?: boolean;
|
|
174
|
+
skipSelf?: boolean;
|
|
165
175
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
166
176
|
};
|
|
167
177
|
declare const provideBreadcrumbPageState: (opts?: {
|
|
@@ -179,10 +189,12 @@ declare const injectBreadcrumbSeparatorState: {
|
|
|
179
189
|
(options: {
|
|
180
190
|
hoisted: true;
|
|
181
191
|
optional?: boolean;
|
|
192
|
+
skipSelf?: boolean;
|
|
182
193
|
}): _angular_core.Signal<{} | null>;
|
|
183
194
|
(options?: {
|
|
184
195
|
hoisted?: boolean;
|
|
185
196
|
optional?: boolean;
|
|
197
|
+
skipSelf?: boolean;
|
|
186
198
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
187
199
|
};
|
|
188
200
|
declare const provideBreadcrumbSeparatorState: (opts?: {
|
|
@@ -200,10 +212,12 @@ declare const injectBreadcrumbEllipsisState: {
|
|
|
200
212
|
(options: {
|
|
201
213
|
hoisted: true;
|
|
202
214
|
optional?: boolean;
|
|
215
|
+
skipSelf?: boolean;
|
|
203
216
|
}): _angular_core.Signal<{} | null>;
|
|
204
217
|
(options?: {
|
|
205
218
|
hoisted?: boolean;
|
|
206
219
|
optional?: boolean;
|
|
220
|
+
skipSelf?: boolean;
|
|
207
221
|
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
208
222
|
};
|
|
209
223
|
declare const provideBreadcrumbEllipsisState: (opts?: {
|
package/button/index.d.ts
CHANGED
|
@@ -3,21 +3,34 @@ import { Signal } from '@angular/core';
|
|
|
3
3
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
4
|
|
|
5
5
|
interface NgpButtonState {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Whether the button is disabled.
|
|
8
|
+
*/
|
|
9
|
+
readonly disabled: Signal<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Set the disabled state of the button.
|
|
12
|
+
* @param value The disabled state.
|
|
13
|
+
*/
|
|
14
|
+
setDisabled(value: boolean): void;
|
|
7
15
|
}
|
|
8
16
|
interface NgpButtonProps {
|
|
9
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Whether the button is disabled.
|
|
19
|
+
*/
|
|
20
|
+
readonly disabled?: Signal<boolean>;
|
|
10
21
|
}
|
|
11
|
-
declare const ngpButton: ({ disabled }: NgpButtonProps) => NgpButtonState;
|
|
22
|
+
declare const ngpButton: ({ disabled: _disabled }: NgpButtonProps) => NgpButtonState;
|
|
12
23
|
declare const injectButtonState: {
|
|
13
24
|
(): Signal<NgpButtonState>;
|
|
14
25
|
(options: {
|
|
15
26
|
hoisted: true;
|
|
16
27
|
optional?: boolean;
|
|
28
|
+
skipSelf?: boolean;
|
|
17
29
|
}): Signal<NgpButtonState | null>;
|
|
18
30
|
(options?: {
|
|
19
31
|
hoisted?: boolean;
|
|
20
32
|
optional?: boolean;
|
|
33
|
+
skipSelf?: boolean;
|
|
21
34
|
}): Signal<NgpButtonState> | Signal<NgpButtonState | null>;
|
|
22
35
|
};
|
|
23
36
|
declare const provideButtonState: (opts?: {
|
|
@@ -33,6 +46,11 @@ declare class NgpButton {
|
|
|
33
46
|
* The button state.
|
|
34
47
|
*/
|
|
35
48
|
protected readonly state: NgpButtonState;
|
|
49
|
+
/**
|
|
50
|
+
* Set the disabled state of the button.
|
|
51
|
+
* @param value The disabled state.
|
|
52
|
+
*/
|
|
53
|
+
setDisabled(value: boolean): void;
|
|
36
54
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpButton, never>;
|
|
37
55
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpButton, "[ngpButton]", ["ngpButton"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
38
56
|
}
|
package/checkbox/index.d.ts
CHANGED
|
@@ -83,10 +83,12 @@ declare const injectCheckboxState: {
|
|
|
83
83
|
(options: {
|
|
84
84
|
hoisted: true;
|
|
85
85
|
optional?: boolean;
|
|
86
|
+
skipSelf?: boolean;
|
|
86
87
|
}): Signal<NgpCheckboxState | null>;
|
|
87
88
|
(options?: {
|
|
88
89
|
hoisted?: boolean;
|
|
89
90
|
optional?: boolean;
|
|
91
|
+
skipSelf?: boolean;
|
|
90
92
|
}): Signal<NgpCheckboxState> | Signal<NgpCheckboxState | null>;
|
|
91
93
|
};
|
|
92
94
|
declare const provideCheckboxState: (opts?: {
|
|
@@ -131,6 +133,18 @@ declare class NgpCheckbox {
|
|
|
131
133
|
*/
|
|
132
134
|
protected readonly state: NgpCheckboxState;
|
|
133
135
|
toggle(event?: Event): void;
|
|
136
|
+
/**
|
|
137
|
+
* Update the checked value.
|
|
138
|
+
*/
|
|
139
|
+
setChecked(value: boolean): void;
|
|
140
|
+
/**
|
|
141
|
+
* Update the indeterminate value.
|
|
142
|
+
*/
|
|
143
|
+
setIndeterminate(value: boolean): void;
|
|
144
|
+
/**
|
|
145
|
+
* Set the disabled value.
|
|
146
|
+
*/
|
|
147
|
+
setDisabled(value: boolean): void;
|
|
134
148
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpCheckbox, never>;
|
|
135
149
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpCheckbox, "[ngpCheckbox]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "ngpCheckboxChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "ngpCheckboxIndeterminate"; "required": false; "isSignal": true; }; "required": { "alias": "ngpCheckboxRequired"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpCheckboxDisabled"; "required": false; "isSignal": true; }; }, { "checkedChange": "ngpCheckboxCheckedChange"; "indeterminateChange": "ngpCheckboxIndeterminateChange"; }, never, never, true, never>;
|
|
136
150
|
}
|
package/collection.json
CHANGED
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
"description": "Add Angular Primitives to a project.",
|
|
17
17
|
"factory": "./schematics/ng-generate/index",
|
|
18
18
|
"schema": "./schematics/ng-generate/schema.json"
|
|
19
|
+
},
|
|
20
|
+
"mcp-setup": {
|
|
21
|
+
"description": "Configure MCP server for AI tools and editors.",
|
|
22
|
+
"factory": "./schematics/mcp-setup/index",
|
|
23
|
+
"schema": "./schematics/mcp-setup/schema.json",
|
|
24
|
+
"aliases": ["mcp"]
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
}
|
|
@@ -381,9 +381,33 @@ class NgpAccordion {
|
|
|
381
381
|
isOpen(value) {
|
|
382
382
|
return this.state.isOpen(value);
|
|
383
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* Set the value of the accordion.
|
|
386
|
+
* @param value The value to set.
|
|
387
|
+
*/
|
|
388
|
+
setValue(value) {
|
|
389
|
+
this.state.setValue(value);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @param value The value to toggle.
|
|
393
|
+
*/
|
|
384
394
|
toggle(value) {
|
|
385
395
|
this.state.toggle(value);
|
|
386
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* Set the disabled state of the accordion.
|
|
399
|
+
* @param value The disabled state.
|
|
400
|
+
*/
|
|
401
|
+
setDisabled(value) {
|
|
402
|
+
this.state.setDisabled(value);
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Set the orientation of the accordion.
|
|
406
|
+
* @param value The orientation.
|
|
407
|
+
*/
|
|
408
|
+
setOrientation(value) {
|
|
409
|
+
this.state.setOrientation(value);
|
|
410
|
+
}
|
|
387
411
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpAccordion, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
388
412
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpAccordion, isStandalone: true, selector: "[ngpAccordion]", inputs: { type: { classPropertyName: "type", publicName: "ngpAccordionType", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "ngpAccordionCollapsible", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpAccordionValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpAccordionDisabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpAccordionOrientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpAccordionValueChange" }, providers: [provideAccordionState()], exportAs: ["ngpAccordion"], ngImport: i0 }); }
|
|
389
413
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-accordion.mjs","sources":["../../../../packages/ng-primitives/accordion/src/accordion/accordion-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger.ts","../../../../packages/ng-primitives/accordion/src/config/accordion-config.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion.ts","../../../../packages/ng-primitives/accordion/src/ng-primitives-accordion.ts"],"sourcesContent":["import { signal, Signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, controlled, createPrimitive, deprecatedSetter } from 'ng-primitives/state';\n\n/**\n * The state interface for the Accordion pattern.\n */\nexport interface NgpAccordionState<T> {\n /**\n * The value of the accordion.\n */\n readonly value: WritableSignal<T | T[] | null>;\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * The accordion orientation.\n */\n readonly orientation: WritableSignal<NgpOrientation>;\n /**\n * Set the value of the accordion.\n */\n setValue(value: T | T[] | null): void;\n /**\n * Set the disabled state of the accordion.\n */\n setDisabled(value: boolean): void;\n /**\n * Set the orientation of the accordion.\n */\n setOrientation(value: NgpOrientation): void;\n /**\n * Whether the specified value is open.\n */\n isOpen(value: T): boolean;\n /**\n * Toggle the specified value.\n */\n toggle(value: T): void;\n}\n\n/**\n * The props interface for the Accordion pattern.\n */\nexport interface NgpAccordionProps<T> {\n /**\n * The type of the accordion.\n */\n readonly type: Signal<NgpAccordionType>;\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible: Signal<boolean>;\n\n /**\n * The value of the accordion.\n */\n readonly value: Signal<T | T[] | null>;\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled?: Signal<boolean>;\n\n /**\n * The accordion orientation.\n */\n readonly orientation: Signal<NgpOrientation>;\n\n /**\n * Callback fired when valueChange is emitted.\n */\n readonly onValueChange?: (value: T | T[] | null) => void;\n}\n\nexport const [NgpAccordionStateToken, ngpAccordion, _injectAccordionState, provideAccordionState] =\n createPrimitive(\n 'NgpAccordion',\n <T>({\n type,\n collapsible,\n value: _value = signal(null),\n disabled: _disabled = signal(false),\n orientation: _orientation = signal('vertical'),\n onValueChange,\n }: NgpAccordionProps<T>): NgpAccordionState<T> => {\n const element = injectElementRef();\n\n // Create controlled signals\n const value = controlled(_value);\n const disabled = controlled(_disabled);\n const orientation = controlled(_orientation);\n\n // Host bindings extracted from directive\n attrBinding(element, 'data-orientation', orientation);\n attrBinding(element, 'data-disabled', disabled);\n\n // Setter methods\n function setDisabled(value: boolean): void {\n disabled.set(value);\n }\n\n function setOrientation(value: NgpOrientation): void {\n orientation.set(value);\n }\n\n function setValue(newValue: T | T[] | null): void {\n value.set(newValue);\n }\n\n // Methods extracted from directive\n /**\n * @param value The value to check. @returns Whether the value is open. @internal\n */\n function isOpen(itemValue: T): boolean {\n if (type() === 'multiple') {\n return (value() as T[] | null)?.includes(itemValue) ?? false;\n }\n\n return value() === itemValue;\n }\n\n function toggle(itemValue: T): void {\n const open = isOpen(itemValue);\n\n // if we are in single mode and the itemValue is already open and the accordion is not collapsible, do nothing\n if (type() === 'single' && open && !collapsible()) {\n return;\n }\n\n // if we are in single mode then toggle the itemValue\n if (type() === 'single') {\n const newValue = open ? null : itemValue;\n value.set(newValue);\n onValueChange?.(newValue);\n return;\n }\n\n // if we are in multiple mode then toggle the itemValue\n let values = (value() as T[]) ?? [];\n\n if (open) {\n values = values.filter(v => v !== itemValue);\n } else {\n values = [...values, itemValue];\n }\n value.set(values);\n onValueChange?.(values);\n }\n\n return {\n value: deprecatedSetter(value, 'setValue'),\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n orientation: deprecatedSetter(orientation, 'setOrientation'),\n setDisabled,\n setOrientation,\n setValue,\n isOpen,\n toggle,\n };\n },\n );\n\nexport type NgpAccordionType = 'single' | 'multiple';\n\nexport function injectAccordionState<T>(): Signal<NgpAccordionState<T>> {\n return _injectAccordionState() as Signal<NgpAccordionState<T>>;\n}\n","import { computed, Signal, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { controlled, createPrimitive, dataBinding, deprecatedSetter } from 'ng-primitives/state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionItemState<T> {\n /**\n * The value of the accordion item.\n */\n readonly value: Signal<T>;\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled: Signal<boolean>;\n /**\n * Whether the accordion item is expanded.\n */\n readonly open: Signal<boolean>;\n /**\n * The trigger id.\n */\n readonly triggerId: Signal<string | undefined>;\n /**\n * The content id.\n */\n readonly contentId: Signal<string | undefined>;\n /**\n * Set the disabled state of the accordion item.\n */\n setDisabled(value: boolean): void;\n /**\n * Set the trigger of the accordion item.\n */\n setTrigger(id: string): void;\n /**\n * Set the content of the accordion item.\n */\n setContent(id: string): void;\n}\n\nexport interface NgpAccordionItemProps<T> {\n /**\n * The value of the accordion item.\n */\n readonly value: Signal<T>;\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled?: Signal<boolean>;\n}\n\nexport const [\n NgpAccordionItemStateToken,\n ngpAccordionItem,\n _injectAccordionItemState,\n provideAccordionItemState,\n] = createPrimitive(\n 'NgpAccordionItem',\n <T>({ value, disabled: _disabled = signal(false) }: NgpAccordionItemProps<T>) => {\n const accordion = injectAccordionState<T>();\n const element = injectElementRef();\n\n const disabled = controlled(_disabled);\n\n // Whether the accordion item is expanded.\n const open = computed<boolean>(() => accordion().isOpen(value()));\n\n const trigger = signal<string | undefined>(undefined);\n const content = signal<string | undefined>(undefined);\n\n // Setup host data bindings\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', open);\n dataBinding(element, 'data-disabled', () => disabled() || accordion().disabled());\n\n // Set the disabled state of the accordion item.\n function setDisabled(value: boolean) {\n disabled.set(value);\n }\n\n function setTrigger(id: string) {\n trigger.set(id);\n }\n\n function setContent(id: string) {\n content.set(id);\n }\n\n return {\n value,\n open,\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n triggerId: deprecatedSetter(trigger, 'setTrigger'),\n contentId: deprecatedSetter(content, 'setContent'),\n setDisabled,\n setTrigger,\n setContent,\n };\n },\n);\n\nexport function injectAccordionItemState<T>(): Signal<NgpAccordionItemState<T>> {\n return _injectAccordionItemState() as Signal<NgpAccordionItemState<T>>;\n}\n","import { afterRenderEffect, computed, signal, Signal } from '@angular/core';\nimport { fromMutationObserver, injectDimensions, injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { safeTakeUntilDestroyed, uniqueId } from 'ng-primitives/utils';\nimport { debounceTime } from 'rxjs/operators';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionContentState {\n /**\n * The id of the content region\n */\n readonly id: Signal<string>;\n}\n\nexport interface NgpAccordionContentProps {\n /**\n * The id of the content region\n */\n readonly id?: Signal<string>;\n}\n\nexport const [\n NgpAccordionContentStateToken,\n ngpAccordionContent,\n injectAccordionContentState,\n provideAccordionContentState,\n] = createPrimitive(\n 'NgpAccordionContent',\n <T>({ id = signal(uniqueId('ngp-accordion-content')) }: NgpAccordionContentProps) => {\n const element = injectElementRef();\n const accordion = injectAccordionState<T>();\n const accordionItem = injectAccordionItemState<T>();\n const dimensions = injectDimensions();\n\n const hidden = computed(() =>\n !accordionItem().open() && dimensions().height === 0 ? 'until-found' : null,\n );\n\n // Host bindings\n attrBinding(element, 'role', 'region');\n attrBinding(element, 'id', id);\n attrBinding(element, 'aria-labelledby', accordionItem().triggerId);\n attrBinding(element, 'hidden', hidden);\n\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', accordionItem().open);\n dataBinding(element, 'data-closed', () => !accordionItem().open());\n\n listener(element, 'beforematch', onBeforeMatch);\n\n // Register the content with the accordion item state\n accordionItem().setContent(id());\n\n /**\n * Handle the beforematch event to automatically open the accordion item\n * when the browser's find-in-page functionality tries to reveal hidden content.\n */\n function onBeforeMatch(): void {\n const isDisabled = accordion().disabled() || accordionItem().disabled();\n if (isDisabled) {\n return;\n }\n accordion().toggle(accordionItem().value() as T);\n }\n\n function updateDimensions(): void {\n if (accordionItem().open()) {\n // remove the inline styles to reset them\n element.nativeElement.style.removeProperty('--ngp-accordion-content-width');\n element.nativeElement.style.removeProperty('--ngp-accordion-content-height');\n // set the dimensions based on the content\n element.nativeElement.style.setProperty(\n '--ngp-accordion-content-width',\n `${element.nativeElement.scrollWidth}px`,\n );\n element.nativeElement.style.setProperty(\n '--ngp-accordion-content-height',\n `${element.nativeElement.scrollHeight}px`,\n );\n }\n }\n\n // any time the open state of the accordion item changes, update the dimensions\n afterRenderEffect(() => updateDimensions());\n\n // update dimensions when the content changes\n fromMutationObserver(element.nativeElement, {\n childList: true,\n subtree: true,\n disabled: computed(() => !accordionItem().open()),\n })\n .pipe(debounceTime(0), safeTakeUntilDestroyed())\n .subscribe(() => updateDimensions());\n\n return {};\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpAccordionContent } from './accordion-content-state';\n\n/**\n * Apply the `ngpAccordionContent` directive to an element that represents the content of an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionContent]',\n exportAs: 'ngpAccordionContent',\n})\nexport class NgpAccordionContent<T> {\n /**\n * The id of the content region\n */\n readonly id = input<string>(uniqueId('ngp-accordion-content'));\n\n constructor() {\n ngpAccordionContent<T>({ id: this.id });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectAccordionState } from '../accordion/accordion-state';\nimport { ngpAccordionItem, provideAccordionItemState } from './accordion-item-state';\n\n/**\n * Apply the `ngpAccordionItem` directive to an element that represents an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionItem]',\n exportAs: 'ngpAccordionItem',\n providers: [provideAccordionItemState()],\n})\nexport class NgpAccordionItem<T> {\n /**\n * Access the accordion.\n */\n protected readonly accordion = injectAccordionState<T>();\n\n /**\n * The value of the accordion item.\n */\n readonly value = input<T>(uniqueId('ngp-accordion-item') as T, {\n alias: 'ngpAccordionItemValue',\n });\n\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion item state.\n */\n protected readonly state = ngpAccordionItem<T>({\n value: this.value,\n disabled: this.disabled,\n });\n\n /**\n * The open state of the accordion item.\n */\n readonly open = this.state.open;\n}\n","import { HOST_TAG_NAME, inject, signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionTriggerState {\n /**\n * The id of the trigger button\n */\n readonly id: Signal<string>;\n /**\n * Toggle the accordion item.\n */\n toggle(): void;\n}\n\nexport interface NgpAccordionTriggerProps {\n /**\n * The id of the trigger button\n */\n readonly id?: Signal<string>;\n}\n\nexport const [\n NgpAccordionTriggerStateToken,\n ngpAccordionTrigger,\n injectAccordionTriggerState,\n provideAccordionTriggerState,\n] = createPrimitive(\n 'NgpAccordionTrigger',\n <T>({ id = signal(uniqueId('ngp-accordion-trigger')) }: NgpAccordionTriggerProps) => {\n const element = injectElementRef();\n const tagName = inject(HOST_TAG_NAME);\n const accordion = injectAccordionState<T>();\n const accordionItem = injectAccordionItemState<T>();\n\n // Host bindings\n attrBinding(element, 'id', id);\n attrBinding(element, 'type', tagName === 'button' ? 'button' : null);\n attrBinding(element, 'aria-controls', accordionItem().contentId);\n attrBinding(element, 'aria-expanded', accordionItem().open);\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', accordionItem().open);\n dataBinding(\n element,\n 'data-disabled',\n () => accordionItem().disabled() || accordion().disabled(),\n );\n\n // register the trigger with the accordion item\n accordionItem().setTrigger(id());\n\n // Methods\n function toggle(): void {\n if (accordionItem().disabled() || accordion().disabled()) {\n return;\n }\n\n accordion().toggle(accordionItem().value()!);\n }\n\n // Event listeners\n listener(element, 'click', toggle);\n\n return { id, toggle };\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpAccordionTrigger } from './accordion-trigger-state';\n\n/**\n * Apply the `ngpAccordionTrigger` directive to an element that represents the trigger for an accordion item, such as a button.\n */\n@Directive({\n selector: '[ngpAccordionTrigger]',\n exportAs: 'ngpAccordionTrigger',\n})\nexport class NgpAccordionTrigger<T> {\n /**\n * The id of the trigger.\n */\n readonly id = input<string>(uniqueId('ngp-accordion-trigger'));\n\n private readonly state = ngpAccordionTrigger<T>({ id: this.id });\n\n /**\n * Toggle the accordion item.\n */\n toggle(): void {\n this.state.toggle();\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport type { NgpAccordionType } from '../accordion/accordion-state';\n\nexport interface NgpAccordionConfig {\n /**\n * The default type of the accordion\n * @default 'single'\n */\n type: NgpAccordionType;\n /**\n * Whether the accordion is collapsible\n * @default false\n */\n collapsible: boolean;\n /**\n * The default orientation of the accordion\n * @default 'vertical'\n */\n orientation: 'vertical' | 'horizontal';\n}\n\nexport const defaultAccordionConfig: NgpAccordionConfig = {\n type: 'single',\n collapsible: false,\n orientation: 'vertical',\n};\n\nexport const NgpAccordionConfigToken = new InjectionToken<NgpAccordionConfig>(\n 'NgpAccordionConfigToken',\n);\n\n/**\n * Provide the default Accordion configuration\n * @param config The Accordion configuration\n * @returns The provider\n */\nexport function provideAccordionConfig(config: Partial<NgpAccordionConfig>): Provider[] {\n return [\n {\n provide: NgpAccordionConfigToken,\n useValue: { ...defaultAccordionConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Accordion configuration\n * @returns The global Accordion configuration\n */\nexport function injectAccordionConfig(): NgpAccordionConfig {\n return inject(NgpAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectAccordionConfig } from '../config/accordion-config';\nimport { ngpAccordion, NgpAccordionType, provideAccordionState } from './accordion-state';\n\n/**\n * Apply the `ngpAccordion` directive to an element that represents the group of accordion items.\n */\n@Directive({\n selector: '[ngpAccordion]',\n exportAs: 'ngpAccordion',\n providers: [provideAccordionState()],\n})\nexport class NgpAccordion<T> {\n /**\n * Access the global accordion configuration.\n */\n private readonly config = injectAccordionConfig();\n\n /**\n * The type of the accordion.\n */\n readonly type = input<NgpAccordionType>(this.config.type, {\n alias: 'ngpAccordionType',\n });\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible = input<boolean, BooleanInput>(this.config.collapsible, {\n alias: 'ngpAccordionCollapsible',\n transform: booleanAttribute,\n });\n\n /**\n * The value of the accordion.\n */\n readonly value = input<T | T[] | null>(null, {\n alias: 'ngpAccordionValue',\n });\n\n /**\n * Event emitted when the accordion value changes.\n */\n readonly valueChange = output<T | T[] | null>({\n alias: 'ngpAccordionValueChange',\n });\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion orientation.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpAccordionOrientation',\n });\n\n /**\n * The accordion state.\n */\n protected readonly state = ngpAccordion<T>({\n type: this.type,\n collapsible: this.collapsible,\n value: this.value,\n disabled: this.disabled,\n orientation: this.orientation,\n onValueChange: value => this.valueChange.emit(value),\n });\n\n /**\n * @param value The value to check.\n * @returns Whether the value is open.\n * @internal\n */\n isOpen(value: T): boolean {\n return this.state.isOpen(value);\n }\n\n toggle(value: T): void {\n this.state.toggle(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA8EO,MAAM,CAAC,sBAAsB,EAAE,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,GAC/F,eAAe,CACb,cAAc,EACd,CAAI,EACF,IAAI,EACJ,WAAW,EACX,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,EAC5B,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,EACnC,WAAW,EAAE,YAAY,GAAG,MAAM,CAAC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;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-accordion.mjs","sources":["../../../../packages/ng-primitives/accordion/src/accordion/accordion-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger.ts","../../../../packages/ng-primitives/accordion/src/config/accordion-config.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion.ts","../../../../packages/ng-primitives/accordion/src/ng-primitives-accordion.ts"],"sourcesContent":["import { signal, Signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, controlled, createPrimitive, deprecatedSetter } from 'ng-primitives/state';\n\n/**\n * The state interface for the Accordion pattern.\n */\nexport interface NgpAccordionState<T> {\n /**\n * The value of the accordion.\n */\n readonly value: WritableSignal<T | T[] | null>;\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * The accordion orientation.\n */\n readonly orientation: WritableSignal<NgpOrientation>;\n /**\n * Set the value of the accordion.\n */\n setValue(value: T | T[] | null): void;\n /**\n * Set the disabled state of the accordion.\n */\n setDisabled(value: boolean): void;\n /**\n * Set the orientation of the accordion.\n */\n setOrientation(value: NgpOrientation): void;\n /**\n * Whether the specified value is open.\n */\n isOpen(value: T): boolean;\n /**\n * Toggle the specified value.\n */\n toggle(value: T): void;\n}\n\n/**\n * The props interface for the Accordion pattern.\n */\nexport interface NgpAccordionProps<T> {\n /**\n * The type of the accordion.\n */\n readonly type: Signal<NgpAccordionType>;\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible: Signal<boolean>;\n\n /**\n * The value of the accordion.\n */\n readonly value: Signal<T | T[] | null>;\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled?: Signal<boolean>;\n\n /**\n * The accordion orientation.\n */\n readonly orientation: Signal<NgpOrientation>;\n\n /**\n * Callback fired when valueChange is emitted.\n */\n readonly onValueChange?: (value: T | T[] | null) => void;\n}\n\nexport const [NgpAccordionStateToken, ngpAccordion, _injectAccordionState, provideAccordionState] =\n createPrimitive(\n 'NgpAccordion',\n <T>({\n type,\n collapsible,\n value: _value = signal(null),\n disabled: _disabled = signal(false),\n orientation: _orientation = signal('vertical'),\n onValueChange,\n }: NgpAccordionProps<T>): NgpAccordionState<T> => {\n const element = injectElementRef();\n\n // Create controlled signals\n const value = controlled(_value);\n const disabled = controlled(_disabled);\n const orientation = controlled(_orientation);\n\n // Host bindings extracted from directive\n attrBinding(element, 'data-orientation', orientation);\n attrBinding(element, 'data-disabled', disabled);\n\n // Setter methods\n function setDisabled(value: boolean): void {\n disabled.set(value);\n }\n\n function setOrientation(value: NgpOrientation): void {\n orientation.set(value);\n }\n\n function setValue(newValue: T | T[] | null): void {\n value.set(newValue);\n }\n\n // Methods extracted from directive\n /**\n * @param value The value to check. @returns Whether the value is open. @internal\n */\n function isOpen(itemValue: T): boolean {\n if (type() === 'multiple') {\n return (value() as T[] | null)?.includes(itemValue) ?? false;\n }\n\n return value() === itemValue;\n }\n\n function toggle(itemValue: T): void {\n const open = isOpen(itemValue);\n\n // if we are in single mode and the itemValue is already open and the accordion is not collapsible, do nothing\n if (type() === 'single' && open && !collapsible()) {\n return;\n }\n\n // if we are in single mode then toggle the itemValue\n if (type() === 'single') {\n const newValue = open ? null : itemValue;\n value.set(newValue);\n onValueChange?.(newValue);\n return;\n }\n\n // if we are in multiple mode then toggle the itemValue\n let values = (value() as T[]) ?? [];\n\n if (open) {\n values = values.filter(v => v !== itemValue);\n } else {\n values = [...values, itemValue];\n }\n value.set(values);\n onValueChange?.(values);\n }\n\n return {\n value: deprecatedSetter(value, 'setValue'),\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n orientation: deprecatedSetter(orientation, 'setOrientation'),\n setDisabled,\n setOrientation,\n setValue,\n isOpen,\n toggle,\n };\n },\n );\n\nexport type NgpAccordionType = 'single' | 'multiple';\n\nexport function injectAccordionState<T>(): Signal<NgpAccordionState<T>> {\n return _injectAccordionState() as Signal<NgpAccordionState<T>>;\n}\n","import { computed, Signal, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { controlled, createPrimitive, dataBinding, deprecatedSetter } from 'ng-primitives/state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionItemState<T> {\n /**\n * The value of the accordion item.\n */\n readonly value: Signal<T>;\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled: Signal<boolean>;\n /**\n * Whether the accordion item is expanded.\n */\n readonly open: Signal<boolean>;\n /**\n * The trigger id.\n */\n readonly triggerId: Signal<string | undefined>;\n /**\n * The content id.\n */\n readonly contentId: Signal<string | undefined>;\n /**\n * Set the disabled state of the accordion item.\n */\n setDisabled(value: boolean): void;\n /**\n * Set the trigger of the accordion item.\n */\n setTrigger(id: string): void;\n /**\n * Set the content of the accordion item.\n */\n setContent(id: string): void;\n}\n\nexport interface NgpAccordionItemProps<T> {\n /**\n * The value of the accordion item.\n */\n readonly value: Signal<T>;\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled?: Signal<boolean>;\n}\n\nexport const [\n NgpAccordionItemStateToken,\n ngpAccordionItem,\n _injectAccordionItemState,\n provideAccordionItemState,\n] = createPrimitive(\n 'NgpAccordionItem',\n <T>({ value, disabled: _disabled = signal(false) }: NgpAccordionItemProps<T>) => {\n const accordion = injectAccordionState<T>();\n const element = injectElementRef();\n\n const disabled = controlled(_disabled);\n\n // Whether the accordion item is expanded.\n const open = computed<boolean>(() => accordion().isOpen(value()));\n\n const trigger = signal<string | undefined>(undefined);\n const content = signal<string | undefined>(undefined);\n\n // Setup host data bindings\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', open);\n dataBinding(element, 'data-disabled', () => disabled() || accordion().disabled());\n\n // Set the disabled state of the accordion item.\n function setDisabled(value: boolean) {\n disabled.set(value);\n }\n\n function setTrigger(id: string) {\n trigger.set(id);\n }\n\n function setContent(id: string) {\n content.set(id);\n }\n\n return {\n value,\n open,\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n triggerId: deprecatedSetter(trigger, 'setTrigger'),\n contentId: deprecatedSetter(content, 'setContent'),\n setDisabled,\n setTrigger,\n setContent,\n };\n },\n);\n\nexport function injectAccordionItemState<T>(): Signal<NgpAccordionItemState<T>> {\n return _injectAccordionItemState() as Signal<NgpAccordionItemState<T>>;\n}\n","import { afterRenderEffect, computed, signal, Signal } from '@angular/core';\nimport { fromMutationObserver, injectDimensions, injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { safeTakeUntilDestroyed, uniqueId } from 'ng-primitives/utils';\nimport { debounceTime } from 'rxjs/operators';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionContentState {\n /**\n * The id of the content region\n */\n readonly id: Signal<string>;\n}\n\nexport interface NgpAccordionContentProps {\n /**\n * The id of the content region\n */\n readonly id?: Signal<string>;\n}\n\nexport const [\n NgpAccordionContentStateToken,\n ngpAccordionContent,\n injectAccordionContentState,\n provideAccordionContentState,\n] = createPrimitive(\n 'NgpAccordionContent',\n <T>({ id = signal(uniqueId('ngp-accordion-content')) }: NgpAccordionContentProps) => {\n const element = injectElementRef();\n const accordion = injectAccordionState<T>();\n const accordionItem = injectAccordionItemState<T>();\n const dimensions = injectDimensions();\n\n const hidden = computed(() =>\n !accordionItem().open() && dimensions().height === 0 ? 'until-found' : null,\n );\n\n // Host bindings\n attrBinding(element, 'role', 'region');\n attrBinding(element, 'id', id);\n attrBinding(element, 'aria-labelledby', accordionItem().triggerId);\n attrBinding(element, 'hidden', hidden);\n\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', accordionItem().open);\n dataBinding(element, 'data-closed', () => !accordionItem().open());\n\n listener(element, 'beforematch', onBeforeMatch);\n\n // Register the content with the accordion item state\n accordionItem().setContent(id());\n\n /**\n * Handle the beforematch event to automatically open the accordion item\n * when the browser's find-in-page functionality tries to reveal hidden content.\n */\n function onBeforeMatch(): void {\n const isDisabled = accordion().disabled() || accordionItem().disabled();\n if (isDisabled) {\n return;\n }\n accordion().toggle(accordionItem().value() as T);\n }\n\n function updateDimensions(): void {\n if (accordionItem().open()) {\n // remove the inline styles to reset them\n element.nativeElement.style.removeProperty('--ngp-accordion-content-width');\n element.nativeElement.style.removeProperty('--ngp-accordion-content-height');\n // set the dimensions based on the content\n element.nativeElement.style.setProperty(\n '--ngp-accordion-content-width',\n `${element.nativeElement.scrollWidth}px`,\n );\n element.nativeElement.style.setProperty(\n '--ngp-accordion-content-height',\n `${element.nativeElement.scrollHeight}px`,\n );\n }\n }\n\n // any time the open state of the accordion item changes, update the dimensions\n afterRenderEffect(() => updateDimensions());\n\n // update dimensions when the content changes\n fromMutationObserver(element.nativeElement, {\n childList: true,\n subtree: true,\n disabled: computed(() => !accordionItem().open()),\n })\n .pipe(debounceTime(0), safeTakeUntilDestroyed())\n .subscribe(() => updateDimensions());\n\n return {};\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpAccordionContent } from './accordion-content-state';\n\n/**\n * Apply the `ngpAccordionContent` directive to an element that represents the content of an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionContent]',\n exportAs: 'ngpAccordionContent',\n})\nexport class NgpAccordionContent<T> {\n /**\n * The id of the content region\n */\n readonly id = input<string>(uniqueId('ngp-accordion-content'));\n\n constructor() {\n ngpAccordionContent<T>({ id: this.id });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectAccordionState } from '../accordion/accordion-state';\nimport { ngpAccordionItem, provideAccordionItemState } from './accordion-item-state';\n\n/**\n * Apply the `ngpAccordionItem` directive to an element that represents an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionItem]',\n exportAs: 'ngpAccordionItem',\n providers: [provideAccordionItemState()],\n})\nexport class NgpAccordionItem<T> {\n /**\n * Access the accordion.\n */\n protected readonly accordion = injectAccordionState<T>();\n\n /**\n * The value of the accordion item.\n */\n readonly value = input<T>(uniqueId('ngp-accordion-item') as T, {\n alias: 'ngpAccordionItemValue',\n });\n\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion item state.\n */\n protected readonly state = ngpAccordionItem<T>({\n value: this.value,\n disabled: this.disabled,\n });\n\n /**\n * The open state of the accordion item.\n */\n readonly open = this.state.open;\n}\n","import { HOST_TAG_NAME, inject, signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionTriggerState {\n /**\n * The id of the trigger button\n */\n readonly id: Signal<string>;\n /**\n * Toggle the accordion item.\n */\n toggle(): void;\n}\n\nexport interface NgpAccordionTriggerProps {\n /**\n * The id of the trigger button\n */\n readonly id?: Signal<string>;\n}\n\nexport const [\n NgpAccordionTriggerStateToken,\n ngpAccordionTrigger,\n injectAccordionTriggerState,\n provideAccordionTriggerState,\n] = createPrimitive(\n 'NgpAccordionTrigger',\n <T>({ id = signal(uniqueId('ngp-accordion-trigger')) }: NgpAccordionTriggerProps) => {\n const element = injectElementRef();\n const tagName = inject(HOST_TAG_NAME);\n const accordion = injectAccordionState<T>();\n const accordionItem = injectAccordionItemState<T>();\n\n // Host bindings\n attrBinding(element, 'id', id);\n attrBinding(element, 'type', tagName === 'button' ? 'button' : null);\n attrBinding(element, 'aria-controls', accordionItem().contentId);\n attrBinding(element, 'aria-expanded', accordionItem().open);\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', accordionItem().open);\n dataBinding(\n element,\n 'data-disabled',\n () => accordionItem().disabled() || accordion().disabled(),\n );\n\n // register the trigger with the accordion item\n accordionItem().setTrigger(id());\n\n // Methods\n function toggle(): void {\n if (accordionItem().disabled() || accordion().disabled()) {\n return;\n }\n\n accordion().toggle(accordionItem().value()!);\n }\n\n // Event listeners\n listener(element, 'click', toggle);\n\n return { id, toggle };\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpAccordionTrigger } from './accordion-trigger-state';\n\n/**\n * Apply the `ngpAccordionTrigger` directive to an element that represents the trigger for an accordion item, such as a button.\n */\n@Directive({\n selector: '[ngpAccordionTrigger]',\n exportAs: 'ngpAccordionTrigger',\n})\nexport class NgpAccordionTrigger<T> {\n /**\n * The id of the trigger.\n */\n readonly id = input<string>(uniqueId('ngp-accordion-trigger'));\n\n private readonly state = ngpAccordionTrigger<T>({ id: this.id });\n\n /**\n * Toggle the accordion item.\n */\n toggle(): void {\n this.state.toggle();\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport type { NgpAccordionType } from '../accordion/accordion-state';\n\nexport interface NgpAccordionConfig {\n /**\n * The default type of the accordion\n * @default 'single'\n */\n type: NgpAccordionType;\n /**\n * Whether the accordion is collapsible\n * @default false\n */\n collapsible: boolean;\n /**\n * The default orientation of the accordion\n * @default 'vertical'\n */\n orientation: 'vertical' | 'horizontal';\n}\n\nexport const defaultAccordionConfig: NgpAccordionConfig = {\n type: 'single',\n collapsible: false,\n orientation: 'vertical',\n};\n\nexport const NgpAccordionConfigToken = new InjectionToken<NgpAccordionConfig>(\n 'NgpAccordionConfigToken',\n);\n\n/**\n * Provide the default Accordion configuration\n * @param config The Accordion configuration\n * @returns The provider\n */\nexport function provideAccordionConfig(config: Partial<NgpAccordionConfig>): Provider[] {\n return [\n {\n provide: NgpAccordionConfigToken,\n useValue: { ...defaultAccordionConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Accordion configuration\n * @returns The global Accordion configuration\n */\nexport function injectAccordionConfig(): NgpAccordionConfig {\n return inject(NgpAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectAccordionConfig } from '../config/accordion-config';\nimport { ngpAccordion, NgpAccordionType, provideAccordionState } from './accordion-state';\n\n/**\n * Apply the `ngpAccordion` directive to an element that represents the group of accordion items.\n */\n@Directive({\n selector: '[ngpAccordion]',\n exportAs: 'ngpAccordion',\n providers: [provideAccordionState()],\n})\nexport class NgpAccordion<T> {\n /**\n * Access the global accordion configuration.\n */\n private readonly config = injectAccordionConfig();\n\n /**\n * The type of the accordion.\n */\n readonly type = input<NgpAccordionType>(this.config.type, {\n alias: 'ngpAccordionType',\n });\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible = input<boolean, BooleanInput>(this.config.collapsible, {\n alias: 'ngpAccordionCollapsible',\n transform: booleanAttribute,\n });\n\n /**\n * The value of the accordion.\n */\n readonly value = input<T | T[] | null>(null, {\n alias: 'ngpAccordionValue',\n });\n\n /**\n * Event emitted when the accordion value changes.\n */\n readonly valueChange = output<T | T[] | null>({\n alias: 'ngpAccordionValueChange',\n });\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion orientation.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpAccordionOrientation',\n });\n\n /**\n * The accordion state.\n */\n protected readonly state = ngpAccordion<T>({\n type: this.type,\n collapsible: this.collapsible,\n value: this.value,\n disabled: this.disabled,\n orientation: this.orientation,\n onValueChange: value => this.valueChange.emit(value),\n });\n\n /**\n * @param value The value to check.\n * @returns Whether the value is open.\n * @internal\n */\n isOpen(value: T): boolean {\n return this.state.isOpen(value);\n }\n\n /**\n * Set the value of the accordion.\n * @param value The value to set.\n */\n setValue(value: T | T[] | null): void {\n this.state.setValue(value);\n }\n\n /**\n * @param value The value to toggle.\n */\n toggle(value: T): void {\n this.state.toggle(value);\n }\n\n /**\n * Set the disabled state of the accordion.\n * @param value The disabled state.\n */\n setDisabled(value: boolean): void {\n this.state.setDisabled(value);\n }\n\n /**\n * Set the orientation of the accordion.\n * @param value The orientation.\n */\n setOrientation(value: NgpOrientation): void {\n this.state.setOrientation(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA8EO,MAAM,CAAC,sBAAsB,EAAE,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,GAC/F,eAAe,CACb,cAAc,EACd,CAAI,EACF,IAAI,EACJ,WAAW,EACX,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,EAC5B,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,EACnC,WAAW,EAAE,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,EAC9C,aAAa,GACQ,KAA0B;AAC/C,IAAA,MAAM,OAAO,GAAG,gBAAgB,EAAE;;AAGlC,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC;AAChC,IAAA,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC;AACtC,IAAA,MAAM,WAAW,GAAG,UAAU,CAAC,YAAY,CAAC;;AAG5C,IAAA,WAAW,CAAC,OAAO,EAAE,kBAAkB,EAAE,WAAW,CAAC;AACrD,IAAA,WAAW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,EAAE,CAAC;AACrC,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, Directive } from '@angular/core';
|
|
2
|
+
import { signal, input, booleanAttribute, Directive } from '@angular/core';
|
|
3
3
|
import { ngpInteractions } from 'ng-primitives/interactions';
|
|
4
4
|
import { injectElementRef } from 'ng-primitives/internal';
|
|
5
|
-
import { createPrimitive, dataBinding, attrBinding } from 'ng-primitives/state';
|
|
5
|
+
import { createPrimitive, controlled, dataBinding, attrBinding } from 'ng-primitives/state';
|
|
6
6
|
|
|
7
|
-
const [NgpButtonStateToken, ngpButton, injectButtonState, provideButtonState] = createPrimitive('NgpButton', ({ disabled }) => {
|
|
7
|
+
const [NgpButtonStateToken, ngpButton, injectButtonState, provideButtonState] = createPrimitive('NgpButton', ({ disabled: _disabled = signal(false) }) => {
|
|
8
8
|
const element = injectElementRef();
|
|
9
9
|
const isButton = element.nativeElement.tagName.toLowerCase() === 'button';
|
|
10
|
+
const disabled = controlled(_disabled);
|
|
10
11
|
// Setup interactions (hover, press, focus-visible)
|
|
11
12
|
ngpInteractions({ hover: true, press: true, focusVisible: true, disabled });
|
|
12
13
|
// Setup host attribute bindings
|
|
@@ -15,7 +16,13 @@ const [NgpButtonStateToken, ngpButton, injectButtonState, provideButtonState] =
|
|
|
15
16
|
if (isButton) {
|
|
16
17
|
attrBinding(element, 'disabled', () => (disabled() ? '' : null));
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
function setDisabled(value) {
|
|
20
|
+
disabled.set(value);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
disabled: disabled.asReadonly(),
|
|
24
|
+
setDisabled,
|
|
25
|
+
};
|
|
19
26
|
});
|
|
20
27
|
|
|
21
28
|
class NgpButton {
|
|
@@ -31,6 +38,13 @@ class NgpButton {
|
|
|
31
38
|
*/
|
|
32
39
|
this.state = ngpButton({ disabled: this.disabled });
|
|
33
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Set the disabled state of the button.
|
|
43
|
+
* @param value The disabled state.
|
|
44
|
+
*/
|
|
45
|
+
setDisabled(value) {
|
|
46
|
+
this.state.setDisabled(value);
|
|
47
|
+
}
|
|
34
48
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
35
49
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpButton, isStandalone: true, selector: "[ngpButton]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideButtonState({ inherit: false })], exportAs: ["ngpButton"], ngImport: i0 }); }
|
|
36
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-button.mjs","sources":["../../../../packages/ng-primitives/button/src/button/button-state.ts","../../../../packages/ng-primitives/button/src/button/button.ts","../../../../packages/ng-primitives/button/src/ng-primitives-button.ts"],"sourcesContent":["import { Signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding } from 'ng-primitives/state';\n\nexport interface NgpButtonState {\n disabled: Signal<boolean>;\n}\n\nexport interface NgpButtonProps {\n disabled
|
|
1
|
+
{"version":3,"file":"ng-primitives-button.mjs","sources":["../../../../packages/ng-primitives/button/src/button/button-state.ts","../../../../packages/ng-primitives/button/src/button/button.ts","../../../../packages/ng-primitives/button/src/ng-primitives-button.ts"],"sourcesContent":["import { signal, Signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, controlled, createPrimitive, dataBinding } from 'ng-primitives/state';\n\nexport interface NgpButtonState {\n /**\n * Whether the button is disabled.\n */\n readonly disabled: Signal<boolean>;\n\n /**\n * Set the disabled state of the button.\n * @param value The disabled state.\n */\n setDisabled(value: boolean): void;\n}\n\nexport interface NgpButtonProps {\n /**\n * Whether the button is disabled.\n */\n readonly disabled?: Signal<boolean>;\n}\n\nexport const [NgpButtonStateToken, ngpButton, injectButtonState, provideButtonState] =\n createPrimitive(\n 'NgpButton',\n ({ disabled: _disabled = signal(false) }: NgpButtonProps): NgpButtonState => {\n const element = injectElementRef();\n const isButton = element.nativeElement.tagName.toLowerCase() === 'button';\n const disabled = controlled(_disabled);\n\n // Setup interactions (hover, press, focus-visible)\n ngpInteractions({ hover: true, press: true, focusVisible: true, disabled });\n\n // Setup host attribute bindings\n dataBinding(element, 'data-disabled', disabled);\n\n // Add the disabled attribute if it's a button element\n if (isButton) {\n attrBinding(element, 'disabled', () => (disabled() ? '' : null));\n }\n\n function setDisabled(value: boolean): void {\n disabled.set(value);\n }\n\n return {\n disabled: disabled.asReadonly(),\n setDisabled,\n };\n },\n );\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { ngpButton, provideButtonState } from './button-state';\n\n@Directive({\n selector: '[ngpButton]',\n exportAs: 'ngpButton',\n providers: [provideButtonState({ inherit: false })],\n})\nexport class NgpButton {\n /**\n * Whether the button is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /**\n * The button state.\n */\n protected readonly state = ngpButton({ disabled: this.disabled });\n\n /**\n * Set the disabled state of the button.\n * @param value The disabled state.\n */\n setDisabled(value: boolean): void {\n this.state.setDisabled(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,CAAC,mBAAmB,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,GAClF,eAAe,CACb,WAAW,EACX,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KA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AA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAFT,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAExC,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;oBACrB,SAAS,EAAE,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACpD,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -145,6 +145,24 @@ class NgpCheckbox {
|
|
|
145
145
|
toggle(event) {
|
|
146
146
|
this.state.toggle(event);
|
|
147
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Update the checked value.
|
|
150
|
+
*/
|
|
151
|
+
setChecked(value) {
|
|
152
|
+
this.state.setChecked(value);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Update the indeterminate value.
|
|
156
|
+
*/
|
|
157
|
+
setIndeterminate(value) {
|
|
158
|
+
this.state.setIndeterminate(value);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Set the disabled value.
|
|
162
|
+
*/
|
|
163
|
+
setDisabled(value) {
|
|
164
|
+
this.state.setDisabled(value);
|
|
165
|
+
}
|
|
148
166
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
149
167
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpCheckbox, isStandalone: true, selector: "[ngpCheckbox]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "ngpCheckboxChecked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "ngpCheckboxIndeterminate", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "ngpCheckboxRequired", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpCheckboxDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "ngpCheckboxCheckedChange", indeterminateChange: "ngpCheckboxIndeterminateChange" }, providers: [provideCheckboxState({ inherit: false })], ngImport: i0 }); }
|
|
150
168
|
}
|