@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
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, input
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
2
|
import { AvatarFallback } from './avatar-fallback.component';
|
|
3
|
+
import { AvatarImage } from './avatar-image.component';
|
|
3
4
|
import { Avatar } from './avatar.component';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Convenience component combining Avatar + AvatarImage + AvatarFallback.
|
|
8
|
+
* Error handling is automatic via the shared Avatar context.
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
|
-
* <ui-avatar
|
|
11
|
-
* src="/avatar.png"
|
|
12
|
-
* alt="John Doe"
|
|
13
|
-
* fallback="JD"
|
|
14
|
-
* />
|
|
11
|
+
* <ui-avatar src="/avatar.png" alt="John Doe" fallback="JD" />
|
|
15
12
|
*/
|
|
16
13
|
@Component({
|
|
17
14
|
selector: 'ui-avatar',
|
|
18
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
-
imports: [Avatar, AvatarFallback],
|
|
16
|
+
imports: [Avatar, AvatarImage, AvatarFallback],
|
|
17
|
+
host: {
|
|
18
|
+
'attr.data-slot': '"ui-avatar"',
|
|
19
|
+
style: 'display: contents',
|
|
20
|
+
},
|
|
20
21
|
template: `
|
|
21
22
|
<Avatar [class]="class()">
|
|
22
|
-
@if (src()
|
|
23
|
-
<
|
|
24
|
-
}
|
|
25
|
-
@if (!src() || imageError()) {
|
|
26
|
-
<AvatarFallback>{{ fallback() }}</AvatarFallback>
|
|
23
|
+
@if (src()) {
|
|
24
|
+
<AvatarImage [src]="src()" [alt]="alt()" />
|
|
27
25
|
}
|
|
26
|
+
<AvatarFallback>{{ fallback() }}</AvatarFallback>
|
|
28
27
|
</Avatar>
|
|
29
28
|
`,
|
|
30
29
|
})
|
|
@@ -33,10 +32,4 @@ export class UiAvatar {
|
|
|
33
32
|
readonly alt = input<string>('');
|
|
34
33
|
readonly fallback = input<string>('');
|
|
35
34
|
readonly class = input<string>('');
|
|
36
|
-
|
|
37
|
-
protected readonly imageError = signal(false);
|
|
38
|
-
|
|
39
|
-
protected onImageError(): void {
|
|
40
|
-
this.imageError.set(true);
|
|
41
|
-
}
|
|
42
35
|
}
|
|
@@ -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 badgeVariants = cva(
|
|
9
|
-
'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
|
|
9
|
+
'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 [&>lucide-icon]:size-3 gap-1 [&>svg]:pointer-events-none [&>lucide-icon]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
@@ -27,6 +27,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
27
27
|
<span class="sr-only">More</span>
|
|
28
28
|
`,
|
|
29
29
|
host: {
|
|
30
|
+
'attr.data-slot': '"breadcrumb-ellipsis"',
|
|
30
31
|
role: 'presentation',
|
|
31
32
|
'[attr.aria-hidden]': '"true"',
|
|
32
33
|
'[class]': 'computedClass()',
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* BreadcrumbItem component - li container.
|
|
6
|
-
* Matches shadcn/ui React BreadcrumbItem exactly.
|
|
7
|
-
*/
|
|
8
4
|
@Component({
|
|
9
5
|
selector: 'BreadcrumbItem',
|
|
10
|
-
template: `<ng-content
|
|
6
|
+
template: `<li [class]="computedClass()"><ng-content /></li>`,
|
|
11
7
|
host: {
|
|
12
|
-
'
|
|
8
|
+
'attr.data-slot': '"breadcrumb-item"',
|
|
9
|
+
style: 'display:contents',
|
|
13
10
|
},
|
|
14
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
12
|
})
|
|
16
13
|
export class BreadcrumbItem {
|
|
17
|
-
/** Additional CSS classes */
|
|
18
14
|
readonly class = input<string>('');
|
|
19
15
|
|
|
20
16
|
protected readonly computedClass = computed(() =>
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* BreadcrumbLink component - anchor link.
|
|
6
|
-
* Matches shadcn/ui React BreadcrumbLink exactly.
|
|
7
|
-
*/
|
|
8
4
|
@Component({
|
|
9
5
|
selector: 'BreadcrumbLink',
|
|
10
|
-
template: `<ng-content
|
|
6
|
+
template: `<a [attr.href]="href()" [class]="computedClass()"><ng-content /></a>`,
|
|
11
7
|
host: {
|
|
12
|
-
'
|
|
13
|
-
|
|
8
|
+
'attr.data-slot': '"breadcrumb-link"',
|
|
9
|
+
style: 'display:contents',
|
|
14
10
|
},
|
|
15
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
12
|
})
|
|
17
13
|
export class BreadcrumbLink {
|
|
18
|
-
|
|
19
|
-
readonly href = input<string>('#');
|
|
20
|
-
|
|
21
|
-
/** Additional CSS classes */
|
|
14
|
+
readonly href = input<string | undefined>(undefined);
|
|
22
15
|
readonly class = input<string>('');
|
|
23
16
|
|
|
24
17
|
protected readonly computedClass = computed(() =>
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* BreadcrumbList component - ol container for items.
|
|
6
|
-
* Matches shadcn/ui React BreadcrumbList exactly.
|
|
7
|
-
*/
|
|
8
4
|
@Component({
|
|
9
5
|
selector: 'BreadcrumbList',
|
|
10
|
-
template: `<ng-content
|
|
6
|
+
template: `<ol [class]="computedClass()"><ng-content /></ol>`,
|
|
11
7
|
host: {
|
|
12
|
-
'
|
|
8
|
+
'attr.data-slot': '"breadcrumb-list"',
|
|
9
|
+
style: 'display:contents',
|
|
13
10
|
},
|
|
14
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
12
|
})
|
|
16
13
|
export class BreadcrumbList {
|
|
17
|
-
/** Additional CSS classes */
|
|
18
14
|
readonly class = input<string>('');
|
|
19
15
|
|
|
20
16
|
protected readonly computedClass = computed(() =>
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
9
9
|
selector: 'BreadcrumbPage',
|
|
10
10
|
template: `<ng-content />`,
|
|
11
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"breadcrumb-page"',
|
|
12
13
|
role: 'link',
|
|
13
14
|
'[attr.aria-disabled]': '"true"',
|
|
14
15
|
'[attr.aria-current]': '"page"',
|
|
@@ -1,39 +1,35 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* BreadcrumbSeparator component - visual separator.
|
|
6
|
-
* Matches shadcn/ui React BreadcrumbSeparator exactly.
|
|
7
|
-
*/
|
|
8
4
|
@Component({
|
|
9
5
|
selector: 'BreadcrumbSeparator',
|
|
10
6
|
template: `
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
<li role="presentation" aria-hidden="true" [class]="computedClass()">
|
|
8
|
+
<ng-content>
|
|
9
|
+
<svg
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
width="24"
|
|
12
|
+
height="24"
|
|
13
|
+
viewBox="0 0 24 24"
|
|
14
|
+
fill="none"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
stroke-width="2"
|
|
17
|
+
stroke-linecap="round"
|
|
18
|
+
stroke-linejoin="round"
|
|
19
|
+
class="h-3.5 w-3.5"
|
|
20
|
+
>
|
|
21
|
+
<path d="m9 18 6-6-6-6" />
|
|
22
|
+
</svg>
|
|
23
|
+
</ng-content>
|
|
24
|
+
</li>
|
|
27
25
|
`,
|
|
28
26
|
host: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'[class]': 'computedClass()',
|
|
27
|
+
'attr.data-slot': '"breadcrumb-separator"',
|
|
28
|
+
style: 'display:contents',
|
|
32
29
|
},
|
|
33
30
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
31
|
})
|
|
35
32
|
export class BreadcrumbSeparator {
|
|
36
|
-
/** Additional CSS classes */
|
|
37
33
|
readonly class = input<string>('');
|
|
38
34
|
|
|
39
35
|
protected readonly computedClass = computed(() =>
|
|
@@ -22,6 +22,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
22
22
|
selector: 'Breadcrumb',
|
|
23
23
|
template: `<ng-content />`,
|
|
24
24
|
host: {
|
|
25
|
+
'attr.data-slot': '"breadcrumb"',
|
|
25
26
|
role: 'navigation',
|
|
26
27
|
'[attr.aria-label]': '"breadcrumb"',
|
|
27
28
|
'[class]': 'computedClass()',
|
|
@@ -20,9 +20,9 @@ export const buttonVariants = cva(
|
|
|
20
20
|
link: 'text-primary underline-offset-4 hover:underline',
|
|
21
21
|
},
|
|
22
22
|
size: {
|
|
23
|
-
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
24
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
25
|
-
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
23
|
+
default: 'h-9 px-4 py-2 has-[>svg]:px-3 has-[>lucide-icon]:px-3',
|
|
24
|
+
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5 has-[>lucide-icon]:px-2.5',
|
|
25
|
+
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4 has-[>lucide-icon]:px-4',
|
|
26
26
|
icon: 'size-9',
|
|
27
27
|
},
|
|
28
28
|
},
|
|
@@ -57,6 +57,7 @@ import { buttonVariants, type ButtonVariants } from './button-variants';
|
|
|
57
57
|
<ng-content />
|
|
58
58
|
`,
|
|
59
59
|
host: {
|
|
60
|
+
'attr.data-slot': '"button"',
|
|
60
61
|
'[class]': 'computedClass()',
|
|
61
62
|
'[attr.disabled]': 'isDisabled() || null',
|
|
62
63
|
'[attr.aria-disabled]': 'isDisabled() || null',
|
|
@@ -26,8 +26,12 @@ import { buttonVariants } from '../button';
|
|
|
26
26
|
@Component({
|
|
27
27
|
selector: 'Calendar',
|
|
28
28
|
imports: [LucideAngularModule],
|
|
29
|
+
host: {
|
|
30
|
+
'attr.data-slot': '"calendar"',
|
|
31
|
+
'[class]': 'computedClass()',
|
|
32
|
+
},
|
|
29
33
|
template: `
|
|
30
|
-
<div
|
|
34
|
+
<div role="application" [attr.aria-label]="ariaLabel()">
|
|
31
35
|
<!-- Header with navigation -->
|
|
32
36
|
<div class="w-full">
|
|
33
37
|
<div class="w-full space-y-4">
|
|
@@ -24,6 +24,7 @@ import { CHART_CONTEXT, type ChartConfig, type ChartContext } from './chart-cont
|
|
|
24
24
|
selector: 'ChartContainer',
|
|
25
25
|
template: `<ng-content />`,
|
|
26
26
|
host: {
|
|
27
|
+
'attr.data-slot': '"chart-container"',
|
|
27
28
|
'[class]': 'computedClass()',
|
|
28
29
|
'[style]': 'chartStyles()',
|
|
29
30
|
'data-chart': '',
|
|
@@ -6,11 +6,11 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
6
6
|
*/
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'ChartLegend',
|
|
9
|
-
template:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
template: `<ng-content />`,
|
|
10
|
+
host: {
|
|
11
|
+
'attr.data-slot': '"chart-legend"',
|
|
12
|
+
'[class]': 'computedClass()',
|
|
13
|
+
},
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
15
|
})
|
|
16
16
|
export class ChartLegend {
|
|
@@ -6,11 +6,11 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
6
6
|
*/
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'ChartTooltipContent',
|
|
9
|
-
template:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
template: `<ng-content />`,
|
|
10
|
+
host: {
|
|
11
|
+
'attr.data-slot': '"chart-tooltip-content"',
|
|
12
|
+
'[class]': 'computedClass()',
|
|
13
|
+
},
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
15
|
})
|
|
16
16
|
export class ChartTooltipContent {
|
|
@@ -6,11 +6,11 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
6
6
|
*/
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'ChartTooltip',
|
|
9
|
-
template:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
template: `<ng-content />`,
|
|
10
|
+
host: {
|
|
11
|
+
'attr.data-slot': '"chart-tooltip"',
|
|
12
|
+
'[class]': 'computedClass()',
|
|
13
|
+
},
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
15
|
})
|
|
16
16
|
export class ChartTooltip {
|
|
@@ -18,10 +18,12 @@ import { COLLAPSIBLE_CONTEXT } from './collapsible-context';
|
|
|
18
18
|
</div>
|
|
19
19
|
`,
|
|
20
20
|
host: {
|
|
21
|
+
'attr.data-slot': '"collapsible-content"',
|
|
21
22
|
'[class]': 'computedClass()',
|
|
22
23
|
'[attr.data-state]': 'collapsible.isOpen() ? "open" : "closed"',
|
|
23
24
|
'[attr.data-disabled]': 'collapsible.disabled() ? "" : null',
|
|
24
|
-
'[attr.
|
|
25
|
+
'[attr.id]': 'collapsible.contentId',
|
|
26
|
+
'[attr.inert]': '!collapsible.isOpen() || null',
|
|
25
27
|
},
|
|
26
28
|
styles: [
|
|
27
29
|
`
|
|
@@ -12,10 +12,12 @@ import { COLLAPSIBLE_CONTEXT } from './collapsible-context';
|
|
|
12
12
|
selector: 'CollapsibleTrigger',
|
|
13
13
|
template: `<ng-content />`,
|
|
14
14
|
host: {
|
|
15
|
+
'attr.data-slot': '"collapsible-trigger"',
|
|
15
16
|
'[class]': 'computedClass()',
|
|
16
17
|
'[attr.data-state]': 'collapsible.isOpen() ? "open" : "closed"',
|
|
17
18
|
'[attr.data-disabled]': 'collapsible.disabled() ? "" : null',
|
|
18
19
|
'[attr.aria-expanded]': 'collapsible.isOpen()',
|
|
20
|
+
'[attr.aria-controls]': 'collapsible.contentId',
|
|
19
21
|
'[attr.disabled]': 'collapsible.disabled() ? true : null',
|
|
20
22
|
'(click)': 'onClick()',
|
|
21
23
|
'(keydown.enter)': 'onClick()',
|
|
@@ -34,6 +34,7 @@ import { COLLAPSIBLE_CONTEXT, CollapsibleContext } from './collapsible-context';
|
|
|
34
34
|
selector: 'Collapsible',
|
|
35
35
|
template: `<ng-content />`,
|
|
36
36
|
host: {
|
|
37
|
+
'attr.data-slot': '"collapsible"',
|
|
37
38
|
'[class]': 'computedClass()',
|
|
38
39
|
'[attr.data-state]': 'isOpen() ? "open" : "closed"',
|
|
39
40
|
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
@@ -76,6 +77,9 @@ export class Collapsible implements CollapsibleContext {
|
|
|
76
77
|
|
|
77
78
|
protected readonly computedClass = computed(() => cn('', this.class()));
|
|
78
79
|
|
|
80
|
+
/** Stable ID linking the trigger (aria-controls) to the content (id) */
|
|
81
|
+
readonly contentId = `collapsible-content-${Math.random().toString(36).slice(2)}`;
|
|
82
|
+
|
|
79
83
|
/** Internal state for open/closed */
|
|
80
84
|
private readonly _isOpen = signal<boolean>(false);
|
|
81
85
|
|
|
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
8
8
|
selector: 'ComboboxGroup',
|
|
9
9
|
template: `<ng-content />`,
|
|
10
10
|
host: {
|
|
11
|
+
'attr.data-slot': '"combobox-group"',
|
|
11
12
|
'[class]': 'computedClass()',
|
|
12
13
|
role: 'group',
|
|
13
14
|
'[attr.aria-label]': 'label()',
|
|
@@ -50,6 +50,7 @@ import { LucideAngularModule } from 'lucide-angular';
|
|
|
50
50
|
</div>
|
|
51
51
|
`,
|
|
52
52
|
host: {
|
|
53
|
+
'attr.data-slot': '"combobox-item"',
|
|
53
54
|
'[class]': 'computedClass()',
|
|
54
55
|
'[id]': 'optionId()',
|
|
55
56
|
role: 'option',
|
|
@@ -65,7 +66,6 @@ import { LucideAngularModule } from 'lucide-angular';
|
|
|
65
66
|
})
|
|
66
67
|
export class ComboboxItem {
|
|
67
68
|
constructor() {
|
|
68
|
-
// Scroll into view when highlighted
|
|
69
69
|
effect(() => {
|
|
70
70
|
if (this.isHighlighted()) {
|
|
71
71
|
this.itemElement()?.nativeElement?.scrollIntoView({
|
|
@@ -73,8 +73,6 @@ export class ComboboxItem {
|
|
|
73
73
|
behavior: 'smooth',
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
// console.log('icon position on combobox item', this.iconPosition());
|
|
78
76
|
});
|
|
79
77
|
}
|
|
80
78
|
|
|
@@ -93,7 +91,6 @@ export class ComboboxItem {
|
|
|
93
91
|
|
|
94
92
|
protected readonly context = inject(COMBOBOX_CONTEXT);
|
|
95
93
|
|
|
96
|
-
// readonly iconPosition = this.context.iconPosition();
|
|
97
94
|
readonly iconPosition = computed(() => this.context.iconPosition());
|
|
98
95
|
protected readonly option = computed(() =>
|
|
99
96
|
this.context.options().find((o) => o.value === this.value()),
|
|
@@ -26,6 +26,7 @@ import { LucideAngularModule } from 'lucide-angular';
|
|
|
26
26
|
<span class="text-neutral-500">{{ placeholder() }}</span>
|
|
27
27
|
}`,
|
|
28
28
|
host: {
|
|
29
|
+
'attr.data-slot': '"combobox-value"',
|
|
29
30
|
'[class]': 'computedClass()',
|
|
30
31
|
},
|
|
31
32
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
9
9
|
selector: 'CommandEmpty',
|
|
10
10
|
template: `<ng-content />`,
|
|
11
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"command-empty"',
|
|
12
13
|
'[class]': 'computedClass()',
|
|
13
14
|
},
|
|
14
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|