@ng-cn/core 1.0.16 → 1.0.18
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/package.json +6 -5
- package/src/app/lib/components/ui/accordion/accordion-content.component.ts +11 -14
- package/src/app/lib/components/ui/accordion/accordion-context.ts +1 -0
- package/src/app/lib/components/ui/accordion/accordion-item.component.ts +8 -0
- package/src/app/lib/components/ui/accordion/accordion-trigger.component.ts +5 -1
- package/src/app/lib/components/ui/accordion/accordion.component.ts +24 -6
- package/src/app/lib/components/ui/alert/alert-variants.ts +18 -4
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-action.component.ts +1 -0
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-cancel.component.ts +1 -1
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-content.component.ts +34 -17
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-description.component.ts +1 -0
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-footer.component.ts +1 -0
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-header.component.ts +1 -0
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-title.component.ts +1 -0
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/alert-dialog/alert-dialog.component.ts +4 -0
- package/src/app/lib/components/ui/aspect-ratio/aspect-ratio.component.ts +1 -0
- package/src/app/lib/components/ui/avatar/avatar-context.ts +9 -0
- package/src/app/lib/components/ui/avatar/avatar-fallback.component.ts +6 -9
- package/src/app/lib/components/ui/avatar/avatar-image.component.ts +40 -11
- package/src/app/lib/components/ui/avatar/avatar.component.ts +18 -13
- package/src/app/lib/components/ui/avatar/index.ts +1 -0
- package/src/app/lib/components/ui/avatar/ui-avatar.component.ts +13 -20
- package/src/app/lib/components/ui/badge/badge-variants.ts +1 -1
- package/src/app/lib/components/ui/badge/badge.component.ts +1 -0
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-ellipsis.component.ts +1 -0
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-item.component.ts +3 -7
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-link.component.ts +4 -11
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-list.component.ts +3 -7
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-page.component.ts +1 -0
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-separator.component.ts +20 -24
- package/src/app/lib/components/ui/breadcrumb/breadcrumb.component.ts +1 -0
- package/src/app/lib/components/ui/button/button-variants.ts +3 -3
- package/src/app/lib/components/ui/button/button.component.ts +1 -0
- package/src/app/lib/components/ui/button-group/button-group.component.ts +1 -0
- package/src/app/lib/components/ui/calendar/calendar.component.ts +5 -1
- package/src/app/lib/components/ui/carousel/carousel-content.component.ts +1 -0
- package/src/app/lib/components/ui/carousel/carousel-item.component.ts +1 -0
- package/src/app/lib/components/ui/carousel/carousel-next.component.ts +1 -0
- package/src/app/lib/components/ui/carousel/carousel-previous.component.ts +1 -0
- package/src/app/lib/components/ui/carousel/carousel.component.ts +1 -0
- package/src/app/lib/components/ui/chart/chart-container.component.ts +1 -0
- package/src/app/lib/components/ui/chart/chart-legend-content.component.ts +1 -0
- package/src/app/lib/components/ui/chart/chart-legend.component.ts +5 -5
- package/src/app/lib/components/ui/chart/chart-tooltip-content.component.ts +5 -5
- package/src/app/lib/components/ui/chart/chart-tooltip.component.ts +5 -5
- package/src/app/lib/components/ui/chart/chart.component.ts +1 -0
- package/src/app/lib/components/ui/checkbox/checkbox.component.ts +1 -1
- package/src/app/lib/components/ui/collapsible/collapsible-content.component.ts +3 -1
- package/src/app/lib/components/ui/collapsible/collapsible-context.ts +1 -0
- package/src/app/lib/components/ui/collapsible/collapsible-trigger.component.ts +2 -0
- package/src/app/lib/components/ui/collapsible/collapsible.component.ts +4 -0
- package/src/app/lib/components/ui/combobox/combobox-content.component.ts +1 -0
- package/src/app/lib/components/ui/combobox/combobox-empty.component.ts +1 -0
- package/src/app/lib/components/ui/combobox/combobox-group.component.ts +1 -0
- package/src/app/lib/components/ui/combobox/combobox-input.component.ts +1 -0
- package/src/app/lib/components/ui/combobox/combobox-item.component.ts +1 -4
- package/src/app/lib/components/ui/combobox/combobox-list.component.ts +1 -1
- package/src/app/lib/components/ui/combobox/combobox-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/combobox/combobox-value.component.ts +1 -0
- package/src/app/lib/components/ui/combobox/combobox.component.ts +1 -1
- package/src/app/lib/components/ui/command/command-dialog.component.ts +1 -0
- package/src/app/lib/components/ui/command/command-empty.component.ts +1 -0
- package/src/app/lib/components/ui/command/command-group.component.ts +1 -0
- package/src/app/lib/components/ui/command/command-input.component.ts +1 -0
- package/src/app/lib/components/ui/command/command-item.component.ts +2 -1
- package/src/app/lib/components/ui/command/command-list.component.ts +1 -0
- package/src/app/lib/components/ui/command/command-separator.component.ts +1 -0
- package/src/app/lib/components/ui/command/command-shortcut.component.ts +1 -0
- package/src/app/lib/components/ui/command/command.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-checkbox-item.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-content.component.ts +49 -17
- package/src/app/lib/components/ui/context-menu/context-menu-item.component.ts +2 -1
- package/src/app/lib/components/ui/context-menu/context-menu-label.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-radio-group.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-radio-item.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-separator.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-shortcut.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-sub-content.component.ts +3 -0
- package/src/app/lib/components/ui/context-menu/context-menu-sub-trigger.component.ts +32 -2
- package/src/app/lib/components/ui/context-menu/context-menu-sub.component.ts +4 -0
- package/src/app/lib/components/ui/context-menu/context-menu-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu.component.ts +1 -0
- package/src/app/lib/components/ui/data-table/data-table-content.component.ts +1 -0
- package/src/app/lib/components/ui/data-table/data-table-pagination.component.ts +1 -0
- package/src/app/lib/components/ui/data-table/data-table-search.component.ts +1 -0
- package/src/app/lib/components/ui/data-table/data-table-toolbar.component.ts +1 -0
- package/src/app/lib/components/ui/data-table/data-table-view-options.component.ts +1 -0
- package/src/app/lib/components/ui/data-table/data-table.component.ts +1 -1
- package/src/app/lib/components/ui/date-picker/date-picker.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog-close.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog-content.component.ts +32 -21
- package/src/app/lib/components/ui/dialog/dialog-description.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog-footer.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog-header.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog-title.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog.component.ts +1 -0
- package/src/app/lib/components/ui/direction/direction-context.ts +9 -0
- package/src/app/lib/components/ui/direction/direction.component.ts +48 -0
- package/src/app/lib/components/ui/direction/index.ts +2 -0
- package/src/app/lib/components/ui/drawer/drawer-close.component.ts +1 -0
- package/src/app/lib/components/ui/drawer/drawer-content.component.ts +45 -0
- package/src/app/lib/components/ui/drawer/drawer-description.component.ts +1 -0
- package/src/app/lib/components/ui/drawer/drawer-footer.component.ts +1 -0
- package/src/app/lib/components/ui/drawer/drawer-header.component.ts +1 -0
- package/src/app/lib/components/ui/drawer/drawer-title.component.ts +1 -0
- package/src/app/lib/components/ui/drawer/drawer-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/drawer/drawer.component.ts +4 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-content.component.ts +3 -2
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-group.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-item.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-label.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.component.ts +2 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-separator.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.component.ts +3 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.component.ts +30 -3
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub.component.ts +4 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-trigger.component.ts +26 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu.component.ts +1 -0
- package/src/app/lib/components/ui/empty/empty-action.component.ts +1 -0
- package/src/app/lib/components/ui/empty/empty-description.component.ts +1 -0
- package/src/app/lib/components/ui/empty/empty-icon.component.ts +2 -1
- package/src/app/lib/components/ui/empty/empty-title.component.ts +1 -0
- package/src/app/lib/components/ui/empty/empty.component.ts +1 -0
- package/src/app/lib/components/ui/form/form-description.component.ts +2 -2
- package/src/app/lib/components/ui/hover-card/hover-card-content.component.ts +109 -60
- package/src/app/lib/components/ui/hover-card/hover-card-context.ts +4 -2
- package/src/app/lib/components/ui/hover-card/hover-card-trigger.component.ts +6 -3
- package/src/app/lib/components/ui/hover-card/hover-card.component.ts +9 -3
- package/src/app/lib/components/ui/input-group/input-group-addon.component.ts +1 -0
- package/src/app/lib/components/ui/input-group/input-group-input.component.ts +1 -0
- package/src/app/lib/components/ui/input-group/input-group.component.ts +1 -0
- package/src/app/lib/components/ui/input-otp/input-otp-group.component.ts +1 -0
- package/src/app/lib/components/ui/input-otp/input-otp-separator.component.ts +1 -0
- package/src/app/lib/components/ui/input-otp/input-otp-slot.component.ts +1 -0
- package/src/app/lib/components/ui/input-otp/input-otp.component.ts +1 -0
- package/src/app/lib/components/ui/kbd/kbd.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-checkbox-item.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-content.component.ts +2 -1
- package/src/app/lib/components/ui/menubar/menubar-item.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-label.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-menu.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-radio-group.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-radio-item.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-separator.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-shortcut.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-sub-content.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-sub-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-sub.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/menubar/menubar.component.ts +1 -0
- package/src/app/lib/components/ui/native-select/native-select.component.ts +1 -1
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-content.component.ts +8 -1
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-context.ts +14 -0
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-indicator.component.ts +1 -0
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-item.component.ts +10 -4
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-link.component.ts +1 -0
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-list.component.ts +1 -0
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-trigger.component.ts +70 -2
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-viewport.component.ts +1 -0
- package/src/app/lib/components/ui/navigation-menu/navigation-menu.component.ts +36 -4
- package/src/app/lib/components/ui/pagination/pagination-content.component.ts +1 -0
- package/src/app/lib/components/ui/pagination/pagination-ellipsis.component.ts +1 -0
- package/src/app/lib/components/ui/pagination/pagination-item.component.ts +1 -0
- package/src/app/lib/components/ui/pagination/pagination-link.component.ts +1 -0
- package/src/app/lib/components/ui/pagination/pagination-next.component.ts +1 -0
- package/src/app/lib/components/ui/pagination/pagination-previous.component.ts +1 -0
- package/src/app/lib/components/ui/pagination/pagination.component.ts +4 -1
- package/src/app/lib/components/ui/popover/popover-anchor.component.ts +1 -0
- package/src/app/lib/components/ui/popover/popover-content.component.ts +12 -0
- package/src/app/lib/components/ui/popover/popover-context.ts +2 -0
- package/src/app/lib/components/ui/popover/popover-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/popover/popover.component.ts +5 -0
- package/src/app/lib/components/ui/progress/progress.component.ts +1 -2
- package/src/app/lib/components/ui/resizable/resizable-handle.component.ts +1 -0
- package/src/app/lib/components/ui/resizable/resizable-panel-group.component.ts +1 -0
- package/src/app/lib/components/ui/resizable/resizable-panel.component.ts +1 -0
- package/src/app/lib/components/ui/scroll-area/scroll-area.component.ts +8 -6
- package/src/app/lib/components/ui/scroll-area/scroll-bar.component.ts +1 -0
- package/src/app/lib/components/ui/segmented/segmented-item.component.ts +1 -0
- package/src/app/lib/components/ui/segmented/segmented.component.ts +1 -0
- package/src/app/lib/components/ui/select/select-content.component.ts +38 -17
- package/src/app/lib/components/ui/select/select-context.ts +10 -0
- package/src/app/lib/components/ui/select/select-item.component.ts +25 -7
- package/src/app/lib/components/ui/select/select-trigger.component.ts +6 -13
- package/src/app/lib/components/ui/select/select.component.ts +46 -0
- package/src/app/lib/components/ui/sheet/sheet-close.component.ts +1 -0
- package/src/app/lib/components/ui/sheet/sheet-content.component.ts +23 -5
- package/src/app/lib/components/ui/sheet/sheet-description.component.ts +1 -0
- package/src/app/lib/components/ui/sheet/sheet-footer.component.ts +1 -0
- package/src/app/lib/components/ui/sheet/sheet-header.component.ts +1 -0
- package/src/app/lib/components/ui/sheet/sheet-title.component.ts +1 -0
- package/src/app/lib/components/ui/sheet/sheet-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/sheet/sheet.component.ts +4 -0
- package/src/app/lib/components/ui/sidebar/sidebar-content.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-footer.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-group-action.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-group-content.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-group-label.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-group.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-header.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-input.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-inset.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-action.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-badge.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-button.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-item.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-skeleton.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-button.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-item.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu-sub.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-menu.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-provider.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-rail.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-separator.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/sidebar/sidebar.component.ts +1 -0
- package/src/app/lib/components/ui/slider/slider.component.ts +2 -2
- package/src/app/lib/components/ui/sonner/index.ts +2 -0
- package/src/app/lib/components/ui/sonner/sonner.component.ts +70 -0
- package/src/app/lib/components/ui/spinner/spinner.component.ts +1 -0
- package/src/app/lib/components/ui/switch/switch.component.ts +1 -14
- package/src/app/lib/components/ui/table/table-body.component.ts +1 -0
- package/src/app/lib/components/ui/table/table-caption.component.ts +1 -0
- package/src/app/lib/components/ui/table/table-cell.component.ts +1 -0
- package/src/app/lib/components/ui/table/table-footer.component.ts +1 -0
- package/src/app/lib/components/ui/table/table-head.component.ts +1 -0
- package/src/app/lib/components/ui/table/table-header.component.ts +1 -0
- package/src/app/lib/components/ui/table/table-row.component.ts +1 -0
- package/src/app/lib/components/ui/table/table.component.ts +1 -0
- package/src/app/lib/components/ui/tabs/tabs-content.component.ts +3 -6
- package/src/app/lib/components/ui/tabs/tabs-list.component.ts +19 -0
- package/src/app/lib/components/ui/tabs/tabs-trigger.component.ts +1 -1
- package/src/app/lib/components/ui/tabs/tabs.component.ts +1 -0
- package/src/app/lib/components/ui/toast/toast-action.component.ts +1 -0
- package/src/app/lib/components/ui/toast/toast-description.component.ts +1 -0
- package/src/app/lib/components/ui/toast/toast-title.component.ts +1 -0
- package/src/app/lib/components/ui/toast/toast.component.ts +1 -0
- package/src/app/lib/components/ui/toast/toaster.component.ts +1 -0
- package/src/app/lib/components/ui/toggle/toggle-variants.ts +1 -1
- package/src/app/lib/components/ui/toggle/toggle.component.ts +12 -6
- package/src/app/lib/components/ui/tooltip/tooltip-content.component.ts +142 -17
- package/src/app/lib/components/ui/tooltip/tooltip-context.ts +3 -1
- package/src/app/lib/components/ui/tooltip/tooltip-provider.component.ts +5 -1
- package/src/app/lib/components/ui/tooltip/tooltip-trigger.component.ts +6 -2
- package/src/app/lib/components/ui/tooltip/tooltip.component.ts +4 -1
- package/src/app/lib/components/ui/typography/typography-blockquote.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-h1.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-h2.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-h3.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-h4.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-inline-code.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-large.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-lead.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-list.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-muted.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-p.component.ts +1 -0
- package/src/app/lib/components/ui/typography/typography-small.component.ts +1 -0
|
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
11
11
|
selector: 'TableHead',
|
|
12
12
|
template: `<th [scope]="scope()" [class]="computedClass()"><ng-content /></th>`,
|
|
13
13
|
host: {
|
|
14
|
+
'attr.data-slot': '"table-head"',
|
|
14
15
|
class: 'contents',
|
|
15
16
|
},
|
|
16
17
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -59,18 +59,15 @@ export interface TabsContentProps {
|
|
|
59
59
|
*/
|
|
60
60
|
@Component({
|
|
61
61
|
selector: 'TabsContent',
|
|
62
|
-
template:
|
|
63
|
-
@if (shouldRender()) {
|
|
64
|
-
<ng-content />
|
|
65
|
-
}
|
|
66
|
-
`,
|
|
62
|
+
template: `<ng-content />`,
|
|
67
63
|
host: {
|
|
64
|
+
'attr.data-slot': '"tabs-content"',
|
|
68
65
|
'[class]': 'computedClass()',
|
|
69
66
|
'[attr.id]': 'panelId()',
|
|
70
67
|
'[attr.data-state]': 'state()',
|
|
71
68
|
'[attr.data-orientation]': 'tabs.orientation()',
|
|
72
69
|
'[attr.aria-labelledby]': 'tabId()',
|
|
73
|
-
'[attr.hidden]': '!isActive() ? true : null',
|
|
70
|
+
'[attr.hidden]': '!isActive() && !forceMount() ? true : null',
|
|
74
71
|
'[attr.tabindex]': 'isActive() ? 0 : -1',
|
|
75
72
|
role: 'tabpanel',
|
|
76
73
|
},
|
|
@@ -86,6 +86,7 @@ export interface TabsListProps {
|
|
|
86
86
|
}
|
|
87
87
|
`,
|
|
88
88
|
host: {
|
|
89
|
+
'attr.data-slot': '"tabs-list"',
|
|
89
90
|
'[class]': 'computedClass()',
|
|
90
91
|
role: 'tablist',
|
|
91
92
|
'[attr.id]': 'tabs.tablistId',
|
|
@@ -186,6 +187,12 @@ export class TabsList {
|
|
|
186
187
|
|
|
187
188
|
if (handled) {
|
|
188
189
|
event.preventDefault();
|
|
190
|
+
|
|
191
|
+
// Skip disabled tabs — scan in the movement direction
|
|
192
|
+
const direction =
|
|
193
|
+
event.key === 'ArrowLeft' || event.key === 'ArrowUp' || event.key === 'End' ? -1 : 1;
|
|
194
|
+
newIndex = this.findEnabledIndex(tabValues, newIndex, direction);
|
|
195
|
+
|
|
189
196
|
const newValue = tabValues[newIndex];
|
|
190
197
|
|
|
191
198
|
// In automatic mode, activate on focus; in manual mode, just focus
|
|
@@ -200,6 +207,18 @@ export class TabsList {
|
|
|
200
207
|
}
|
|
201
208
|
}
|
|
202
209
|
|
|
210
|
+
private findEnabledIndex(tabValues: string[], startIndex: number, direction: 1 | -1): number {
|
|
211
|
+
const length = tabValues.length;
|
|
212
|
+
let index = startIndex;
|
|
213
|
+
for (let i = 0; i < length; i++) {
|
|
214
|
+
const tabId = this.tabs.getTabId(tabValues[index]);
|
|
215
|
+
const el = document.getElementById(tabId);
|
|
216
|
+
if (!el?.hasAttribute('data-disabled')) return index;
|
|
217
|
+
index = ((index + direction) + length) % length;
|
|
218
|
+
}
|
|
219
|
+
return startIndex;
|
|
220
|
+
}
|
|
221
|
+
|
|
203
222
|
private updateIndicator(): void {
|
|
204
223
|
const activeValue = this.tabs.value();
|
|
205
224
|
if (!activeValue) return;
|
|
@@ -74,6 +74,7 @@ export interface TabsTriggerProps {
|
|
|
74
74
|
selector: 'TabsTrigger',
|
|
75
75
|
template: `<ng-content />`,
|
|
76
76
|
host: {
|
|
77
|
+
'attr.data-slot': '"tabs-trigger"',
|
|
77
78
|
'[class]': 'computedClass()',
|
|
78
79
|
'[attr.id]': 'tabId()',
|
|
79
80
|
'[attr.data-state]': 'state()',
|
|
@@ -82,7 +83,6 @@ export interface TabsTriggerProps {
|
|
|
82
83
|
'[attr.aria-controls]': 'panelId()',
|
|
83
84
|
'[attr.aria-disabled]': 'disabled() || null',
|
|
84
85
|
'[attr.tabindex]': 'isActive() ? 0 : -1',
|
|
85
|
-
'[attr.disabled]': 'disabled() ? "" : null',
|
|
86
86
|
'(click)': 'onClick()',
|
|
87
87
|
'(keydown.enter)': 'onClick()',
|
|
88
88
|
'(keydown.space)': 'onSpace($event)',
|
|
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
|
|
6
6
|
* WCAG AA compliant contrast ratios for all variants
|
|
7
7
|
*/
|
|
8
8
|
export const toggleVariants = cva(
|
|
9
|
-
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground transition-colors hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none",
|
|
9
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground transition-colors hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 [&_lucide-icon]:pointer-events-none [&_lucide-icon:not([class*='size-'])]:size-4 [&_lucide-icon]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
input,
|
|
8
8
|
model,
|
|
9
9
|
output,
|
|
10
|
+
signal,
|
|
10
11
|
} from '@angular/core';
|
|
11
12
|
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
12
13
|
import { toggleVariants, type ToggleVariants } from './toggle-variants';
|
|
@@ -97,8 +98,8 @@ export type ToggleProps = {
|
|
|
97
98
|
type: 'button',
|
|
98
99
|
'[attr.aria-pressed]': 'pressed()',
|
|
99
100
|
'[attr.data-state]': 'state()',
|
|
100
|
-
'[attr.data-disabled]': '
|
|
101
|
-
'[attr.disabled]': '
|
|
101
|
+
'[attr.data-disabled]': 'isDisabled() ? "" : null',
|
|
102
|
+
'[attr.disabled]': 'isDisabled() ? "" : null',
|
|
102
103
|
'(click)': 'toggle()',
|
|
103
104
|
'data-slot': 'toggle',
|
|
104
105
|
},
|
|
@@ -136,6 +137,9 @@ export class Toggle implements ControlValueAccessor {
|
|
|
136
137
|
/** Additional CSS classes to apply */
|
|
137
138
|
readonly class = input<string>('');
|
|
138
139
|
|
|
140
|
+
/** Whether the toggle is effectively disabled (input or Angular Forms) */
|
|
141
|
+
protected readonly isDisabled = computed(() => this.disabled() || this.isFormsDisabled());
|
|
142
|
+
|
|
139
143
|
/** Current state for data attribute */
|
|
140
144
|
protected readonly state = computed((): ToggleState => (this.pressed() ? 'on' : 'off'));
|
|
141
145
|
/** Computed class combining variants and custom classes */
|
|
@@ -149,17 +153,19 @@ export class Toggle implements ControlValueAccessor {
|
|
|
149
153
|
),
|
|
150
154
|
);
|
|
151
155
|
|
|
156
|
+
/** Tracks disabled state set by Angular Forms (.disable() / .enable()) */
|
|
157
|
+
private readonly isFormsDisabled = signal<boolean>(false);
|
|
158
|
+
|
|
152
159
|
/** ControlValueAccessor callbacks */
|
|
153
160
|
private onChange: (value: boolean) => void = () => {};
|
|
154
161
|
private onTouched: () => void = () => {};
|
|
155
|
-
setDisabledState
|
|
156
|
-
|
|
157
|
-
// Angular forms will call this but we use the input binding
|
|
162
|
+
setDisabledState(isDisabled: boolean): void {
|
|
163
|
+
this.isFormsDisabled.set(isDisabled);
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
/** Toggle the pressed state */
|
|
161
167
|
toggle(): void {
|
|
162
|
-
if (!this.
|
|
168
|
+
if (!this.isDisabled()) {
|
|
163
169
|
const newValue = !this.pressed();
|
|
164
170
|
this.pressed.set(newValue);
|
|
165
171
|
this.onChange(newValue);
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import { cn, Presence } from '@/lib/utils';
|
|
2
|
-
import {
|
|
1
|
+
import { Align, cn, computePosition, getTransformOrigin, Presence, Side } from '@/lib/utils';
|
|
2
|
+
import {
|
|
3
|
+
afterNextRender,
|
|
4
|
+
ChangeDetectionStrategy,
|
|
5
|
+
Component,
|
|
6
|
+
computed,
|
|
7
|
+
effect,
|
|
8
|
+
ElementRef,
|
|
9
|
+
inject,
|
|
10
|
+
Injector,
|
|
11
|
+
input,
|
|
12
|
+
signal,
|
|
13
|
+
} from '@angular/core';
|
|
3
14
|
import { TOOLTIP_CONTEXT, TooltipAlign, TooltipSide } from './tooltip-context';
|
|
4
15
|
|
|
5
16
|
export type TooltipContentState = 'open' | 'closed';
|
|
@@ -34,7 +45,8 @@ export interface TooltipContentProps {
|
|
|
34
45
|
*
|
|
35
46
|
* @description
|
|
36
47
|
* TooltipContent displays the actual tooltip content. It supports positioning
|
|
37
|
-
* on different sides and alignments relative to the trigger
|
|
48
|
+
* on different sides and alignments relative to the trigger using fixed positioning
|
|
49
|
+
* via computePosition to avoid clipping inside overflow:hidden ancestors.
|
|
38
50
|
*
|
|
39
51
|
* ## Features
|
|
40
52
|
* - Configurable side (top, right, bottom, left)
|
|
@@ -42,10 +54,14 @@ export interface TooltipContentProps {
|
|
|
42
54
|
* - Customizable offset from trigger
|
|
43
55
|
* - Smooth enter/exit animations
|
|
44
56
|
* - Uses Presence for proper exit animations
|
|
57
|
+
* - Fixed positioning — not clipped by overflow:hidden ancestors
|
|
58
|
+
* - Escape key to dismiss
|
|
59
|
+
* - disableHoverableContent support
|
|
45
60
|
*
|
|
46
61
|
* ## Accessibility
|
|
47
62
|
* - `role="tooltip"` on the element
|
|
48
63
|
* - Unique ID for aria-describedby relationship with trigger
|
|
64
|
+
* - Escape key dismisses tooltip (WCAG 1.4.13)
|
|
49
65
|
*
|
|
50
66
|
* @example Basic usage
|
|
51
67
|
* ```html
|
|
@@ -81,21 +97,49 @@ export interface TooltipContentProps {
|
|
|
81
97
|
<div
|
|
82
98
|
[class]="computedClass()"
|
|
83
99
|
[attr.data-state]="state()"
|
|
84
|
-
[attr.data-side]="
|
|
85
|
-
[attr.data-align]="
|
|
100
|
+
[attr.data-side]="computedSide()"
|
|
101
|
+
[attr.data-align]="computedAlign()"
|
|
102
|
+
[style]="positionStyles()"
|
|
86
103
|
role="tooltip"
|
|
87
104
|
[id]="context.tooltipId"
|
|
105
|
+
(mouseenter)="onMouseEnter()"
|
|
88
106
|
>
|
|
89
107
|
<ng-content />
|
|
90
108
|
</div>
|
|
91
109
|
</Presence>
|
|
92
110
|
`,
|
|
93
111
|
host: {
|
|
112
|
+
'attr.data-slot': '"tooltip-content"',
|
|
94
113
|
class: 'contents',
|
|
114
|
+
'(document:keydown.escape)': 'onEscape()',
|
|
95
115
|
},
|
|
96
116
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
97
117
|
})
|
|
98
118
|
export class TooltipContent {
|
|
119
|
+
constructor() {
|
|
120
|
+
// Recalculate position when open state changes (browser-only via afterNextRender)
|
|
121
|
+
effect(() => {
|
|
122
|
+
const isOpen = this.context.open();
|
|
123
|
+
if (isOpen) {
|
|
124
|
+
this.isPositioned.set(false);
|
|
125
|
+
afterNextRender(
|
|
126
|
+
() => {
|
|
127
|
+
this.schedulePositionUpdate();
|
|
128
|
+
},
|
|
129
|
+
{ injector: this._injector },
|
|
130
|
+
);
|
|
131
|
+
} else {
|
|
132
|
+
this.cancelScheduledPositionUpdate();
|
|
133
|
+
this.isPositioned.set(false);
|
|
134
|
+
this.positionStyles.set({
|
|
135
|
+
position: 'fixed',
|
|
136
|
+
top: '-9999px',
|
|
137
|
+
left: '-9999px',
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
99
143
|
/** The preferred side of the trigger to render against */
|
|
100
144
|
readonly side = input<TooltipSide>('top');
|
|
101
145
|
/** The distance in pixels from the trigger */
|
|
@@ -107,29 +151,110 @@ export class TooltipContent {
|
|
|
107
151
|
/** Additional CSS classes */
|
|
108
152
|
readonly class = input<string>('');
|
|
109
153
|
|
|
154
|
+
private readonly _elementRef = inject(ElementRef);
|
|
155
|
+
private readonly _injector = inject(Injector);
|
|
156
|
+
|
|
110
157
|
protected readonly context = inject(TOOLTIP_CONTEXT);
|
|
111
158
|
|
|
159
|
+
protected readonly isPositioned = signal(false);
|
|
160
|
+
/** Computed position after collision detection */
|
|
161
|
+
protected readonly computedSide = signal<Side>('top');
|
|
162
|
+
protected readonly computedAlign = signal<Align>('center');
|
|
163
|
+
protected readonly positionStyles = signal<Record<string, string>>({
|
|
164
|
+
position: 'fixed',
|
|
165
|
+
top: '-9999px',
|
|
166
|
+
left: '-9999px',
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
private positionFrameId: number | null = null;
|
|
170
|
+
|
|
112
171
|
/** Current state: open or closed */
|
|
113
172
|
protected readonly state = computed<TooltipContentState>(() =>
|
|
114
173
|
this.context.open() ? 'open' : 'closed',
|
|
115
174
|
);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
left: 'right-full top-1/2 -translate-y-1/2 mr-2',
|
|
121
|
-
right: 'left-full top-1/2 -translate-y-1/2 ml-2',
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
return cn(
|
|
125
|
-
'absolute z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md',
|
|
175
|
+
|
|
176
|
+
protected readonly computedClass = computed(() =>
|
|
177
|
+
cn(
|
|
178
|
+
'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md',
|
|
126
179
|
'data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
127
180
|
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
128
181
|
'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
|
129
182
|
'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',
|
|
130
183
|
'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
131
|
-
|
|
184
|
+
!this.isPositioned() && 'opacity-0 pointer-events-none',
|
|
132
185
|
this.class(),
|
|
186
|
+
),
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
onMouseEnter(): void {
|
|
190
|
+
if (this.context.disableHoverableContent?.()) {
|
|
191
|
+
this.context.setOpen(false);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
protected onEscape(): void {
|
|
196
|
+
if (this.context.open()) {
|
|
197
|
+
this.context.setOpen(false);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
private schedulePositionUpdate(): void {
|
|
202
|
+
this.cancelScheduledPositionUpdate();
|
|
203
|
+
|
|
204
|
+
this.positionFrameId = requestAnimationFrame(() => {
|
|
205
|
+
this.updatePosition();
|
|
206
|
+
|
|
207
|
+
this.positionFrameId = requestAnimationFrame(() => {
|
|
208
|
+
this.updatePosition();
|
|
209
|
+
this.positionFrameId = null;
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
private cancelScheduledPositionUpdate(): void {
|
|
215
|
+
if (this.positionFrameId !== null) {
|
|
216
|
+
cancelAnimationFrame(this.positionFrameId);
|
|
217
|
+
this.positionFrameId = null;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
private updatePosition(): void {
|
|
222
|
+
const triggerElement = this.context.triggerRef?.();
|
|
223
|
+
const contentElement = this._elementRef.nativeElement.querySelector(
|
|
224
|
+
'[role="tooltip"]',
|
|
225
|
+
) as HTMLElement;
|
|
226
|
+
|
|
227
|
+
if (!triggerElement || !contentElement) return;
|
|
228
|
+
|
|
229
|
+
const triggerRect = triggerElement.getBoundingClientRect();
|
|
230
|
+
const contentRect = contentElement.getBoundingClientRect();
|
|
231
|
+
const overlayWidth = Math.round(contentRect.width || 100);
|
|
232
|
+
const overlayHeight = Math.round(contentRect.height || 32);
|
|
233
|
+
|
|
234
|
+
const result = computePosition(
|
|
235
|
+
triggerRect,
|
|
236
|
+
{ width: overlayWidth, height: overlayHeight },
|
|
237
|
+
{
|
|
238
|
+
side: this.side() as Side,
|
|
239
|
+
align: this.align() as Align,
|
|
240
|
+
sideOffset: this.sideOffset(),
|
|
241
|
+
alignOffset: this.alignOffset(),
|
|
242
|
+
avoidCollisions: true,
|
|
243
|
+
collisionPadding: 8,
|
|
244
|
+
},
|
|
133
245
|
);
|
|
134
|
-
|
|
246
|
+
|
|
247
|
+
this.computedSide.set(result.side);
|
|
248
|
+
this.computedAlign.set(result.align);
|
|
249
|
+
|
|
250
|
+
// Set position styles with transform origin for animations
|
|
251
|
+
const transformOrigin = getTransformOrigin(result.side, result.align);
|
|
252
|
+
this.positionStyles.set({
|
|
253
|
+
position: 'fixed',
|
|
254
|
+
top: result.styles.top || '',
|
|
255
|
+
left: result.styles.left || '',
|
|
256
|
+
'--radix-tooltip-content-transform-origin': transformOrigin,
|
|
257
|
+
});
|
|
258
|
+
this.isPositioned.set(true);
|
|
259
|
+
}
|
|
135
260
|
}
|
|
@@ -9,13 +9,15 @@ export interface TooltipContextValue {
|
|
|
9
9
|
/** Set open state */
|
|
10
10
|
setOpen: (open: boolean) => void;
|
|
11
11
|
/** Delay before showing tooltip (ms) */
|
|
12
|
-
delayDuration: number;
|
|
12
|
+
delayDuration: () => number;
|
|
13
13
|
/** Skip delay duration when quickly hovering between tooltips (ms) */
|
|
14
14
|
skipDelayDuration: number;
|
|
15
15
|
/** Unique ID for aria-describedby relationship */
|
|
16
16
|
tooltipId: string;
|
|
17
17
|
/** Whether hoverable content is disabled */
|
|
18
18
|
disableHoverableContent: () => boolean;
|
|
19
|
+
/** Reference to the trigger element for fixed positioning */
|
|
20
|
+
triggerRef?: WritableSignal<HTMLElement | null>;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export const TOOLTIP_CONTEXT = new InjectionToken<TooltipContextValue>('TOOLTIP_CONTEXT');
|
|
@@ -52,6 +52,10 @@ export interface TooltipProviderProps {
|
|
|
52
52
|
@Component({
|
|
53
53
|
selector: 'TooltipProvider',
|
|
54
54
|
template: `<ng-content />`,
|
|
55
|
+
host: {
|
|
56
|
+
'attr.data-slot': '"tooltip-provider"',
|
|
57
|
+
style: 'display: contents',
|
|
58
|
+
},
|
|
55
59
|
providers: [
|
|
56
60
|
{
|
|
57
61
|
provide: TOOLTIP_CONTEXT,
|
|
@@ -69,7 +73,7 @@ export class TooltipProvider implements TooltipContextValue {
|
|
|
69
73
|
/** Unique ID for aria-describedby relationship */
|
|
70
74
|
readonly tooltipId = `tooltip-provider-${++tooltipIdCounter}`;
|
|
71
75
|
/** The duration from when the pointer enters the trigger until the tooltip opens */
|
|
72
|
-
readonly delayDuration = 700;
|
|
76
|
+
readonly delayDuration = input<number>(700);
|
|
73
77
|
/** How much time a user has to enter another trigger without incurring a delay again */
|
|
74
78
|
readonly skipDelayDuration = 300;
|
|
75
79
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, inject, input, OnDestroy } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, inject, input, OnDestroy } from '@angular/core';
|
|
2
2
|
import { TOOLTIP_CONTEXT } from './tooltip-context';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -54,6 +54,7 @@ export interface TooltipTriggerProps {
|
|
|
54
54
|
selector: 'TooltipTrigger',
|
|
55
55
|
template: `<ng-content />`,
|
|
56
56
|
host: {
|
|
57
|
+
'attr.data-slot': '"tooltip-trigger"',
|
|
57
58
|
'(mouseenter)': 'onMouseEnter()',
|
|
58
59
|
'(mouseleave)': 'onMouseLeave()',
|
|
59
60
|
'(focus)': 'onFocus()',
|
|
@@ -69,6 +70,7 @@ export class TooltipTrigger implements OnDestroy {
|
|
|
69
70
|
readonly asChild = input<boolean>(false);
|
|
70
71
|
|
|
71
72
|
protected readonly context = inject(TOOLTIP_CONTEXT);
|
|
73
|
+
private readonly _elementRef = inject(ElementRef);
|
|
72
74
|
|
|
73
75
|
private showTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
74
76
|
private hideTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
@@ -79,9 +81,10 @@ export class TooltipTrigger implements OnDestroy {
|
|
|
79
81
|
|
|
80
82
|
onMouseEnter(): void {
|
|
81
83
|
this.clearTimeouts();
|
|
84
|
+
this.context.triggerRef?.set(this._elementRef.nativeElement);
|
|
82
85
|
this.showTimeout = setTimeout(() => {
|
|
83
86
|
this.context.setOpen(true);
|
|
84
|
-
}, this.context.delayDuration);
|
|
87
|
+
}, this.context.delayDuration());
|
|
85
88
|
}
|
|
86
89
|
onMouseLeave(): void {
|
|
87
90
|
this.clearTimeouts();
|
|
@@ -92,6 +95,7 @@ export class TooltipTrigger implements OnDestroy {
|
|
|
92
95
|
}
|
|
93
96
|
onFocus(): void {
|
|
94
97
|
// Show immediately on focus for keyboard users
|
|
98
|
+
this.context.triggerRef?.set(this._elementRef.nativeElement);
|
|
95
99
|
this.context.setOpen(true);
|
|
96
100
|
}
|
|
97
101
|
onBlur(): void {
|
|
@@ -96,6 +96,7 @@ export interface TooltipProps {
|
|
|
96
96
|
selector: 'Tooltip',
|
|
97
97
|
template: `<ng-content />`,
|
|
98
98
|
host: {
|
|
99
|
+
'attr.data-slot': '"tooltip"',
|
|
99
100
|
class: 'relative inline-block',
|
|
100
101
|
},
|
|
101
102
|
providers: [
|
|
@@ -125,9 +126,11 @@ export class Tooltip implements TooltipContextValue {
|
|
|
125
126
|
readonly disableHoverableContent = input<boolean>(false);
|
|
126
127
|
|
|
127
128
|
readonly open = signal(false);
|
|
129
|
+
/** Reference to the trigger element for fixed positioning */
|
|
130
|
+
readonly triggerRef = signal<HTMLElement | null>(null);
|
|
128
131
|
|
|
129
132
|
/** The duration from when the pointer enters the trigger until the tooltip opens */
|
|
130
|
-
readonly delayDuration = 700;
|
|
133
|
+
readonly delayDuration = input<number>(700);
|
|
131
134
|
/** How much time a user has to enter another trigger without incurring a delay again */
|
|
132
135
|
readonly skipDelayDuration = 300;
|
|
133
136
|
/** Unique ID for aria-describedby relationship */
|
|
@@ -13,6 +13,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
13
13
|
selector: 'TypographyBlockquote',
|
|
14
14
|
template: `<ng-content />`,
|
|
15
15
|
host: {
|
|
16
|
+
'attr.data-slot': '"typography-blockquote"',
|
|
16
17
|
'[class]': 'computedClass()',
|
|
17
18
|
style: 'display: block',
|
|
18
19
|
},
|
|
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
11
11
|
selector: 'TypographyInlineCode',
|
|
12
12
|
template: `<ng-content />`,
|
|
13
13
|
host: {
|
|
14
|
+
'attr.data-slot': '"typography-inline-code"',
|
|
14
15
|
'[class]': 'computedClass()',
|
|
15
16
|
},
|
|
16
17
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
11
11
|
selector: 'TypographyLarge',
|
|
12
12
|
template: `<ng-content />`,
|
|
13
13
|
host: {
|
|
14
|
+
'attr.data-slot': '"typography-large"',
|
|
14
15
|
'[class]': 'computedClass()',
|
|
15
16
|
},
|
|
16
17
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -13,6 +13,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
13
13
|
selector: 'TypographyLead',
|
|
14
14
|
template: `<ng-content />`,
|
|
15
15
|
host: {
|
|
16
|
+
'attr.data-slot': '"typography-lead"',
|
|
16
17
|
'[class]': 'computedClass()',
|
|
17
18
|
style: 'display: block',
|
|
18
19
|
},
|
|
@@ -14,6 +14,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
14
14
|
selector: 'TypographyList',
|
|
15
15
|
template: `<ng-content />`,
|
|
16
16
|
host: {
|
|
17
|
+
'attr.data-slot': '"typography-list"',
|
|
17
18
|
'[class]': 'computedClass()',
|
|
18
19
|
},
|
|
19
20
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
11
11
|
selector: 'TypographyMuted',
|
|
12
12
|
template: `<ng-content />`,
|
|
13
13
|
host: {
|
|
14
|
+
'attr.data-slot': '"typography-muted"',
|
|
14
15
|
'[class]': 'computedClass()',
|
|
15
16
|
},
|
|
16
17
|
changeDetection: ChangeDetectionStrategy.OnPush,
|