@radix-ng/primitives 0.4.0 → 0.5.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/accordion/README.md +3 -0
- package/accordion/index.d.ts +7 -0
- package/accordion/src/accordion/accordion.directive.d.ts +64 -0
- package/accordion/src/accordion/accordion.token.d.ts +4 -0
- package/accordion/src/accordion-content/accordion-content.directive.d.ts +44 -0
- package/accordion/src/accordion-header/accordion-header.directive.d.ts +6 -0
- package/accordion/src/accordion-item/accordion-item.directive.d.ts +42 -0
- package/accordion/src/accordion-item/accordion-item.token.d.ts +4 -0
- package/accordion/src/accordion-state.directive.d.ts +28 -0
- package/accordion/src/accordion-trigger/accordion-trigger.directive.d.ts +23 -0
- package/accordion/src/accordion.config.d.ts +25 -0
- package/esm2022/accordion/index.mjs +8 -0
- package/esm2022/accordion/radix-ng-primitives-accordion.mjs +5 -0
- package/esm2022/accordion/src/accordion/accordion.directive.mjs +108 -0
- package/esm2022/accordion/src/accordion/accordion.token.mjs +6 -0
- package/esm2022/accordion/src/accordion-content/accordion-content.directive.mjs +75 -0
- package/esm2022/accordion/src/accordion-header/accordion-header.directive.mjs +17 -0
- package/esm2022/accordion/src/accordion-item/accordion-item.directive.mjs +81 -0
- package/esm2022/accordion/src/accordion-item/accordion-item.token.mjs +6 -0
- package/esm2022/accordion/src/accordion-state.directive.mjs +49 -0
- package/esm2022/accordion/src/accordion-trigger/accordion-trigger.directive.mjs +49 -0
- package/esm2022/accordion/src/accordion.config.mjs +27 -0
- package/esm2022/label/src/label.directive.mjs +17 -3
- package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +5 -4
- package/esm2022/toggle-group/index.mjs +6 -0
- package/esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs +5 -0
- package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +79 -0
- package/esm2022/toggle-group/src/toggle-group-button.token.mjs +6 -0
- package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +159 -0
- package/esm2022/toggle-group/src/toggle-group.directive.mjs +157 -0
- package/esm2022/toggle-group/src/toggle-group.token.mjs +6 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +394 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +16 -2
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +4 -3
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +397 -0
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -0
- package/label/src/label.directive.d.ts +6 -1
- package/package.json +12 -6
- package/roving-focus/src/roving-focus-group.directive.d.ts +1 -1
- package/toggle-group/README.md +3 -0
- package/toggle-group/index.d.ts +5 -0
- package/toggle-group/src/toggle-group-button.directive.d.ts +39 -0
- package/toggle-group/src/toggle-group-button.token.d.ts +4 -0
- package/toggle-group/src/toggle-group-multi.directive.d.ts +90 -0
- package/toggle-group/src/toggle-group.directive.d.ts +90 -0
- package/toggle-group/src/toggle-group.token.d.ts +5 -0
- package/esm2022/tooltip/index.mjs +0 -5
- package/esm2022/tooltip/radix-ng-primitives-tooltip.mjs +0 -5
- package/esm2022/tooltip/src/tooltip-arrow.directive.mjs +0 -17
- package/esm2022/tooltip/src/tooltip-trigger.directive.mjs +0 -148
- package/esm2022/tooltip/src/tooltip-trigger.token.mjs +0 -6
- package/esm2022/tooltip/src/tooltip.config.mjs +0 -31
- package/esm2022/tooltip/src/tooltip.directive.mjs +0 -46
- package/fesm2022/radix-ng-primitives-tooltip.mjs +0 -242
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +0 -1
- package/tooltip/README.md +0 -1
- package/tooltip/index.d.ts +0 -4
- package/tooltip/src/tooltip-arrow.directive.d.ts +0 -6
- package/tooltip/src/tooltip-trigger.directive.d.ts +0 -79
- package/tooltip/src/tooltip-trigger.token.d.ts +0 -4
- package/tooltip/src/tooltip.config.d.ts +0 -46
- package/tooltip/src/tooltip.directive.d.ts +0 -17
@@ -1,242 +0,0 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { Directive, InjectionToken, inject, booleanAttribute, numberAttribute, Input, HostListener } from '@angular/core';
|
3
|
-
import * as i1 from '@radix-ng/primitives/overlay';
|
4
|
-
import { RdxOverlayArrowDirective, RdxOverlayTriggerDirective, RdxOverlayDirective } from '@radix-ng/primitives/overlay';
|
5
|
-
|
6
|
-
class RdxTooltipArrowDirective {
|
7
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxTooltipArrowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
8
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxTooltipArrowDirective, isStandalone: true, selector: "[rdxTooltipArrow]", hostDirectives: [{ directive: i1.RdxOverlayArrowDirective }], ngImport: i0 }); }
|
9
|
-
}
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxTooltipArrowDirective, decorators: [{
|
11
|
-
type: Directive,
|
12
|
-
args: [{
|
13
|
-
selector: '[rdxTooltipArrow]',
|
14
|
-
standalone: true,
|
15
|
-
hostDirectives: [RdxOverlayArrowDirective]
|
16
|
-
}]
|
17
|
-
}] });
|
18
|
-
|
19
|
-
const RdxTooltipTriggerToken = new InjectionToken('RdxTooltipTriggerToken');
|
20
|
-
function injectTooltipTrigger() {
|
21
|
-
return inject(RdxTooltipTriggerToken);
|
22
|
-
}
|
23
|
-
|
24
|
-
const TooltipConfigToken = new InjectionToken('TooltipConfig');
|
25
|
-
const defaultTooltipConfig = {
|
26
|
-
offset: 4,
|
27
|
-
placement: 'top',
|
28
|
-
showDelay: 0,
|
29
|
-
hideDelay: 0,
|
30
|
-
flip: true,
|
31
|
-
container: document.body
|
32
|
-
};
|
33
|
-
/**
|
34
|
-
* Provide the default Tooltip configuration
|
35
|
-
* @param config The Tooltip configuration
|
36
|
-
* @returns The provider
|
37
|
-
*/
|
38
|
-
function provideTooltipConfig(config) {
|
39
|
-
return [
|
40
|
-
{
|
41
|
-
provide: TooltipConfigToken,
|
42
|
-
useValue: { ...defaultTooltipConfig, ...config }
|
43
|
-
}
|
44
|
-
];
|
45
|
-
}
|
46
|
-
/**
|
47
|
-
* Inject the Tooltip configuration
|
48
|
-
* @returns The global Tooltip configuration
|
49
|
-
*/
|
50
|
-
function injectTooltipConfig() {
|
51
|
-
return inject(TooltipConfigToken, { optional: true }) ?? defaultTooltipConfig;
|
52
|
-
}
|
53
|
-
|
54
|
-
/* eslint-disable @angular-eslint/no-input-rename */
|
55
|
-
class RdxTooltipTriggerDirective {
|
56
|
-
constructor() {
|
57
|
-
/**
|
58
|
-
* Access the overlay trigger directive
|
59
|
-
*/
|
60
|
-
this.overlayTrigger = inject(RdxOverlayTriggerDirective);
|
61
|
-
/**
|
62
|
-
* Access the global tooltip configuration
|
63
|
-
*/
|
64
|
-
this.tooltipConfig = injectTooltipConfig();
|
65
|
-
/**
|
66
|
-
* Define if the trigger should be disabled.
|
67
|
-
* @default false
|
68
|
-
*/
|
69
|
-
this.disabled = false;
|
70
|
-
/**
|
71
|
-
* Define the placement of the tooltip relative to the trigger.
|
72
|
-
* @default 'bottom'
|
73
|
-
*/
|
74
|
-
this.placement = this.tooltipConfig.placement;
|
75
|
-
/**
|
76
|
-
* Define the offset of the tooltip relative to the trigger.
|
77
|
-
* @default 0
|
78
|
-
*/
|
79
|
-
this.offset = this.tooltipConfig.offset;
|
80
|
-
/**
|
81
|
-
* Define the delay before the tooltip is displayed.
|
82
|
-
* @default 0
|
83
|
-
*/
|
84
|
-
this.showDelay = this.tooltipConfig.showDelay;
|
85
|
-
/**
|
86
|
-
* Define the delay before the tooltip is hidden.
|
87
|
-
* @default 0
|
88
|
-
*/
|
89
|
-
this.hideDelay = this.tooltipConfig.hideDelay;
|
90
|
-
/**
|
91
|
-
* Define whether the tooltip should flip when there is not enough space for the tooltip.
|
92
|
-
* @default true
|
93
|
-
*/
|
94
|
-
this.flip = this.tooltipConfig.flip;
|
95
|
-
/**
|
96
|
-
* Define the container in to which the tooltip should be attached.
|
97
|
-
* @default document.body
|
98
|
-
*/
|
99
|
-
this.container = this.tooltipConfig.container;
|
100
|
-
}
|
101
|
-
ngOnInit() {
|
102
|
-
this.overlayTrigger.registerProvider({
|
103
|
-
provide: RdxTooltipTriggerToken,
|
104
|
-
useValue: this
|
105
|
-
});
|
106
|
-
}
|
107
|
-
/**
|
108
|
-
* Show the tooltip.
|
109
|
-
*/
|
110
|
-
show() {
|
111
|
-
this.overlayTrigger.show();
|
112
|
-
}
|
113
|
-
/**
|
114
|
-
* Hide the tooltip.
|
115
|
-
*/
|
116
|
-
hide() {
|
117
|
-
this.overlayTrigger.hide();
|
118
|
-
}
|
119
|
-
/**
|
120
|
-
* Define the tooltip id.
|
121
|
-
* @param id The tooltip id
|
122
|
-
* @internal
|
123
|
-
*/
|
124
|
-
setTooltipId(id) {
|
125
|
-
this.tooltipId = id;
|
126
|
-
}
|
127
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxTooltipTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
128
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxTooltipTriggerDirective, isStandalone: true, selector: "[rdxTooltipTrigger]", inputs: { templateRef: ["rdxTooltipTrigger", "templateRef"], disabled: ["rdxTooltipDisabled", "disabled", booleanAttribute], placement: ["rdxTooltipPlacement", "placement"], offset: ["rdxTooltipOffset", "offset", numberAttribute], showDelay: ["rdxTooltipShowDelay", "showDelay", numberAttribute], hideDelay: ["rdxTooltipHideDelay", "hideDelay", numberAttribute], flip: ["rdxTooltipFlip", "flip", booleanAttribute], container: ["rdxTooltipContainer", "container"] }, host: { listeners: { "mouseenter": "show()", "focus": "show()", "mouseleave": "hide()", "blur": "hide()", "window:keydown.escape": "hide()" }, properties: { "attr.aria-describedby": "tooltipId" } }, hostDirectives: [{ directive: i1.RdxOverlayTriggerDirective, inputs: ["rdxOverlayTrigger", "rdxTooltipTrigger", "rdxOverlayDisabled", "rdxTooltipDisabled", "rdxOverlayPlacement", "rdxTooltipPlacement", "rdxOverlayOffset", "rdxTooltipOffset", "rdxOverlayShowDelay", "rdxTooltipShowDelay", "rdxOverlayHideDelay", "rdxTooltipHideDelay", "rdxOverlayShift", "rdxTooltipShift", "rdxOverlayFlip", "rdxTooltipFlip", "rdxOverlayContainer", "rdxTooltipContainer"] }], ngImport: i0 }); }
|
129
|
-
}
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxTooltipTriggerDirective, decorators: [{
|
131
|
-
type: Directive,
|
132
|
-
args: [{
|
133
|
-
selector: '[rdxTooltipTrigger]',
|
134
|
-
standalone: true,
|
135
|
-
host: {
|
136
|
-
'[attr.aria-describedby]': 'tooltipId'
|
137
|
-
},
|
138
|
-
hostDirectives: [
|
139
|
-
{
|
140
|
-
directive: RdxOverlayTriggerDirective,
|
141
|
-
inputs: [
|
142
|
-
'rdxOverlayTrigger: rdxTooltipTrigger',
|
143
|
-
'rdxOverlayDisabled: rdxTooltipDisabled',
|
144
|
-
'rdxOverlayPlacement: rdxTooltipPlacement',
|
145
|
-
'rdxOverlayOffset: rdxTooltipOffset',
|
146
|
-
'rdxOverlayShowDelay: rdxTooltipShowDelay',
|
147
|
-
'rdxOverlayHideDelay: rdxTooltipHideDelay',
|
148
|
-
'rdxOverlayShift: rdxTooltipShift',
|
149
|
-
'rdxOverlayFlip: rdxTooltipFlip',
|
150
|
-
'rdxOverlayContainer: rdxTooltipContainer'
|
151
|
-
]
|
152
|
-
}
|
153
|
-
]
|
154
|
-
}]
|
155
|
-
}], propDecorators: { templateRef: [{
|
156
|
-
type: Input,
|
157
|
-
args: [{ alias: 'rdxTooltipTrigger', required: true }]
|
158
|
-
}], disabled: [{
|
159
|
-
type: Input,
|
160
|
-
args: [{ alias: 'rdxTooltipDisabled', transform: booleanAttribute }]
|
161
|
-
}], placement: [{
|
162
|
-
type: Input,
|
163
|
-
args: ['rdxTooltipPlacement']
|
164
|
-
}], offset: [{
|
165
|
-
type: Input,
|
166
|
-
args: [{ alias: 'rdxTooltipOffset', transform: numberAttribute }]
|
167
|
-
}], showDelay: [{
|
168
|
-
type: Input,
|
169
|
-
args: [{ alias: 'rdxTooltipShowDelay', transform: numberAttribute }]
|
170
|
-
}], hideDelay: [{
|
171
|
-
type: Input,
|
172
|
-
args: [{ alias: 'rdxTooltipHideDelay', transform: numberAttribute }]
|
173
|
-
}], flip: [{
|
174
|
-
type: Input,
|
175
|
-
args: [{ alias: 'rdxTooltipFlip', transform: booleanAttribute }]
|
176
|
-
}], container: [{
|
177
|
-
type: Input,
|
178
|
-
args: ['rdxTooltipContainer']
|
179
|
-
}], show: [{
|
180
|
-
type: HostListener,
|
181
|
-
args: ['mouseenter']
|
182
|
-
}, {
|
183
|
-
type: HostListener,
|
184
|
-
args: ['focus']
|
185
|
-
}], hide: [{
|
186
|
-
type: HostListener,
|
187
|
-
args: ['mouseleave']
|
188
|
-
}, {
|
189
|
-
type: HostListener,
|
190
|
-
args: ['blur']
|
191
|
-
}, {
|
192
|
-
type: HostListener,
|
193
|
-
args: ['window:keydown.escape']
|
194
|
-
}] } });
|
195
|
-
|
196
|
-
/**
|
197
|
-
* A unique identifier for the tooltip
|
198
|
-
*/
|
199
|
-
let uniqueId = 0;
|
200
|
-
class RdxTooltipDirective {
|
201
|
-
constructor() {
|
202
|
-
/**
|
203
|
-
* Access the tooltip trigger
|
204
|
-
*/
|
205
|
-
this.trigger = injectTooltipTrigger();
|
206
|
-
/**
|
207
|
-
* Define the tooltip id
|
208
|
-
*/
|
209
|
-
this.id = `rdx-tooltip-${uniqueId++}`;
|
210
|
-
}
|
211
|
-
ngOnInit() {
|
212
|
-
this.trigger.setTooltipId(this.id);
|
213
|
-
}
|
214
|
-
ngOnChanges(changes) {
|
215
|
-
if ('id' in changes) {
|
216
|
-
this.trigger.setTooltipId(this.id);
|
217
|
-
}
|
218
|
-
}
|
219
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
220
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxTooltipDirective, isStandalone: true, selector: "[rdxTooltip]", inputs: { id: "id" }, host: { attributes: { "role": "tooltip" } }, exportAs: ["rdxTooltip"], usesOnChanges: true, hostDirectives: [{ directive: i1.RdxOverlayDirective }], ngImport: i0 }); }
|
221
|
-
}
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxTooltipDirective, decorators: [{
|
223
|
-
type: Directive,
|
224
|
-
args: [{
|
225
|
-
selector: '[rdxTooltip]',
|
226
|
-
standalone: true,
|
227
|
-
exportAs: 'rdxTooltip',
|
228
|
-
hostDirectives: [RdxOverlayDirective],
|
229
|
-
host: {
|
230
|
-
role: 'tooltip'
|
231
|
-
}
|
232
|
-
}]
|
233
|
-
}], propDecorators: { id: [{
|
234
|
-
type: Input
|
235
|
-
}] } });
|
236
|
-
|
237
|
-
/**
|
238
|
-
* Generated bundle index. Do not edit.
|
239
|
-
*/
|
240
|
-
|
241
|
-
export { RdxTooltipArrowDirective, RdxTooltipDirective, RdxTooltipTriggerDirective, TooltipConfigToken, injectTooltipConfig, provideTooltipConfig };
|
242
|
-
//# sourceMappingURL=radix-ng-primitives-tooltip.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-tooltip.mjs","sources":["../../../packages/primitives/tooltip/src/tooltip-arrow.directive.ts","../../../packages/primitives/tooltip/src/tooltip-trigger.token.ts","../../../packages/primitives/tooltip/src/tooltip.config.ts","../../../packages/primitives/tooltip/src/tooltip-trigger.directive.ts","../../../packages/primitives/tooltip/src/tooltip.directive.ts","../../../packages/primitives/tooltip/radix-ng-primitives-tooltip.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\nimport { RdxOverlayArrowDirective } from '@radix-ng/primitives/overlay';\n\n@Directive({\n selector: '[rdxTooltipArrow]',\n standalone: true,\n hostDirectives: [RdxOverlayArrowDirective]\n})\nexport class RdxTooltipArrowDirective {}\n","import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxTooltipTriggerDirective } from './tooltip-trigger.directive';\n\nexport const RdxTooltipTriggerToken = new InjectionToken<RdxTooltipTriggerDirective>(\n 'RdxTooltipTriggerToken'\n);\n\nexport function injectTooltipTrigger(): RdxTooltipTriggerDirective {\n return inject(RdxTooltipTriggerToken);\n}\n","import { inject, InjectionToken, Provider } from '@angular/core';\n\nimport { Placement } from '@floating-ui/dom';\n\nexport const TooltipConfigToken = new InjectionToken<RdxTooltipConfig>('TooltipConfig');\n\nexport interface RdxTooltipConfig {\n /**\n * Define the offset of the tooltip relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n placement: Placement;\n\n /**\n * Define the delay before the tooltip is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the tooltip should be attached.\n * @default document.body\n */\n container: HTMLElement;\n}\n\nconst defaultTooltipConfig: RdxTooltipConfig = {\n offset: 4,\n placement: 'top',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: document.body\n};\n\n/**\n * Provide the default Tooltip configuration\n * @param config The Tooltip configuration\n * @returns The provider\n */\nexport function provideTooltipConfig(config: Partial<RdxTooltipConfig>): Provider[] {\n return [\n {\n provide: TooltipConfigToken,\n useValue: { ...defaultTooltipConfig, ...config }\n }\n ];\n}\n\n/**\n * Inject the Tooltip configuration\n * @returns The global Tooltip configuration\n */\nexport function injectTooltipConfig(): RdxTooltipConfig {\n return inject(TooltipConfigToken, { optional: true }) ?? defaultTooltipConfig;\n}\n","/* eslint-disable @angular-eslint/no-input-rename */\nimport {\n booleanAttribute,\n Directive,\n HostListener,\n inject,\n Input,\n numberAttribute,\n OnInit,\n TemplateRef\n} from '@angular/core';\n\nimport { Placement } from '@floating-ui/dom';\nimport { RdxOverlayTriggerDirective } from '@radix-ng/primitives/overlay';\n\nimport { RdxTooltipTriggerToken } from './tooltip-trigger.token';\nimport { injectTooltipConfig } from './tooltip.config';\n\n@Directive({\n selector: '[rdxTooltipTrigger]',\n standalone: true,\n host: {\n '[attr.aria-describedby]': 'tooltipId'\n },\n hostDirectives: [\n {\n directive: RdxOverlayTriggerDirective,\n inputs: [\n 'rdxOverlayTrigger: rdxTooltipTrigger',\n 'rdxOverlayDisabled: rdxTooltipDisabled',\n 'rdxOverlayPlacement: rdxTooltipPlacement',\n 'rdxOverlayOffset: rdxTooltipOffset',\n 'rdxOverlayShowDelay: rdxTooltipShowDelay',\n 'rdxOverlayHideDelay: rdxTooltipHideDelay',\n 'rdxOverlayShift: rdxTooltipShift',\n 'rdxOverlayFlip: rdxTooltipFlip',\n 'rdxOverlayContainer: rdxTooltipContainer'\n ]\n }\n ]\n})\nexport class RdxTooltipTriggerDirective implements OnInit {\n /**\n * Access the overlay trigger directive\n */\n private readonly overlayTrigger = inject(RdxOverlayTriggerDirective);\n\n /**\n * Access the global tooltip configuration\n */\n private readonly tooltipConfig = injectTooltipConfig();\n\n /**\n * Define the tooltip to display when the trigger is activated.\n */\n @Input({ alias: 'rdxTooltipTrigger', required: true }) templateRef!: TemplateRef<void>;\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n @Input({ alias: 'rdxTooltipDisabled', transform: booleanAttribute }) disabled = false;\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'bottom'\n */\n @Input('rdxTooltipPlacement') placement: Placement = this.tooltipConfig.placement;\n\n /**\n * Define the offset of the tooltip relative to the trigger.\n * @default 0\n */\n @Input({ alias: 'rdxTooltipOffset', transform: numberAttribute }) offset: number =\n this.tooltipConfig.offset;\n\n /**\n * Define the delay before the tooltip is displayed.\n * @default 0\n */\n @Input({ alias: 'rdxTooltipShowDelay', transform: numberAttribute }) showDelay: number =\n this.tooltipConfig.showDelay;\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n @Input({ alias: 'rdxTooltipHideDelay', transform: numberAttribute }) hideDelay: number =\n this.tooltipConfig.hideDelay;\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n @Input({ alias: 'rdxTooltipFlip', transform: booleanAttribute }) flip: boolean =\n this.tooltipConfig.flip;\n\n /**\n * Define the container in to which the tooltip should be attached.\n * @default document.body\n */\n @Input('rdxTooltipContainer') container: HTMLElement = this.tooltipConfig.container;\n\n /**\n * The tooltip id.\n */\n protected tooltipId?: string;\n\n ngOnInit(): void {\n this.overlayTrigger.registerProvider({\n provide: RdxTooltipTriggerToken,\n useValue: this\n });\n }\n\n /**\n * Show the tooltip.\n */\n @HostListener('mouseenter')\n @HostListener('focus')\n show(): void {\n this.overlayTrigger.show();\n }\n\n /**\n * Hide the tooltip.\n */\n @HostListener('mouseleave')\n @HostListener('blur')\n @HostListener('window:keydown.escape')\n hide(): void {\n this.overlayTrigger.hide();\n }\n\n /**\n * Define the tooltip id.\n * @param id The tooltip id\n * @internal\n */\n setTooltipId(id: string) {\n this.tooltipId = id;\n }\n}\n","import { Directive, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\n\nimport { RdxOverlayDirective } from '@radix-ng/primitives/overlay';\n\nimport { injectTooltipTrigger } from './tooltip-trigger.token';\n\n/**\n * A unique identifier for the tooltip\n */\nlet uniqueId = 0;\n\n@Directive({\n selector: '[rdxTooltip]',\n standalone: true,\n exportAs: 'rdxTooltip',\n hostDirectives: [RdxOverlayDirective],\n host: {\n role: 'tooltip'\n }\n})\nexport class RdxTooltipDirective implements OnInit, OnChanges {\n /**\n * Access the tooltip trigger\n */\n private readonly trigger = injectTooltipTrigger();\n\n /**\n * Define the tooltip id\n */\n @Input() id = `rdx-tooltip-${uniqueId++}`;\n\n ngOnInit(): void {\n this.trigger.setTooltipId(this.id);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('id' in changes) {\n this.trigger.setTooltipId(this.id);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MASa,wBAAwB,CAAA;8GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,wBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;oBAChB,cAAc,EAAE,CAAC,wBAAwB,CAAC;AAC7C,iBAAA,CAAA;;;ACJM,MAAM,sBAAsB,GAAG,IAAI,cAAc,CACpD,wBAAwB,CAC3B,CAAC;SAEc,oBAAoB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAC1C;;MCNa,kBAAkB,GAAG,IAAI,cAAc,CAAmB,eAAe,EAAE;AAwCxF,MAAM,oBAAoB,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ix-ng/primitives/tooltip
|
package/tooltip/index.d.ts
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
import * as i0 from "@angular/core";
|
2
|
-
import * as i1 from "@radix-ng/primitives/overlay";
|
3
|
-
export declare class RdxTooltipArrowDirective {
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdxTooltipArrowDirective, never>;
|
5
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTooltipArrowDirective, "[rdxTooltipArrow]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxOverlayArrowDirective; inputs: {}; outputs: {}; }]>;
|
6
|
-
}
|
@@ -1,79 +0,0 @@
|
|
1
|
-
import { OnInit, TemplateRef } from '@angular/core';
|
2
|
-
import { Placement } from '@floating-ui/dom';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
import * as i1 from "@radix-ng/primitives/overlay";
|
5
|
-
export declare class RdxTooltipTriggerDirective implements OnInit {
|
6
|
-
/**
|
7
|
-
* Access the overlay trigger directive
|
8
|
-
*/
|
9
|
-
private readonly overlayTrigger;
|
10
|
-
/**
|
11
|
-
* Access the global tooltip configuration
|
12
|
-
*/
|
13
|
-
private readonly tooltipConfig;
|
14
|
-
/**
|
15
|
-
* Define the tooltip to display when the trigger is activated.
|
16
|
-
*/
|
17
|
-
templateRef: TemplateRef<void>;
|
18
|
-
/**
|
19
|
-
* Define if the trigger should be disabled.
|
20
|
-
* @default false
|
21
|
-
*/
|
22
|
-
disabled: boolean;
|
23
|
-
/**
|
24
|
-
* Define the placement of the tooltip relative to the trigger.
|
25
|
-
* @default 'bottom'
|
26
|
-
*/
|
27
|
-
placement: Placement;
|
28
|
-
/**
|
29
|
-
* Define the offset of the tooltip relative to the trigger.
|
30
|
-
* @default 0
|
31
|
-
*/
|
32
|
-
offset: number;
|
33
|
-
/**
|
34
|
-
* Define the delay before the tooltip is displayed.
|
35
|
-
* @default 0
|
36
|
-
*/
|
37
|
-
showDelay: number;
|
38
|
-
/**
|
39
|
-
* Define the delay before the tooltip is hidden.
|
40
|
-
* @default 0
|
41
|
-
*/
|
42
|
-
hideDelay: number;
|
43
|
-
/**
|
44
|
-
* Define whether the tooltip should flip when there is not enough space for the tooltip.
|
45
|
-
* @default true
|
46
|
-
*/
|
47
|
-
flip: boolean;
|
48
|
-
/**
|
49
|
-
* Define the container in to which the tooltip should be attached.
|
50
|
-
* @default document.body
|
51
|
-
*/
|
52
|
-
container: HTMLElement;
|
53
|
-
/**
|
54
|
-
* The tooltip id.
|
55
|
-
*/
|
56
|
-
protected tooltipId?: string;
|
57
|
-
ngOnInit(): void;
|
58
|
-
/**
|
59
|
-
* Show the tooltip.
|
60
|
-
*/
|
61
|
-
show(): void;
|
62
|
-
/**
|
63
|
-
* Hide the tooltip.
|
64
|
-
*/
|
65
|
-
hide(): void;
|
66
|
-
/**
|
67
|
-
* Define the tooltip id.
|
68
|
-
* @param id The tooltip id
|
69
|
-
* @internal
|
70
|
-
*/
|
71
|
-
setTooltipId(id: string): void;
|
72
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdxTooltipTriggerDirective, never>;
|
73
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTooltipTriggerDirective, "[rdxTooltipTrigger]", never, { "templateRef": { "alias": "rdxTooltipTrigger"; "required": true; }; "disabled": { "alias": "rdxTooltipDisabled"; "required": false; }; "placement": { "alias": "rdxTooltipPlacement"; "required": false; }; "offset": { "alias": "rdxTooltipOffset"; "required": false; }; "showDelay": { "alias": "rdxTooltipShowDelay"; "required": false; }; "hideDelay": { "alias": "rdxTooltipHideDelay"; "required": false; }; "flip": { "alias": "rdxTooltipFlip"; "required": false; }; "container": { "alias": "rdxTooltipContainer"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.RdxOverlayTriggerDirective; inputs: { "rdxOverlayTrigger": "rdxTooltipTrigger"; "rdxOverlayDisabled": "rdxTooltipDisabled"; "rdxOverlayPlacement": "rdxTooltipPlacement"; "rdxOverlayOffset": "rdxTooltipOffset"; "rdxOverlayShowDelay": "rdxTooltipShowDelay"; "rdxOverlayHideDelay": "rdxTooltipHideDelay"; "rdxOverlayShift": "rdxTooltipShift"; "rdxOverlayFlip": "rdxTooltipFlip"; "rdxOverlayContainer": "rdxTooltipContainer"; }; outputs: {}; }]>;
|
74
|
-
static ngAcceptInputType_disabled: unknown;
|
75
|
-
static ngAcceptInputType_offset: unknown;
|
76
|
-
static ngAcceptInputType_showDelay: unknown;
|
77
|
-
static ngAcceptInputType_hideDelay: unknown;
|
78
|
-
static ngAcceptInputType_flip: unknown;
|
79
|
-
}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
2
|
-
import type { RdxTooltipTriggerDirective } from './tooltip-trigger.directive';
|
3
|
-
export declare const RdxTooltipTriggerToken: InjectionToken<RdxTooltipTriggerDirective>;
|
4
|
-
export declare function injectTooltipTrigger(): RdxTooltipTriggerDirective;
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { InjectionToken, Provider } from '@angular/core';
|
2
|
-
import { Placement } from '@floating-ui/dom';
|
3
|
-
export declare const TooltipConfigToken: InjectionToken<RdxTooltipConfig>;
|
4
|
-
export interface RdxTooltipConfig {
|
5
|
-
/**
|
6
|
-
* Define the offset of the tooltip relative to the trigger.
|
7
|
-
* @default 4
|
8
|
-
*/
|
9
|
-
offset: number;
|
10
|
-
/**
|
11
|
-
* Define the placement of the tooltip relative to the trigger.
|
12
|
-
* @default 'top'
|
13
|
-
*/
|
14
|
-
placement: Placement;
|
15
|
-
/**
|
16
|
-
* Define the delay before the tooltip is shown.
|
17
|
-
* @default 0
|
18
|
-
*/
|
19
|
-
showDelay: number;
|
20
|
-
/**
|
21
|
-
* Define the delay before the tooltip is hidden.
|
22
|
-
* @default 0
|
23
|
-
*/
|
24
|
-
hideDelay: number;
|
25
|
-
/**
|
26
|
-
* Define whether the tooltip should flip when there is not enough space for the tooltip.
|
27
|
-
* @default true
|
28
|
-
*/
|
29
|
-
flip: boolean;
|
30
|
-
/**
|
31
|
-
* Define the container in to which the tooltip should be attached.
|
32
|
-
* @default document.body
|
33
|
-
*/
|
34
|
-
container: HTMLElement;
|
35
|
-
}
|
36
|
-
/**
|
37
|
-
* Provide the default Tooltip configuration
|
38
|
-
* @param config The Tooltip configuration
|
39
|
-
* @returns The provider
|
40
|
-
*/
|
41
|
-
export declare function provideTooltipConfig(config: Partial<RdxTooltipConfig>): Provider[];
|
42
|
-
/**
|
43
|
-
* Inject the Tooltip configuration
|
44
|
-
* @returns The global Tooltip configuration
|
45
|
-
*/
|
46
|
-
export declare function injectTooltipConfig(): RdxTooltipConfig;
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
import * as i1 from "@radix-ng/primitives/overlay";
|
4
|
-
export declare class RdxTooltipDirective implements OnInit, OnChanges {
|
5
|
-
/**
|
6
|
-
* Access the tooltip trigger
|
7
|
-
*/
|
8
|
-
private readonly trigger;
|
9
|
-
/**
|
10
|
-
* Define the tooltip id
|
11
|
-
*/
|
12
|
-
id: string;
|
13
|
-
ngOnInit(): void;
|
14
|
-
ngOnChanges(changes: SimpleChanges): void;
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdxTooltipDirective, never>;
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTooltipDirective, "[rdxTooltip]", ["rdxTooltip"], { "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.RdxOverlayDirective; inputs: {}; outputs: {}; }]>;
|
17
|
-
}
|