@radix-ng/primitives 0.50.0 → 1.0.0-beta.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/collection/README.md +1 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +134 -66
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +224 -132
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-arrow.mjs +26 -10
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +6 -6
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +68 -75
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +123 -0
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-calendar.mjs +104 -103
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +414 -80
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +193 -92
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +72 -0
- package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-config.mjs +5 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +143 -427
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +757 -757
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +55 -53
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +93 -86
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +658 -330
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +98 -76
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-editable.mjs +20 -20
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +363 -0
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +29 -14
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +172 -0
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +11 -11
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +1484 -353
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1060 -1553
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -366
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +51 -51
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +980 -995
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +137 -82
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +40 -16
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-progress.mjs +231 -92
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +211 -70
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +127 -77
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +791 -511
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +16 -45
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +976 -720
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +69 -71
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +128 -124
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +388 -115
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +111 -117
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +122 -248
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +99 -62
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +307 -94
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1079
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +46 -87
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives.mjs.map +1 -1
- package/meter/README.md +3 -0
- package/navigation-menu/README.md +2 -1
- package/package.json +85 -63
- package/portal/README.md +2 -0
- package/preview-card/README.md +3 -0
- package/schematics/collection.json +1 -0
- package/schematics/ng-add/index.d.ts +3 -2
- package/schematics/ng-add/index.js +62 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.d.ts +4 -2
- package/schematics/ng-add/package-config.js +10 -2
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +14 -0
- package/select/README.md +2 -0
- package/{accordion/index.d.ts → types/radix-ng-primitives-accordion.d.ts} +102 -67
- package/types/radix-ng-primitives-alert-dialog.d.ts +114 -0
- package/{arrow/index.d.ts → types/radix-ng-primitives-arrow.d.ts} +1 -1
- package/{aspect-ratio/index.d.ts → types/radix-ng-primitives-aspect-ratio.d.ts} +1 -1
- package/{avatar/index.d.ts → types/radix-ng-primitives-avatar.d.ts} +7 -11
- package/types/radix-ng-primitives-button.d.ts +73 -0
- package/{calendar/index.d.ts → types/radix-ng-primitives-calendar.d.ts} +2 -3
- package/types/radix-ng-primitives-checkbox.d.ts +337 -0
- package/types/radix-ng-primitives-collapsible.d.ts +159 -0
- package/types/radix-ng-primitives-collection.d.ts +44 -0
- package/{config/index.d.ts → types/radix-ng-primitives-config.d.ts} +1 -1
- package/types/radix-ng-primitives-context-menu.d.ts +73 -0
- package/{core/index.d.ts → types/radix-ng-primitives-core.d.ts} +311 -236
- package/{cropper/index.d.ts → types/radix-ng-primitives-cropper.d.ts} +6 -5
- package/{date-field/index.d.ts → types/radix-ng-primitives-date-field.d.ts} +42 -27
- package/types/radix-ng-primitives-dialog.d.ts +323 -0
- package/{dismissable-layer/index.d.ts → types/radix-ng-primitives-dismissable-layer.d.ts} +15 -7
- package/types/radix-ng-primitives-drawer.d.ts +448 -0
- package/{editable/index.d.ts → types/radix-ng-primitives-editable.d.ts} +1 -1
- package/types/radix-ng-primitives-field.d.ts +373 -0
- package/types/radix-ng-primitives-fieldset.d.ts +48 -0
- package/{focus-scope/index.d.ts → types/radix-ng-primitives-focus-scope.d.ts} +13 -5
- package/types/radix-ng-primitives-input.d.ts +87 -0
- package/{label/index.d.ts → types/radix-ng-primitives-label.d.ts} +0 -1
- package/types/radix-ng-primitives-menu.d.ts +612 -0
- package/types/radix-ng-primitives-menubar.d.ts +66 -0
- package/types/radix-ng-primitives-meter.d.ts +193 -0
- package/types/radix-ng-primitives-navigation-menu.d.ts +488 -0
- package/types/radix-ng-primitives-number-field.d.ts +464 -0
- package/{pagination/index.d.ts → types/radix-ng-primitives-pagination.d.ts} +2 -2
- package/types/radix-ng-primitives-popover.d.ts +416 -0
- package/{popper/index.d.ts → types/radix-ng-primitives-popper.d.ts} +50 -9
- package/types/radix-ng-primitives-portal.d.ts +30 -0
- package/types/radix-ng-primitives-presence.d.ts +55 -0
- package/types/radix-ng-primitives-preview-card.d.ts +359 -0
- package/types/radix-ng-primitives-progress.d.ts +206 -0
- package/{radio/index.d.ts → types/radix-ng-primitives-radio.d.ts} +56 -26
- package/{roving-focus/index.d.ts → types/radix-ng-primitives-roving-focus.d.ts} +38 -27
- package/types/radix-ng-primitives-select.d.ts +512 -0
- package/types/radix-ng-primitives-separator.d.ts +38 -0
- package/types/radix-ng-primitives-slider.d.ts +377 -0
- package/{stepper/index.d.ts → types/radix-ng-primitives-stepper.d.ts} +21 -22
- package/types/radix-ng-primitives-switch.d.ts +121 -0
- package/types/radix-ng-primitives-tabs.d.ts +247 -0
- package/{time-field/index.d.ts → types/radix-ng-primitives-time-field.d.ts} +46 -31
- package/types/radix-ng-primitives-toggle-group.d.ts +116 -0
- package/types/radix-ng-primitives-toggle.d.ts +65 -0
- package/types/radix-ng-primitives-toolbar.d.ts +180 -0
- package/types/radix-ng-primitives-tooltip.d.ts +395 -0
- package/{visually-hidden/index.d.ts → types/radix-ng-primitives-visually-hidden.d.ts} +19 -19
- package/alert-dialog/index.d.ts +0 -57
- package/checkbox/index.d.ts +0 -164
- package/collapsible/index.d.ts +0 -85
- package/context-menu/index.d.ts +0 -129
- package/dialog/index.d.ts +0 -205
- package/dropdown-menu/README.md +0 -1
- package/dropdown-menu/index.d.ts +0 -171
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -583
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1246
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -740
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
- package/hover-card/README.md +0 -3
- package/hover-card/index.d.ts +0 -472
- package/menu/index.d.ts +0 -139
- package/menubar/index.d.ts +0 -56
- package/navigation-menu/index.d.ts +0 -405
- package/number-field/index.d.ts +0 -203
- package/popover/index.d.ts +0 -403
- package/portal/index.d.ts +0 -22
- package/presence/index.d.ts +0 -103
- package/progress/index.d.ts +0 -79
- package/select/index.d.ts +0 -214
- package/separator/index.d.ts +0 -63
- package/slider/index.d.ts +0 -263
- package/switch/index.d.ts +0 -105
- package/tabs/index.d.ts +0 -112
- package/toggle/index.d.ts +0 -75
- package/toggle-group/index.d.ts +0 -194
- package/toolbar/index.d.ts +0 -55
- package/tooltip/index.d.ts +0 -433
- package/tooltip2/README.md +0 -3
- package/tooltip2/index.d.ts +0 -325
- /package/{focus-guards/index.d.ts → types/radix-ng-primitives-focus-guards.d.ts} +0 -0
- /package/{index.d.ts → types/radix-ng-primitives.d.ts} +0 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
import * as i1 from '@radix-ng/primitives/presence';
|
|
4
|
+
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
5
|
+
import { DataOrientation, BooleanInput } from '@radix-ng/primitives/core';
|
|
6
|
+
import * as _radix_ng_primitives_tabs from '@radix-ng/primitives/tabs';
|
|
7
|
+
import * as i1$1 from '@radix-ng/primitives/roving-focus';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Structural directive that mounts the tab panel contents only while the panel is active,
|
|
11
|
+
* unmounting them once the exit animation finishes. Apply it inside an `[rdxTabsPanel]` to get
|
|
12
|
+
* Base UI's default unmounting behavior; combine with `keepMounted` on the panel to keep the
|
|
13
|
+
* contents mounted instead.
|
|
14
|
+
*
|
|
15
|
+
* The presence state is read from the parent panel through {@link RdxPresenceDirective}.
|
|
16
|
+
*/
|
|
17
|
+
declare class RdxTabsPanelPresence {
|
|
18
|
+
constructor();
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsPanelPresence, never>;
|
|
20
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsPanelPresence, "ng-template[rdxTabsPanelPresence]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxPresenceDirective; inputs: {}; outputs: {}; }]>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The direction in which the active tab moved relative to the previously active tab.
|
|
25
|
+
* Mirrors Base UI's `Tabs.Tab.ActivationDirection`.
|
|
26
|
+
*/
|
|
27
|
+
type RdxTabsActivationDirection = 'left' | 'right' | 'up' | 'down' | 'none';
|
|
28
|
+
/** A value that identifies a tab / panel pair. */
|
|
29
|
+
type RdxTabsValue = string | number | null;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Groups the tabs and the corresponding panels.
|
|
33
|
+
*
|
|
34
|
+
* @see https://base-ui.com/react/components/tabs
|
|
35
|
+
*/
|
|
36
|
+
declare class RdxTabsRoot {
|
|
37
|
+
/** @ignore */
|
|
38
|
+
readonly baseId: string;
|
|
39
|
+
/**
|
|
40
|
+
* The value of the currently selected tab. Use together with `(onValueChange)` for controlled state.
|
|
41
|
+
*/
|
|
42
|
+
readonly value: _angular_core.ModelSignal<RdxTabsValue | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* The value of the tab that should be initially selected when uncontrolled.
|
|
45
|
+
*/
|
|
46
|
+
readonly defaultValue: _angular_core.InputSignal<RdxTabsValue | undefined>;
|
|
47
|
+
/**
|
|
48
|
+
* The orientation the tabs are laid out. Controls arrow-key navigation
|
|
49
|
+
* (left/right vs. up/down).
|
|
50
|
+
*
|
|
51
|
+
* @default 'horizontal'
|
|
52
|
+
*/
|
|
53
|
+
readonly orientation: _angular_core.InputSignal<DataOrientation>;
|
|
54
|
+
/**
|
|
55
|
+
* Event emitted when the selected tab changes.
|
|
56
|
+
*/
|
|
57
|
+
readonly onValueChange: _angular_core.OutputEmitterRef<RdxTabsValue>;
|
|
58
|
+
/** @ignore Set by `[rdxTabsList]`. */
|
|
59
|
+
readonly activateOnFocus: _angular_core.WritableSignal<boolean>;
|
|
60
|
+
/** @ignore Set by `[rdxTabsList]`. */
|
|
61
|
+
readonly tabListElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
62
|
+
/** @ignore */
|
|
63
|
+
readonly activationDirection: _angular_core.WritableSignal<RdxTabsActivationDirection>;
|
|
64
|
+
constructor();
|
|
65
|
+
/** @ignore */
|
|
66
|
+
setValue(value: RdxTabsValue): void;
|
|
67
|
+
private computeDirection;
|
|
68
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsRoot, never>;
|
|
69
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsRoot, "[rdxTabsRoot]", ["rdxTabsRoot"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Groups the individual tab buttons and manages keyboard navigation.
|
|
74
|
+
*
|
|
75
|
+
* @see https://base-ui.com/react/components/tabs
|
|
76
|
+
*/
|
|
77
|
+
declare class RdxTabsList {
|
|
78
|
+
protected readonly rootContext: _radix_ng_primitives_tabs.RdxTabsRootContext;
|
|
79
|
+
private readonly elementRef;
|
|
80
|
+
private readonly rovingFocusGroup;
|
|
81
|
+
/**
|
|
82
|
+
* Whether a tab is activated when it receives focus (automatic activation).
|
|
83
|
+
* When `false`, tabs are only activated on click or Enter/Space.
|
|
84
|
+
*
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
readonly activateOnFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
88
|
+
/**
|
|
89
|
+
* Whether keyboard navigation should loop from the last tab back to the first.
|
|
90
|
+
*
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
readonly loopFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
94
|
+
constructor();
|
|
95
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsList, never>;
|
|
96
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsList, "[rdxTabsList]", ["rdxTabsList"], { "activateOnFocus": { "alias": "activateOnFocus"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1$1.RdxRovingFocusGroupDirective; inputs: {}; outputs: {}; }]>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* An individual interactive tab button that activates its corresponding panel.
|
|
101
|
+
*
|
|
102
|
+
* @see https://base-ui.com/react/components/tabs
|
|
103
|
+
*/
|
|
104
|
+
declare class RdxTabsTab {
|
|
105
|
+
protected readonly rootContext: _radix_ng_primitives_tabs.RdxTabsRootContext;
|
|
106
|
+
private readonly rovingFocusItem;
|
|
107
|
+
/**
|
|
108
|
+
* A unique value that associates the tab with a panel.
|
|
109
|
+
*/
|
|
110
|
+
readonly value: _angular_core.InputSignal<RdxTabsValue>;
|
|
111
|
+
/**
|
|
112
|
+
* When `true`, prevents the user from interacting with the tab.
|
|
113
|
+
*/
|
|
114
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
115
|
+
/** @ignore */
|
|
116
|
+
protected readonly tabId: _angular_core.Signal<string>;
|
|
117
|
+
/** @ignore */
|
|
118
|
+
protected readonly panelId: _angular_core.Signal<string>;
|
|
119
|
+
/** @ignore */
|
|
120
|
+
protected readonly active: _angular_core.Signal<boolean>;
|
|
121
|
+
constructor();
|
|
122
|
+
/** @ignore */
|
|
123
|
+
protected onMouseDown(event: MouseEvent): void;
|
|
124
|
+
/** @ignore */
|
|
125
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
126
|
+
/** @ignore */
|
|
127
|
+
protected onFocus(): void;
|
|
128
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsTab, never>;
|
|
129
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsTab, "[rdxTabsTab]", ["rdxTabsTab"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1$1.RdxRovingFocusItemDirective; inputs: { "allowShiftKey": "allowShiftKey"; }; outputs: {}; }]>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A panel displayed when its corresponding tab is active.
|
|
134
|
+
*
|
|
135
|
+
* By default the panel stays in the DOM and is toggled with the `hidden` attribute. To unmount the
|
|
136
|
+
* contents while inactive (Base UI's default `keepMounted: false`), nest a `*rdxTabsPanelPresence`
|
|
137
|
+
* structural directive inside it; set `keepMounted` to keep the contents mounted regardless.
|
|
138
|
+
*
|
|
139
|
+
* @see https://base-ui.com/react/components/tabs
|
|
140
|
+
*/
|
|
141
|
+
declare class RdxTabsPanel {
|
|
142
|
+
private readonly elementRef;
|
|
143
|
+
protected readonly rootContext: _radix_ng_primitives_tabs.RdxTabsRootContext;
|
|
144
|
+
/**
|
|
145
|
+
* A unique value that associates the panel with a tab.
|
|
146
|
+
*/
|
|
147
|
+
readonly value: _angular_core.InputSignal<RdxTabsValue>;
|
|
148
|
+
/**
|
|
149
|
+
* Keep the panel contents mounted in the DOM while inactive (the contents are still hidden).
|
|
150
|
+
* Only relevant together with `*rdxTabsPanelPresence`, which otherwise unmounts them.
|
|
151
|
+
*
|
|
152
|
+
* @default false
|
|
153
|
+
*/
|
|
154
|
+
readonly keepMounted: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
155
|
+
private readonly transition;
|
|
156
|
+
/** Reactive enter/exit transition phase (`'starting'` | `'ending'` | `undefined`). */
|
|
157
|
+
readonly transitionStatus: _angular_core.Signal<_radix_ng_primitives_core.RdxTransitionStatus>;
|
|
158
|
+
/** @ignore */
|
|
159
|
+
protected readonly panelId: _angular_core.Signal<string>;
|
|
160
|
+
/** @ignore */
|
|
161
|
+
protected readonly tabId: _angular_core.Signal<string>;
|
|
162
|
+
/** Whether this panel's tab is currently selected. */
|
|
163
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
164
|
+
/** `true` once a `*rdxTabsPanelPresence` child takes over mounting. */
|
|
165
|
+
private readonly hasPresence;
|
|
166
|
+
/**
|
|
167
|
+
* Whether the contents should be present for `*rdxTabsPanelPresence`. Flips with `active` so the
|
|
168
|
+
* presence directive owns the exit-animation timing (it keeps the node mounted until its exit
|
|
169
|
+
* `@keyframes` finishes); `keepMounted` keeps them mounted regardless.
|
|
170
|
+
*/
|
|
171
|
+
readonly present: _angular_core.Signal<boolean>;
|
|
172
|
+
/**
|
|
173
|
+
* The `hidden` attribute value. The panel is shown while active or while its exit transition
|
|
174
|
+
* runs. When a presence child unmounts the contents we no longer force `hidden` (the empty
|
|
175
|
+
* element renders nothing), unless `keepMounted` keeps the inactive contents around.
|
|
176
|
+
*/
|
|
177
|
+
protected readonly hidden: _angular_core.Signal<boolean>;
|
|
178
|
+
/** @ignore Index of the panel, derived from the order of its associated tab. */
|
|
179
|
+
protected readonly index: _angular_core.Signal<number | null>;
|
|
180
|
+
private previousActive;
|
|
181
|
+
private isFirstRun;
|
|
182
|
+
constructor();
|
|
183
|
+
/** @ignore Called by `RdxTabsPanelPresence` so the panel stops forcing `hidden`. */
|
|
184
|
+
markHasPresence(): void;
|
|
185
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsPanel, never>;
|
|
186
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsPanel, "[rdxTabsPanel]", ["rdxTabsPanel"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
interface TabGeometry {
|
|
190
|
+
top: number;
|
|
191
|
+
right: number;
|
|
192
|
+
bottom: number;
|
|
193
|
+
left: number;
|
|
194
|
+
width: number;
|
|
195
|
+
height: number;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* A visual element that tracks the position and size of the active tab. Exposes the active tab
|
|
199
|
+
* geometry as CSS variables (`--active-tab-{top,right,bottom,left,width,height}`) so it can be
|
|
200
|
+
* animated with CSS.
|
|
201
|
+
*
|
|
202
|
+
* @see https://base-ui.com/react/components/tabs
|
|
203
|
+
*/
|
|
204
|
+
declare class RdxTabsIndicator {
|
|
205
|
+
protected readonly rootContext: _radix_ng_primitives_tabs.RdxTabsRootContext;
|
|
206
|
+
private readonly destroyRef;
|
|
207
|
+
/** @ignore */
|
|
208
|
+
protected readonly geometry: _angular_core.WritableSignal<TabGeometry | null>;
|
|
209
|
+
constructor();
|
|
210
|
+
private scheduleMeasure;
|
|
211
|
+
private measure;
|
|
212
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsIndicator, never>;
|
|
213
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsIndicator, "[rdxTabsIndicator]", ["rdxTabsIndicator"], {}, {}, never, never, true, never>;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
interface RdxTabsRootContext {
|
|
217
|
+
/** Stable id used to derive tab / panel ids. */
|
|
218
|
+
readonly baseId: string;
|
|
219
|
+
/** The value of the currently selected tab. */
|
|
220
|
+
readonly value: Signal<RdxTabsValue | undefined>;
|
|
221
|
+
/** The orientation of the tabs. */
|
|
222
|
+
readonly orientation: Signal<DataOrientation>;
|
|
223
|
+
/** Direction the selection moved relative to the previously active tab. */
|
|
224
|
+
readonly activationDirection: Signal<RdxTabsActivationDirection>;
|
|
225
|
+
/** Whether tabs are activated on focus (set by the list). */
|
|
226
|
+
readonly activateOnFocus: Signal<boolean>;
|
|
227
|
+
/** The `[rdxTabsList]` host element, used to resolve tab order and indicator geometry. */
|
|
228
|
+
readonly tabListElement: Signal<HTMLElement | null>;
|
|
229
|
+
/** Select a tab by value. No-op when the value is unchanged. */
|
|
230
|
+
setValue(value: RdxTabsValue): void;
|
|
231
|
+
/** Mirror the list's `activateOnFocus` input onto the root context. */
|
|
232
|
+
setActivateOnFocus(value: boolean): void;
|
|
233
|
+
/** Register the list host element. */
|
|
234
|
+
setTabListElement(element: HTMLElement | null): void;
|
|
235
|
+
}
|
|
236
|
+
declare const injectTabsRootContext: (optional?: boolean) => RdxTabsRootContext | null;
|
|
237
|
+
declare const provideTabsRootContext: (useFactory: () => RdxTabsRootContext) => _angular_core.Provider;
|
|
238
|
+
|
|
239
|
+
declare const tabsImports: (typeof RdxTabsPanelPresence)[];
|
|
240
|
+
declare class RdxTabsModule {
|
|
241
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsModule, never>;
|
|
242
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxTabsModule, never, [typeof RdxTabsRoot, typeof RdxTabsList, typeof RdxTabsTab, typeof RdxTabsPanel, typeof RdxTabsPanelPresence, typeof RdxTabsIndicator], [typeof RdxTabsRoot, typeof RdxTabsList, typeof RdxTabsTab, typeof RdxTabsPanel, typeof RdxTabsPanelPresence, typeof RdxTabsIndicator]>;
|
|
243
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxTabsModule>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { RdxTabsIndicator, RdxTabsList, RdxTabsModule, RdxTabsPanel, RdxTabsPanelPresence, RdxTabsRoot, RdxTabsTab, injectTabsRootContext, provideTabsRootContext, tabsImports };
|
|
247
|
+
export type { RdxTabsActivationDirection, RdxTabsRootContext, RdxTabsValue };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Signal, WritableSignal, InjectionToken, InputSignal, ModelSignal } from '@angular/core';
|
|
3
3
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
4
|
-
import { TimeValue, HourCycle, Granularity, DateStep, Formatter, SegmentValueObj, SegmentPart } from '@radix-ng/primitives/core';
|
|
4
|
+
import { TimeValue, HourCycle, Granularity, Direction, BooleanInput, DateStep, Formatter, SegmentValueObj, SegmentPart } from '@radix-ng/primitives/core';
|
|
5
5
|
import * as _internationalized_date from '@internationalized/date';
|
|
6
|
-
import { Direction } from '@angular/cdk/bidi';
|
|
7
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
8
6
|
|
|
9
|
-
declare class RdxTimeFieldRootDirective
|
|
10
|
-
private readonly elementRef;
|
|
7
|
+
declare class RdxTimeFieldRootDirective {
|
|
11
8
|
/**
|
|
12
9
|
* The controlled checked state of the calendar.
|
|
13
10
|
*/
|
|
@@ -47,47 +44,61 @@ declare class RdxTimeFieldRootDirective implements OnInit, AfterViewInit {
|
|
|
47
44
|
* The stepping interval for the time fields. Defaults to 1
|
|
48
45
|
*/
|
|
49
46
|
readonly step: _angular_core.InputSignal<DateStep | undefined>;
|
|
50
|
-
readonly step$:
|
|
47
|
+
readonly step$: Signal<DateStep>;
|
|
51
48
|
/**
|
|
49
|
+
* Locale- and hour-cycle-aware formatter. Recomputed whenever `locale` or
|
|
50
|
+
* `hourCycle` change so segments always render with the current settings.
|
|
52
51
|
* @ignore
|
|
53
52
|
*/
|
|
54
|
-
readonly
|
|
53
|
+
readonly formatter: Signal<Formatter>;
|
|
54
|
+
/**
|
|
55
|
+
* @ignore
|
|
56
|
+
*/
|
|
57
|
+
readonly defaultDate: Signal<TimeValue>;
|
|
55
58
|
/**
|
|
56
59
|
* The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view
|
|
57
60
|
*/
|
|
58
61
|
readonly placeholder: _angular_core.ModelSignal<TimeValue | undefined>;
|
|
59
62
|
/**
|
|
63
|
+
* Segment input parts, collected from the projected content in DOM order. This
|
|
64
|
+
* stays in sync with `segmentContents()` (granularity / locale / value changes
|
|
65
|
+
* add or remove segments) instead of being captured once after view init.
|
|
60
66
|
* @ignore
|
|
61
67
|
*/
|
|
62
|
-
readonly
|
|
68
|
+
private readonly segmentInputs;
|
|
63
69
|
/**
|
|
70
|
+
* The focusable (non-literal) segment elements, in DOM order.
|
|
64
71
|
* @ignore
|
|
65
72
|
*/
|
|
66
|
-
readonly
|
|
73
|
+
readonly segmentElements: Signal<HTMLElement[]>;
|
|
67
74
|
/**
|
|
68
75
|
* @ignore
|
|
69
76
|
*/
|
|
70
|
-
|
|
77
|
+
readonly currentFocusedElement: _angular_core.WritableSignal<HTMLElement | null>;
|
|
71
78
|
/**
|
|
72
79
|
* @ignore
|
|
73
80
|
*/
|
|
74
|
-
readonly
|
|
81
|
+
readonly inferredGranularity: Signal<Granularity>;
|
|
82
|
+
readonly convertedMinValue: Signal<_internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime | undefined>;
|
|
83
|
+
readonly convertedMaxValue: Signal<_internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime | undefined>;
|
|
84
|
+
readonly convertedModelValue: _angular_core.WritableSignal<TimeValue | undefined>;
|
|
85
|
+
readonly convertedPlaceholder: _angular_core.WritableSignal<TimeValue>;
|
|
75
86
|
/**
|
|
87
|
+
* The per-segment values. Writable so segment editing (via `useDateField`) can
|
|
88
|
+
* update individual parts, but re-synced from the model whenever the value,
|
|
89
|
+
* granularity or formatter change — so a controlled `value` set after init is
|
|
90
|
+
* reflected, and an empty field re-initializes when granularity changes.
|
|
76
91
|
* @ignore
|
|
77
92
|
*/
|
|
78
|
-
readonly
|
|
79
|
-
readonly convertedMinValue: _angular_core.Signal<_internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime | undefined>;
|
|
80
|
-
readonly convertedMaxValue: _angular_core.Signal<_internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime | undefined>;
|
|
81
|
-
readonly convertedModelValue: _angular_core.WritableSignal<TimeValue | undefined>;
|
|
82
|
-
readonly convertedPlaceholder: _angular_core.WritableSignal<TimeValue>;
|
|
93
|
+
readonly segmentValues: _angular_core.WritableSignal<SegmentValueObj>;
|
|
83
94
|
/**
|
|
84
95
|
* @ignore
|
|
85
96
|
*/
|
|
86
|
-
readonly isInvalid:
|
|
97
|
+
readonly isInvalid: Signal<boolean>;
|
|
87
98
|
/**
|
|
88
99
|
* @ignore
|
|
89
100
|
*/
|
|
90
|
-
readonly allSegmentContent:
|
|
101
|
+
readonly allSegmentContent: Signal<{
|
|
91
102
|
obj: _radix_ng_primitives_core.SegmentContentObj;
|
|
92
103
|
arr: {
|
|
93
104
|
part: _radix_ng_primitives_core.SegmentPart;
|
|
@@ -97,43 +108,47 @@ declare class RdxTimeFieldRootDirective implements OnInit, AfterViewInit {
|
|
|
97
108
|
/**
|
|
98
109
|
* An array of segments that should be readonly, which prevent user input on them.
|
|
99
110
|
*/
|
|
100
|
-
readonly segmentContents:
|
|
111
|
+
readonly segmentContents: Signal<{
|
|
101
112
|
part: _radix_ng_primitives_core.SegmentPart;
|
|
102
113
|
value: string;
|
|
103
114
|
}[]>;
|
|
104
115
|
/**
|
|
105
116
|
* @ignore
|
|
106
117
|
*/
|
|
107
|
-
readonly currentSegmentIndex:
|
|
118
|
+
readonly currentSegmentIndex: Signal<number>;
|
|
108
119
|
/**
|
|
109
120
|
* @ignore
|
|
110
121
|
*/
|
|
111
|
-
readonly prevFocusableSegment:
|
|
122
|
+
readonly prevFocusableSegment: Signal<HTMLElement | null>;
|
|
112
123
|
/**
|
|
113
124
|
* @ignore
|
|
114
125
|
*/
|
|
115
|
-
readonly nextFocusableSegment:
|
|
126
|
+
readonly nextFocusableSegment: Signal<HTMLElement | null>;
|
|
116
127
|
/**
|
|
117
128
|
* @ignore
|
|
118
129
|
*/
|
|
119
130
|
readonly focusNext: () => void;
|
|
120
131
|
constructor();
|
|
121
|
-
ngOnInit(): void;
|
|
122
|
-
ngAfterViewInit(): void;
|
|
123
132
|
/**
|
|
124
133
|
* @ignore
|
|
125
134
|
*/
|
|
126
|
-
onKeydown(event:
|
|
135
|
+
onKeydown(event: Event): void;
|
|
127
136
|
/**
|
|
128
137
|
* @ignore
|
|
129
138
|
*/
|
|
130
139
|
setFocusedElement(el: HTMLElement): void;
|
|
131
140
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTimeFieldRootDirective, never>;
|
|
132
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTimeFieldRootDirective, "[rdxTimeFieldRoot]", ["rdxTimeFieldRoot"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "hourCycle": { "alias": "hourCycle"; "required": false; "isSignal": true; }; "granularity": { "alias": "granularity"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "hideTimeZone": { "alias": "hideTimeZone"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "placeholder": "placeholderChange"; },
|
|
141
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTimeFieldRootDirective, "[rdxTimeFieldRoot]", ["rdxTimeFieldRoot"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "hourCycle": { "alias": "hourCycle"; "required": false; "isSignal": true; }; "granularity": { "alias": "granularity"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "hideTimeZone": { "alias": "hideTimeZone"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "placeholder": "placeholderChange"; }, ["segmentInputs"], never, true, never>;
|
|
133
142
|
}
|
|
134
143
|
|
|
135
144
|
declare class RdxTimeFieldInputDirective {
|
|
136
145
|
private readonly el;
|
|
146
|
+
/**
|
|
147
|
+
* The host element of this segment. Consumed by the root to collect focusable
|
|
148
|
+
* segments in DOM order.
|
|
149
|
+
* @ignore
|
|
150
|
+
*/
|
|
151
|
+
readonly element: HTMLElement;
|
|
137
152
|
private readonly rootContext;
|
|
138
153
|
/**
|
|
139
154
|
* The part of the date to render
|
|
@@ -165,16 +180,16 @@ declare class RdxTimeFieldInputDirective {
|
|
|
165
180
|
/**
|
|
166
181
|
* @ignore
|
|
167
182
|
*/
|
|
168
|
-
handleSegmentClick: (e:
|
|
183
|
+
handleSegmentClick: (e: Event) => void;
|
|
169
184
|
/**
|
|
170
185
|
* @ignore
|
|
171
186
|
*/
|
|
172
|
-
handleSegmentKeydown: (e:
|
|
187
|
+
handleSegmentKeydown: (e: Event) => void;
|
|
173
188
|
constructor();
|
|
174
189
|
/**
|
|
175
190
|
* @ignore
|
|
176
191
|
*/
|
|
177
|
-
onFocus(e:
|
|
192
|
+
onFocus(e: Event): void;
|
|
178
193
|
/**
|
|
179
194
|
* @ignore
|
|
180
195
|
*/
|
|
@@ -190,7 +205,7 @@ interface TimeFieldContextToken {
|
|
|
190
205
|
isInvalid: Signal<boolean>;
|
|
191
206
|
disabled: InputSignal<boolean>;
|
|
192
207
|
readonly: InputSignal<boolean>;
|
|
193
|
-
formatter: Formatter
|
|
208
|
+
formatter: Signal<Formatter>;
|
|
194
209
|
hourCycle: InputSignal<HourCycle>;
|
|
195
210
|
segmentValues: WritableSignal<SegmentValueObj>;
|
|
196
211
|
focusNext: () => void;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
import { DataOrientation, BooleanInput } from '@radix-ng/primitives/core';
|
|
4
|
+
import * as i1 from '@radix-ng/primitives/roving-focus';
|
|
5
|
+
import { Direction } from '@radix-ng/primitives/roving-focus';
|
|
6
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Shared state a {@link RdxToggle} reads when it participates in a toggle group.
|
|
10
|
+
*/
|
|
11
|
+
interface RdxToggleGroupContext {
|
|
12
|
+
/** The currently pressed values. */
|
|
13
|
+
readonly value: Signal<string[]>;
|
|
14
|
+
/** Whether the whole group is disabled. */
|
|
15
|
+
readonly disabled: Signal<boolean>;
|
|
16
|
+
/** Whether more than one item can be pressed at a time. */
|
|
17
|
+
readonly multiple: Signal<boolean>;
|
|
18
|
+
/** The orientation of the group. */
|
|
19
|
+
readonly orientation: Signal<DataOrientation>;
|
|
20
|
+
/** Toggle the pressed state of `value` within the group. */
|
|
21
|
+
toggle(value: string): void;
|
|
22
|
+
}
|
|
23
|
+
declare const injectToggleGroupContext: (optional?: boolean) => RdxToggleGroupContext | null;
|
|
24
|
+
declare const provideToggleGroupContext: (useFactory: () => RdxToggleGroupContext) => _angular_core.Provider;
|
|
25
|
+
|
|
26
|
+
/** Builds the shared context a {@link RdxToggle} reads when it belongs to this group. */
|
|
27
|
+
declare function toggleGroupContext(instance: RdxToggleGroupBase): RdxToggleGroupContext;
|
|
28
|
+
/**
|
|
29
|
+
* Shared state and behavior for the toggle group. Concrete directives add the roving-focus group
|
|
30
|
+
* ({@link RdxToggleGroup}) or omit it when an ancestor already owns focus, e.g. a toolbar
|
|
31
|
+
* ({@link RdxToggleGroupWithoutFocus}).
|
|
32
|
+
*/
|
|
33
|
+
declare abstract class RdxToggleGroupBase implements ControlValueAccessor {
|
|
34
|
+
/**
|
|
35
|
+
* The pressed values. Always an array — a single value is `[value]`. Use with `(onValueChange)`
|
|
36
|
+
* for controlled state.
|
|
37
|
+
*/
|
|
38
|
+
readonly value: _angular_core.ModelSignal<string[] | undefined>;
|
|
39
|
+
/** The values pressed when the group is initially rendered (uncontrolled). */
|
|
40
|
+
readonly defaultValue: _angular_core.InputSignal<string[] | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* Whether multiple items can be pressed at the same time.
|
|
43
|
+
*
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
readonly multiple: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the whole group is disabled.
|
|
49
|
+
*
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
53
|
+
/**
|
|
54
|
+
* The orientation of the group, controlling arrow-key navigation.
|
|
55
|
+
*
|
|
56
|
+
* @default 'horizontal'
|
|
57
|
+
*/
|
|
58
|
+
readonly orientation: _angular_core.InputSignal<DataOrientation>;
|
|
59
|
+
/** Event emitted when the pressed values change. */
|
|
60
|
+
readonly onValueChange: _angular_core.OutputEmitterRef<string[]>;
|
|
61
|
+
/** @ignore */
|
|
62
|
+
readonly pressedValues: _angular_core.Signal<string[]>;
|
|
63
|
+
protected readonly accessorDisabled: _angular_core.WritableSignal<boolean>;
|
|
64
|
+
/** @ignore */
|
|
65
|
+
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
66
|
+
private onChange?;
|
|
67
|
+
protected onTouched?: () => void;
|
|
68
|
+
constructor();
|
|
69
|
+
/** @ignore */
|
|
70
|
+
toggle(value: string): void;
|
|
71
|
+
/** @ignore */
|
|
72
|
+
writeValue(value: string[] | string | null): void;
|
|
73
|
+
/** @ignore */
|
|
74
|
+
registerOnChange(fn: (value: string[]) => void): void;
|
|
75
|
+
/** @ignore */
|
|
76
|
+
registerOnTouched(fn: () => void): void;
|
|
77
|
+
/** @ignore */
|
|
78
|
+
setDisabledState(isDisabled: boolean): void;
|
|
79
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupBase, never>;
|
|
80
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroupBase, never, never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A set of two-state buttons that can be toggled on or off. Owns roving keyboard focus over its
|
|
85
|
+
* `[rdxToggle]` children.
|
|
86
|
+
*
|
|
87
|
+
* @see https://base-ui.com/react/components/toggle-group
|
|
88
|
+
*/
|
|
89
|
+
declare class RdxToggleGroup extends RdxToggleGroupBase {
|
|
90
|
+
/** Text direction for arrow-key navigation. */
|
|
91
|
+
readonly dir: _angular_core.InputSignal<Direction>;
|
|
92
|
+
/**
|
|
93
|
+
* Whether keyboard navigation should loop from the last item back to the first.
|
|
94
|
+
*
|
|
95
|
+
* @default true
|
|
96
|
+
*/
|
|
97
|
+
readonly loopFocus: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
98
|
+
private readonly rovingFocusGroup;
|
|
99
|
+
constructor();
|
|
100
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroup, never>;
|
|
101
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroup, "[rdxToggleGroup]", ["rdxToggleGroup"], { "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: {}; outputs: {}; }]>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A toggle group that does NOT create its own roving-focus group, for use inside a container that
|
|
106
|
+
* already owns keyboard focus (e.g. a toolbar). The `[rdxToggle]` children register with the nearest
|
|
107
|
+
* ancestor roving-focus group instead. Mirrors Base UI's behavior of skipping its composite root
|
|
108
|
+
* when nested in a toolbar.
|
|
109
|
+
*/
|
|
110
|
+
declare class RdxToggleGroupWithoutFocus extends RdxToggleGroupBase {
|
|
111
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupWithoutFocus, never>;
|
|
112
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroupWithoutFocus, "[rdxToggleGroupWithoutFocus]", ["rdxToggleGroupWithoutFocus"], {}, {}, never, never, true, never>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { RdxToggleGroup, RdxToggleGroupBase, RdxToggleGroupWithoutFocus, injectToggleGroupContext, provideToggleGroupContext, toggleGroupContext };
|
|
116
|
+
export type { RdxToggleGroupContext };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { BooleanInput } from '@radix-ng/primitives/core';
|
|
3
|
+
import * as i1 from '@radix-ng/primitives/roving-focus';
|
|
4
|
+
import * as i1$1 from '@radix-ng/primitives/visually-hidden';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A two-state button that can be either on (pressed) or off.
|
|
8
|
+
*
|
|
9
|
+
* Works standalone or as an item of a `[rdxToggleGroup]`: inside a group it derives its pressed
|
|
10
|
+
* state from the group's value (matched by `value`) and participates in the group's roving focus.
|
|
11
|
+
*
|
|
12
|
+
* @see https://base-ui.com/react/components/toggle
|
|
13
|
+
*/
|
|
14
|
+
declare class RdxToggle {
|
|
15
|
+
private readonly group;
|
|
16
|
+
private readonly rovingItem;
|
|
17
|
+
/**
|
|
18
|
+
* A value identifying this toggle inside a `[rdxToggleGroup]`. Required when used in a group.
|
|
19
|
+
*/
|
|
20
|
+
readonly value: _angular_core.InputSignal<string | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* The pressed state when initially rendered (uncontrolled, standalone only).
|
|
23
|
+
*
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
readonly defaultPressed: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
27
|
+
/**
|
|
28
|
+
* The controlled pressed state (standalone). Use with `(onPressedChange)` or two-way `[(pressed)]`.
|
|
29
|
+
*/
|
|
30
|
+
readonly pressed: _angular_core.ModelSignal<boolean | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the toggle is disabled.
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the host is a native `<button>`. When `false`, the toggle adds `role="button"` and
|
|
39
|
+
* handles Enter/Space itself.
|
|
40
|
+
*
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
readonly nativeButton: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
44
|
+
/** Event emitted when the pressed state changes (standalone). */
|
|
45
|
+
readonly onPressedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
46
|
+
private readonly internalPressed;
|
|
47
|
+
/** @ignore Whether the toggle is currently pressed (from the group when grouped). */
|
|
48
|
+
readonly pressedState: _angular_core.Signal<boolean>;
|
|
49
|
+
/** @ignore */
|
|
50
|
+
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
51
|
+
constructor();
|
|
52
|
+
/** @ignore */
|
|
53
|
+
protected onClick(): void;
|
|
54
|
+
/** @ignore */
|
|
55
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
56
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggle, never>;
|
|
57
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggle, "[rdxToggle]", ["rdxToggle"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultPressed": { "alias": "defaultPressed"; "required": false; "isSignal": true; }; "pressed": { "alias": "pressed"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "nativeButton": { "alias": "nativeButton"; "required": false; "isSignal": true; }; }, { "pressed": "pressedChange"; "onPressedChange": "onPressedChange"; }, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: {}; outputs: {}; }]>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare class RdxToggleVisuallyHiddenInputDirective {
|
|
61
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleVisuallyHiddenInputDirective, never>;
|
|
62
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleVisuallyHiddenInputDirective, "input[rdxToggleVisuallyHiddenInput]", ["rdxToggleVisuallyHiddenInput"], {}, {}, never, never, true, [{ directive: typeof i1$1.RdxVisuallyHiddenInputBubbleDirective; inputs: { "name": "name"; "required": "required"; "value": "value"; "disabled": "disabled"; }; outputs: {}; }]>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { RdxToggle, RdxToggleVisuallyHiddenInputDirective };
|