@exhaustive-ui/mcp 0.0.0-stage → 3.0.0-alpha.1
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/LICENSE +23 -0
- package/README.md +167 -2
- package/data/components/accordion.md +421 -0
- package/data/components/animateonscroll.md +163 -0
- package/data/components/autocomplete.md +1077 -0
- package/data/components/autofocus.md +38 -0
- package/data/components/avatar.md +417 -0
- package/data/components/badge.md +234 -0
- package/data/components/blockui.md +108 -0
- package/data/components/breadcrumb.md +178 -0
- package/data/components/button.md +774 -0
- package/data/components/card.md +138 -0
- package/data/components/carousel.md +440 -0
- package/data/components/cascadeselect.md +1387 -0
- package/data/components/chart.md +1178 -0
- package/data/components/checkbox.md +529 -0
- package/data/components/chip.md +180 -0
- package/data/components/colorpicker.md +301 -0
- package/data/components/confirmdialog.md +287 -0
- package/data/components/confirmpopup.md +417 -0
- package/data/components/contextmenu.md +491 -0
- package/data/components/dataview.md +600 -0
- package/data/components/datepicker.md +1262 -0
- package/data/components/dialog.md +622 -0
- package/data/components/divider.md +250 -0
- package/data/components/dock.md +500 -0
- package/data/components/dragdrop.md +285 -0
- package/data/components/drawer.md +510 -0
- package/data/components/dynamicdialog.md +109 -0
- package/data/components/editor.md +291 -0
- package/data/components/fieldset.md +182 -0
- package/data/components/fileupload.md +430 -0
- package/data/components/floatlabel.md +155 -0
- package/data/components/fluid.md +72 -0
- package/data/components/focustrap.md +65 -0
- package/data/components/galleria.md +627 -0
- package/data/components/iconfield.md +246 -0
- package/data/components/iftalabel.md +105 -0
- package/data/components/imagecompare.md +97 -0
- package/data/components/inplace.md +233 -0
- package/data/components/inputgroup.md +306 -0
- package/data/components/inputmask.md +518 -0
- package/data/components/inputnumber.md +675 -0
- package/data/components/inputotp.md +336 -0
- package/data/components/inputtext.md +488 -0
- package/data/components/keyfilter.md +85 -0
- package/data/components/knob.md +462 -0
- package/data/components/listbox.md +798 -0
- package/data/components/llms.md +28 -0
- package/data/components/megamenu.md +587 -0
- package/data/components/menu.md +483 -0
- package/data/components/menubar.md +462 -0
- package/data/components/message.md +449 -0
- package/data/components/metergroup.md +241 -0
- package/data/components/multiselect.md +1047 -0
- package/data/components/orderlist.md +342 -0
- package/data/components/organizationchart.md +197 -0
- package/data/components/overlay.md +217 -0
- package/data/components/paginator.md +314 -0
- package/data/components/panel.md +214 -0
- package/data/components/panelmenu.md +699 -0
- package/data/components/password.md +570 -0
- package/data/components/picklist.md +420 -0
- package/data/components/popover.md +378 -0
- package/data/components/progressbar.md +181 -0
- package/data/components/progressspinner.md +91 -0
- package/data/components/radiobutton.md +377 -0
- package/data/components/rating.md +312 -0
- package/data/components/ripple.md +89 -0
- package/data/components/scroller.md +122 -0
- package/data/components/scrollpanel.md +149 -0
- package/data/components/scrolltop.md +105 -0
- package/data/components/select.md +1206 -0
- package/data/components/selectbutton.md +356 -0
- package/data/components/skeleton.md +242 -0
- package/data/components/slider.md +337 -0
- package/data/components/speeddial.md +589 -0
- package/data/components/splitbutton.md +945 -0
- package/data/components/splitter.md +196 -0
- package/data/components/stepper.md +411 -0
- package/data/components/styleclass.md +126 -0
- package/data/components/table.md +4557 -0
- package/data/components/tabs.md +467 -0
- package/data/components/tag.md +200 -0
- package/data/components/terminal.md +118 -0
- package/data/components/textarea.md +416 -0
- package/data/components/tieredmenu.md +578 -0
- package/data/components/timeline.md +310 -0
- package/data/components/toast.md +596 -0
- package/data/components/togglebutton.md +356 -0
- package/data/components/toggleswitch.md +285 -0
- package/data/components/toolbar.md +182 -0
- package/data/components/tooltip.md +211 -0
- package/data/components/tree.md +746 -0
- package/data/components/treeselect.md +912 -0
- package/data/components/treetable.md +2814 -0
- package/data/components.json +43751 -0
- package/data/llms-full.txt +47433 -0
- package/data/llms.txt +121 -0
- package/data/manifest.json +46513 -0
- package/data/pages/accessibility.md +28 -0
- package/data/pages/animations.md +28 -0
- package/data/pages/configuration.md +210 -0
- package/data/pages/contribution.md +20 -0
- package/data/pages/customicons.md +20 -0
- package/data/pages/faq.md +20 -0
- package/data/pages/icons.md +66 -0
- package/data/pages/installation.md +71 -0
- package/data/pages/llms.md +61 -0
- package/data/pages/passthrough.md +32 -0
- package/data/pages/philosophy.md +28 -0
- package/data/pages/primeflex.md +20 -0
- package/data/pages/rtl.md +12 -0
- package/data/pages/styled.md +132 -0
- package/data/pages/tailwind.md +40 -0
- package/data/pages/unstyled.md +39 -0
- package/data/snapshot.json +9 -0
- package/dist/index.d.mts +448 -0
- package/dist/index.mjs +2501 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -3
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Angular Toolbar Component
|
|
2
|
+
|
|
3
|
+
Toolbar is a grouping component for buttons and other content.
|
|
4
|
+
|
|
5
|
+
## Accessibility
|
|
6
|
+
|
|
7
|
+
Screen Reader Toolbar uses toolbar role for the root element, aria-orientation is not included as it defaults to horizontal . Any valid attribute is passed to the root element so you may add additional properties like aria-labelledby and aria-labelled to define the element if required. Keyboard Support Component does not include any interactive elements. Arbitrary content can be placed with templating and elements like buttons inside should follow the page tab sequence.
|
|
8
|
+
|
|
9
|
+
## Basic
|
|
10
|
+
|
|
11
|
+
Toolbar is a grouping component for buttons and other content. Its content can be placed inside the start , center and end sections.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Component, OnInit } from '@angular/core';
|
|
15
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
16
|
+
import { IconFieldModule } from '@exhaustive-ui/core/iconfield';
|
|
17
|
+
import { InputIconModule } from '@exhaustive-ui/core/inputicon';
|
|
18
|
+
import { SplitButtonModule } from '@exhaustive-ui/core/splitbutton';
|
|
19
|
+
import { ToolbarModule } from '@exhaustive-ui/core/toolbar';
|
|
20
|
+
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
21
|
+
import { MenuItem } from '@exhaustive-ui/core/api';
|
|
22
|
+
|
|
23
|
+
@Component({
|
|
24
|
+
template: `
|
|
25
|
+
<div class="card">
|
|
26
|
+
<p-toolbar>
|
|
27
|
+
<ng-template #start>
|
|
28
|
+
<p-button icon="pi pi-plus" class="mr-2" text severity="secondary" />
|
|
29
|
+
<p-button icon="pi pi-print" class="mr-2" text severity="secondary" />
|
|
30
|
+
<p-button icon="pi pi-upload" text severity="secondary" />
|
|
31
|
+
</ng-template>
|
|
32
|
+
<ng-template #center>
|
|
33
|
+
<p-iconfield iconPosition="left">
|
|
34
|
+
<p-inputicon class="pi pi-search" />
|
|
35
|
+
<input type="text" pInputText placeholder="Search" />
|
|
36
|
+
</p-iconfield>
|
|
37
|
+
</ng-template>
|
|
38
|
+
<ng-template #end>
|
|
39
|
+
<p-splitbutton label="Save" [model]="items" />
|
|
40
|
+
</ng-template>
|
|
41
|
+
</p-toolbar>
|
|
42
|
+
</div>
|
|
43
|
+
`,
|
|
44
|
+
standalone: true,
|
|
45
|
+
imports: [ButtonModule, IconFieldModule, InputIconModule, SplitButtonModule, ToolbarModule, InputTextModule]
|
|
46
|
+
})
|
|
47
|
+
export class ToolbarBasicDemo implements OnInit {
|
|
48
|
+
items: MenuItem[] | undefined;
|
|
49
|
+
|
|
50
|
+
ngOnInit() {
|
|
51
|
+
this.items = [
|
|
52
|
+
{
|
|
53
|
+
label: 'Update',
|
|
54
|
+
icon: 'pi pi-refresh'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: 'Delete',
|
|
58
|
+
icon: 'pi pi-times'
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Custom
|
|
66
|
+
|
|
67
|
+
Content can also be placed using the start , center and end templates.
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
import { Component } from '@angular/core';
|
|
71
|
+
import { AvatarModule } from '@exhaustive-ui/core/avatar';
|
|
72
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
73
|
+
import { ToolbarModule } from '@exhaustive-ui/core/toolbar';
|
|
74
|
+
|
|
75
|
+
@Component({
|
|
76
|
+
template: `
|
|
77
|
+
<div class="card">
|
|
78
|
+
<p-toolbar [style]="{ 'border-radius': '3rem', padding: '1rem 1rem 1rem 1.5rem' }">
|
|
79
|
+
<ng-template #start>
|
|
80
|
+
<div class="flex items-center gap-2">
|
|
81
|
+
<svg width="31" height="33" viewBox="0 0 31 33" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 2rem; margin-right: 1rem">
|
|
82
|
+
<path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--p-primary-color)" />
|
|
83
|
+
<mask id="mask0_1_52" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="31" height="33">
|
|
84
|
+
<path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--ground-background)" />
|
|
85
|
+
</mask>
|
|
86
|
+
<g mask="url(#mask0_1_52)">
|
|
87
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.1935 0V3.5994V3.58318V20.0075V20.0075V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1935 0Z" fill="var(--p-primary-color)" />
|
|
88
|
+
</g>
|
|
89
|
+
<path d="M19.6399 15.3776L18.1861 15.0547L19.3169 16.6695V21.6755L23.1938 18.4458V12.9554L21.4169 13.6013L19.6399 15.3776Z" fill="var(--ground-background)" />
|
|
90
|
+
<path d="M10.5936 15.3776L12.0474 15.0547L10.9166 16.6695V21.6755L7.03966 18.4458V12.9554L8.81661 13.6013L10.5936 15.3776Z" fill="var(--ground-background)" />
|
|
91
|
+
<path
|
|
92
|
+
fill-rule="evenodd"
|
|
93
|
+
clip-rule="evenodd"
|
|
94
|
+
d="M11.3853 16.9726L12.6739 15.0309L13.4793 15.5163H16.7008L17.5061 15.0309L18.7947 16.9726V24.254L17.8283 25.7103L16.7008 26.843H13.4793L12.3518 25.7103L11.3853 24.254V16.9726Z"
|
|
95
|
+
fill="var(--ground-background)"
|
|
96
|
+
/>
|
|
97
|
+
<path d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z" fill="var(--ground-background)" />
|
|
98
|
+
<path d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z" fill="var(--ground-background)" />
|
|
99
|
+
<path
|
|
100
|
+
fill-rule="evenodd"
|
|
101
|
+
clip-rule="evenodd"
|
|
102
|
+
d="M13.0167 5.68861L11.7244 8.7568L13.8244 14.8932H14.7936V5.68861H13.0167ZM15.4397 5.68861V14.8932H16.5706L18.5091 8.7568L17.2167 5.68861H15.4397Z"
|
|
103
|
+
fill="var(--ground-background)"
|
|
104
|
+
/>
|
|
105
|
+
<path d="M13.8244 14.8932L6.87813 12.3094L5.90888 8.27235L11.8859 8.7568L13.9859 14.8932H13.8244Z" fill="var(--ground-background)" />
|
|
106
|
+
<path d="M16.5706 14.8932L23.5169 12.3094L24.4861 8.27235L18.3476 8.7568L16.4091 14.8932H16.5706Z" fill="var(--ground-background)" />
|
|
107
|
+
<path d="M18.8321 8.27235L22.2245 7.94938L19.9629 5.68861H17.7013L18.8321 8.27235Z" fill="var(--ground-background)" />
|
|
108
|
+
<path d="M11.4013 8.27235L8.00893 7.94938L10.2705 5.68861H12.5321L11.4013 8.27235Z" fill="var(--ground-background)" />
|
|
109
|
+
</svg>
|
|
110
|
+
<p-button label="Files" text plain />
|
|
111
|
+
<p-button label="Edit" text plain />
|
|
112
|
+
<p-button label="View" text plain />
|
|
113
|
+
</div>
|
|
114
|
+
</ng-template>
|
|
115
|
+
<ng-template #end>
|
|
116
|
+
<div class="flex items-center gap-2">
|
|
117
|
+
<p-button label="Share" severity="contrast" size="small" />
|
|
118
|
+
<p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/amyelsner.png" [style]="{ width: '32px', height: '32px' }" />
|
|
119
|
+
</div>
|
|
120
|
+
</ng-template>
|
|
121
|
+
</p-toolbar>
|
|
122
|
+
</div>
|
|
123
|
+
`,
|
|
124
|
+
standalone: true,
|
|
125
|
+
imports: [AvatarModule, ButtonModule, ToolbarModule]
|
|
126
|
+
})
|
|
127
|
+
export class ToolbarCustomDemo {}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Toolbar
|
|
131
|
+
|
|
132
|
+
Toolbar is a grouping component for buttons and other content.
|
|
133
|
+
|
|
134
|
+
### Props
|
|
135
|
+
|
|
136
|
+
| Name | Type | Default | Description |
|
|
137
|
+
|------|------|---------|-------------|
|
|
138
|
+
| dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
|
|
139
|
+
| unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
|
|
140
|
+
| pt | InputSignal<ToolbarPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
141
|
+
| ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
|
|
142
|
+
| ariaLabelledBy | InputSignal<string> | ... | Defines a string value that labels an interactive element. |
|
|
143
|
+
|
|
144
|
+
### Templates
|
|
145
|
+
|
|
146
|
+
| Name | Type | Description |
|
|
147
|
+
|------|------|-------------|
|
|
148
|
+
| start | TemplateRef<void> | Custom start template. |
|
|
149
|
+
| end | TemplateRef<void> | Custom end template. |
|
|
150
|
+
| center | TemplateRef<void> | Custom center template. |
|
|
151
|
+
|
|
152
|
+
## Pass Through Options
|
|
153
|
+
|
|
154
|
+
| Name | Type | Description |
|
|
155
|
+
|------|------|-------------|
|
|
156
|
+
| root | PassThroughOption<HTMLElement, I> | Used to pass attributes to the root's DOM element. |
|
|
157
|
+
| start | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the start's DOM element. |
|
|
158
|
+
| center | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the center's DOM element. |
|
|
159
|
+
| end | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the right's DOM element. |
|
|
160
|
+
|
|
161
|
+
## Theming
|
|
162
|
+
|
|
163
|
+
### CSS Classes
|
|
164
|
+
|
|
165
|
+
| Class | Description |
|
|
166
|
+
|-------|-------------|
|
|
167
|
+
| p-toolbar | Class name of the root element |
|
|
168
|
+
| p-toolbar-start | Class name of the start element |
|
|
169
|
+
| p-toolbar-center | Class name of the center element |
|
|
170
|
+
| p-toolbar-end | Class name of the end element |
|
|
171
|
+
|
|
172
|
+
### Design Tokens
|
|
173
|
+
|
|
174
|
+
| Token | CSS Variable | Description |
|
|
175
|
+
|-------|--------------|-------------|
|
|
176
|
+
| toolbar.background | --p-toolbar-background | Background of root |
|
|
177
|
+
| toolbar.border.color | --p-toolbar-border-color | Border color of root |
|
|
178
|
+
| toolbar.border.radius | --p-toolbar-border-radius | Border radius of root |
|
|
179
|
+
| toolbar.color | --p-toolbar-color | Color of root |
|
|
180
|
+
| toolbar.gap | --p-toolbar-gap | Gap of root |
|
|
181
|
+
| toolbar.padding | --p-toolbar-padding | Padding of root |
|
|
182
|
+
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Angular Tooltip Component
|
|
2
|
+
|
|
3
|
+
Tooltip directive provides advisory information for a component. Tooltip is integrated within various ExhaustiveUI components.
|
|
4
|
+
|
|
5
|
+
## Accessibility
|
|
6
|
+
|
|
7
|
+
Screen Reader Tooltip component uses tooltip role and when it becomes visible the generated id of the tooltip is defined as the aria-describedby of the target. Keyboard Support Key Function escape Closes the tooltip when focus is on the target.
|
|
8
|
+
|
|
9
|
+
## Auto Hide
|
|
10
|
+
|
|
11
|
+
Tooltip is hidden when mouse leaves the target element, in cases where tooltip needs to be interacted with, set autoHide to false to change the default behavior.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Component } from '@angular/core';
|
|
15
|
+
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
16
|
+
import { TooltipModule } from '@exhaustive-ui/core/tooltip';
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
template: `
|
|
20
|
+
<div class="card flex flex-wrap justify-center gap-2">
|
|
21
|
+
<input type="text" pInputText pTooltip="Enter your username" [autoHide]="false" placeholder="autoHide: false" />
|
|
22
|
+
<input type="text" pInputText pTooltip="Enter your username" placeholder="autoHide: true" />
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
standalone: true,
|
|
26
|
+
imports: [InputTextModule, TooltipModule]
|
|
27
|
+
})
|
|
28
|
+
export class TooltipAutohideDemo {}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Custom
|
|
32
|
+
|
|
33
|
+
Tooltip can use either a string or a TemplateRef .
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { Component } from '@angular/core';
|
|
37
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
38
|
+
import { TooltipModule } from '@exhaustive-ui/core/tooltip';
|
|
39
|
+
|
|
40
|
+
@Component({
|
|
41
|
+
template: `
|
|
42
|
+
<div class="card flex justify-center">
|
|
43
|
+
<p-button [pTooltip]="tooltipContent" severity="secondary" tooltipPosition="bottom" label="Button" />
|
|
44
|
+
<ng-template #tooltipContent>
|
|
45
|
+
<div class="flex items-center">
|
|
46
|
+
<img src="https://exhaustive-ui.e-xiste.com/logo-icon.svg" alt="ExhaustiveUI" width="32" height="32" class="mr-2" />
|
|
47
|
+
<span> <b>ExhaustiveUI</b> rocks! </span>
|
|
48
|
+
</div>
|
|
49
|
+
</ng-template>
|
|
50
|
+
</div>
|
|
51
|
+
`,
|
|
52
|
+
standalone: true,
|
|
53
|
+
imports: [ButtonModule, TooltipModule]
|
|
54
|
+
})
|
|
55
|
+
export class TooltipCustomDemo {}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Delay
|
|
59
|
+
|
|
60
|
+
Adding delays to the show and hide events are defined with showDelay and hideDelay options respectively.
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { Component } from '@angular/core';
|
|
64
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
65
|
+
import { TooltipModule } from '@exhaustive-ui/core/tooltip';
|
|
66
|
+
|
|
67
|
+
@Component({
|
|
68
|
+
template: `
|
|
69
|
+
<div class="card flex justify-center">
|
|
70
|
+
<p-button pTooltip="Confirm to proceed" showDelay="1000" hideDelay="300" label="Save" />
|
|
71
|
+
</div>
|
|
72
|
+
`,
|
|
73
|
+
standalone: true,
|
|
74
|
+
imports: [ButtonModule, TooltipModule]
|
|
75
|
+
})
|
|
76
|
+
export class TooltipDelayDemo {}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Event
|
|
80
|
+
|
|
81
|
+
Tooltip gets displayed on hover event of its target by default, other option is the focus event to display and blur to hide.
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import { Component } from '@angular/core';
|
|
85
|
+
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
86
|
+
import { TooltipModule } from '@exhaustive-ui/core/tooltip';
|
|
87
|
+
|
|
88
|
+
@Component({
|
|
89
|
+
template: `
|
|
90
|
+
<div class="card flex flex-wrap justify-center gap-2">
|
|
91
|
+
<input type="text" pInputText pTooltip="Enter your username" tooltipEvent="focus" placeholder="focus to display tooltip" />
|
|
92
|
+
</div>
|
|
93
|
+
`,
|
|
94
|
+
standalone: true,
|
|
95
|
+
imports: [InputTextModule, TooltipModule]
|
|
96
|
+
})
|
|
97
|
+
export class TooltipEventDemo {}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Tooltip Options
|
|
101
|
+
|
|
102
|
+
Tooltip is also configurable by using tooltipOptions property.
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
import { Component } from '@angular/core';
|
|
106
|
+
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
107
|
+
import { TooltipModule } from '@exhaustive-ui/core/tooltip';
|
|
108
|
+
|
|
109
|
+
@Component({
|
|
110
|
+
template: `
|
|
111
|
+
<div class="card flex justify-center">
|
|
112
|
+
<input type="text" pInputText pTooltip="Enter your username" [tooltipOptions]="tooltipOptions" placeholder="hover to display tooltip" />
|
|
113
|
+
</div>
|
|
114
|
+
`,
|
|
115
|
+
standalone: true,
|
|
116
|
+
imports: [InputTextModule, TooltipModule]
|
|
117
|
+
})
|
|
118
|
+
export class TooltipOptionsDemo {
|
|
119
|
+
tooltipOptions: any;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Position
|
|
124
|
+
|
|
125
|
+
Position of the tooltip is specified using tooltipPosition attribute. Valid values are top , bottom , right and left . Default position of the tooltip is right .
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { Component } from '@angular/core';
|
|
129
|
+
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
130
|
+
import { TooltipModule } from '@exhaustive-ui/core/tooltip';
|
|
131
|
+
|
|
132
|
+
@Component({
|
|
133
|
+
template: `
|
|
134
|
+
<div class="card flex flex-wrap justify-center gap-2">
|
|
135
|
+
<input type="text" pInputText pTooltip="Enter your username" tooltipPosition="right" placeholder="Right" />
|
|
136
|
+
<input type="text" pInputText pTooltip="Enter your username" tooltipPosition="top" placeholder="Top" />
|
|
137
|
+
<input type="text" pInputText pTooltip="Enter your username" tooltipPosition="bottom" placeholder="Bottom" />
|
|
138
|
+
<input type="text" pInputText pTooltip="Enter your username" tooltipPosition="left" placeholder="Left" />
|
|
139
|
+
</div>
|
|
140
|
+
`,
|
|
141
|
+
standalone: true,
|
|
142
|
+
imports: [InputTextModule, TooltipModule]
|
|
143
|
+
})
|
|
144
|
+
export class TooltipPositionDemo {}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Tooltip
|
|
148
|
+
|
|
149
|
+
Tooltip directive provides advisory information for a component.
|
|
150
|
+
|
|
151
|
+
### Props
|
|
152
|
+
|
|
153
|
+
| Name | Type | Default | Description |
|
|
154
|
+
|------|------|---------|-------------|
|
|
155
|
+
| dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
|
|
156
|
+
| unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
|
|
157
|
+
| pt | InputSignal<TooltipPassThroughOptions<unknown>> | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
158
|
+
| ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
|
|
159
|
+
| tooltipPosition | InputSignal<string> | ... | Position of the tooltip. |
|
|
160
|
+
| tooltipEvent | InputSignal<"focus" \| "hover" \| "both"> | ... | Event to show the tooltip. |
|
|
161
|
+
| positionStyle | InputSignal<string> | ... | Type of CSS position. |
|
|
162
|
+
| tooltipStyleClass | InputSignal<string> | ... | Style class of the tooltip. |
|
|
163
|
+
| tooltipZIndex | InputSignal<string> | ... | Whether the z-index should be managed automatically to always go on top or have a fixed value. |
|
|
164
|
+
| escape | InputSignalWithTransform<boolean, unknown> | ... | By default the tooltip contents are rendered as text. Set to false to support html tags in the content. |
|
|
165
|
+
| showDelay | InputSignalWithTransform<number, unknown> | ... | Delay to show the tooltip in milliseconds. |
|
|
166
|
+
| hideDelay | InputSignalWithTransform<number, unknown> | ... | Delay to hide the tooltip in milliseconds. |
|
|
167
|
+
| life | InputSignalWithTransform<number, unknown> | ... | Time to wait in milliseconds to hide the tooltip even it is active. |
|
|
168
|
+
| positionTop | InputSignalWithTransform<number, unknown> | ... | Specifies the additional vertical offset of the tooltip from its default position. |
|
|
169
|
+
| positionLeft | InputSignalWithTransform<number, unknown> | ... | Specifies the additional horizontal offset of the tooltip from its default position. |
|
|
170
|
+
| autoHide | InputSignalWithTransform<boolean, unknown> | ... | Whether to hide tooltip when hovering over tooltip content. |
|
|
171
|
+
| fitContent | InputSignalWithTransform<boolean, unknown> | ... | Automatically adjusts the element position when there is not enough space on the selected position. |
|
|
172
|
+
| hideOnEscape | InputSignalWithTransform<boolean, unknown> | ... | Whether to hide tooltip on escape key press. |
|
|
173
|
+
| showOnEllipsis | InputSignalWithTransform<boolean, unknown> | ... | Whether to show the tooltip only when the target text overflows (e.g., ellipsis is active). |
|
|
174
|
+
| content | InputSignal<string \| TemplateRef<HTMLElement>> | ... | Content of the tooltip. |
|
|
175
|
+
| disabled | InputSignal<boolean> | false | When present, it specifies that the component should be disabled. |
|
|
176
|
+
| tooltipOptions | InputSignal<TooltipOptions> | ... | Specifies the tooltip configuration options for the component. |
|
|
177
|
+
| appendTo | InputSignal<any> | 'self' | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
|
|
178
|
+
| ptTooltip | InputSignal<TooltipPassThrough> | undefined | Used to pass attributes to DOM elements inside the Tooltip component. **(Deprecated)** |
|
|
179
|
+
| pTooltipPT | InputSignal<TooltipPassThrough> | undefined | Used to pass attributes to DOM elements inside the Tooltip component. |
|
|
180
|
+
| pTooltipUnstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
|
|
181
|
+
|
|
182
|
+
## Pass Through Options
|
|
183
|
+
|
|
184
|
+
| Name | Type | Description |
|
|
185
|
+
|------|------|-------------|
|
|
186
|
+
| root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
|
|
187
|
+
| arrow | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the arrow's DOM element. |
|
|
188
|
+
| text | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the text's DOM element. |
|
|
189
|
+
|
|
190
|
+
## Theming
|
|
191
|
+
|
|
192
|
+
### CSS Classes
|
|
193
|
+
|
|
194
|
+
| Class | Description |
|
|
195
|
+
|-------|-------------|
|
|
196
|
+
| p-tooltip | Class name of the root element |
|
|
197
|
+
| p-tooltip-arrow | Class name of the arrow element |
|
|
198
|
+
| p-tooltip-text | Class name of the text element |
|
|
199
|
+
|
|
200
|
+
### Design Tokens
|
|
201
|
+
|
|
202
|
+
| Token | CSS Variable | Description |
|
|
203
|
+
|-------|--------------|-------------|
|
|
204
|
+
| tooltip.max.width | --p-tooltip-max-width | Max width of root |
|
|
205
|
+
| tooltip.gutter | --p-tooltip-gutter | Gutter of root |
|
|
206
|
+
| tooltip.shadow | --p-tooltip-shadow | Shadow of root |
|
|
207
|
+
| tooltip.padding | --p-tooltip-padding | Padding of root |
|
|
208
|
+
| tooltip.border.radius | --p-tooltip-border-radius | Border radius of root |
|
|
209
|
+
| tooltip.background | --p-tooltip-background | Background of root |
|
|
210
|
+
| tooltip.color | --p-tooltip-color | Color of root |
|
|
211
|
+
|