@ng-cn/core 1.0.15 → 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 +34 -33
- package/schematics/component/index.js +454 -95
- package/schematics/component/index.ts +459 -98
- package/schematics/ng-add/index.js +539 -55
- package/schematics/ng-add/index.ts +555 -62
- package/schematics/ng-add/schema.json +8 -2
- package/schematics/test-schematic.js +1 -2
- package/src/app/lib/components/ui/.gitkeep +0 -0
- package/src/app/lib/components/ui/accordion/accordion-content.component.ts +16 -24
- package/src/app/lib/components/ui/accordion/accordion-context.ts +4 -9
- package/src/app/lib/components/ui/accordion/accordion-item.component.ts +33 -29
- package/src/app/lib/components/ui/accordion/accordion-trigger.component.ts +11 -14
- package/src/app/lib/components/ui/accordion/accordion.component.ts +60 -49
- package/src/app/lib/components/ui/accordion/index.ts +5 -6
- package/src/app/lib/components/ui/alert/alert-description.component.ts +3 -8
- package/src/app/lib/components/ui/alert/alert-title.component.ts +2 -7
- package/src/app/lib/components/ui/alert/alert-variants.ts +19 -5
- package/src/app/lib/components/ui/alert/alert.component.ts +2 -10
- package/src/app/lib/components/ui/alert/index.ts +0 -1
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-action.component.ts +5 -12
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-cancel.component.ts +5 -11
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-content.component.ts +63 -66
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-context.ts +10 -5
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-description.component.ts +5 -10
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-footer.component.ts +3 -7
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-header.component.ts +3 -7
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-title.component.ts +5 -12
- package/src/app/lib/components/ui/alert-dialog/alert-dialog-trigger.component.ts +8 -12
- package/src/app/lib/components/ui/alert-dialog/alert-dialog.component.ts +28 -34
- package/src/app/lib/components/ui/alert-dialog/index.ts +0 -1
- package/src/app/lib/components/ui/aspect-ratio/aspect-ratio.component.ts +3 -9
- package/src/app/lib/components/ui/avatar/avatar-context.ts +9 -0
- package/src/app/lib/components/ui/avatar/avatar-fallback.component.ts +7 -18
- package/src/app/lib/components/ui/avatar/avatar-image.component.ts +39 -17
- package/src/app/lib/components/ui/avatar/avatar.component.ts +17 -20
- package/src/app/lib/components/ui/avatar/index.ts +1 -1
- package/src/app/lib/components/ui/avatar/ui-avatar.component.ts +9 -30
- package/src/app/lib/components/ui/badge/badge-variants.ts +5 -5
- package/src/app/lib/components/ui/badge/badge.component.ts +4 -8
- package/src/app/lib/components/ui/badge/index.ts +0 -1
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-ellipsis.component.ts +3 -7
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-item.component.ts +5 -14
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-link.component.ts +6 -18
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-list.component.ts +6 -15
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-page.component.ts +3 -7
- package/src/app/lib/components/ui/breadcrumb/breadcrumb-separator.component.ts +22 -31
- package/src/app/lib/components/ui/breadcrumb/breadcrumb.component.ts +3 -9
- package/src/app/lib/components/ui/breadcrumb/index.ts +0 -1
- package/src/app/lib/components/ui/button/button-variants.ts +6 -8
- package/src/app/lib/components/ui/button/button.component.ts +4 -8
- package/src/app/lib/components/ui/button/index.ts +0 -1
- package/src/app/lib/components/ui/button-group/button-group-variants.ts +12 -15
- package/src/app/lib/components/ui/button-group/button-group.component.ts +6 -14
- package/src/app/lib/components/ui/button-group/index.ts +1 -5
- package/src/app/lib/components/ui/calendar/calendar.component.ts +103 -115
- package/src/app/lib/components/ui/card/card-action.component.ts +2 -10
- package/src/app/lib/components/ui/card/card-content.component.ts +1 -6
- package/src/app/lib/components/ui/card/card-description.component.ts +2 -7
- package/src/app/lib/components/ui/card/card-footer.component.ts +2 -7
- package/src/app/lib/components/ui/card/card-header.component.ts +3 -8
- package/src/app/lib/components/ui/card/card-title.component.ts +2 -9
- package/src/app/lib/components/ui/card/card.component.ts +3 -8
- package/src/app/lib/components/ui/card/index.ts +0 -1
- package/src/app/lib/components/ui/carousel/carousel-content.component.ts +3 -9
- package/src/app/lib/components/ui/carousel/carousel-item.component.ts +5 -5
- package/src/app/lib/components/ui/carousel/carousel-next.component.ts +9 -8
- package/src/app/lib/components/ui/carousel/carousel-previous.component.ts +9 -8
- package/src/app/lib/components/ui/carousel/carousel.component.ts +14 -25
- package/src/app/lib/components/ui/carousel/index.ts +5 -2
- package/src/app/lib/components/ui/chart/chart-container.component.ts +20 -26
- package/src/app/lib/components/ui/chart/chart-legend-content.component.ts +6 -16
- package/src/app/lib/components/ui/chart/chart-legend.component.ts +2 -7
- package/src/app/lib/components/ui/chart/chart-tooltip-content.component.ts +2 -9
- package/src/app/lib/components/ui/chart/chart-tooltip.component.ts +2 -7
- package/src/app/lib/components/ui/chart/chart.component.ts +12 -32
- package/src/app/lib/components/ui/chart/index.ts +7 -8
- package/src/app/lib/components/ui/checkbox/checkbox.component.ts +55 -74
- package/src/app/lib/components/ui/collapsible/collapsible-content.component.ts +16 -25
- package/src/app/lib/components/ui/collapsible/collapsible-context.ts +0 -8
- package/src/app/lib/components/ui/collapsible/collapsible-trigger.component.ts +6 -16
- package/src/app/lib/components/ui/collapsible/collapsible.component.ts +29 -33
- package/src/app/lib/components/ui/collapsible/index.ts +0 -1
- package/src/app/lib/components/ui/combobox/combobox-content.component.ts +8 -15
- package/src/app/lib/components/ui/combobox/combobox-context.ts +5 -4
- package/src/app/lib/components/ui/combobox/combobox-empty.component.ts +5 -12
- package/src/app/lib/components/ui/combobox/combobox-group.component.ts +3 -7
- package/src/app/lib/components/ui/combobox/combobox-input.component.ts +25 -25
- package/src/app/lib/components/ui/combobox/combobox-item.component.ts +45 -44
- package/src/app/lib/components/ui/combobox/combobox-list.component.ts +14 -12
- package/src/app/lib/components/ui/combobox/combobox-trigger.component.ts +24 -14
- package/src/app/lib/components/ui/combobox/combobox-value.component.ts +27 -22
- package/src/app/lib/components/ui/combobox/combobox.component.ts +74 -54
- package/src/app/lib/components/ui/combobox/index.ts +1 -6
- package/src/app/lib/components/ui/command/command-context.ts +1 -5
- package/src/app/lib/components/ui/command/command-dialog.component.ts +12 -14
- package/src/app/lib/components/ui/command/command-empty.component.ts +2 -3
- package/src/app/lib/components/ui/command/command-group.component.ts +32 -25
- package/src/app/lib/components/ui/command/command-input.component.ts +29 -28
- package/src/app/lib/components/ui/command/command-item.component.ts +46 -58
- package/src/app/lib/components/ui/command/command-list.component.ts +5 -4
- package/src/app/lib/components/ui/command/command-separator.component.ts +2 -3
- package/src/app/lib/components/ui/command/command-shortcut.component.ts +2 -1
- package/src/app/lib/components/ui/command/command.component.ts +33 -22
- package/src/app/lib/components/ui/command/index.ts +0 -1
- package/src/app/lib/components/ui/context-menu/context-menu-checkbox-item.component.ts +20 -11
- package/src/app/lib/components/ui/context-menu/context-menu-content.component.ts +36 -43
- package/src/app/lib/components/ui/context-menu/context-menu-context.ts +1 -1
- package/src/app/lib/components/ui/context-menu/context-menu-item.component.ts +12 -13
- package/src/app/lib/components/ui/context-menu/context-menu-label.component.ts +2 -5
- package/src/app/lib/components/ui/context-menu/context-menu-radio-group.component.ts +9 -2
- package/src/app/lib/components/ui/context-menu/context-menu-radio-item.component.ts +14 -14
- package/src/app/lib/components/ui/context-menu/context-menu-separator.component.ts +2 -3
- package/src/app/lib/components/ui/context-menu/context-menu-shortcut.component.ts +2 -1
- package/src/app/lib/components/ui/context-menu/context-menu-sub-content.component.ts +5 -5
- package/src/app/lib/components/ui/context-menu/context-menu-sub-trigger.component.ts +8 -7
- package/src/app/lib/components/ui/context-menu/context-menu-sub.component.ts +9 -2
- package/src/app/lib/components/ui/context-menu/context-menu-trigger.component.ts +8 -7
- package/src/app/lib/components/ui/context-menu/context-menu.component.ts +1 -0
- package/src/app/lib/components/ui/context-menu/index.ts +15 -4
- package/src/app/lib/components/ui/data-table/data-table-content.component.ts +22 -28
- package/src/app/lib/components/ui/data-table/data-table-context.ts +1 -3
- package/src/app/lib/components/ui/data-table/data-table-pagination.component.ts +17 -27
- package/src/app/lib/components/ui/data-table/data-table-search.component.ts +6 -14
- package/src/app/lib/components/ui/data-table/data-table-toolbar.component.ts +3 -7
- package/src/app/lib/components/ui/data-table/data-table-view-options.component.ts +11 -20
- package/src/app/lib/components/ui/data-table/data-table.component.ts +41 -49
- package/src/app/lib/components/ui/data-table/index.ts +7 -8
- package/src/app/lib/components/ui/date-picker/date-picker.component.ts +24 -24
- package/src/app/lib/components/ui/dialog/dialog-close.component.ts +4 -8
- package/src/app/lib/components/ui/dialog/dialog-content.component.ts +72 -73
- package/src/app/lib/components/ui/dialog/dialog-context.ts +7 -5
- package/src/app/lib/components/ui/dialog/dialog-description.component.ts +5 -10
- package/src/app/lib/components/ui/dialog/dialog-footer.component.ts +3 -7
- package/src/app/lib/components/ui/dialog/dialog-header.component.ts +3 -7
- package/src/app/lib/components/ui/dialog/dialog-title.component.ts +5 -10
- package/src/app/lib/components/ui/dialog/dialog-trigger.component.ts +7 -11
- package/src/app/lib/components/ui/dialog/dialog.component.ts +29 -34
- package/src/app/lib/components/ui/dialog/index.ts +0 -1
- package/src/app/lib/components/ui/drawer/drawer-close.component.ts +4 -8
- package/src/app/lib/components/ui/drawer/drawer-content.component.ts +39 -35
- package/src/app/lib/components/ui/drawer/drawer-description.component.ts +5 -10
- package/src/app/lib/components/ui/drawer/drawer-footer.component.ts +3 -7
- package/src/app/lib/components/ui/drawer/drawer-header.component.ts +3 -7
- package/src/app/lib/components/ui/drawer/drawer-title.component.ts +5 -10
- package/src/app/lib/components/ui/drawer/drawer-trigger.component.ts +7 -11
- package/src/app/lib/components/ui/drawer/drawer.component.ts +25 -26
- package/src/app/lib/components/ui/drawer/index.ts +0 -1
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.component.ts +20 -11
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-content.component.ts +96 -61
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-context.ts +1 -1
- 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 +10 -11
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-label.component.ts +2 -5
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.component.ts +14 -5
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.component.ts +14 -14
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-separator.component.ts +2 -3
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.component.ts +2 -1
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.component.ts +5 -5
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.component.ts +8 -7
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub.component.ts +9 -2
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-trigger.component.ts +6 -5
- package/src/app/lib/components/ui/dropdown-menu/dropdown-menu.component.ts +1 -0
- package/src/app/lib/components/ui/dropdown-menu/index.ts +10 -3
- package/src/app/lib/components/ui/empty/empty-action.component.ts +2 -9
- package/src/app/lib/components/ui/empty/empty-description.component.ts +2 -10
- package/src/app/lib/components/ui/empty/empty-icon.component.ts +3 -8
- package/src/app/lib/components/ui/empty/empty-title.component.ts +2 -9
- package/src/app/lib/components/ui/empty/empty.component.ts +3 -8
- package/src/app/lib/components/ui/empty/index.ts +0 -1
- package/src/app/lib/components/ui/form/form-context.ts +1 -11
- package/src/app/lib/components/ui/form/form-control.component.ts +22 -22
- package/src/app/lib/components/ui/form/form-description.component.ts +4 -10
- package/src/app/lib/components/ui/form/form-field.component.ts +7 -10
- package/src/app/lib/components/ui/form/form-item.component.ts +2 -12
- package/src/app/lib/components/ui/form/form-label.component.ts +15 -15
- package/src/app/lib/components/ui/form/form-message.component.ts +7 -15
- package/src/app/lib/components/ui/form/form.component.ts +9 -20
- package/src/app/lib/components/ui/form/index.ts +4 -5
- package/src/app/lib/components/ui/hover-card/hover-card-content.component.ts +21 -33
- package/src/app/lib/components/ui/hover-card/hover-card-context.ts +0 -8
- package/src/app/lib/components/ui/hover-card/hover-card-trigger.component.ts +17 -26
- package/src/app/lib/components/ui/hover-card/hover-card.component.ts +18 -28
- package/src/app/lib/components/ui/hover-card/index.ts +9 -6
- package/src/app/lib/components/ui/input/input.component.ts +57 -75
- package/src/app/lib/components/ui/input-group/index.ts +0 -1
- package/src/app/lib/components/ui/input-group/input-group-addon.component.ts +4 -11
- package/src/app/lib/components/ui/input-group/input-group-input.component.ts +3 -8
- package/src/app/lib/components/ui/input-group/input-group.component.ts +4 -9
- package/src/app/lib/components/ui/input-otp/index.ts +4 -5
- package/src/app/lib/components/ui/input-otp/input-otp-context.ts +0 -8
- package/src/app/lib/components/ui/input-otp/input-otp-group.component.ts +2 -3
- package/src/app/lib/components/ui/input-otp/input-otp-separator.component.ts +4 -3
- package/src/app/lib/components/ui/input-otp/input-otp-slot.component.ts +8 -10
- package/src/app/lib/components/ui/input-otp/input-otp.component.ts +27 -45
- package/src/app/lib/components/ui/kbd/index.ts +0 -1
- package/src/app/lib/components/ui/kbd/kbd-variants.ts +1 -1
- package/src/app/lib/components/ui/kbd/kbd.component.ts +4 -8
- package/src/app/lib/components/ui/label/label.component.ts +15 -28
- package/src/app/lib/components/ui/menubar/index.ts +11 -8
- package/src/app/lib/components/ui/menubar/menubar-checkbox-item.component.ts +21 -12
- package/src/app/lib/components/ui/menubar/menubar-content.component.ts +46 -53
- package/src/app/lib/components/ui/menubar/menubar-context.ts +3 -9
- package/src/app/lib/components/ui/menubar/menubar-item.component.ts +13 -14
- package/src/app/lib/components/ui/menubar/menubar-label.component.ts +2 -5
- package/src/app/lib/components/ui/menubar/menubar-menu.component.ts +14 -2
- package/src/app/lib/components/ui/menubar/menubar-radio-group.component.ts +9 -2
- package/src/app/lib/components/ui/menubar/menubar-radio-item.component.ts +13 -13
- package/src/app/lib/components/ui/menubar/menubar-separator.component.ts +2 -3
- package/src/app/lib/components/ui/menubar/menubar-shortcut.component.ts +2 -1
- package/src/app/lib/components/ui/menubar/menubar-sub-content.component.ts +5 -5
- package/src/app/lib/components/ui/menubar/menubar-sub-trigger.component.ts +7 -6
- package/src/app/lib/components/ui/menubar/menubar-sub.component.ts +8 -1
- package/src/app/lib/components/ui/menubar/menubar-trigger.component.ts +26 -21
- package/src/app/lib/components/ui/menubar/menubar.component.ts +6 -13
- package/src/app/lib/components/ui/native-select/index.ts +1 -5
- package/src/app/lib/components/ui/native-select/native-select-variants.ts +1 -1
- package/src/app/lib/components/ui/native-select/native-select.component.ts +14 -15
- package/src/app/lib/components/ui/navigation-menu/index.ts +10 -8
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-content.component.ts +18 -13
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-context.ts +2 -10
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-indicator.component.ts +3 -2
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-item.component.ts +6 -1
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-link.component.ts +3 -8
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-list.component.ts +2 -4
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-trigger-style.ts +1 -1
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-trigger.component.ts +8 -7
- package/src/app/lib/components/ui/navigation-menu/navigation-menu-viewport.component.ts +3 -2
- package/src/app/lib/components/ui/navigation-menu/navigation-menu.component.ts +8 -15
- package/src/app/lib/components/ui/pagination/index.ts +0 -1
- package/src/app/lib/components/ui/pagination/pagination-content.component.ts +3 -7
- package/src/app/lib/components/ui/pagination/pagination-ellipsis.component.ts +3 -7
- package/src/app/lib/components/ui/pagination/pagination-item.component.ts +3 -9
- package/src/app/lib/components/ui/pagination/pagination-link.component.ts +4 -8
- package/src/app/lib/components/ui/pagination/pagination-next.component.ts +3 -11
- package/src/app/lib/components/ui/pagination/pagination-previous.component.ts +3 -11
- package/src/app/lib/components/ui/pagination/pagination.component.ts +3 -7
- package/src/app/lib/components/ui/popover/index.ts +9 -6
- package/src/app/lib/components/ui/popover/popover-anchor.component.ts +2 -13
- package/src/app/lib/components/ui/popover/popover-content.component.ts +119 -69
- package/src/app/lib/components/ui/popover/popover-context.ts +0 -8
- package/src/app/lib/components/ui/popover/popover-trigger.component.ts +22 -22
- package/src/app/lib/components/ui/popover/popover.component.ts +20 -33
- package/src/app/lib/components/ui/progress/index.ts +1 -6
- package/src/app/lib/components/ui/progress/progress.component.ts +15 -30
- package/src/app/lib/components/ui/radio-group/index.ts +1 -4
- package/src/app/lib/components/ui/radio-group/radio-group-context.ts +1 -7
- package/src/app/lib/components/ui/radio-group/radio-group-item.component.ts +36 -69
- package/src/app/lib/components/ui/radio-group/radio-group.component.ts +38 -67
- package/src/app/lib/components/ui/resizable/index.ts +0 -1
- package/src/app/lib/components/ui/resizable/resizable-handle.component.ts +25 -39
- package/src/app/lib/components/ui/resizable/resizable-panel-group.component.ts +15 -18
- package/src/app/lib/components/ui/resizable/resizable-panel.component.ts +12 -31
- package/src/app/lib/components/ui/scroll-area/index.ts +4 -5
- package/src/app/lib/components/ui/scroll-area/scroll-area.component.ts +5 -19
- package/src/app/lib/components/ui/scroll-area/scroll-bar.component.ts +8 -27
- package/src/app/lib/components/ui/segmented/index.ts +5 -9
- package/src/app/lib/components/ui/segmented/segmented-context.ts +1 -3
- package/src/app/lib/components/ui/segmented/segmented-item.component.ts +21 -29
- package/src/app/lib/components/ui/segmented/segmented-variants.ts +2 -2
- package/src/app/lib/components/ui/segmented/segmented.component.ts +24 -32
- package/src/app/lib/components/ui/select/index.ts +5 -6
- package/src/app/lib/components/ui/select/select-content.component.ts +34 -62
- package/src/app/lib/components/ui/select/select-context.ts +4 -14
- package/src/app/lib/components/ui/select/select-group.component.ts +6 -7
- package/src/app/lib/components/ui/select/select-item.component.ts +46 -55
- package/src/app/lib/components/ui/select/select-label.component.ts +2 -7
- package/src/app/lib/components/ui/select/select-separator.component.ts +3 -8
- package/src/app/lib/components/ui/select/select-trigger.component.ts +28 -25
- package/src/app/lib/components/ui/select/select-value.component.ts +7 -13
- package/src/app/lib/components/ui/select/select.component.ts +52 -64
- package/src/app/lib/components/ui/separator/index.ts +1 -6
- package/src/app/lib/components/ui/separator/separator.component.ts +4 -19
- package/src/app/lib/components/ui/sheet/index.ts +0 -1
- package/src/app/lib/components/ui/sheet/sheet-close.component.ts +4 -8
- package/src/app/lib/components/ui/sheet/sheet-content.component.ts +31 -36
- package/src/app/lib/components/ui/sheet/sheet-description.component.ts +5 -10
- package/src/app/lib/components/ui/sheet/sheet-footer.component.ts +3 -7
- package/src/app/lib/components/ui/sheet/sheet-header.component.ts +3 -7
- package/src/app/lib/components/ui/sheet/sheet-title.component.ts +5 -10
- package/src/app/lib/components/ui/sheet/sheet-trigger.component.ts +7 -11
- package/src/app/lib/components/ui/sheet/sheet-variants.ts +1 -1
- package/src/app/lib/components/ui/sheet/sheet.component.ts +36 -36
- package/src/app/lib/components/ui/sidebar/index.ts +14 -15
- package/src/app/lib/components/ui/sidebar/sidebar-content.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-context.ts +1 -3
- package/src/app/lib/components/ui/sidebar/sidebar-footer.component.ts +3 -9
- package/src/app/lib/components/ui/sidebar/sidebar-group-action.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-group-content.component.ts +3 -9
- package/src/app/lib/components/ui/sidebar/sidebar-group-label.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-group.component.ts +3 -7
- package/src/app/lib/components/ui/sidebar/sidebar-header.component.ts +3 -9
- package/src/app/lib/components/ui/sidebar/sidebar-input.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-inset.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-menu-action.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-menu-badge.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-menu-button.component.ts +4 -9
- package/src/app/lib/components/ui/sidebar/sidebar-menu-item.component.ts +3 -9
- package/src/app/lib/components/ui/sidebar/sidebar-menu-skeleton.component.ts +6 -11
- package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-button.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-item.component.ts +2 -6
- package/src/app/lib/components/ui/sidebar/sidebar-menu-sub.component.ts +4 -8
- package/src/app/lib/components/ui/sidebar/sidebar-menu.component.ts +3 -7
- package/src/app/lib/components/ui/sidebar/sidebar-provider.component.ts +46 -52
- package/src/app/lib/components/ui/sidebar/sidebar-rail.component.ts +6 -11
- package/src/app/lib/components/ui/sidebar/sidebar-route-active.service.ts +17 -17
- package/src/app/lib/components/ui/sidebar/sidebar-separator.component.ts +3 -7
- package/src/app/lib/components/ui/sidebar/sidebar-trigger.component.ts +6 -11
- package/src/app/lib/components/ui/sidebar/sidebar.component.ts +20 -31
- package/src/app/lib/components/ui/skeleton/skeleton.component.ts +3 -8
- package/src/app/lib/components/ui/slider/index.ts +1 -6
- package/src/app/lib/components/ui/slider/slider.component.ts +73 -138
- package/src/app/lib/components/ui/spinner/index.ts +0 -1
- package/src/app/lib/components/ui/spinner/spinner-variants.ts +19 -22
- package/src/app/lib/components/ui/spinner/spinner.component.ts +4 -8
- package/src/app/lib/components/ui/switch/index.ts +1 -6
- package/src/app/lib/components/ui/switch/switch.component.ts +83 -108
- package/src/app/lib/components/ui/table/index.ts +0 -1
- package/src/app/lib/components/ui/table/table-body.component.ts +6 -10
- package/src/app/lib/components/ui/table/table-caption.component.ts +6 -8
- package/src/app/lib/components/ui/table/table-cell.component.ts +4 -8
- package/src/app/lib/components/ui/table/table-footer.component.ts +6 -8
- package/src/app/lib/components/ui/table/table-head.component.ts +4 -8
- package/src/app/lib/components/ui/table/table-header.component.ts +6 -10
- package/src/app/lib/components/ui/table/table-row.component.ts +6 -11
- package/src/app/lib/components/ui/table/table.component.ts +4 -8
- package/src/app/lib/components/ui/tabs/index.ts +14 -7
- package/src/app/lib/components/ui/tabs/tabs-content.component.ts +11 -36
- package/src/app/lib/components/ui/tabs/tabs-context.ts +0 -8
- package/src/app/lib/components/ui/tabs/tabs-list.component.ts +54 -60
- package/src/app/lib/components/ui/tabs/tabs-trigger.component.ts +20 -35
- package/src/app/lib/components/ui/tabs/tabs.component.ts +32 -49
- package/src/app/lib/components/ui/textarea/textarea.component.ts +3 -8
- package/src/app/lib/components/ui/toast/index.ts +6 -7
- package/src/app/lib/components/ui/toast/toast-action.component.ts +7 -18
- package/src/app/lib/components/ui/toast/toast-description.component.ts +2 -11
- package/src/app/lib/components/ui/toast/toast-title.component.ts +2 -9
- package/src/app/lib/components/ui/toast/toast-variants.ts +1 -1
- package/src/app/lib/components/ui/toast/toast.component.ts +18 -24
- package/src/app/lib/components/ui/toast/toast.service.ts +22 -37
- package/src/app/lib/components/ui/toast/toaster.component.ts +6 -16
- package/src/app/lib/components/ui/toggle/index.ts +1 -5
- package/src/app/lib/components/ui/toggle/toggle-variants.ts +2 -2
- package/src/app/lib/components/ui/toggle/toggle.component.ts +32 -51
- package/src/app/lib/components/ui/toggle-group/index.ts +1 -4
- package/src/app/lib/components/ui/toggle-group/toggle-group-context.ts +1 -7
- package/src/app/lib/components/ui/toggle-group/toggle-group-item.component.ts +38 -59
- package/src/app/lib/components/ui/toggle-group/toggle-group.component.ts +33 -51
- package/src/app/lib/components/ui/tooltip/index.ts +9 -6
- package/src/app/lib/components/ui/tooltip/tooltip-content.component.ts +6 -24
- package/src/app/lib/components/ui/tooltip/tooltip-context.ts +0 -8
- package/src/app/lib/components/ui/tooltip/tooltip-provider.component.ts +12 -24
- package/src/app/lib/components/ui/tooltip/tooltip-trigger.component.ts +4 -21
- package/src/app/lib/components/ui/tooltip/tooltip.component.ts +21 -33
- package/src/app/lib/components/ui/typography/index.ts +0 -1
- package/src/app/lib/components/ui/typography/typography-blockquote.component.ts +3 -7
- package/src/app/lib/components/ui/typography/typography-h1.component.ts +3 -10
- package/src/app/lib/components/ui/typography/typography-h2.component.ts +3 -10
- package/src/app/lib/components/ui/typography/typography-h3.component.ts +3 -7
- package/src/app/lib/components/ui/typography/typography-h4.component.ts +3 -7
- package/src/app/lib/components/ui/typography/typography-inline-code.component.ts +4 -8
- package/src/app/lib/components/ui/typography/typography-large.component.ts +3 -9
- package/src/app/lib/components/ui/typography/typography-lead.component.ts +3 -7
- package/src/app/lib/components/ui/typography/typography-list.component.ts +3 -7
- package/src/app/lib/components/ui/typography/typography-muted.component.ts +3 -7
- package/src/app/lib/components/ui/typography/typography-p.component.ts +3 -7
- package/src/app/lib/components/ui/typography/typography-small.component.ts +3 -7
- package/src/app/lib/utils/accessibility/click-outside.directive.ts +1 -8
- package/src/app/lib/utils/accessibility/focus-management.service.ts +4 -15
- package/src/app/lib/utils/accessibility/focus-trap.directive.ts +32 -106
- package/src/app/lib/utils/accessibility/index.ts +16 -5
- package/src/app/lib/utils/accessibility/keyboard-navigation.directive.ts +5 -8
- package/src/app/lib/utils/accessibility/live-region.directive.ts +10 -13
- package/src/app/lib/utils/accessibility/touch-target.directive.ts +1 -8
- package/src/app/lib/utils/animation/animation.utils.ts +4 -7
- package/src/app/lib/utils/animation/index.ts +15 -5
- package/src/app/lib/utils/animation/presence.component.ts +1 -1
- package/src/app/lib/utils/animation/presence.directive.ts +2 -2
- package/src/app/lib/utils/positioning/index.ts +40 -18
- package/src/app/lib/components/ui/index.ts +0 -551
- package/src/app/lib/index.ts +0 -7
|
@@ -1,31 +1,53 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
computed,
|
|
6
|
+
effect,
|
|
7
|
+
inject,
|
|
8
|
+
input,
|
|
7
9
|
} from '@angular/core';
|
|
10
|
+
import { AVATAR_CONTEXT } from './avatar-context';
|
|
8
11
|
|
|
9
|
-
/**
|
|
10
|
-
* Avatar image component.
|
|
11
|
-
* The image to display for the avatar.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* <AvatarImage src="/avatar.png" alt="User avatar" />
|
|
15
|
-
*/
|
|
16
12
|
@Component({
|
|
17
13
|
selector: 'AvatarImage',
|
|
18
|
-
template:
|
|
14
|
+
template: `
|
|
15
|
+
@if (context.imageStatus() !== 'error') {
|
|
16
|
+
<img
|
|
17
|
+
[src]="src()"
|
|
18
|
+
[alt]="alt()"
|
|
19
|
+
[class]="computedClass()"
|
|
20
|
+
(load)="onLoad()"
|
|
21
|
+
(error)="onError()"
|
|
22
|
+
/>
|
|
23
|
+
}
|
|
24
|
+
`,
|
|
19
25
|
host: {
|
|
20
|
-
'
|
|
21
|
-
'data-slot': 'avatar-image',
|
|
26
|
+
'attr.data-slot': '"avatar-image"',
|
|
22
27
|
},
|
|
23
28
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
29
|
})
|
|
25
30
|
export class AvatarImage {
|
|
31
|
+
readonly src = input<string>('');
|
|
32
|
+
readonly alt = input<string>('');
|
|
26
33
|
readonly class = input<string>('');
|
|
27
34
|
|
|
28
|
-
protected readonly
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
protected readonly context = inject(AVATAR_CONTEXT);
|
|
36
|
+
protected readonly computedClass = computed(() => cn('aspect-square size-full', this.class()));
|
|
37
|
+
|
|
38
|
+
constructor() {
|
|
39
|
+
// Reset status whenever src changes so a new src gets a fresh load attempt
|
|
40
|
+
effect(() => {
|
|
41
|
+
const _ = this.src();
|
|
42
|
+
this.context.imageStatus.set('idle');
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected onLoad(): void {
|
|
47
|
+
this.context.imageStatus.set('loaded');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
protected onError(): void {
|
|
51
|
+
this.context.imageStatus.set('error');
|
|
52
|
+
}
|
|
31
53
|
}
|
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
computed,
|
|
6
|
+
forwardRef,
|
|
7
|
+
input,
|
|
8
|
+
signal,
|
|
7
9
|
} from '@angular/core';
|
|
10
|
+
import { AVATAR_CONTEXT, AvatarContext, AvatarImageStatus } from './avatar-context';
|
|
8
11
|
|
|
9
|
-
/**
|
|
10
|
-
* Avatar container component.
|
|
11
|
-
* Wraps the avatar image and fallback.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* <Avatar>
|
|
15
|
-
* <img AvatarImage src="/avatar.png" alt="User" />
|
|
16
|
-
* <AvatarFallback>JD</AvatarFallback>
|
|
17
|
-
* </Avatar>
|
|
18
|
-
*/
|
|
19
12
|
@Component({
|
|
20
13
|
selector: 'Avatar',
|
|
21
14
|
template: `<ng-content />`,
|
|
22
15
|
host: {
|
|
16
|
+
'attr.data-slot': '"avatar"',
|
|
23
17
|
'[class]': 'computedClass()',
|
|
24
|
-
'data-slot': 'avatar',
|
|
25
18
|
},
|
|
19
|
+
providers: [
|
|
20
|
+
{
|
|
21
|
+
provide: AVATAR_CONTEXT,
|
|
22
|
+
useExisting: forwardRef(() => Avatar),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
26
25
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
26
|
})
|
|
28
|
-
export class Avatar {
|
|
27
|
+
export class Avatar implements AvatarContext {
|
|
29
28
|
readonly class = input<string>('');
|
|
29
|
+
readonly imageStatus = signal<AvatarImageStatus>('idle');
|
|
30
30
|
|
|
31
31
|
protected readonly computedClass = computed(() =>
|
|
32
|
-
cn(
|
|
33
|
-
'relative flex size-8 shrink-0 overflow-hidden rounded-full',
|
|
34
|
-
this.class()
|
|
35
|
-
)
|
|
32
|
+
cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', this.class()),
|
|
36
33
|
);
|
|
37
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
export { AVATAR_CONTEXT, type AvatarContext, type AvatarImageStatus } from './avatar-context';
|
|
1
2
|
export { AvatarFallback } from './avatar-fallback.component';
|
|
2
3
|
export { AvatarImage } from './avatar-image.component';
|
|
3
4
|
export { Avatar } from './avatar.component';
|
|
4
5
|
export { UiAvatar } from './ui-avatar.component';
|
|
5
|
-
|
|
@@ -1,40 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
input,
|
|
5
|
-
signal,
|
|
6
|
-
} from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
7
2
|
import { AvatarFallback } from './avatar-fallback.component';
|
|
3
|
+
import { AvatarImage } from './avatar-image.component';
|
|
8
4
|
import { Avatar } from './avatar.component';
|
|
9
5
|
|
|
10
6
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* Convenience component combining Avatar + AvatarImage + AvatarFallback.
|
|
8
|
+
* Error handling is automatic via the shared Avatar context.
|
|
13
9
|
*
|
|
14
10
|
* @example
|
|
15
|
-
* <ui-avatar
|
|
16
|
-
* src="/avatar.png"
|
|
17
|
-
* alt="John Doe"
|
|
18
|
-
* fallback="JD"
|
|
19
|
-
* />
|
|
11
|
+
* <ui-avatar src="/avatar.png" alt="John Doe" fallback="JD" />
|
|
20
12
|
*/
|
|
21
13
|
@Component({
|
|
22
14
|
selector: 'ui-avatar',
|
|
23
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
|
-
imports: [Avatar, AvatarFallback],
|
|
16
|
+
imports: [Avatar, AvatarImage, AvatarFallback],
|
|
25
17
|
template: `
|
|
26
18
|
<Avatar [class]="class()">
|
|
27
|
-
@if (src()
|
|
28
|
-
<
|
|
29
|
-
AvatarImage
|
|
30
|
-
[src]="src()"
|
|
31
|
-
[alt]="alt()"
|
|
32
|
-
(error)="onImageError()"
|
|
33
|
-
/>
|
|
34
|
-
}
|
|
35
|
-
@if (!src() || imageError()) {
|
|
36
|
-
<AvatarFallback>{{ fallback() }}</AvatarFallback>
|
|
19
|
+
@if (src()) {
|
|
20
|
+
<AvatarImage [src]="src()" [alt]="alt()" />
|
|
37
21
|
}
|
|
22
|
+
<AvatarFallback>{{ fallback() }}</AvatarFallback>
|
|
38
23
|
</Avatar>
|
|
39
24
|
`,
|
|
40
25
|
})
|
|
@@ -43,10 +28,4 @@ export class UiAvatar {
|
|
|
43
28
|
readonly alt = input<string>('');
|
|
44
29
|
readonly fallback = input<string>('');
|
|
45
30
|
readonly class = input<string>('');
|
|
46
|
-
|
|
47
|
-
protected readonly imageError = signal(false);
|
|
48
|
-
|
|
49
|
-
protected onImageError() {
|
|
50
|
-
this.imageError.set(true);
|
|
51
|
-
}
|
|
52
31
|
}
|
|
@@ -6,23 +6,23 @@ 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: {
|
|
13
|
-
default:
|
|
14
|
-
'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
|
|
13
|
+
default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
|
|
15
14
|
secondary:
|
|
16
15
|
'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
|
|
17
16
|
destructive:
|
|
18
17
|
'border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',
|
|
19
|
-
outline:
|
|
18
|
+
outline:
|
|
19
|
+
'text-foreground border-border [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
defaultVariants: {
|
|
23
23
|
variant: 'default',
|
|
24
24
|
},
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
import { badgeVariants, type BadgeVariants } from './badge-variants';
|
|
9
4
|
|
|
10
5
|
/**
|
|
@@ -27,6 +22,7 @@ import { badgeVariants, type BadgeVariants } from './badge-variants';
|
|
|
27
22
|
selector: 'Badge',
|
|
28
23
|
template: `<ng-content />`,
|
|
29
24
|
host: {
|
|
25
|
+
'attr.data-slot': '"badge"',
|
|
30
26
|
'[class]': 'computedClass()',
|
|
31
27
|
},
|
|
32
28
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -44,7 +40,7 @@ export class Badge {
|
|
|
44
40
|
badgeVariants({
|
|
45
41
|
variant: this.variant(),
|
|
46
42
|
}),
|
|
47
|
-
this.class()
|
|
48
|
-
)
|
|
43
|
+
this.class(),
|
|
44
|
+
),
|
|
49
45
|
);
|
|
50
46
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
|
|
9
4
|
/**
|
|
10
5
|
* BreadcrumbEllipsis component - shows more items indicator.
|
|
@@ -32,6 +27,7 @@ import {
|
|
|
32
27
|
<span class="sr-only">More</span>
|
|
33
28
|
`,
|
|
34
29
|
host: {
|
|
30
|
+
'attr.data-slot': '"breadcrumb-ellipsis"',
|
|
35
31
|
role: 'presentation',
|
|
36
32
|
'[attr.aria-hidden]': '"true"',
|
|
37
33
|
'[class]': 'computedClass()',
|
|
@@ -43,6 +39,6 @@ export class BreadcrumbEllipsis {
|
|
|
43
39
|
readonly class = input<string>('');
|
|
44
40
|
|
|
45
41
|
protected readonly computedClass = computed(() =>
|
|
46
|
-
cn('flex h-9 w-9 items-center justify-center', this.class())
|
|
42
|
+
cn('flex h-9 w-9 items-center justify-center', this.class()),
|
|
47
43
|
);
|
|
48
44
|
}
|
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
|
|
9
|
-
/**
|
|
10
|
-
* BreadcrumbItem component - li container.
|
|
11
|
-
* Matches shadcn/ui React BreadcrumbItem exactly.
|
|
12
|
-
*/
|
|
13
4
|
@Component({
|
|
14
5
|
selector: 'BreadcrumbItem',
|
|
15
|
-
template: `<ng-content
|
|
6
|
+
template: `<li [class]="computedClass()"><ng-content /></li>`,
|
|
16
7
|
host: {
|
|
17
|
-
'
|
|
8
|
+
'attr.data-slot': '"breadcrumb-item"',
|
|
9
|
+
style: 'display:contents',
|
|
18
10
|
},
|
|
19
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
12
|
})
|
|
21
13
|
export class BreadcrumbItem {
|
|
22
|
-
/** Additional CSS classes */
|
|
23
14
|
readonly class = input<string>('');
|
|
24
15
|
|
|
25
16
|
protected readonly computedClass = computed(() =>
|
|
26
|
-
cn('inline-flex items-center gap-1.5', this.class())
|
|
17
|
+
cn('inline-flex items-center gap-1.5', this.class()),
|
|
27
18
|
);
|
|
28
19
|
}
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
|
|
9
|
-
/**
|
|
10
|
-
* BreadcrumbLink component - anchor link.
|
|
11
|
-
* Matches shadcn/ui React BreadcrumbLink exactly.
|
|
12
|
-
*/
|
|
13
4
|
@Component({
|
|
14
5
|
selector: 'BreadcrumbLink',
|
|
15
|
-
template: `<ng-content
|
|
6
|
+
template: `<a [attr.href]="href()" [class]="computedClass()"><ng-content /></a>`,
|
|
16
7
|
host: {
|
|
17
|
-
'
|
|
18
|
-
|
|
8
|
+
'attr.data-slot': '"breadcrumb-link"',
|
|
9
|
+
style: 'display:contents',
|
|
19
10
|
},
|
|
20
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
12
|
})
|
|
22
13
|
export class BreadcrumbLink {
|
|
23
|
-
|
|
24
|
-
readonly href = input<string>('#');
|
|
25
|
-
|
|
26
|
-
/** Additional CSS classes */
|
|
14
|
+
readonly href = input<string | undefined>(undefined);
|
|
27
15
|
readonly class = input<string>('');
|
|
28
16
|
|
|
29
17
|
protected readonly computedClass = computed(() =>
|
|
30
|
-
cn('transition-colors hover:text-foreground', this.class())
|
|
18
|
+
cn('transition-colors hover:text-foreground', this.class()),
|
|
31
19
|
);
|
|
32
20
|
}
|
|
@@ -1,31 +1,22 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
|
|
9
|
-
/**
|
|
10
|
-
* BreadcrumbList component - ol container for items.
|
|
11
|
-
* Matches shadcn/ui React BreadcrumbList exactly.
|
|
12
|
-
*/
|
|
13
4
|
@Component({
|
|
14
5
|
selector: 'BreadcrumbList',
|
|
15
|
-
template: `<ng-content
|
|
6
|
+
template: `<ol [class]="computedClass()"><ng-content /></ol>`,
|
|
16
7
|
host: {
|
|
17
|
-
'
|
|
8
|
+
'attr.data-slot': '"breadcrumb-list"',
|
|
9
|
+
style: 'display:contents',
|
|
18
10
|
},
|
|
19
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
12
|
})
|
|
21
13
|
export class BreadcrumbList {
|
|
22
|
-
/** Additional CSS classes */
|
|
23
14
|
readonly class = input<string>('');
|
|
24
15
|
|
|
25
16
|
protected readonly computedClass = computed(() =>
|
|
26
17
|
cn(
|
|
27
18
|
'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',
|
|
28
|
-
this.class()
|
|
29
|
-
)
|
|
19
|
+
this.class(),
|
|
20
|
+
),
|
|
30
21
|
);
|
|
31
22
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
|
|
9
4
|
/**
|
|
10
5
|
* BreadcrumbPage component - current page span.
|
|
@@ -14,6 +9,7 @@ import {
|
|
|
14
9
|
selector: 'BreadcrumbPage',
|
|
15
10
|
template: `<ng-content />`,
|
|
16
11
|
host: {
|
|
12
|
+
'attr.data-slot': '"breadcrumb-page"',
|
|
17
13
|
role: 'link',
|
|
18
14
|
'[attr.aria-disabled]': '"true"',
|
|
19
15
|
'[attr.aria-current]': '"page"',
|
|
@@ -26,6 +22,6 @@ export class BreadcrumbPage {
|
|
|
26
22
|
readonly class = input<string>('');
|
|
27
23
|
|
|
28
24
|
protected readonly computedClass = computed(() =>
|
|
29
|
-
cn('font-normal text-foreground', this.class())
|
|
25
|
+
cn('font-normal text-foreground', this.class()),
|
|
30
26
|
);
|
|
31
27
|
}
|
|
@@ -1,47 +1,38 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
|
|
9
|
-
/**
|
|
10
|
-
* BreadcrumbSeparator component - visual separator.
|
|
11
|
-
* Matches shadcn/ui React BreadcrumbSeparator exactly.
|
|
12
|
-
*/
|
|
13
4
|
@Component({
|
|
14
5
|
selector: 'BreadcrumbSeparator',
|
|
15
6
|
template: `
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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>
|
|
32
25
|
`,
|
|
33
26
|
host: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
'[class]': 'computedClass()',
|
|
27
|
+
'attr.data-slot': '"breadcrumb-separator"',
|
|
28
|
+
style: 'display:contents',
|
|
37
29
|
},
|
|
38
30
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
31
|
})
|
|
40
32
|
export class BreadcrumbSeparator {
|
|
41
|
-
/** Additional CSS classes */
|
|
42
33
|
readonly class = input<string>('');
|
|
43
34
|
|
|
44
35
|
protected readonly computedClass = computed(() =>
|
|
45
|
-
cn('[&>svg]:h-3.5 [&>svg]:w-3.5', this.class())
|
|
36
|
+
cn('[&>svg]:h-3.5 [&>svg]:w-3.5', this.class()),
|
|
46
37
|
);
|
|
47
38
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
|
|
9
4
|
/**
|
|
10
5
|
* Breadcrumb component - root container.
|
|
@@ -27,6 +22,7 @@ import {
|
|
|
27
22
|
selector: 'Breadcrumb',
|
|
28
23
|
template: `<ng-content />`,
|
|
29
24
|
host: {
|
|
25
|
+
'attr.data-slot': '"breadcrumb"',
|
|
30
26
|
role: 'navigation',
|
|
31
27
|
'[attr.aria-label]': '"breadcrumb"',
|
|
32
28
|
'[class]': 'computedClass()',
|
|
@@ -37,7 +33,5 @@ export class Breadcrumb {
|
|
|
37
33
|
/** Additional CSS classes */
|
|
38
34
|
readonly class = input<string>('');
|
|
39
35
|
|
|
40
|
-
protected readonly computedClass = computed(() =>
|
|
41
|
-
cn(this.class())
|
|
42
|
-
);
|
|
36
|
+
protected readonly computedClass = computed(() => cn(this.class()));
|
|
43
37
|
}
|
|
@@ -10,21 +10,19 @@ export const buttonVariants = cva(
|
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
|
-
default:
|
|
14
|
-
'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
13
|
+
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
15
14
|
destructive:
|
|
16
15
|
'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',
|
|
17
16
|
outline:
|
|
18
17
|
'border border-input bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground',
|
|
19
|
-
secondary:
|
|
20
|
-
'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
18
|
+
secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
21
19
|
ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',
|
|
22
20
|
link: 'text-primary underline-offset-4 hover:underline',
|
|
23
21
|
},
|
|
24
22
|
size: {
|
|
25
|
-
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
26
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
27
|
-
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',
|
|
28
26
|
icon: 'size-9',
|
|
29
27
|
},
|
|
30
28
|
},
|
|
@@ -32,7 +30,7 @@ export const buttonVariants = cva(
|
|
|
32
30
|
variant: 'default',
|
|
33
31
|
size: 'default',
|
|
34
32
|
},
|
|
35
|
-
}
|
|
33
|
+
},
|
|
36
34
|
);
|
|
37
35
|
|
|
38
36
|
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
input,
|
|
7
|
-
} from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
8
3
|
import { buttonVariants, type ButtonVariants } from './button-variants';
|
|
9
4
|
|
|
10
5
|
/**
|
|
@@ -62,6 +57,7 @@ import { buttonVariants, type ButtonVariants } from './button-variants';
|
|
|
62
57
|
<ng-content />
|
|
63
58
|
`,
|
|
64
59
|
host: {
|
|
60
|
+
'attr.data-slot': '"button"',
|
|
65
61
|
'[class]': 'computedClass()',
|
|
66
62
|
'[attr.disabled]': 'isDisabled() || null',
|
|
67
63
|
'[attr.aria-disabled]': 'isDisabled() || null',
|
|
@@ -97,7 +93,7 @@ export class Button {
|
|
|
97
93
|
size: this.size(),
|
|
98
94
|
}),
|
|
99
95
|
this.loading() && 'relative cursor-wait',
|
|
100
|
-
this.class()
|
|
101
|
-
)
|
|
96
|
+
this.class(),
|
|
97
|
+
),
|
|
102
98
|
);
|
|
103
99
|
}
|
|
@@ -4,21 +4,18 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
* ButtonGroup variants using class-variance-authority
|
|
5
5
|
* Grouped buttons with shared styling
|
|
6
6
|
*/
|
|
7
|
-
export const buttonGroupVariants = cva(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
vertical:
|
|
15
|
-
'flex-col [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',
|
|
16
|
-
},
|
|
7
|
+
export const buttonGroupVariants = cva('inline-flex items-center justify-center rounded-md', {
|
|
8
|
+
variants: {
|
|
9
|
+
orientation: {
|
|
10
|
+
horizontal:
|
|
11
|
+
'[&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ml-px',
|
|
12
|
+
vertical:
|
|
13
|
+
'flex-col [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',
|
|
17
14
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
);
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
orientation: 'horizontal',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
23
20
|
|
|
24
21
|
export type ButtonGroupVariants = VariantProps<typeof buttonGroupVariants>;
|