@spartan-ng/brain 0.0.1-alpha.563 → 0.0.1-alpha.564
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/accordion/index.d.ts +125 -10
- package/alert-dialog/index.d.ts +40 -13
- package/autocomplete/index.d.ts +113 -15
- package/avatar/index.d.ts +40 -8
- package/button/index.d.ts +15 -3
- package/calendar/index.d.ts +465 -29
- package/checkbox/index.d.ts +156 -3
- package/collapsible/index.d.ts +70 -8
- package/command/index.d.ts +147 -16
- package/core/index.d.ts +153 -11
- package/date-time/index.d.ts +321 -3
- package/date-time-luxon/index.d.ts +32 -1
- package/dialog/index.d.ts +225 -21
- package/fesm2022/spartan-ng-brain-accordion.mjs +12 -12
- package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs +18 -18
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-autocomplete.mjs +18 -18
- package/fesm2022/spartan-ng-brain-autocomplete.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-avatar.mjs +12 -12
- package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-button.mjs +3 -3
- package/fesm2022/spartan-ng-brain-button.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-calendar.mjs +42 -42
- package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-checkbox.mjs +5 -5
- package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs +9 -9
- package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-command.mjs +29 -34
- package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-core.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-date-time-luxon.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-date-time.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-dialog.mjs +24 -24
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-form-field.mjs +3 -3
- package/fesm2022/spartan-ng-brain-form-field.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-forms.mjs +6 -6
- package/fesm2022/spartan-ng-brain-forms.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-hover-card.mjs +12 -12
- package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input-otp.mjs +6 -6
- package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-label.mjs +3 -3
- package/fesm2022/spartan-ng-brain-label.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-menu.mjs +24 -24
- package/fesm2022/spartan-ng-brain-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs +21 -21
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-popover.mjs +12 -12
- package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-progress.mjs +6 -6
- package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-radio-group.mjs +6 -6
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-resizable.mjs +10 -11
- package/fesm2022/spartan-ng-brain-resizable.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +33 -33
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-separator.mjs +3 -3
- package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sheet.mjs +21 -21
- package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-slider.mjs +17 -17
- package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-switch.mjs +8 -8
- package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tabs.mjs +15 -15
- package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle-group.mjs +6 -6
- package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle.mjs +3 -3
- package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tooltip.mjs +14 -14
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain.mjs.map +1 -1
- package/form-field/index.d.ts +14 -1
- package/forms/index.d.ts +35 -3
- package/hover-card/index.d.ts +86 -5
- package/index.d.ts +2 -2
- package/input-otp/index.d.ts +82 -5
- package/label/index.d.ts +20 -3
- package/menu/index.d.ts +79 -17
- package/navigation-menu/index.d.ts +185 -13
- package/package.json +24 -24
- package/popover/index.d.ts +39 -9
- package/progress/index.d.ts +39 -6
- package/radio-group/index.d.ts +124 -6
- package/resizable/index.d.ts +103 -3
- package/select/index.d.ts +217 -21
- package/separator/index.d.ts +27 -4
- package/sheet/index.d.ts +51 -15
- package/slider/index.d.ts +100 -12
- package/switch/index.d.ts +141 -5
- package/tabs/index.d.ts +276 -10
- package/toggle/index.d.ts +30 -3
- package/toggle-group/index.d.ts +108 -6
- package/tooltip/index.d.ts +261 -10
- package/accordion/lib/brn-accordion-content.d.ts +0 -20
- package/accordion/lib/brn-accordion-item.d.ts +0 -28
- package/accordion/lib/brn-accordion-token.d.ts +0 -19
- package/accordion/lib/brn-accordion-trigger.d.ts +0 -16
- package/accordion/lib/brn-accordion.d.ts +0 -39
- package/alert-dialog/lib/brn-alert-dialog-content.d.ts +0 -6
- package/alert-dialog/lib/brn-alert-dialog-description.d.ts +0 -6
- package/alert-dialog/lib/brn-alert-dialog-overlay.d.ts +0 -6
- package/alert-dialog/lib/brn-alert-dialog-title.d.ts +0 -6
- package/alert-dialog/lib/brn-alert-dialog-trigger.d.ts +0 -10
- package/alert-dialog/lib/brn-alert-dialog.d.ts +0 -7
- package/autocomplete/lib/brn-autocomplete-empty.d.ts +0 -11
- package/autocomplete/lib/brn-autocomplete-group.d.ts +0 -8
- package/autocomplete/lib/brn-autocomplete-item.d.ts +0 -32
- package/autocomplete/lib/brn-autocomplete-item.token.d.ts +0 -4
- package/autocomplete/lib/brn-autocomplete-list.d.ts +0 -8
- package/autocomplete/lib/brn-autocomplete-search-input.d.ts +0 -13
- package/autocomplete/lib/brn-autocomplete.d.ts +0 -30
- package/autocomplete/lib/brn-autocomplete.token.d.ts +0 -5
- package/avatar/lib/brn-avatar.d.ts +0 -7
- package/avatar/lib/fallback/brn-avatar-fallback.d.ts +0 -9
- package/avatar/lib/fallback/index.d.ts +0 -1
- package/avatar/lib/image/brn-avatar-image.d.ts +0 -9
- package/avatar/lib/image/index.d.ts +0 -1
- package/avatar/lib/util/hex-color-for.d.ts +0 -1
- package/avatar/lib/util/index.d.ts +0 -3
- package/avatar/lib/util/initials.pipe.d.ts +0 -7
- package/avatar/lib/util/is-bright.d.ts +0 -1
- package/button/lib/brn-button.d.ts +0 -10
- package/calendar/lib/brn-calendar-cell-button.d.ts +0 -62
- package/calendar/lib/brn-calendar-cell.d.ts +0 -5
- package/calendar/lib/brn-calendar-grid.d.ts +0 -7
- package/calendar/lib/brn-calendar-header.d.ts +0 -7
- package/calendar/lib/brn-calendar-month-select.d.ts +0 -17
- package/calendar/lib/brn-calendar-next-button.d.ts +0 -13
- package/calendar/lib/brn-calendar-previous-button.d.ts +0 -13
- package/calendar/lib/brn-calendar-week.d.ts +0 -25
- package/calendar/lib/brn-calendar-weekday.d.ts +0 -28
- package/calendar/lib/brn-calendar-year-select.d.ts +0 -16
- package/calendar/lib/brn-calendar.d.ts +0 -74
- package/calendar/lib/brn-calendar.token.d.ts +0 -22
- package/calendar/lib/i18n/calendar-i18n.d.ts +0 -32
- package/calendar/lib/mode/brn-calendar-multiple.d.ts +0 -77
- package/calendar/lib/mode/brn-calendar-range.d.ts +0 -79
- package/checkbox/lib/brn-checkbox.d.ts +0 -151
- package/collapsible/lib/brn-collapsible-content.d.ts +0 -15
- package/collapsible/lib/brn-collapsible-token.d.ts +0 -16
- package/collapsible/lib/brn-collapsible-trigger.d.ts +0 -9
- package/collapsible/lib/brn-collapsible.d.ts +0 -24
- package/command/lib/brn-command-empty.d.ts +0 -11
- package/command/lib/brn-command-group.d.ts +0 -12
- package/command/lib/brn-command-item.d.ts +0 -42
- package/command/lib/brn-command-item.token.d.ts +0 -4
- package/command/lib/brn-command-list.d.ts +0 -8
- package/command/lib/brn-command-search-input.d.ts +0 -24
- package/command/lib/brn-command-search-input.token.d.ts +0 -4
- package/command/lib/brn-command.d.ts +0 -29
- package/command/lib/brn-command.token.d.ts +0 -11
- package/core/helpers/computed-previous.d.ts +0 -36
- package/core/helpers/create-hover-observable.d.ts +0 -7
- package/core/helpers/create-injection-token.d.ts +0 -20
- package/core/helpers/custom-element-class-settable.d.ts +0 -12
- package/core/helpers/debounced-signal.d.ts +0 -9
- package/core/helpers/dev-mode.d.ts +0 -5
- package/core/helpers/exposes-side.d.ts +0 -13
- package/core/helpers/exposes-state.d.ts +0 -13
- package/core/helpers/measure-dimensions.d.ts +0 -5
- package/core/helpers/table-classes-settable.d.ts +0 -16
- package/core/helpers/wait-for-element-animations.d.ts +0 -5
- package/core/helpers/zone-free.d.ts +0 -10
- package/date-time/lib/date-adapter.d.ts +0 -186
- package/date-time/lib/native-date-adapter.d.ts +0 -103
- package/date-time/lib/utc-date-adapter.d.ts +0 -28
- package/date-time-luxon/lib/date-adapter.d.ts +0 -29
- package/dialog/lib/brn-dialog-close.d.ts +0 -8
- package/dialog/lib/brn-dialog-content.d.ts +0 -12
- package/dialog/lib/brn-dialog-description.d.ts +0 -8
- package/dialog/lib/brn-dialog-options.d.ts +0 -26
- package/dialog/lib/brn-dialog-overlay.d.ts +0 -9
- package/dialog/lib/brn-dialog-ref.d.ts +0 -24
- package/dialog/lib/brn-dialog-state.d.ts +0 -1
- package/dialog/lib/brn-dialog-title.d.ts +0 -8
- package/dialog/lib/brn-dialog-token.d.ts +0 -29
- package/dialog/lib/brn-dialog-trigger.d.ts +0 -18
- package/dialog/lib/brn-dialog-utils.d.ts +0 -1
- package/dialog/lib/brn-dialog.d.ts +0 -61
- package/dialog/lib/brn-dialog.service.d.ts +0 -23
- package/form-field/lib/brn-form-field-control.d.ts +0 -11
- package/forms/lib/control-value-accessor.d.ts +0 -2
- package/forms/lib/error-options.d.ts +0 -14
- package/forms/lib/error-state-tracker.d.ts +0 -15
- package/hover-card/lib/brn-hover-card-content.service.d.ts +0 -72
- package/hover-card/lib/brn-hover-card.d.ts +0 -9
- package/input-otp/lib/brn-input-otp-slot.d.ts +0 -15
- package/input-otp/lib/brn-input-otp.d.ts +0 -61
- package/input-otp/lib/brn-input-otp.token.d.ts +0 -5
- package/label/lib/brn-label.d.ts +0 -15
- package/menu/lib/brn-context-menu-trigger.d.ts +0 -14
- package/menu/lib/brn-menu-align.d.ts +0 -4
- package/menu/lib/brn-menu-bar.d.ts +0 -6
- package/menu/lib/brn-menu-group.d.ts +0 -6
- package/menu/lib/brn-menu-item-checkbox.d.ts +0 -11
- package/menu/lib/brn-menu-item-radio.d.ts +0 -11
- package/menu/lib/brn-menu-item.d.ts +0 -10
- package/menu/lib/brn-menu-trigger.d.ts +0 -11
- package/menu/lib/brn-menu.d.ts +0 -11
- package/navigation-menu/lib/brn-navigation-menu-content.d.ts +0 -22
- package/navigation-menu/lib/brn-navigation-menu-content.service.d.ts +0 -44
- package/navigation-menu/lib/brn-navigation-menu-item-focusable.token.d.ts +0 -4
- package/navigation-menu/lib/brn-navigation-menu-item.d.ts +0 -23
- package/navigation-menu/lib/brn-navigation-menu-item.token.d.ts +0 -5
- package/navigation-menu/lib/brn-navigation-menu-link.d.ts +0 -22
- package/navigation-menu/lib/brn-navigation-menu-list.d.ts +0 -7
- package/navigation-menu/lib/brn-navigation-menu-trigger.d.ts +0 -44
- package/navigation-menu/lib/brn-navigation-menu.d.ts +0 -61
- package/navigation-menu/lib/brn-navigation-menu.token.d.ts +0 -5
- package/navigation-menu/lib/brn-parent-nav-menu.token.d.ts +0 -8
- package/popover/lib/brn-popover-close.d.ts +0 -6
- package/popover/lib/brn-popover-content.d.ts +0 -6
- package/popover/lib/brn-popover-trigger.d.ts +0 -10
- package/popover/lib/brn-popover.d.ts +0 -15
- package/progress/lib/brn-progress-indicator.d.ts +0 -6
- package/progress/lib/brn-progress.d.ts +0 -24
- package/progress/lib/brn-progress.token.d.ts +0 -4
- package/radio-group/lib/brn-radio-group.d.ts +0 -59
- package/radio-group/lib/brn-radio-group.token.d.ts +0 -4
- package/radio-group/lib/brn-radio.d.ts +0 -58
- package/resizable/lib/brn-resizable-group.d.ts +0 -37
- package/resizable/lib/brn-resizable-handle.d.ts +0 -26
- package/resizable/lib/brn-resizable-panel.d.ts +0 -39
- package/select/lib/brn-select-content.d.ts +0 -48
- package/select/lib/brn-select-content.token.d.ts +0 -4
- package/select/lib/brn-select-group.d.ts +0 -6
- package/select/lib/brn-select-label.d.ts +0 -9
- package/select/lib/brn-select-option.d.ts +0 -25
- package/select/lib/brn-select-placeholder.d.ts +0 -8
- package/select/lib/brn-select-trigger.d.ts +0 -24
- package/select/lib/brn-select-value-template.d.ts +0 -11
- package/select/lib/brn-select-value.d.ts +0 -18
- package/select/lib/brn-select.d.ts +0 -69
- package/select/lib/brn-select.token.d.ts +0 -4
- package/separator/lib/brn-separator.d.ts +0 -14
- package/separator/lib/brn-separator.token.d.ts +0 -7
- package/sheet/lib/brn-sheet-close.d.ts +0 -6
- package/sheet/lib/brn-sheet-content.d.ts +0 -8
- package/sheet/lib/brn-sheet-description.d.ts +0 -6
- package/sheet/lib/brn-sheet-overlay.d.ts +0 -6
- package/sheet/lib/brn-sheet-title.d.ts +0 -6
- package/sheet/lib/brn-sheet-trigger.d.ts +0 -10
- package/sheet/lib/brn-sheet.d.ts +0 -10
- package/slider/lib/brn-slider-range.d.ts +0 -7
- package/slider/lib/brn-slider-thumb.d.ts +0 -24
- package/slider/lib/brn-slider-tick.d.ts +0 -12
- package/slider/lib/brn-slider-track.d.ts +0 -12
- package/slider/lib/brn-slider-track.token.d.ts +0 -5
- package/slider/lib/brn-slider.d.ts +0 -39
- package/slider/lib/brn-slider.token.d.ts +0 -4
- package/switch/lib/brn-switch-thumb.d.ts +0 -5
- package/switch/lib/brn-switch.d.ts +0 -131
- package/tabs/lib/brn-tabs-content.d.ts +0 -15
- package/tabs/lib/brn-tabs-list.d.ts +0 -17
- package/tabs/lib/brn-tabs-paginated-list.d.ts +0 -196
- package/tabs/lib/brn-tabs-trigger.d.ts +0 -21
- package/tabs/lib/brn-tabs.d.ts +0 -38
- package/toggle/lib/brn-toggle.d.ts +0 -25
- package/toggle-group/lib/brn-toggle-group.d.ts +0 -68
- package/toggle-group/lib/brn-toggle-group.token.d.ts +0 -4
- package/toggle-group/lib/brn-toggle-item.d.ts +0 -31
- package/tooltip/lib/brn-tooltip-content-template.d.ts +0 -8
- package/tooltip/lib/brn-tooltip-content.d.ts +0 -73
- package/tooltip/lib/brn-tooltip-trigger.d.ts +0 -141
- package/tooltip/lib/brn-tooltip.d.ts +0 -7
- package/tooltip/lib/brn-tooltip.token.d.ts +0 -28
package/collapsible/index.d.ts
CHANGED
|
@@ -1,8 +1,70 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, Type, ExistingProvider, ValueProvider } from '@angular/core';
|
|
3
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import * as _spartan_ng_brain_collapsible from '@spartan-ng/brain/collapsible';
|
|
5
|
+
import { MeasurementDisplay } from '@spartan-ng/brain/core';
|
|
6
|
+
|
|
7
|
+
type BrnCollapsibleState = 'open' | 'closed';
|
|
8
|
+
declare class BrnCollapsible {
|
|
9
|
+
readonly contentId: _angular_core.WritableSignal<string>;
|
|
10
|
+
/**
|
|
11
|
+
* The expanded or collapsed state of the collapsible component.
|
|
12
|
+
*/
|
|
13
|
+
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* The current state of the collapsible component as 'open' or 'closed'.
|
|
16
|
+
*/
|
|
17
|
+
readonly state: _angular_core.Signal<BrnCollapsibleState>;
|
|
18
|
+
/**
|
|
19
|
+
* The disabled state of the collapsible component.
|
|
20
|
+
*/
|
|
21
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
22
|
+
/**
|
|
23
|
+
* Toggles the expanded state of the collapsible component.
|
|
24
|
+
*/
|
|
25
|
+
toggle(): void;
|
|
26
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCollapsible, never>;
|
|
27
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCollapsible, "[brnCollapsible],brn-collapsible", never, { "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare class BrnCollapsibleContent {
|
|
31
|
+
private readonly _config;
|
|
32
|
+
private readonly _elementRef;
|
|
33
|
+
protected readonly _collapsible: _spartan_ng_brain_collapsible.BrnCollapsible | null;
|
|
34
|
+
protected readonly _width: _angular_core.WritableSignal<number | null>;
|
|
35
|
+
protected readonly _height: _angular_core.WritableSignal<number | null>;
|
|
36
|
+
/**
|
|
37
|
+
* The id of the collapsible content element.
|
|
38
|
+
*/
|
|
39
|
+
readonly id: _angular_core.InputSignal<string | null | undefined>;
|
|
40
|
+
constructor();
|
|
41
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCollapsibleContent, never>;
|
|
42
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCollapsibleContent, "[brnCollapsibleContent],brn-collapsible-content", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare class BrnCollapsibleTrigger {
|
|
46
|
+
protected readonly _collapsible: _spartan_ng_brain_collapsible.BrnCollapsible | null;
|
|
47
|
+
readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
|
|
48
|
+
constructor();
|
|
49
|
+
toggle(): void;
|
|
50
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCollapsibleTrigger, never>;
|
|
51
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCollapsibleTrigger, "button[brnCollapsibleTrigger]", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare const BrnCollapsibleToken: InjectionToken<BrnCollapsible>;
|
|
55
|
+
declare function injectBrnCollapsible(): BrnCollapsible | null;
|
|
56
|
+
declare function provideBrnCollapsible(collapsible: Type<BrnCollapsible>): ExistingProvider;
|
|
57
|
+
interface BrCollapsibleConfig {
|
|
58
|
+
/**
|
|
59
|
+
* The display style to use when measuring element dimensions.
|
|
60
|
+
* @default 'block'
|
|
61
|
+
*/
|
|
62
|
+
measurementDisplay: MeasurementDisplay;
|
|
63
|
+
}
|
|
64
|
+
declare function provideBrnCollapsibleConfig(config: Partial<BrCollapsibleConfig>): ValueProvider;
|
|
65
|
+
declare function injectBrnCollapsibleConfig(): BrCollapsibleConfig;
|
|
66
|
+
|
|
67
|
+
declare const BrnCollapsibleImports: readonly [typeof BrnCollapsible, typeof BrnCollapsibleTrigger, typeof BrnCollapsibleContent];
|
|
68
|
+
|
|
69
|
+
export { BrnCollapsible, BrnCollapsibleContent, BrnCollapsibleImports, BrnCollapsibleToken, BrnCollapsibleTrigger, injectBrnCollapsible, injectBrnCollapsibleConfig, provideBrnCollapsible, provideBrnCollapsibleConfig };
|
|
70
|
+
export type { BrCollapsibleConfig, BrnCollapsibleState };
|
package/command/index.d.ts
CHANGED
|
@@ -1,16 +1,147 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import * as _spartan_ng_brain_command from '@spartan-ng/brain/command';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { InjectionToken, Type, ExistingProvider, ValueProvider, AfterViewInit, OnInit } from '@angular/core';
|
|
4
|
+
import { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';
|
|
5
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
|
+
import { DefaultValueAccessor } from '@angular/forms';
|
|
7
|
+
|
|
8
|
+
declare const BrnCommandToken: InjectionToken<BrnCommand>;
|
|
9
|
+
declare function provideBrnCommand(command: Type<BrnCommand>): ExistingProvider;
|
|
10
|
+
declare function injectBrnCommand(): BrnCommand;
|
|
11
|
+
type CommandFilter = (value: string, search: string) => boolean;
|
|
12
|
+
interface BrnCommandConfig {
|
|
13
|
+
filter: CommandFilter;
|
|
14
|
+
}
|
|
15
|
+
declare function provideBrnCommandConfig(config: Partial<BrnCommandConfig>): ValueProvider;
|
|
16
|
+
declare function injectBrnCommandConfig(): BrnCommandConfig;
|
|
17
|
+
|
|
18
|
+
declare class BrnCommand implements AfterViewInit {
|
|
19
|
+
private static _id;
|
|
20
|
+
private readonly _platform;
|
|
21
|
+
private readonly _injector;
|
|
22
|
+
private readonly _config;
|
|
23
|
+
/** The id of the command */
|
|
24
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
25
|
+
/** A custom filter function to use when searching. */
|
|
26
|
+
readonly filter: _angular_core.InputSignal<CommandFilter>;
|
|
27
|
+
/** when the selection has changed */
|
|
28
|
+
readonly valueChange: _angular_core.OutputEmitterRef<string>;
|
|
29
|
+
/** @internal The search query */
|
|
30
|
+
readonly search: _angular_core.Signal<string>;
|
|
31
|
+
/** Access the search input if present */
|
|
32
|
+
private readonly _searchInput;
|
|
33
|
+
/** @internal Access all the items within the command */
|
|
34
|
+
readonly items: _angular_core.Signal<readonly _spartan_ng_brain_command.BrnCommandItem[]>;
|
|
35
|
+
/** @internal The key manager for managing active descendant */
|
|
36
|
+
readonly keyManager: ActiveDescendantKeyManager<_spartan_ng_brain_command.BrnCommandItem>;
|
|
37
|
+
constructor();
|
|
38
|
+
ngAfterViewInit(): void;
|
|
39
|
+
protected selectActiveItem(): void;
|
|
40
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCommand, never>;
|
|
41
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCommand, "[brnCommand]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, ["_searchInput", "items"], never, true, never>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare class BrnCommandEmpty {
|
|
45
|
+
private readonly _templateRef;
|
|
46
|
+
private readonly _viewContainerRef;
|
|
47
|
+
private readonly _command;
|
|
48
|
+
/** Determine if the command has any visible items */
|
|
49
|
+
private readonly _visible;
|
|
50
|
+
constructor();
|
|
51
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCommandEmpty, never>;
|
|
52
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCommandEmpty, "[brnCommandEmpty]", never, {}, {}, never, never, true, never>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class BrnCommandGroup {
|
|
56
|
+
private static _id;
|
|
57
|
+
/** The id of the command list */
|
|
58
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
59
|
+
/** Get the items in the group */
|
|
60
|
+
private readonly _items;
|
|
61
|
+
/** Determine if there are any visible items in the group */
|
|
62
|
+
protected readonly _visible: _angular_core.Signal<boolean>;
|
|
63
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCommandGroup, never>;
|
|
64
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCommandGroup, "[brnCommandGroup]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, ["_items"], never, true, never>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class BrnCommandItem implements Highlightable, OnInit {
|
|
68
|
+
private static _id;
|
|
69
|
+
private readonly _platform;
|
|
70
|
+
private readonly _elementRef;
|
|
71
|
+
/** Access the command component */
|
|
72
|
+
private readonly _command;
|
|
73
|
+
/** A unique id for the item */
|
|
74
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
75
|
+
/** The value this item represents. */
|
|
76
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
77
|
+
/** Whether the item is disabled. */
|
|
78
|
+
readonly _disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
79
|
+
/** Expose disabled as a value - used by the Highlightable interface */
|
|
80
|
+
get disabled(): boolean;
|
|
81
|
+
/** Whether the item is initialized, this is to prevent accessing the value-input before the component is initialized.
|
|
82
|
+
* The brn-command-empty directive accesses the value before the component is initialized, which causes an error.
|
|
83
|
+
*/
|
|
84
|
+
private readonly _initialized;
|
|
85
|
+
/** Whether the item is selected. */
|
|
86
|
+
protected readonly _active: _angular_core.WritableSignal<boolean>;
|
|
87
|
+
/** Emits when the item is selected. */
|
|
88
|
+
readonly selected: _angular_core.OutputEmitterRef<void>;
|
|
89
|
+
/** @internal Determine if this item is visible based on the current search query */
|
|
90
|
+
readonly visible: _angular_core.Signal<boolean>;
|
|
91
|
+
/** @internal Get the value of the item, with check if it has been initialized to avoid errors */
|
|
92
|
+
readonly safeValue: _angular_core.Signal<string>;
|
|
93
|
+
/** @internal Get the display value */
|
|
94
|
+
getLabel(): string;
|
|
95
|
+
/** @internal */
|
|
96
|
+
setActiveStyles(): void;
|
|
97
|
+
/** @internal */
|
|
98
|
+
setInactiveStyles(): void;
|
|
99
|
+
protected onClick(): void;
|
|
100
|
+
protected activate(): void;
|
|
101
|
+
ngOnInit(): void;
|
|
102
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCommandItem, never>;
|
|
103
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCommandItem, "button[brnCommandItem]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "_disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "selected": "selected"; }, never, never, true, never>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare class BrnCommandList {
|
|
107
|
+
private static _id;
|
|
108
|
+
/** The id of the command list */
|
|
109
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
110
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCommandList, never>;
|
|
111
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCommandList, "[brnCommandList]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare class BrnCommandSearchInput extends DefaultValueAccessor implements OnInit {
|
|
115
|
+
private readonly _destroyRef;
|
|
116
|
+
private readonly _el;
|
|
117
|
+
private readonly _injector;
|
|
118
|
+
private readonly _command;
|
|
119
|
+
/** The initial value of the search input */
|
|
120
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
121
|
+
/** @internal The mutable value of the search input */
|
|
122
|
+
readonly mutableValue: _angular_core.Signal<_angular_core.WritableSignal<string>>;
|
|
123
|
+
/** @internal The "real" value of the search input */
|
|
124
|
+
readonly valueState: _angular_core.Signal<string>;
|
|
125
|
+
/** The id of the active option */
|
|
126
|
+
protected readonly _activeDescendant: _angular_core.WritableSignal<string | undefined>;
|
|
127
|
+
ngOnInit(): void;
|
|
128
|
+
/** Listen for changes to the input value */
|
|
129
|
+
protected onInput(): void;
|
|
130
|
+
/** Listen for keydown events */
|
|
131
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
132
|
+
/** CONROL VALUE ACCESSOR */
|
|
133
|
+
writeValue(value: string | null): void;
|
|
134
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnCommandSearchInput, never>;
|
|
135
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCommandSearchInput, "input[brnCommandSearchInput]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare const BrnCommandItemToken: InjectionToken<BrnCommandItem>;
|
|
139
|
+
declare function provideBrnCommandItem(command: Type<BrnCommandItem>): ExistingProvider;
|
|
140
|
+
|
|
141
|
+
declare const BrnCommandSearchInputToken: InjectionToken<BrnCommandSearchInput>;
|
|
142
|
+
declare function provideBrnCommandSearchInput(command: Type<BrnCommandSearchInput>): ExistingProvider;
|
|
143
|
+
|
|
144
|
+
declare const BrnCommandImports: readonly [typeof BrnCommandEmpty, typeof BrnCommandGroup, typeof BrnCommandItem, typeof BrnCommandList, typeof BrnCommandSearchInput, typeof BrnCommand];
|
|
145
|
+
|
|
146
|
+
export { BrnCommand, BrnCommandEmpty, BrnCommandGroup, BrnCommandImports, BrnCommandItem, BrnCommandItemToken, BrnCommandList, BrnCommandSearchInput, BrnCommandSearchInputToken, BrnCommandToken, injectBrnCommand, injectBrnCommandConfig, provideBrnCommand, provideBrnCommandConfig, provideBrnCommandItem, provideBrnCommandSearchInput };
|
|
147
|
+
export type { BrnCommandConfig, CommandFilter };
|
package/core/index.d.ts
CHANGED
|
@@ -1,11 +1,153 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, NgZone } from '@angular/core';
|
|
3
|
+
import { Subject, Observable, MonoTypeOperatorFunction } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns a signal that emits the previous value of the given signal.
|
|
7
|
+
* The first time the signal is emitted, the previous value will be the same as the current value.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const value = signal(0);
|
|
12
|
+
* const previous = computedPrevious(value);
|
|
13
|
+
*
|
|
14
|
+
* effect(() => {
|
|
15
|
+
* console.log('Current value:', value());
|
|
16
|
+
* console.log('Previous value:', previous());
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* Logs:
|
|
20
|
+
* // Current value: 0
|
|
21
|
+
* // Previous value: 0
|
|
22
|
+
*
|
|
23
|
+
* value.set(1);
|
|
24
|
+
*
|
|
25
|
+
* Logs:
|
|
26
|
+
* // Current value: 1
|
|
27
|
+
* // Previous value: 0
|
|
28
|
+
*
|
|
29
|
+
* value.set(2);
|
|
30
|
+
*
|
|
31
|
+
* Logs:
|
|
32
|
+
* // Current value: 2
|
|
33
|
+
* // Previous value: 1
|
|
34
|
+
*```
|
|
35
|
+
*
|
|
36
|
+
* @param computation Signal to compute previous value for
|
|
37
|
+
* @returns Signal that emits previous value of `s`
|
|
38
|
+
*/
|
|
39
|
+
declare function computedPrevious<T>(computation: Signal<T>): Signal<T>;
|
|
40
|
+
|
|
41
|
+
declare function isElement(node?: Element | EventTarget | Node | null): node is Element;
|
|
42
|
+
declare const createHoverObservable: (nativeElement: HTMLElement, zone: NgZone, destroyed$: Subject<void>) => Observable<{
|
|
43
|
+
hover: boolean;
|
|
44
|
+
relatedTarget?: EventTarget | null;
|
|
45
|
+
}>;
|
|
46
|
+
|
|
47
|
+
interface CustomElementClassSettable {
|
|
48
|
+
setClassToCustomElement: (newClass: string) => void;
|
|
49
|
+
}
|
|
50
|
+
declare const injectCustomClassSettable: {
|
|
51
|
+
(): CustomElementClassSettable;
|
|
52
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
53
|
+
optional?: false;
|
|
54
|
+
}): CustomElementClassSettable;
|
|
55
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
56
|
+
optional: true;
|
|
57
|
+
}): CustomElementClassSettable | null;
|
|
58
|
+
};
|
|
59
|
+
declare const provideCustomClassSettable: (value: CustomElementClassSettable) => _angular_core.Provider;
|
|
60
|
+
declare const provideCustomClassSettableExisting: (valueFactory: () => _angular_core.Type<CustomElementClassSettable>) => _angular_core.Provider;
|
|
61
|
+
declare const SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN: _angular_core.InjectionToken<CustomElementClassSettable>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Creates a debounced version of a source signal.
|
|
65
|
+
*
|
|
66
|
+
* @param source - The input signal to debounce.
|
|
67
|
+
* @param delay - Debounce time in milliseconds.
|
|
68
|
+
* @returns A new signal that updates only after the source has stopped changing for `delay` ms.
|
|
69
|
+
*/
|
|
70
|
+
declare function debouncedSignal<T>(source: Signal<T>, delay: number): Signal<T>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Set by Angular to true when in development mode.
|
|
74
|
+
* Allows for tree-shaking code that is only used in development.
|
|
75
|
+
*/
|
|
76
|
+
declare const brnDevMode: boolean;
|
|
77
|
+
|
|
78
|
+
interface ExposesSide {
|
|
79
|
+
side: Signal<'top' | 'bottom' | 'left' | 'right'>;
|
|
80
|
+
}
|
|
81
|
+
declare const injectExposedSideProvider: {
|
|
82
|
+
(): ExposesSide;
|
|
83
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
84
|
+
optional?: false;
|
|
85
|
+
}): ExposesSide;
|
|
86
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
87
|
+
optional: true;
|
|
88
|
+
}): ExposesSide | null;
|
|
89
|
+
};
|
|
90
|
+
declare const provideExposedSideProvider: (value: ExposesSide) => _angular_core.Provider;
|
|
91
|
+
declare const provideExposedSideProviderExisting: (valueFactory: () => _angular_core.Type<ExposesSide>) => _angular_core.Provider;
|
|
92
|
+
declare const EXPOSES_SIDE_TOKEN: _angular_core.InjectionToken<ExposesSide>;
|
|
93
|
+
|
|
94
|
+
interface ExposesState {
|
|
95
|
+
state: Signal<'open' | 'closed'>;
|
|
96
|
+
}
|
|
97
|
+
declare const injectExposesStateProvider: {
|
|
98
|
+
(): ExposesState;
|
|
99
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
100
|
+
optional?: false;
|
|
101
|
+
}): ExposesState;
|
|
102
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
103
|
+
optional: true;
|
|
104
|
+
}): ExposesState | null;
|
|
105
|
+
};
|
|
106
|
+
declare const provideExposesStateProvider: (value: ExposesState) => _angular_core.Provider;
|
|
107
|
+
declare const provideExposesStateProviderExisting: (valueFactory: () => _angular_core.Type<ExposesState>) => _angular_core.Provider;
|
|
108
|
+
declare const EXPOSES_STATE_TOKEN: _angular_core.InjectionToken<ExposesState>;
|
|
109
|
+
|
|
110
|
+
type MeasurementDisplay = 'block' | 'inline-block' | 'flex' | 'grid' | 'table' | 'contents' | (string & {});
|
|
111
|
+
declare const measureDimensions: (elementToMeasure: HTMLElement, measurementDisplay: MeasurementDisplay) => {
|
|
112
|
+
width: number;
|
|
113
|
+
height: number;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
interface TableClassesSettable {
|
|
117
|
+
setTableClasses: (classes: Partial<{
|
|
118
|
+
table: string;
|
|
119
|
+
headerRow: string;
|
|
120
|
+
bodyRow: string;
|
|
121
|
+
}>) => void;
|
|
122
|
+
}
|
|
123
|
+
declare const injectTableClassesSettable: {
|
|
124
|
+
(): TableClassesSettable;
|
|
125
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
126
|
+
optional?: false;
|
|
127
|
+
}): TableClassesSettable;
|
|
128
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
129
|
+
optional: true;
|
|
130
|
+
}): TableClassesSettable | null;
|
|
131
|
+
};
|
|
132
|
+
declare const provideTableClassesSettable: (value: TableClassesSettable) => _angular_core.Provider;
|
|
133
|
+
declare const provideTableClassesSettableExisting: (valueFactory: () => _angular_core.Type<TableClassesSettable>) => _angular_core.Provider;
|
|
134
|
+
declare const SET_TABLE_CLASSES_TOKEN: _angular_core.InjectionToken<TableClassesSettable>;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Waits for all animations (including subtree) within the given element to finish.
|
|
138
|
+
* Ignores animations canceled with an AbortError.
|
|
139
|
+
*/
|
|
140
|
+
declare function waitForElementAnimations(el: HTMLElement): Promise<void>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* We are building on shoulders of giants here and use the implementation provided by the incredible TaigaUI
|
|
144
|
+
* team: https://github.com/taiga-family/taiga-ui/blob/main/projects/cdk/observables/zone-free.ts#L22
|
|
145
|
+
* Check them out! Give them a try! Leave a star! Their work is incredible!
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
declare function brnZoneFull<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
149
|
+
declare function brnZoneFree<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
150
|
+
declare function brnZoneOptimized<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
151
|
+
|
|
152
|
+
export { EXPOSES_SIDE_TOKEN, EXPOSES_STATE_TOKEN, SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN, SET_TABLE_CLASSES_TOKEN, brnDevMode, brnZoneFree, brnZoneFull, brnZoneOptimized, computedPrevious, createHoverObservable, debouncedSignal, injectCustomClassSettable, injectExposedSideProvider, injectExposesStateProvider, injectTableClassesSettable, isElement, measureDimensions, provideCustomClassSettable, provideCustomClassSettableExisting, provideExposedSideProvider, provideExposedSideProviderExisting, provideExposesStateProvider, provideExposesStateProviderExisting, provideTableClassesSettable, provideTableClassesSettableExisting, waitForElementAnimations };
|
|
153
|
+
export type { CustomElementClassSettable, ExposesSide, ExposesState, MeasurementDisplay, TableClassesSettable };
|