@ojiepermana/angular-component 22.0.27
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/README.md +82 -0
- package/accordion/README.md +193 -0
- package/alert/README.md +180 -0
- package/alert-dialog/README.md +239 -0
- package/aspect-ratio/README.md +112 -0
- package/avatar/README.md +176 -0
- package/badge/README.md +133 -0
- package/breadcrumb/README.md +216 -0
- package/button/README.md +139 -0
- package/button-group/README.md +208 -0
- package/calendar/README.md +135 -0
- package/card/README.md +220 -0
- package/carousel/README.md +276 -0
- package/checkbox/README.md +149 -0
- package/collapsible/README.md +195 -0
- package/combobox/README.md +198 -0
- package/command/README.md +275 -0
- package/composer/README.md +235 -0
- package/context-menu/README.md +267 -0
- package/date-picker/README.md +179 -0
- package/dialog/README.md +235 -0
- package/drawer/README.md +145 -0
- package/dropdown-menu/README.md +311 -0
- package/editor/README.md +136 -0
- package/empty/README.md +183 -0
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +186 -0
- package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +276 -0
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-alert.mjs +99 -0
- package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +37 -0
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -0
- package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-badge.mjs +50 -0
- package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +200 -0
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +103 -0
- package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-button.mjs +68 -0
- package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +103 -0
- package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-card.mjs +152 -0
- package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +334 -0
- package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +165 -0
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +121 -0
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +274 -0
- package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-command.mjs +297 -0
- package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
- package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +108 -0
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +186 -0
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +283 -0
- package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +6 -0
- package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +494 -0
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-editor.mjs +680 -0
- package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
- package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-form.mjs +364 -0
- package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +275 -0
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-icon.mjs +86 -0
- package/fesm2022/ojiepermana-angular-component-icon.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +179 -0
- package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +517 -0
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input.mjs +45 -0
- package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -0
- package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
- package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
- package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-label.mjs +33 -0
- package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +311 -0
- package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
- package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +408 -0
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +226 -0
- package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +810 -0
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-popover.mjs +145 -0
- package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-progress.mjs +60 -0
- package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-radio.mjs +173 -0
- package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +478 -0
- package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +54 -0
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-select.mjs +297 -0
- package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-separator.mjs +37 -0
- package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +297 -0
- package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +31 -0
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-slider.mjs +423 -0
- package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
- package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-switch.mjs +140 -0
- package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -0
- package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +271 -0
- package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +39 -0
- package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
- package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toast.mjs +161 -0
- package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
- package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +410 -0
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-utils.mjs +81 -0
- package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component.mjs +11 -0
- package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
- package/form/README.md +210 -0
- package/hover-card/README.md +142 -0
- package/icon/README.md +25 -0
- package/input/README.md +159 -0
- package/input-group/README.md +237 -0
- package/input-otp/README.md +278 -0
- package/item/README.md +247 -0
- package/kanban/README.md +81 -0
- package/kbd/README.md +139 -0
- package/label/README.md +135 -0
- package/menubar/README.md +269 -0
- package/native-select/README.md +176 -0
- package/navigation-menu/README.md +160 -0
- package/package.json +291 -0
- package/pagination/README.md +144 -0
- package/pillbox/README.md +67 -0
- package/popover/README.md +43 -0
- package/progress/README.md +160 -0
- package/radio/README.md +209 -0
- package/resizable/README.md +168 -0
- package/scroll-area/README.md +143 -0
- package/select/README.md +174 -0
- package/separator/README.md +170 -0
- package/sheet/README.md +183 -0
- package/skeleton/README.md +158 -0
- package/slider/README.md +207 -0
- package/spinner/README.md +160 -0
- package/switch/README.md +166 -0
- package/table/README.md +291 -0
- package/tabs/README.md +214 -0
- package/textarea/README.md +153 -0
- package/timeline/README.md +94 -0
- package/toast/README.md +321 -0
- package/toggle/README.md +131 -0
- package/toggle-group/README.md +206 -0
- package/tooltip/README.md +207 -0
- package/types/ojiepermana-angular-component-accordion.d.ts +51 -0
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +93 -0
- package/types/ojiepermana-angular-component-alert.d.ts +37 -0
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -0
- package/types/ojiepermana-angular-component-avatar.d.ts +51 -0
- package/types/ojiepermana-angular-component-badge.d.ts +19 -0
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -0
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -0
- package/types/ojiepermana-angular-component-button.d.ts +22 -0
- package/types/ojiepermana-angular-component-calendar.d.ts +39 -0
- package/types/ojiepermana-angular-component-card.d.ts +60 -0
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -0
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -0
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -0
- package/types/ojiepermana-angular-component-combobox.d.ts +53 -0
- package/types/ojiepermana-angular-component-command.d.ts +102 -0
- package/types/ojiepermana-angular-component-composer.d.ts +90 -0
- package/types/ojiepermana-angular-component-context-menu.d.ts +36 -0
- package/types/ojiepermana-angular-component-date-picker.d.ts +48 -0
- package/types/ojiepermana-angular-component-dialog.d.ts +87 -0
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -0
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +140 -0
- package/types/ojiepermana-angular-component-editor.d.ts +126 -0
- package/types/ojiepermana-angular-component-empty.d.ts +50 -0
- package/types/ojiepermana-angular-component-form.d.ts +140 -0
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -0
- package/types/ojiepermana-angular-component-icon.d.ts +31 -0
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -0
- package/types/ojiepermana-angular-component-input-otp.d.ts +142 -0
- package/types/ojiepermana-angular-component-input.d.ts +16 -0
- package/types/ojiepermana-angular-component-item.d.ts +88 -0
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
- package/types/ojiepermana-angular-component-label.d.ts +11 -0
- package/types/ojiepermana-angular-component-menubar.d.ts +69 -0
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +98 -0
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -0
- package/types/ojiepermana-angular-component-pillbox.d.ts +156 -0
- package/types/ojiepermana-angular-component-popover.d.ts +50 -0
- package/types/ojiepermana-angular-component-progress.d.ts +17 -0
- package/types/ojiepermana-angular-component-radio.d.ts +57 -0
- package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -0
- package/types/ojiepermana-angular-component-select.d.ts +56 -0
- package/types/ojiepermana-angular-component-separator.d.ts +14 -0
- package/types/ojiepermana-angular-component-sheet.d.ts +78 -0
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -0
- package/types/ojiepermana-angular-component-slider.d.ts +74 -0
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
- package/types/ojiepermana-angular-component-switch.d.ts +44 -0
- package/types/ojiepermana-angular-component-table.d.ts +52 -0
- package/types/ojiepermana-angular-component-tabs.d.ts +92 -0
- package/types/ojiepermana-angular-component-textarea.d.ts +12 -0
- package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
- package/types/ojiepermana-angular-component-toast.d.ts +51 -0
- package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
- package/types/ojiepermana-angular-component-tooltip.d.ts +101 -0
- package/types/ojiepermana-angular-component-utils.d.ts +30 -0
- package/types/ojiepermana-angular-component.d.ts +2 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Toggle Group
|
|
2
|
+
|
|
3
|
+
A set of two-state buttons that can be toggled on or off with either single or multiple selection.
|
|
4
|
+
|
|
5
|
+
Use Toggle Group for formatting toolbars, persistent filters, view-mode switches, or any compact control cluster where each item represents a pressed state instead of an immediate action.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { ToggleGroupComponent, ToggleGroupItemDirective } from '@ojiepermana/angular-component/toggle-group';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Composition
|
|
14
|
+
|
|
15
|
+
The Angular structure keeps the same root-plus-items shape as shadcn and Radix while translating the API to strongly typed Angular bindings.
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
ToggleGroup
|
|
19
|
+
├── button[ToggleGroupItem]
|
|
20
|
+
└── button[ToggleGroupItem]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Basic usage
|
|
24
|
+
|
|
25
|
+
Use `[(value)]` for single-select groups and `[(values)]` for multi-select groups.
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
readonly alignment = signal<string | null>('center');
|
|
29
|
+
readonly styles = signal<string[]>(['bold']);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<ToggleGroup type="single" [(value)]="alignment" variant="outline" aria-label="Text alignment">
|
|
34
|
+
<button ToggleGroupItem value="left" aria-label="Left aligned">Left</button>
|
|
35
|
+
<button ToggleGroupItem value="center" aria-label="Center aligned">Center</button>
|
|
36
|
+
<button ToggleGroupItem value="right" aria-label="Right aligned">Right</button>
|
|
37
|
+
</ToggleGroup>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<ToggleGroup type="multiple" [(values)]="styles" variant="outline" aria-label="Text styles">
|
|
42
|
+
<button ToggleGroupItem value="bold" aria-label="Bold">Bold</button>
|
|
43
|
+
<button ToggleGroupItem value="italic" aria-label="Italic">Italic</button>
|
|
44
|
+
<button ToggleGroupItem value="underline" aria-label="Underline">Underline</button>
|
|
45
|
+
</ToggleGroup>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Common patterns
|
|
49
|
+
|
|
50
|
+
### Outline
|
|
51
|
+
|
|
52
|
+
Use `variant="outline"` when the group should read like a bordered toolbar or filter control.
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<ToggleGroup type="single" [(value)]="filter" variant="outline" aria-label="Message filters">
|
|
56
|
+
<button ToggleGroupItem value="all">All</button>
|
|
57
|
+
<button ToggleGroupItem value="missed">Missed</button>
|
|
58
|
+
</ToggleGroup>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Size
|
|
62
|
+
|
|
63
|
+
Set `size` on the root so every child item scales together.
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<ToggleGroup type="single" [(value)]="alignment" variant="outline" size="lg" aria-label="Large alignment">
|
|
67
|
+
<button ToggleGroupItem value="left">Left</button>
|
|
68
|
+
<button ToggleGroupItem value="center">Center</button>
|
|
69
|
+
<button ToggleGroupItem value="right">Right</button>
|
|
70
|
+
</ToggleGroup>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Spacing
|
|
74
|
+
|
|
75
|
+
Spacing defaults to `2`, matching the current shadcn docs. Use `spacing="0"` for connected items or larger values for looser toolbars.
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<ToggleGroup type="single" [(value)]="alignment" variant="outline" spacing="0" aria-label="Connected alignment">
|
|
79
|
+
<button ToggleGroupItem value="left">Left</button>
|
|
80
|
+
<button ToggleGroupItem value="center">Center</button>
|
|
81
|
+
<button ToggleGroupItem value="right">Right</button>
|
|
82
|
+
</ToggleGroup>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Vertical orientation
|
|
86
|
+
|
|
87
|
+
Use `orientation="vertical"` to stack items while keeping the same roving-focus keyboard behavior.
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<ToggleGroup type="multiple" [(values)]="styles" orientation="vertical" spacing="1" aria-label="Text styles">
|
|
91
|
+
<button ToggleGroupItem value="bold" aria-label="Toggle bold">Bold</button>
|
|
92
|
+
<button ToggleGroupItem value="italic" aria-label="Toggle italic">Italic</button>
|
|
93
|
+
<button ToggleGroupItem value="underline" aria-label="Toggle underline">Underline</button>
|
|
94
|
+
</ToggleGroup>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Disabled group
|
|
98
|
+
|
|
99
|
+
Disable the root when the whole cluster is unavailable.
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<ToggleGroup
|
|
103
|
+
type="multiple"
|
|
104
|
+
[(values)]="styles"
|
|
105
|
+
variant="outline"
|
|
106
|
+
[disabled]="true"
|
|
107
|
+
aria-label="Unavailable text styles">
|
|
108
|
+
<button ToggleGroupItem value="bold">Bold</button>
|
|
109
|
+
<button ToggleGroupItem value="italic">Italic</button>
|
|
110
|
+
<button ToggleGroupItem value="underline">Underline</button>
|
|
111
|
+
</ToggleGroup>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Custom controlled state
|
|
115
|
+
|
|
116
|
+
The selected value can drive any Angular signal, such as font weight, filters, or an editor mode.
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
readonly fontWeight = signal<string | null>('normal');
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```html
|
|
123
|
+
<ToggleGroup type="single" [(value)]="fontWeight" variant="outline" size="lg" aria-label="Font weight">
|
|
124
|
+
<button ToggleGroupItem value="light" class="min-w-24">Light</button>
|
|
125
|
+
<button ToggleGroupItem value="normal" class="min-w-24">Normal</button>
|
|
126
|
+
<button ToggleGroupItem value="medium" class="min-w-24">Medium</button>
|
|
127
|
+
<button ToggleGroupItem value="bold" class="min-w-24">Bold</button>
|
|
128
|
+
</ToggleGroup>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### RTL
|
|
132
|
+
|
|
133
|
+
Direction comes from the surrounding layout. Horizontal arrow navigation respects the active text direction automatically.
|
|
134
|
+
|
|
135
|
+
```html
|
|
136
|
+
<div dir="rtl" lang="ar" class="text-right">
|
|
137
|
+
<ToggleGroup type="single" [(value)]="view" variant="outline" aria-label="طريقة العرض">
|
|
138
|
+
<button ToggleGroupItem value="list">قائمة</button>
|
|
139
|
+
<button ToggleGroupItem value="grid">شبكة</button>
|
|
140
|
+
<button ToggleGroupItem value="cards">بطاقات</button>
|
|
141
|
+
</ToggleGroup>
|
|
142
|
+
</div>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## API reference
|
|
146
|
+
|
|
147
|
+
### `ToggleGroupComponent`
|
|
148
|
+
|
|
149
|
+
| Input or model | Type | Default |
|
|
150
|
+
| -------------- | ---------------------------- | -------------- |
|
|
151
|
+
| `type` | `'single' \| 'multiple'` | required |
|
|
152
|
+
| `value` | `string \| null` | `null` |
|
|
153
|
+
| `values` | `string[]` | `[]` |
|
|
154
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` |
|
|
155
|
+
| `variant` | `'default' \| 'outline'` | `'default'` |
|
|
156
|
+
| `size` | `'sm' \| 'default' \| 'lg'` | `'default'` |
|
|
157
|
+
| `spacing` | `0 \| 1 \| 2 \| 3 \| 4` | `2` |
|
|
158
|
+
| `loop` | `boolean` | `true` |
|
|
159
|
+
| `disabled` | `boolean` | `false` |
|
|
160
|
+
| `dir` | `'ltr' \| 'rtl' \| null` | `null` |
|
|
161
|
+
| `class` | `string` | `''` |
|
|
162
|
+
|
|
163
|
+
### `ToggleGroupItemDirective`
|
|
164
|
+
|
|
165
|
+
| Input | Type | Default |
|
|
166
|
+
| ---------- | --------- | ------- |
|
|
167
|
+
| `value` | `string` | — |
|
|
168
|
+
| `disabled` | `boolean` | `false` |
|
|
169
|
+
| `class` | `string` | `''` |
|
|
170
|
+
|
|
171
|
+
Host: `button[ToggleGroupItem]`.
|
|
172
|
+
|
|
173
|
+
The item host exposes `aria-pressed`, `data-state="on|off"`, `data-variant`, `data-size`, `data-orientation`, and `data-disabled` for styling and testing hooks.
|
|
174
|
+
|
|
175
|
+
## Styling and theming
|
|
176
|
+
|
|
177
|
+
- Toggle Group items intentionally share the same `variant` and `size` contract as the standalone Toggle primitive, so grouped toolbars and standalone toggles stay visually aligned.
|
|
178
|
+
- Use `spacing` for inter-item layout. When `spacing="0"`, the root collapses adjacent radius and borders so outline items read as a connected control.
|
|
179
|
+
- Use `class` on the root or an item for width, alignment, or card-like custom presentations.
|
|
180
|
+
|
|
181
|
+
## Accessibility
|
|
182
|
+
|
|
183
|
+
- `ToggleGroup` renders `role="group"`; provide `aria-label` or `aria-labelledby` when the cluster needs an accessible name.
|
|
184
|
+
- `button[ToggleGroupItem]` keeps native button semantics and exposes `aria-pressed` for the two-state pattern.
|
|
185
|
+
- Add an `aria-label` to icon-only items.
|
|
186
|
+
- Disabled items stay visible and are skipped by the group keyboard navigation.
|
|
187
|
+
|
|
188
|
+
## Keyboard interactions
|
|
189
|
+
|
|
190
|
+
- Tab moves focus to the pressed item or the first enabled item in the group.
|
|
191
|
+
- Enter and Space activate or deactivate the current item through the native button click.
|
|
192
|
+
- Arrow keys move focus through the group.
|
|
193
|
+
- `Home` and `End` jump to the first or last enabled item.
|
|
194
|
+
- Horizontal arrow movement respects RTL direction.
|
|
195
|
+
|
|
196
|
+
## Angular notes
|
|
197
|
+
|
|
198
|
+
- Use `[(value)]` in single mode and `[(values)]` in multiple mode instead of overloading one input with two types.
|
|
199
|
+
- The item host selector is `button[ToggleGroupItem]`; consumers do not add `Toggle` separately.
|
|
200
|
+
- The root owns roving focus, so consumer templates do not need extra CDK focus utilities.
|
|
201
|
+
|
|
202
|
+
## Source parity
|
|
203
|
+
|
|
204
|
+
This Angular implementation follows the current shadcn Toggle Group docs for outline styling, size scaling, spacing, vertical orientation, disabled groups, custom controlled state, RTL behavior, and the Radix roving-focus keyboard contract.
|
|
205
|
+
|
|
206
|
+
The intentional Angular deviation is the binding split between `value` and `values`, which keeps signal types explicit for single and multiple modes.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
Displays a small, supplemental text label when a focusable element receives hover or keyboard focus.
|
|
4
|
+
|
|
5
|
+
This Angular implementation now supports a composition-based tooltip surface with `Tooltip`, `[TooltipTrigger]`, and `ng-template[TooltipContent]`, while keeping the older `[Tooltip]` string directive as a lightweight shortcut for one-line hints.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import {
|
|
11
|
+
TooltipComponent,
|
|
12
|
+
TooltipContentDirective,
|
|
13
|
+
TooltipDirective,
|
|
14
|
+
TooltipTriggerDirective,
|
|
15
|
+
} from '@ojiepermana/angular-component/tooltip';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Composition
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Tooltip
|
|
22
|
+
├── focusable host[TooltipTrigger]
|
|
23
|
+
└── ng-template[TooltipContent]
|
|
24
|
+
|
|
25
|
+
Optional convenience shortcut:
|
|
26
|
+
button[Tooltip]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Basic usage
|
|
30
|
+
|
|
31
|
+
Use the composed surface when you want shadcn-style trigger and content structure or richer overlay content.
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<Tooltip [openDelay]="0">
|
|
35
|
+
<ng-template TooltipContent #tooltipContent="TooltipContent">
|
|
36
|
+
<span>Add to library</span>
|
|
37
|
+
</ng-template>
|
|
38
|
+
|
|
39
|
+
<button Button type="button" variant="outline" [TooltipTrigger]="tooltipContent">Hover</button>
|
|
40
|
+
</Tooltip>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Common patterns
|
|
44
|
+
|
|
45
|
+
### Side and alignment
|
|
46
|
+
|
|
47
|
+
Use `side="top|right|bottom|left"` and `align="start|center|end"` on `[TooltipTrigger]` to control placement.
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<Tooltip side="top" [openDelay]="0">
|
|
51
|
+
<ng-template TooltipContent #startContent="TooltipContent">
|
|
52
|
+
<span>Start aligned tooltip</span>
|
|
53
|
+
</ng-template>
|
|
54
|
+
|
|
55
|
+
<button Button type="button" variant="outline" [TooltipTrigger]="startContent" align="start">Start</button>
|
|
56
|
+
</Tooltip>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Rich content
|
|
60
|
+
|
|
61
|
+
The overlay template can include small layout fragments, emphasized text, or keyboard shortcut chips.
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<Tooltip [openDelay]="0">
|
|
65
|
+
<ng-template TooltipContent #shortcutContent="TooltipContent">
|
|
66
|
+
<span class="inline-flex items-center gap-1.5">
|
|
67
|
+
Save changes
|
|
68
|
+
<kbd class="border-primary-foreground/30 bg-primary-foreground/10 text-primary-foreground shadow-none"> Cmd </kbd>
|
|
69
|
+
<kbd class="border-primary-foreground/30 bg-primary-foreground/10 text-primary-foreground shadow-none"> S </kbd>
|
|
70
|
+
</span>
|
|
71
|
+
</ng-template>
|
|
72
|
+
|
|
73
|
+
<button Button type="button" variant="outline" [TooltipTrigger]="shortcutContent">Save</button>
|
|
74
|
+
</Tooltip>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Disabled buttons
|
|
78
|
+
|
|
79
|
+
Disabled native buttons do not emit hover or focus events. Wrap them with a focusable element and attach `[TooltipTrigger]` to the wrapper.
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<Tooltip [openDelay]="0">
|
|
83
|
+
<ng-template TooltipContent #disabledContent="TooltipContent">
|
|
84
|
+
<span>This feature is currently unavailable</span>
|
|
85
|
+
</ng-template>
|
|
86
|
+
|
|
87
|
+
<span
|
|
88
|
+
class="inline-block rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
89
|
+
tabindex="0"
|
|
90
|
+
[TooltipTrigger]="disabledContent">
|
|
91
|
+
<button Button type="button" variant="outline" disabled>Disabled</button>
|
|
92
|
+
</span>
|
|
93
|
+
</Tooltip>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Quick string API
|
|
97
|
+
|
|
98
|
+
For simple one-line hints, the original directive remains available.
|
|
99
|
+
|
|
100
|
+
```html
|
|
101
|
+
<button Button type="button" variant="outline" [Tooltip]="'Quick text hint'" TooltipPosition="above">
|
|
102
|
+
String directive
|
|
103
|
+
</button>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Programmatic control
|
|
107
|
+
|
|
108
|
+
Export the trigger as `TooltipTrigger` when a flow needs to open or close the composed tooltip imperatively.
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<Tooltip [openDelay]="0">
|
|
112
|
+
<ng-template TooltipContent #saveContent="TooltipContent">
|
|
113
|
+
<span>Saved</span>
|
|
114
|
+
</ng-template>
|
|
115
|
+
|
|
116
|
+
<button
|
|
117
|
+
Button
|
|
118
|
+
type="button"
|
|
119
|
+
variant="outline"
|
|
120
|
+
#saveTrigger="TooltipTrigger"
|
|
121
|
+
[TooltipTrigger]="saveContent"
|
|
122
|
+
(click)="saveTrigger.open()">
|
|
123
|
+
Save
|
|
124
|
+
</button>
|
|
125
|
+
</Tooltip>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## API reference
|
|
129
|
+
|
|
130
|
+
### `TooltipComponent`
|
|
131
|
+
|
|
132
|
+
| Input | Type | Default |
|
|
133
|
+
| ------------ | ---------------------------------------- | ---------- |
|
|
134
|
+
| `side` | `'top' \| 'right' \| 'bottom' \| 'left'` | `'top'` |
|
|
135
|
+
| `align` | `'start' \| 'center' \| 'end'` | `'center'` |
|
|
136
|
+
| `sideOffset` | `number` | `4` |
|
|
137
|
+
| `openDelay` | `number` | `150` |
|
|
138
|
+
| `closeDelay` | `number` | `0` |
|
|
139
|
+
|
|
140
|
+
### `TooltipTriggerDirective`
|
|
141
|
+
|
|
142
|
+
| Input | Type | Notes |
|
|
143
|
+
| ---------------- | ---------------------------------------- | --------------------------------------------------- |
|
|
144
|
+
| `TooltipTrigger` | `TooltipContentDirective` | Required content template ref for the overlay body. |
|
|
145
|
+
| `side` | `'top' \| 'right' \| 'bottom' \| 'left'` | Overrides the root side for this trigger. |
|
|
146
|
+
| `align` | `'start' \| 'center' \| 'end'` | Overrides the root alignment for this trigger. |
|
|
147
|
+
| `sideOffset` | `number` | Overrides the root offset for this trigger. |
|
|
148
|
+
| `openDelay` | `number` | Overrides the root open delay for this trigger. |
|
|
149
|
+
| `closeDelay` | `number` | Overrides the root close delay for this trigger. |
|
|
150
|
+
| `disabled` | `boolean` | Suppresses tooltip opening for the trigger. |
|
|
151
|
+
|
|
152
|
+
### `TooltipTriggerDirective` methods
|
|
153
|
+
|
|
154
|
+
- `open()`: opens the composed tooltip.
|
|
155
|
+
- `close()`: closes the composed tooltip.
|
|
156
|
+
|
|
157
|
+
### `TooltipContentDirective`
|
|
158
|
+
|
|
159
|
+
- Applied as `ng-template[TooltipContent]`.
|
|
160
|
+
- Supplies the portal content rendered inside the tooltip overlay.
|
|
161
|
+
|
|
162
|
+
### `TooltipDirective`
|
|
163
|
+
|
|
164
|
+
| Input | Type | Notes |
|
|
165
|
+
| ---------------------- | ------------------------- | -------------------------------------------------------- |
|
|
166
|
+
| `Tooltip` | `string` | Message rendered inside the Material tooltip overlay. |
|
|
167
|
+
| `TooltipPosition` | `TooltipPosition` | `left`, `right`, `above`, `below`, `before`, or `after`. |
|
|
168
|
+
| `TooltipDisabled` | `boolean` | Temporarily suppresses tooltip display. |
|
|
169
|
+
| `TooltipShowDelay` | `number` | Delay in milliseconds before the tooltip opens. |
|
|
170
|
+
| `TooltipHideDelay` | `number` | Delay in milliseconds before the tooltip closes. |
|
|
171
|
+
| `TooltipTouchGestures` | `'auto' \| 'on' \| 'off'` | Controls touch gesture behavior on mobile devices. |
|
|
172
|
+
|
|
173
|
+
For the original primitive contract, see the Radix Tooltip API: <https://www.radix-ui.com/primitives/docs/components/tooltip#api-reference>.
|
|
174
|
+
|
|
175
|
+
## Styling and theming
|
|
176
|
+
|
|
177
|
+
The composed tooltip applies its visual shell directly on the overlay pane and keeps the stable `tooltip-panel` class hook.
|
|
178
|
+
|
|
179
|
+
Projected content inherits the library theme tokens, so small layout helpers such as `inline-flex`, gap utilities, and subtle emphasis classes can be used without rebuilding the panel wrapper.
|
|
180
|
+
|
|
181
|
+
The string directive continues to force the `tooltip-panel` class on the Material tooltip overlay for backward-compatible styling.
|
|
182
|
+
|
|
183
|
+
## Accessibility
|
|
184
|
+
|
|
185
|
+
- The composed overlay pane uses `role="tooltip"`.
|
|
186
|
+
- Trigger hosts receive `aria-describedby` while the tooltip is open.
|
|
187
|
+
- Tooltip content should stay supplemental and should not be the only place that important instructions live.
|
|
188
|
+
- Use focusable hosts so keyboard users can reveal the tooltip without relying on hover.
|
|
189
|
+
- Disabled controls still need a focusable wrapper if you expect keyboard users to reach the explanation.
|
|
190
|
+
|
|
191
|
+
## Keyboard interactions
|
|
192
|
+
|
|
193
|
+
- Focusing the trigger opens the tooltip after the configured delay.
|
|
194
|
+
- Moving focus away closes it again.
|
|
195
|
+
- Pressing Escape closes the currently open composed tooltip.
|
|
196
|
+
- Native hosts keep their default Enter and Space behavior.
|
|
197
|
+
|
|
198
|
+
## Angular notes
|
|
199
|
+
|
|
200
|
+
- Prefer the composition-based surface when you need richer content or closer shadcn parity.
|
|
201
|
+
- Keep the string directive for quick one-line hints or for existing code that already relies on `MatTooltip` semantics.
|
|
202
|
+
- The composed trigger is exported as `TooltipTrigger`, so template refs can call `open()` and `close()` directly.
|
|
203
|
+
- For interactive overlay content, use Popover or Hover Card instead of Tooltip.
|
|
204
|
+
|
|
205
|
+
## Source parity
|
|
206
|
+
|
|
207
|
+
This Angular version now mirrors the shadcn runtime more closely with an explicit root, trigger, and content surface while preserving a compact Angular convenience directive for minimal text hints.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type AccordionType = 'single' | 'multiple';
|
|
4
|
+
declare abstract class AccordionContextBase {
|
|
5
|
+
abstract isOpen(value: string): boolean;
|
|
6
|
+
abstract toggle(value: string): void;
|
|
7
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionContextBase, never>;
|
|
8
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionContextBase, never, never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
10
|
+
declare class AccordionComponent extends AccordionContextBase {
|
|
11
|
+
readonly type: _angular_core.InputSignal<AccordionType>;
|
|
12
|
+
readonly collapsible: _angular_core.InputSignal<boolean>;
|
|
13
|
+
readonly value: _angular_core.ModelSignal<string | string[] | null>;
|
|
14
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
15
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
16
|
+
private readonly openSet;
|
|
17
|
+
isOpen(value: string): boolean;
|
|
18
|
+
toggle(value: string): void;
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionComponent, never>;
|
|
20
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionComponent, "Accordion", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, ["*"], true, never>;
|
|
21
|
+
}
|
|
22
|
+
declare class AccordionItemComponent {
|
|
23
|
+
protected readonly ctx: AccordionContextBase;
|
|
24
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
25
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
26
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
27
|
+
readonly triggerId: string;
|
|
28
|
+
readonly contentId: string;
|
|
29
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
30
|
+
readonly open: _angular_core.Signal<boolean>;
|
|
31
|
+
toggle(): void;
|
|
32
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
|
|
33
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionItemComponent, "AccordionItem", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
34
|
+
}
|
|
35
|
+
declare class AccordionTriggerComponent {
|
|
36
|
+
protected readonly item: AccordionItemComponent;
|
|
37
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
38
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
39
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTriggerComponent, never>;
|
|
40
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionTriggerComponent, "button[AccordionTrigger]", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
41
|
+
}
|
|
42
|
+
declare class AccordionContentComponent {
|
|
43
|
+
protected readonly item: AccordionItemComponent;
|
|
44
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
45
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
46
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionContentComponent, never>;
|
|
47
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionContentComponent, "AccordionContent", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { AccordionComponent, AccordionContentComponent, AccordionContextBase, AccordionItemComponent, AccordionTriggerComponent };
|
|
51
|
+
export type { AccordionType };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ButtonVariant, ButtonSize } from '@ojiepermana/angular-component/button';
|
|
3
|
+
|
|
4
|
+
type AlertDialogSize = 'default' | 'sm';
|
|
5
|
+
|
|
6
|
+
declare class AlertDialogComponent {
|
|
7
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
8
|
+
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
9
|
+
readonly closeOnBackdropClick: _angular_core.InputSignal<boolean>;
|
|
10
|
+
readonly showCloseButton: _angular_core.InputSignal<boolean>;
|
|
11
|
+
readonly closeButtonLabel: _angular_core.InputSignal<string>;
|
|
12
|
+
readonly labelledBy: _angular_core.InputSignal<string | null>;
|
|
13
|
+
readonly describedBy: _angular_core.InputSignal<string | null>;
|
|
14
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
15
|
+
readonly openedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
16
|
+
private readonly contentSize;
|
|
17
|
+
readonly resolvedSize: _angular_core.Signal<AlertDialogSize>;
|
|
18
|
+
protected readonly surfaceClasses: _angular_core.Signal<string>;
|
|
19
|
+
setContentSize(size: AlertDialogSize): void;
|
|
20
|
+
close(): void;
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogComponent, never>;
|
|
22
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogComponent, "AlertDialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "closeButtonLabel": { "alias": "closeButtonLabel"; "required": false; "isSignal": true; }; "labelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "describedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "openedChange": "openedChange"; }, never, ["*"], true, never>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class AlertDialogContentComponent {
|
|
26
|
+
readonly size: _angular_core.InputSignal<AlertDialogSize>;
|
|
27
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
28
|
+
private readonly alertDialog;
|
|
29
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
30
|
+
constructor();
|
|
31
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogContentComponent, never>;
|
|
32
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogContentComponent, "AlertDialogContent", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
33
|
+
}
|
|
34
|
+
declare class AlertDialogHeaderComponent {
|
|
35
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
36
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
37
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogHeaderComponent, never>;
|
|
38
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogHeaderComponent, "AlertDialogHeader", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
39
|
+
}
|
|
40
|
+
declare class AlertDialogTitleComponent {
|
|
41
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
42
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
43
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogTitleComponent, never>;
|
|
44
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogTitleComponent, "AlertDialogTitle, h2[AlertDialogTitle]", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
45
|
+
}
|
|
46
|
+
declare class AlertDialogDescriptionComponent {
|
|
47
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
48
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
49
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogDescriptionComponent, never>;
|
|
50
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogDescriptionComponent, "AlertDialogDescription, p[AlertDialogDescription]", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
51
|
+
}
|
|
52
|
+
declare class AlertDialogMediaComponent {
|
|
53
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
54
|
+
private readonly alertDialog;
|
|
55
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
56
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogMediaComponent, never>;
|
|
57
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogMediaComponent, "AlertDialogMedia", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
58
|
+
}
|
|
59
|
+
declare class AlertDialogFooterComponent {
|
|
60
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
61
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogFooterComponent, never>;
|
|
63
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogFooterComponent, "AlertDialogFooter", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
64
|
+
}
|
|
65
|
+
declare class AlertDialogCancelComponent {
|
|
66
|
+
readonly variant: _angular_core.InputSignal<ButtonVariant>;
|
|
67
|
+
readonly size: _angular_core.InputSignal<ButtonSize>;
|
|
68
|
+
readonly closeOnClick: _angular_core.InputSignal<boolean>;
|
|
69
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
70
|
+
private readonly host;
|
|
71
|
+
private readonly alertDialog;
|
|
72
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
73
|
+
protected readonly buttonType: _angular_core.Signal<"button" | null>;
|
|
74
|
+
protected handleClick(): void;
|
|
75
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogCancelComponent, never>;
|
|
76
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogCancelComponent, "button[AlertDialogCancel], a[AlertDialogCancel]", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
77
|
+
}
|
|
78
|
+
declare class AlertDialogActionComponent {
|
|
79
|
+
readonly variant: _angular_core.InputSignal<ButtonVariant>;
|
|
80
|
+
readonly size: _angular_core.InputSignal<ButtonSize>;
|
|
81
|
+
readonly closeOnClick: _angular_core.InputSignal<boolean>;
|
|
82
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
83
|
+
private readonly host;
|
|
84
|
+
private readonly alertDialog;
|
|
85
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
86
|
+
protected readonly buttonType: _angular_core.Signal<"button" | null>;
|
|
87
|
+
protected handleClick(): void;
|
|
88
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogActionComponent, never>;
|
|
89
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialogActionComponent, "button[AlertDialogAction], a[AlertDialogAction]", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { AlertDialogActionComponent, AlertDialogCancelComponent, AlertDialogComponent, AlertDialogContentComponent, AlertDialogDescriptionComponent, AlertDialogFooterComponent, AlertDialogHeaderComponent, AlertDialogMediaComponent, AlertDialogTitleComponent };
|
|
93
|
+
export type { AlertDialogSize };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const alertVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
type AlertVariant = NonNullable<VariantProps<typeof alertVariants>['variant']>;
|
|
9
|
+
|
|
10
|
+
declare class AlertComponent {
|
|
11
|
+
readonly variant: _angular_core.InputSignal<AlertVariant>;
|
|
12
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
13
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
14
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
15
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertComponent, "Alert", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
16
|
+
}
|
|
17
|
+
declare class AlertTitleComponent {
|
|
18
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
19
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
20
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertTitleComponent, never>;
|
|
21
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertTitleComponent, "AlertTitle, h5[AlertTitle]", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
22
|
+
}
|
|
23
|
+
declare class AlertDescriptionComponent {
|
|
24
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
25
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
26
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDescriptionComponent, never>;
|
|
27
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDescriptionComponent, "AlertDescription", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
declare class AlertActionComponent {
|
|
30
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
31
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
32
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertActionComponent, never>;
|
|
33
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertActionComponent, "AlertAction", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { AlertActionComponent, AlertComponent, AlertDescriptionComponent, AlertTitleComponent, alertVariants };
|
|
37
|
+
export type { AlertVariant };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class AspectRatioComponent {
|
|
4
|
+
readonly ratio: _angular_core.InputSignal<number>;
|
|
5
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
6
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
7
|
+
protected readonly paddingBottom: _angular_core.Signal<string>;
|
|
8
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AspectRatioComponent, never>;
|
|
9
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AspectRatioComponent, "AspectRatio", never, { "ratio": { "alias": "ratio"; "required": true; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { AspectRatioComponent };
|