@ng-cn/core 1.0.16 → 1.0.17
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 +1 -1
- 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 +25 -9
- 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 +9 -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/collapsible/collapsible-content.component.ts +1 -0
- package/src/app/lib/components/ui/collapsible/collapsible-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/collapsible/collapsible.component.ts +1 -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 +1 -0
- 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 +1 -0
- package/src/app/lib/components/ui/context-menu/context-menu-sub-trigger.component.ts +2 -1
- package/src/app/lib/components/ui/context-menu/context-menu-sub.component.ts +1 -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/dialog/dialog-close.component.ts +1 -0
- package/src/app/lib/components/ui/dialog/dialog-content.component.ts +20 -16
- 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/drawer/drawer-close.component.ts +1 -0
- package/src/app/lib/components/ui/drawer/drawer-content.component.ts +1 -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 +1 -0
- 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 +1 -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 +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.component.ts +2 -1
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu.component.ts +1 -0
- package/src/app/lib/components/ui/hover-card/hover-card-content.component.ts +1 -0
- package/src/app/lib/components/ui/hover-card/hover-card-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/hover-card/hover-card.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 +1 -0
- 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 +1 -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 +1 -0
- 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 +1 -0
- 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 +4 -0
- 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 +1 -0
- package/src/app/lib/components/ui/popover/popover-anchor.component.ts +1 -0
- package/src/app/lib/components/ui/popover/popover-content.component.ts +1 -0
- package/src/app/lib/components/ui/popover/popover-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/popover/popover.component.ts +1 -0
- 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 +1 -0
- package/src/app/lib/components/ui/scroll-area/scroll-bar.component.ts +1 -0
- package/src/app/lib/components/ui/select/select-content.component.ts +3 -2
- package/src/app/lib/components/ui/sheet/sheet-close.component.ts +1 -0
- package/src/app/lib/components/ui/sheet/sheet-content.component.ts +1 -0
- 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/spinner/spinner.component.ts +1 -0
- 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 +1 -0
- package/src/app/lib/components/ui/tabs/tabs-trigger.component.ts +1 -0
- 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/tooltip/tooltip-content.component.ts +1 -0
- package/src/app/lib/components/ui/tooltip/tooltip-provider.component.ts +4 -0
- package/src/app/lib/components/ui/tooltip/tooltip-trigger.component.ts +1 -0
- package/src/app/lib/components/ui/tooltip/tooltip.component.ts +1 -0
- 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
|
@@ -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',
|
|
@@ -18,6 +18,7 @@ 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',
|
|
@@ -12,6 +12,7 @@ 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',
|
|
@@ -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',
|
|
@@ -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,
|
|
@@ -25,6 +25,7 @@ let itemIndexCounter = 0;
|
|
|
25
25
|
selector: 'CommandItem',
|
|
26
26
|
template: `<ng-content />`,
|
|
27
27
|
host: {
|
|
28
|
+
'attr.data-slot': '"command-item"',
|
|
28
29
|
'[class]': 'computedClass()',
|
|
29
30
|
'[attr.role]': '"option"',
|
|
30
31
|
'[attr.id]': 'itemId',
|
|
@@ -92,7 +93,7 @@ export class CommandItem implements OnInit, OnDestroy {
|
|
|
92
93
|
});
|
|
93
94
|
protected readonly computedClass = computed(() =>
|
|
94
95
|
cn(
|
|
95
|
-
'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[selected]:bg-accent data-[selected]:text-accent-foreground data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
96
|
+
'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[selected]:bg-accent data-[selected]:text-accent-foreground data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 [&>lucide-icon]:size-4 [&>lucide-icon]:shrink-0',
|
|
96
97
|
!this.disabled() && 'cursor-pointer hover:bg-accent hover:text-accent-foreground',
|
|
97
98
|
this.class(),
|
|
98
99
|
),
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
9
9
|
selector: 'CommandSeparator',
|
|
10
10
|
template: ``,
|
|
11
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"command-separator"',
|
|
12
13
|
'[class]': 'computedClass()',
|
|
13
14
|
},
|
|
14
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
9
9
|
selector: 'CommandShortcut',
|
|
10
10
|
template: `<ng-content />`,
|
|
11
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"command-shortcut"',
|
|
12
13
|
'[class]': 'computedClass()',
|
|
13
14
|
},
|
|
14
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -27,6 +27,7 @@ import { CONTEXT_MENU_CONTEXT } from './context-menu-context';
|
|
|
27
27
|
<ng-content />
|
|
28
28
|
`,
|
|
29
29
|
host: {
|
|
30
|
+
'attr.data-slot': '"context-menu-checkbox-item"',
|
|
30
31
|
'[class]': 'computedClass()',
|
|
31
32
|
'[attr.role]': '"menuitemcheckbox"',
|
|
32
33
|
'[attr.aria-checked]': 'checked()',
|
|
@@ -11,6 +11,7 @@ import { CONTEXT_MENU_CONTEXT } from './context-menu-context';
|
|
|
11
11
|
selector: 'ContextMenuItem',
|
|
12
12
|
template: `<ng-content />`,
|
|
13
13
|
host: {
|
|
14
|
+
'attr.data-slot': '"context-menu-item"',
|
|
14
15
|
'[class]': 'computedClass()',
|
|
15
16
|
'[attr.role]': '"menuitem"',
|
|
16
17
|
'[attr.tabindex]': 'disabled() ? -1 : -1',
|
|
@@ -37,7 +38,7 @@ export class ContextMenuItem {
|
|
|
37
38
|
|
|
38
39
|
protected readonly computedClass = computed(() =>
|
|
39
40
|
cn(
|
|
40
|
-
'relative flex cursor-default select-none items-center gap-3 rounded-md px-3 py-2.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
41
|
+
'relative flex cursor-default select-none items-center gap-3 rounded-md px-3 py-2.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 [&>lucide-icon]:size-4 [&>lucide-icon]:shrink-0',
|
|
41
42
|
this.inset() && 'pl-8',
|
|
42
43
|
!this.disabled() && 'cursor-pointer hover:bg-accent hover:text-accent-foreground',
|
|
43
44
|
this.class(),
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
9
9
|
selector: 'ContextMenuLabel',
|
|
10
10
|
template: `<ng-content />`,
|
|
11
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"context-menu-label"',
|
|
12
13
|
'[class]': 'computedClass()',
|
|
13
14
|
},
|
|
14
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -20,6 +20,7 @@ import { CONTEXT_MENU_RADIO_GROUP_CONTEXT } from './context-menu-radio-group.com
|
|
|
20
20
|
<ng-content />
|
|
21
21
|
`,
|
|
22
22
|
host: {
|
|
23
|
+
'attr.data-slot': '"context-menu-radio-item"',
|
|
23
24
|
'[class]': 'computedClass()',
|
|
24
25
|
'[attr.role]': '"menuitemradio"',
|
|
25
26
|
'[attr.aria-checked]': 'isSelected()',
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
9
9
|
selector: 'ContextMenuSeparator',
|
|
10
10
|
template: ``,
|
|
11
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"context-menu-separator"',
|
|
12
13
|
'[class]': 'computedClass()',
|
|
13
14
|
'[attr.role]': '"separator"',
|
|
14
15
|
},
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
9
9
|
selector: 'ContextMenuShortcut',
|
|
10
10
|
template: `<ng-content />`,
|
|
11
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"context-menu-shortcut"',
|
|
12
13
|
'[class]': 'computedClass()',
|
|
13
14
|
},
|
|
14
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -15,6 +15,7 @@ import { CONTEXT_MENU_SUB_CONTEXT } from './context-menu-sub.component';
|
|
|
15
15
|
<lucide-icon [img]="ChevronRightIcon" class="ml-auto h-4 w-4" />
|
|
16
16
|
`,
|
|
17
17
|
host: {
|
|
18
|
+
'attr.data-slot': '"context-menu-sub-trigger"',
|
|
18
19
|
'[class]': 'computedClass()',
|
|
19
20
|
'(mouseenter)': 'onMouseEnter()',
|
|
20
21
|
'(mouseleave)': 'onMouseLeave()',
|
|
@@ -33,7 +34,7 @@ export class ContextMenuSubTrigger {
|
|
|
33
34
|
|
|
34
35
|
protected readonly computedClass = computed(() =>
|
|
35
36
|
cn(
|
|
36
|
-
'flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent [&>svg]:size-4 [&>svg]:shrink-0',
|
|
37
|
+
'flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent [&>svg]:size-4 [&>svg]:shrink-0 [&>lucide-icon]:size-4 [&>lucide-icon]:shrink-0',
|
|
37
38
|
this.inset() && 'pl-8',
|
|
38
39
|
this.class(),
|
|
39
40
|
),
|
|
@@ -10,6 +10,7 @@ import { CONTEXT_MENU_CONTEXT } from './context-menu-context';
|
|
|
10
10
|
selector: 'ContextMenuTrigger',
|
|
11
11
|
template: `<ng-content />`,
|
|
12
12
|
host: {
|
|
13
|
+
'attr.data-slot': '"context-menu-trigger"',
|
|
13
14
|
'[attr.tabindex]': '0',
|
|
14
15
|
'(contextmenu)': 'onContextMenu($event)',
|
|
15
16
|
'(keydown)': 'onKeydown($event)',
|
|
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
|
|
|
8
8
|
selector: 'DataTableToolbar',
|
|
9
9
|
template: `<ng-content />`,
|
|
10
10
|
host: {
|
|
11
|
+
'attr.data-slot': '"data-table-toolbar"',
|
|
11
12
|
'[class]': 'computedClass()',
|
|
12
13
|
},
|
|
13
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|