@spartan-ng/cli 0.0.1-alpha.584 → 0.0.1-alpha.585
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/generators/migrate-brain-imports/import-map.d.ts +0 -1
- package/src/generators/migrate-brain-imports/import-map.js +0 -1
- package/src/generators/migrate-brain-imports/import-map.js.map +1 -1
- package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-content.ts.template +6 -13
- package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-icon.ts.template +8 -13
- package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-item.ts.template +5 -10
- package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-trigger.ts.template +8 -11
- package/src/generators/ui/libs/accordion/files/lib/hlm-accordion.ts.template +5 -10
- package/src/generators/ui/libs/alert/files/lib/hlm-alert-description.ts.template +5 -13
- package/src/generators/ui/libs/alert/files/lib/hlm-alert-title.ts.template +5 -10
- package/src/generators/ui/libs/alert/files/lib/hlm-alert.ts.template +6 -7
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-content.ts.template +8 -11
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-description.ts.template +5 -6
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-footer.ts.template +5 -8
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-header.ts.template +5 -8
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-title.ts.template +5 -6
- package/src/generators/ui/libs/aspect-ratio/files/lib/helm-aspect-ratio.ts.template +9 -15
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-empty.ts.template +5 -8
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-group.ts.template +5 -13
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-item.ts.template +8 -16
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-list.ts.template +5 -13
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete.ts.template +7 -13
- package/src/generators/ui/libs/avatar/files/lib/fallback/hlm-avatar-fallback.ts.template +5 -11
- package/src/generators/ui/libs/avatar/files/lib/hlm-avatar.ts.template +6 -11
- package/src/generators/ui/libs/avatar/files/lib/image/hlm-avatar-image.ts.template +6 -9
- package/src/generators/ui/libs/badge/files/lib/hlm-badge.ts.template +6 -7
- package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-item.ts.template +5 -9
- package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-link.ts.template +6 -9
- package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-list.ts.template +5 -11
- package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-page.ts.template +5 -7
- package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-separator.ts.template +5 -7
- package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb.ts.template +1 -7
- package/src/generators/ui/libs/button/files/lib/hlm-button.ts.template +6 -9
- package/src/generators/ui/libs/button-group/files/lib/hlm-button-group-separator.ts.template +8 -12
- package/src/generators/ui/libs/button-group/files/lib/hlm-button-group-text.ts.template +8 -14
- package/src/generators/ui/libs/button-group/files/lib/hlm-button-group.ts.template +6 -9
- package/src/generators/ui/libs/card/files/lib/hlm-card-action.ts.template +5 -10
- package/src/generators/ui/libs/card/files/lib/hlm-card-content.ts.template +5 -8
- package/src/generators/ui/libs/card/files/lib/hlm-card-description.ts.template +5 -8
- package/src/generators/ui/libs/card/files/lib/hlm-card-footer.ts.template +5 -8
- package/src/generators/ui/libs/card/files/lib/hlm-card-header.ts.template +8 -13
- package/src/generators/ui/libs/card/files/lib/hlm-card-title.ts.template +5 -8
- package/src/generators/ui/libs/card/files/lib/hlm-card.ts.template +5 -8
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-content.ts.template +5 -8
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-item.ts.template +5 -8
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-next.ts.template +1 -4
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-previous.ts.template +1 -6
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-slide-display.ts.template +0 -5
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel.ts.template +5 -6
- package/src/generators/ui/libs/collapsible/files/lib/hlm-collapsible-content.ts.template +5 -7
- package/src/generators/ui/libs/command/files/lib/hlm-command-dialog-close-button.ts.template +8 -13
- package/src/generators/ui/libs/command/files/lib/hlm-command-dialog.ts.template +7 -12
- package/src/generators/ui/libs/command/files/lib/hlm-command-empty.ts.template +5 -6
- package/src/generators/ui/libs/command/files/lib/hlm-command-group-label.ts.template +5 -11
- package/src/generators/ui/libs/command/files/lib/hlm-command-group.ts.template +5 -11
- package/src/generators/ui/libs/command/files/lib/hlm-command-icon.ts.template +5 -8
- package/src/generators/ui/libs/command/files/lib/hlm-command-item.ts.template +8 -14
- package/src/generators/ui/libs/command/files/lib/hlm-command-list.ts.template +5 -11
- package/src/generators/ui/libs/command/files/lib/hlm-command-search-input.ts.template +8 -14
- package/src/generators/ui/libs/command/files/lib/hlm-command-search.ts.template +5 -11
- package/src/generators/ui/libs/command/files/lib/hlm-command-separator.ts.template +5 -9
- package/src/generators/ui/libs/command/files/lib/hlm-command-shortcut.ts.template +5 -8
- package/src/generators/ui/libs/command/files/lib/hlm-command.ts.template +5 -11
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-close.ts.template +8 -12
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-content.ts.template +6 -10
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-description.ts.template +5 -6
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-footer.ts.template +5 -8
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-header.ts.template +5 -8
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-overlay.ts.template +2 -2
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-title.ts.template +5 -6
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-checkbox-indicator.ts.template +8 -13
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-checkbox.ts.template +9 -13
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-group.ts.template +5 -6
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-item-sub-indicator.ts.template +5 -8
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-item.ts.template +9 -12
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-label.ts.template +5 -8
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-radio-indicator.ts.template +8 -13
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-radio.ts.template +9 -13
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-separator.ts.template +5 -6
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-shortcut.ts.template +5 -8
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-sub.ts.template +7 -12
- package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu.ts.template +7 -12
- package/src/generators/ui/libs/empty/files/lib/hlm-empty-content.ts.template +5 -9
- package/src/generators/ui/libs/empty/files/lib/hlm-empty-description.ts.template +7 -12
- package/src/generators/ui/libs/empty/files/lib/hlm-empty-header.ts.template +5 -9
- package/src/generators/ui/libs/empty/files/lib/hlm-empty-media.ts.template +6 -9
- package/src/generators/ui/libs/empty/files/lib/hlm-empty-title.ts.template +5 -7
- package/src/generators/ui/libs/empty/files/lib/hlm-empty.ts.template +8 -12
- package/src/generators/ui/libs/field/files/lib/hlm-field-content.ts.template +5 -9
- package/src/generators/ui/libs/field/files/lib/hlm-field-description.ts.template +6 -11
- package/src/generators/ui/libs/field/files/lib/hlm-field-group.ts.template +8 -12
- package/src/generators/ui/libs/field/files/lib/hlm-field-label.ts.template +6 -11
- package/src/generators/ui/libs/field/files/lib/hlm-field-legend.ts.template +6 -9
- package/src/generators/ui/libs/field/files/lib/hlm-field-separator.ts.template +5 -9
- package/src/generators/ui/libs/field/files/lib/hlm-field-set.ts.template +6 -11
- package/src/generators/ui/libs/field/files/lib/hlm-field-title.ts.template +8 -12
- package/src/generators/ui/libs/field/files/lib/hlm-field.ts.template +5 -9
- package/src/generators/ui/libs/form-field/files/lib/hlm-error.ts.template +5 -10
- package/src/generators/ui/libs/form-field/files/lib/hlm-form-field.ts.template +3 -16
- package/src/generators/ui/libs/form-field/files/lib/hlm-hint.ts.template +5 -8
- package/src/generators/ui/libs/hover-card/files/lib/hlm-hover-card-content.ts.template +5 -11
- package/src/generators/ui/libs/input/files/lib/hlm-input.ts.template +4 -10
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-addon.ts.template +5 -8
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-button.ts.template +3 -12
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-input.ts.template +3 -18
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-text.ts.template +8 -14
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-textarea.ts.template +6 -18
- package/src/generators/ui/libs/input-group/files/lib/hlm-input-group.ts.template +6 -12
- package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-group.ts.template +5 -7
- package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-separator.ts.template +5 -7
- package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-slot.ts.template +6 -11
- package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp.ts.template +5 -9
- package/src/generators/ui/libs/item/files/lib/hlm-item-actions.ts.template +5 -6
- package/src/generators/ui/libs/item/files/lib/hlm-item-content.ts.template +5 -8
- package/src/generators/ui/libs/item/files/lib/hlm-item-description.ts.template +6 -10
- package/src/generators/ui/libs/item/files/lib/hlm-item-footer.ts.template +5 -8
- package/src/generators/ui/libs/item/files/lib/hlm-item-group.ts.template +6 -6
- package/src/generators/ui/libs/item/files/lib/hlm-item-header.ts.template +5 -8
- package/src/generators/ui/libs/item/files/lib/hlm-item-media.ts.template +6 -10
- package/src/generators/ui/libs/item/files/lib/hlm-item-separator.ts.template +6 -7
- package/src/generators/ui/libs/item/files/lib/hlm-item-title.ts.template +5 -8
- package/src/generators/ui/libs/item/files/lib/hlm-item.ts.template +6 -10
- package/src/generators/ui/libs/kbd/files/lib/hlm-kbd-group.ts.template +5 -6
- package/src/generators/ui/libs/kbd/files/lib/hlm-kbd.ts.template +6 -10
- package/src/generators/ui/libs/label/files/lib/hlm-label.ts.template +8 -14
- package/src/generators/ui/libs/menubar/files/lib/hlm-menubar-trigger.ts.template +6 -11
- package/src/generators/ui/libs/menubar/files/lib/hlm-menubar.ts.template +5 -8
- package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-content.ts.template +7 -13
- package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-item.ts.template +5 -8
- package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-link.ts.template +6 -12
- package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-list.ts.template +6 -12
- package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-trigger.ts.template +8 -13
- package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu.ts.template +5 -10
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-content.ts.template +5 -6
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-ellipsis.ts.template +6 -6
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-item.ts.template +5 -6
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-link.ts.template +7 -12
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-next.ts.template +5 -8
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-previous.ts.template +4 -8
- package/src/generators/ui/libs/pagination/files/lib/hlm-pagination.ts.template +6 -7
- package/src/generators/ui/libs/popover/files/lib/hlm-popover-content.ts.template +7 -14
- package/src/generators/ui/libs/progress/files/lib/hlm-progress-indicator.ts.template +7 -15
- package/src/generators/ui/libs/progress/files/lib/hlm-progress.ts.template +5 -10
- package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-group.ts.template +5 -6
- package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-indicator.ts.template +8 -11
- package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-group.ts.template +5 -9
- package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-handle.ts.template +8 -12
- package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-panel.ts.template +2 -8
- package/src/generators/ui/libs/scroll-area/files/lib/hlm-scroll-area.ts.template +5 -6
- package/src/generators/ui/libs/select/files/lib/hlm-select-content.ts.template +8 -11
- package/src/generators/ui/libs/select/files/lib/hlm-select-group.ts.template +2 -10
- package/src/generators/ui/libs/select/files/lib/hlm-select-label.ts.template +7 -12
- package/src/generators/ui/libs/select/files/lib/hlm-select-option.ts.template +8 -13
- package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-down.ts.template +5 -10
- package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-up.ts.template +5 -10
- package/src/generators/ui/libs/select/files/lib/hlm-select-value.ts.template +5 -10
- package/src/generators/ui/libs/select/files/lib/hlm-select.ts.template +5 -8
- package/src/generators/ui/libs/separator/files/lib/hlm-separator.ts.template +5 -8
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-close.ts.template +8 -11
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-content.ts.template +3 -19
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-description.ts.template +5 -6
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-footer.ts.template +5 -6
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-header.ts.template +5 -6
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-title.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-content.ts.template +5 -11
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-footer.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group-action.ts.template +6 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group-content.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group-label.ts.template +6 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group.ts.template +5 -8
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-header.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-input.ts.template +7 -8
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-inset.ts.template +6 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-action.ts.template +7 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-badge.ts.template +6 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-button.ts.template +5 -7
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-item.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-skeleton.ts.template +6 -8
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-sub-button.ts.template +6 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-sub-item.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-sub.ts.template +6 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-rail.ts.template +6 -10
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-separator.ts.template +5 -6
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-wrapper.ts.template +6 -9
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar.ts.template +11 -14
- package/src/generators/ui/libs/skeleton/files/lib/hlm-skeleton.ts.template +5 -8
- package/src/generators/ui/libs/slider/files/lib/hlm-slider.ts.template +5 -14
- package/src/generators/ui/libs/spinner/files/lib/hlm-spinner.ts.template +6 -7
- package/src/generators/ui/libs/switch/files/lib/hlm-switch-thumb.ts.template +8 -14
- package/src/generators/ui/libs/table/files/lib/hlm-table.ts.template +39 -79
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-content.ts.template +8 -11
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-list.ts.template +5 -8
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-paginated-list.ts.template +6 -7
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-trigger.ts.template +8 -11
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs.ts.template +5 -6
- package/src/generators/ui/libs/textarea/files/lib/hlm-textarea.ts.template +4 -8
- package/src/generators/ui/libs/toggle/files/lib/hlm-toggle.ts.template +6 -11
- package/src/generators/ui/libs/toggle-group/files/lib/hlm-toggle-group-item.ts.template +7 -12
- package/src/generators/ui/libs/toggle-group/files/lib/hlm-toggle-group.ts.template +5 -11
- package/src/generators/ui/libs/typography/files/lib/hlm-blockquote.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-code.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-h1.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-h2.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-h3.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-h4.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-large.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-lead.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-muted.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-p.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-small.ts.template +5 -8
- package/src/generators/ui/libs/typography/files/lib/hlm-ul.ts.template +5 -8
- package/src/generators/ui/libs/utils/files/lib/hlm.ts.template +251 -0
- package/src/generators/ui/supported-ui-libraries.json +66 -97
package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-trigger.ts.template
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnNavigationMenuTrigger } from '@spartan-ng/brain/navigation-menu';
|
|
3
|
-
import {
|
|
4
|
-
import { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: 'button[hlmNavigationMenuTrigger]',
|
|
8
7
|
hostDirectives: [BrnNavigationMenuTrigger],
|
|
9
|
-
host: {
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
|
-
},
|
|
12
8
|
})
|
|
13
9
|
export class HlmNavigationMenuTrigger {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
10
|
+
constructor() {
|
|
11
|
+
classes(
|
|
12
|
+
() =>
|
|
13
|
+
'bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50',
|
|
14
|
+
);
|
|
15
|
+
}
|
|
21
16
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnNavigationMenu } from '@spartan-ng/brain/navigation-menu';
|
|
3
|
-
import {
|
|
4
|
-
import { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: 'nav[hlmNavigationMenu]',
|
|
@@ -12,13 +11,9 @@ import { ClassValue } from 'clsx';
|
|
|
12
11
|
outputs: ['valueChange'],
|
|
13
12
|
},
|
|
14
13
|
],
|
|
15
|
-
host: {
|
|
16
|
-
'[class]': '_computedClass()',
|
|
17
|
-
},
|
|
18
14
|
})
|
|
19
15
|
export class HlmNavigationMenu {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
16
|
+
constructor() {
|
|
17
|
+
classes(() => 'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center');
|
|
18
|
+
}
|
|
24
19
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { Directive
|
|
2
|
-
import {
|
|
3
|
-
import type { ClassValue } from 'clsx';
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
4
3
|
|
|
5
4
|
@Directive({
|
|
6
5
|
selector: 'ul[hlmPaginationContent]',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'pagination-content',
|
|
9
|
-
'[class]': '_computedClass()',
|
|
10
8
|
},
|
|
11
9
|
})
|
|
12
10
|
export class HlmPaginationContent {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => 'flex flex-row items-center gap-1');
|
|
13
|
+
}
|
|
15
14
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component,
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
2
|
import { provideIcons } from '@ng-icons/core';
|
|
3
3
|
import { lucideEllipsis } from '@ng-icons/lucide';
|
|
4
4
|
import { HlmIconImports } from '<%- importAlias %>/icon';
|
|
5
|
-
import {
|
|
6
|
-
import type { ClassValue } from 'clsx';
|
|
5
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
7
6
|
|
|
8
7
|
@Component({
|
|
9
8
|
selector: 'hlm-pagination-ellipsis',
|
|
@@ -14,15 +13,16 @@ import type { ClassValue } from 'clsx';
|
|
|
14
13
|
'data-slot': 'pagination-ellipsis',
|
|
15
14
|
},
|
|
16
15
|
template: `
|
|
17
|
-
<span
|
|
16
|
+
<span aria-hidden="true">
|
|
18
17
|
<ng-icon hlm size="sm" name="lucideEllipsis" />
|
|
19
18
|
<span class="sr-only">{{ srOnlyText() }}</span>
|
|
20
19
|
</span>
|
|
21
20
|
`,
|
|
22
21
|
})
|
|
23
22
|
export class HlmPaginationEllipsis {
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
constructor() {
|
|
24
|
+
classes(() => 'flex size-9 items-center justify-center');
|
|
25
|
+
}
|
|
26
26
|
|
|
27
27
|
/** Screen reader only text for the ellipsis */
|
|
28
28
|
public readonly srOnlyText = input<string>('More pages');
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { Directive
|
|
2
|
-
import {
|
|
3
|
-
import type { ClassValue } from 'clsx';
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
4
3
|
|
|
5
4
|
@Directive({
|
|
6
5
|
selector: 'li[hlmPaginationItem]',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'pagination-item',
|
|
9
|
-
'[class]': '_computedClass()',
|
|
10
8
|
},
|
|
11
9
|
})
|
|
12
10
|
export class HlmPaginationItem {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => '');
|
|
13
|
+
}
|
|
15
14
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
-
import { Directive, booleanAttribute,
|
|
2
|
+
import { Directive, booleanAttribute, input } from '@angular/core';
|
|
3
3
|
import { RouterLink } from '@angular/router';
|
|
4
|
-
import { type ButtonVariants
|
|
5
|
-
import {
|
|
6
|
-
import type { ClassValue } from 'clsx';
|
|
4
|
+
import { buttonVariants, type ButtonVariants } from '<%- importAlias %>/button';
|
|
5
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
7
6
|
|
|
8
7
|
@Directive({
|
|
9
8
|
selector: '[hlmPaginationLink]',
|
|
@@ -27,13 +26,11 @@ import type { ClassValue } from 'clsx';
|
|
|
27
26
|
],
|
|
28
27
|
host: {
|
|
29
28
|
'data-slot': 'pagination-link',
|
|
30
|
-
'[class]': '_computedClass()',
|
|
31
29
|
'[attr.data-active]': 'isActive() ? "true" : null',
|
|
32
30
|
'[attr.aria-current]': 'isActive() ? "page" : null',
|
|
33
31
|
},
|
|
34
32
|
})
|
|
35
33
|
export class HlmPaginationLink {
|
|
36
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
37
34
|
/** Whether the link is active (i.e., the current page). */
|
|
38
35
|
public readonly isActive = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
39
36
|
/** The size of the button. */
|
|
@@ -41,15 +38,13 @@ export class HlmPaginationLink {
|
|
|
41
38
|
/** The link to navigate to the page. */
|
|
42
39
|
public readonly link = input<RouterLink['routerLink']>();
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'',
|
|
41
|
+
constructor() {
|
|
42
|
+
classes(() => [
|
|
47
43
|
this.link() === undefined ? 'cursor-pointer' : '',
|
|
48
44
|
buttonVariants({
|
|
49
45
|
variant: this.isActive() ? 'outline' : 'ghost',
|
|
50
46
|
size: this.size(),
|
|
51
47
|
}),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
);
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
55
50
|
}
|
|
@@ -5,8 +5,7 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
|
5
5
|
import { lucideChevronRight } from '@ng-icons/lucide';
|
|
6
6
|
import type { ButtonVariants } from '<%- importAlias %>/button';
|
|
7
7
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
8
|
-
import {
|
|
9
|
-
import type { ClassValue } from 'clsx';
|
|
8
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
10
9
|
import { HlmPaginationLink } from './hlm-pagination-link';
|
|
11
10
|
|
|
12
11
|
@Component({
|
|
@@ -16,7 +15,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
|
|
|
16
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
16
|
template: `
|
|
18
17
|
<a
|
|
19
|
-
[class]="_computedClass()"
|
|
20
18
|
hlmPaginationLink
|
|
21
19
|
[link]="link()"
|
|
22
20
|
[queryParams]="queryParams()"
|
|
@@ -30,7 +28,10 @@ import { HlmPaginationLink } from './hlm-pagination-link';
|
|
|
30
28
|
`,
|
|
31
29
|
})
|
|
32
30
|
export class HlmPaginationNext {
|
|
33
|
-
|
|
31
|
+
constructor() {
|
|
32
|
+
classes(() => ['gap-1 px-2.5', !this.iconOnly() ? 'sm:pr-2.5' : '']);
|
|
33
|
+
}
|
|
34
|
+
|
|
34
35
|
/** The link to navigate to the next page. */
|
|
35
36
|
public readonly link = input<RouterLink['routerLink']>();
|
|
36
37
|
/** The query parameters to pass to the next page. */
|
|
@@ -49,8 +50,4 @@ export class HlmPaginationNext {
|
|
|
49
50
|
protected readonly _labelClass = computed(() => (this.iconOnly() ? 'sr-only' : 'hidden sm:block'));
|
|
50
51
|
|
|
51
52
|
protected readonly _size = computed<ButtonVariants['size']>(() => (this.iconOnly() ? 'icon' : 'default'));
|
|
52
|
-
|
|
53
|
-
protected readonly _computedClass = computed(() =>
|
|
54
|
-
hlm('gap-1 px-2.5', !this.iconOnly() ? 'sm:pr-2.5' : '', this.userClass()),
|
|
55
|
-
);
|
|
56
53
|
}
|
|
@@ -5,8 +5,7 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
|
5
5
|
import { lucideChevronLeft } from '@ng-icons/lucide';
|
|
6
6
|
import type { ButtonVariants } from '<%- importAlias %>/button';
|
|
7
7
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
8
|
-
import {
|
|
9
|
-
import type { ClassValue } from 'clsx';
|
|
8
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
10
9
|
import { HlmPaginationLink } from './hlm-pagination-link';
|
|
11
10
|
|
|
12
11
|
@Component({
|
|
@@ -16,7 +15,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
|
|
|
16
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
16
|
template: `
|
|
18
17
|
<a
|
|
19
|
-
[class]="_computedClass()"
|
|
20
18
|
hlmPaginationLink
|
|
21
19
|
[link]="link()"
|
|
22
20
|
[queryParams]="queryParams()"
|
|
@@ -30,7 +28,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
|
|
|
30
28
|
`,
|
|
31
29
|
})
|
|
32
30
|
export class HlmPaginationPrevious {
|
|
33
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
34
31
|
/** The link to navigate to the previous page. */
|
|
35
32
|
public readonly link = input<RouterLink['routerLink']>();
|
|
36
33
|
/** The query parameters to pass to the previous page. */
|
|
@@ -47,10 +44,9 @@ export class HlmPaginationPrevious {
|
|
|
47
44
|
transform: booleanAttribute,
|
|
48
45
|
});
|
|
49
46
|
protected readonly _labelClass = computed(() => (this.iconOnly() ? 'sr-only' : 'hidden sm:block'));
|
|
50
|
-
|
|
51
47
|
protected readonly _size = computed<ButtonVariants['size']>(() => (this.iconOnly() ? 'icon' : 'default'));
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
constructor() {
|
|
50
|
+
classes(() => ['gap-1 px-2.5', !this.iconOnly() ? 'sm:pl-2.5' : '']);
|
|
51
|
+
}
|
|
56
52
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { Directive,
|
|
2
|
-
import {
|
|
3
|
-
import type { ClassValue } from 'clsx';
|
|
1
|
+
import { Directive, input } from '@angular/core';
|
|
2
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
4
3
|
|
|
5
4
|
@Directive({
|
|
6
5
|
selector: '[hlmPagination],hlm-pagination',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'pagination',
|
|
9
8
|
role: 'navigation',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
'[attr.aria-label]': 'ariaLabel()',
|
|
12
10
|
},
|
|
13
11
|
})
|
|
14
12
|
export class HlmPagination {
|
|
15
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
-
protected readonly _computedClass = computed(() => hlm('mx-auto flex w-full justify-center', this.userClass()));
|
|
17
|
-
|
|
18
13
|
/** The aria-label for the pagination component. */
|
|
19
14
|
public readonly ariaLabel = input<string>('pagination', { alias: 'aria-label' });
|
|
15
|
+
|
|
16
|
+
constructor() {
|
|
17
|
+
classes(() => 'mx-auto flex w-full justify-center');
|
|
18
|
+
}
|
|
20
19
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { Directive, ElementRef, Renderer2,
|
|
1
|
+
import { Directive, ElementRef, Renderer2, effect, inject, signal } from '@angular/core';
|
|
2
2
|
import { injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: '[hlmPopoverContent],[brnPopoverContent][hlm]',
|
|
8
|
-
host: {
|
|
9
|
-
'[class]': '_computedClass()',
|
|
10
|
-
},
|
|
11
7
|
})
|
|
12
8
|
export class HlmPopoverContent {
|
|
13
9
|
private readonly _stateProvider = injectExposesStateProvider({ host: true });
|
|
@@ -19,13 +15,10 @@ export class HlmPopoverContent {
|
|
|
19
15
|
effect(() => {
|
|
20
16
|
this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
|
|
21
17
|
});
|
|
22
|
-
}
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
);
|
|
19
|
+
classes(
|
|
20
|
+
() =>
|
|
21
|
+
'border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative w-72 rounded-md border p-4 shadow-md outline-none',
|
|
22
|
+
);
|
|
23
|
+
}
|
|
31
24
|
}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive, computed } from '@angular/core';
|
|
2
2
|
import { BrnProgressIndicator, injectBrnProgress } from '@spartan-ng/brain/progress';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: '[hlmProgressIndicator],hlm-progress-indicator',
|
|
8
7
|
hostDirectives: [BrnProgressIndicator],
|
|
9
|
-
host: {
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
|
-
'[class.animate-indeterminate]': '_indeterminate()',
|
|
12
|
-
'[style.transform]': '_transform()',
|
|
13
|
-
},
|
|
8
|
+
host: { '[class.animate-indeterminate]': '_indeterminate()', '[style.transform]': '_transform()' },
|
|
14
9
|
})
|
|
15
10
|
export class HlmProgressIndicator {
|
|
16
11
|
private readonly _progress = injectBrnProgress();
|
|
17
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
18
|
-
|
|
19
|
-
protected readonly _computedClass = computed(() =>
|
|
20
|
-
hlm('bg-primary h-full w-full flex-1 transition-all', this.userClass()),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
12
|
protected readonly _transform = computed(() => `translateX(-${100 - (this._progress.value() ?? 100)}%)`);
|
|
24
|
-
|
|
25
13
|
protected readonly _indeterminate = computed(
|
|
26
14
|
() => this._progress.value() === null || this._progress.value() === undefined,
|
|
27
15
|
);
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
classes(() => 'bg-primary h-full w-full flex-1 transition-all');
|
|
19
|
+
}
|
|
28
20
|
}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnProgress } from '@spartan-ng/brain/progress';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: 'hlm-progress,[hlmProgress]',
|
|
8
7
|
hostDirectives: [{ directive: BrnProgress, inputs: ['value', 'max', 'getValueLabel'] }],
|
|
9
|
-
host: {
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
|
-
},
|
|
12
8
|
})
|
|
13
9
|
export class HlmProgress {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
);
|
|
10
|
+
constructor() {
|
|
11
|
+
classes(() => 'bg-primary/20 relative inline-flex h-2 w-full overflow-hidden rounded-full');
|
|
12
|
+
}
|
|
18
13
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnRadioGroup } from '@spartan-ng/brain/radio-group';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: '[hlmRadioGroup],hlm-radio-group',
|
|
@@ -14,10 +13,10 @@ import type { ClassValue } from 'clsx';
|
|
|
14
13
|
],
|
|
15
14
|
host: {
|
|
16
15
|
'data-slot': 'radio-group',
|
|
17
|
-
'[class]': '_computedClass()',
|
|
18
16
|
},
|
|
19
17
|
})
|
|
20
18
|
export class HlmRadioGroup {
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
constructor() {
|
|
20
|
+
classes(() => 'grid gap-3');
|
|
21
|
+
}
|
|
23
22
|
}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component
|
|
2
|
-
import {
|
|
3
|
-
import type { ClassValue } from 'clsx';
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
4
3
|
|
|
5
4
|
@Component({
|
|
6
5
|
selector: 'hlm-radio-indicator',
|
|
7
6
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
7
|
host: {
|
|
9
8
|
'data-slot': 'radio-group-indicator',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
template: `
|
|
13
11
|
<div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div>
|
|
14
12
|
`,
|
|
15
13
|
})
|
|
16
14
|
export class HlmRadioIndicator {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
15
|
+
constructor() {
|
|
16
|
+
classes(
|
|
17
|
+
() =>
|
|
18
|
+
'border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/30 group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-[color,box-shadow] outline-none group-has-[:focus-visible]:ring-[3px]',
|
|
19
|
+
);
|
|
20
|
+
}
|
|
24
21
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnResizableGroup } from '@spartan-ng/brain/resizable';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: '[hlmResizableGroup],hlm-resizable-group',
|
|
@@ -14,13 +13,10 @@ import type { ClassValue } from 'clsx';
|
|
|
14
13
|
],
|
|
15
14
|
host: {
|
|
16
15
|
'data-slot': 'resizable-group',
|
|
17
|
-
'[class]': '_computedClass()',
|
|
18
16
|
},
|
|
19
17
|
})
|
|
20
18
|
export class HlmResizableGroup {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
hlm('group flex h-full w-full data-[panel-group-direction=vertical]:flex-col', this.userClass()),
|
|
25
|
-
);
|
|
19
|
+
constructor() {
|
|
20
|
+
classes(() => 'group flex h-full w-full data-[panel-group-direction=vertical]:flex-col');
|
|
21
|
+
}
|
|
26
22
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component,
|
|
1
|
+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
2
2
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
3
|
import { lucideGripVertical } from '@ng-icons/lucide';
|
|
4
4
|
import { BrnResizableHandle } from '@spartan-ng/brain/resizable';
|
|
5
5
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
6
|
-
import {
|
|
7
|
-
import type { ClassValue } from 'clsx';
|
|
6
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
8
7
|
|
|
9
8
|
@Component({
|
|
10
9
|
selector: 'hlm-resizable-handle',
|
|
@@ -15,7 +14,6 @@ import type { ClassValue } from 'clsx';
|
|
|
15
14
|
hostDirectives: [{ directive: BrnResizableHandle, inputs: ['withHandle', 'disabled'] }],
|
|
16
15
|
host: {
|
|
17
16
|
'data-slot': 'resizable-handle',
|
|
18
|
-
'[class]': '_computedClass()',
|
|
19
17
|
},
|
|
20
18
|
template: `
|
|
21
19
|
@if (_brnResizableHandle.withHandle()) {
|
|
@@ -28,12 +26,10 @@ import type { ClassValue } from 'clsx';
|
|
|
28
26
|
export class HlmResizableHandle {
|
|
29
27
|
protected readonly _brnResizableHandle = inject(BrnResizableHandle);
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
),
|
|
38
|
-
);
|
|
29
|
+
constructor() {
|
|
30
|
+
classes(
|
|
31
|
+
() =>
|
|
32
|
+
'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=horizontal]:hover:cursor-ew-resize data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:hover:cursor-ns-resize [&[data-panel-group-direction=vertical]>div]:rotate-90',
|
|
33
|
+
);
|
|
34
|
+
}
|
|
39
35
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnResizablePanel } from '@spartan-ng/brain/resizable';
|
|
3
|
-
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
5
3
|
|
|
6
4
|
@Directive({
|
|
7
5
|
selector: '[hlmResizablePanel],hlm-resizable-panel',
|
|
@@ -13,10 +11,6 @@ import type { ClassValue } from 'clsx';
|
|
|
13
11
|
],
|
|
14
12
|
host: {
|
|
15
13
|
'data-slot': 'resizable-panel',
|
|
16
|
-
'[class]': '_computedClass()',
|
|
17
14
|
},
|
|
18
15
|
})
|
|
19
|
-
export class HlmResizablePanel {
|
|
20
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
21
|
-
protected readonly _computedClass = computed(() => hlm(this.userClass()));
|
|
22
|
-
}
|
|
16
|
+
export class HlmResizablePanel {}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import type { ClassValue } from 'clsx';
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
4
3
|
|
|
5
4
|
@Directive({
|
|
6
5
|
selector: 'ng-scrollbar[hlm],ng-scrollbar[hlmScrollbar]',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'scroll-area',
|
|
9
|
-
'[class]': '_computedClass()',
|
|
10
8
|
'[style.--scrollbar-border-radius]': '100 + "px"',
|
|
11
9
|
'[style.--scrollbar-offset]': '3',
|
|
12
10
|
'[style.--scrollbar-thumb-color]': '"var(--border)"',
|
|
@@ -15,6 +13,7 @@ import type { ClassValue } from 'clsx';
|
|
|
15
13
|
},
|
|
16
14
|
})
|
|
17
15
|
export class HlmScrollArea {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
constructor() {
|
|
17
|
+
classes(() => 'block');
|
|
18
|
+
}
|
|
20
19
|
}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
-
import { Directive, booleanAttribute,
|
|
2
|
+
import { Directive, booleanAttribute, input } from '@angular/core';
|
|
3
3
|
import { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
4
|
-
import {
|
|
5
|
-
import type { ClassValue } from 'clsx';
|
|
4
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
6
5
|
|
|
7
6
|
@Directive({
|
|
8
7
|
selector: '[hlmSelectContent], hlm-select-content',
|
|
9
8
|
host: {
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
'[attr.data-state]': '_stateProvider?.state() ?? "open"',
|
|
12
10
|
'[attr.data-side]': '_sideProvider?.side() ?? "bottom"',
|
|
13
11
|
},
|
|
14
12
|
})
|
|
15
13
|
export class HlmSelectContent {
|
|
16
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
17
14
|
public readonly stickyLabels = input<boolean, BooleanInput>(false, {
|
|
18
15
|
transform: booleanAttribute,
|
|
19
16
|
});
|
|
20
17
|
protected readonly _stateProvider = injectExposesStateProvider({ optional: true });
|
|
21
18
|
protected readonly _sideProvider = injectExposedSideProvider({ optional: true });
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
20
|
+
constructor() {
|
|
21
|
+
classes(
|
|
22
|
+
() =>
|
|
23
|
+
'border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 w-full min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md data-[side=bottom]:top-[2px] data-[side=top]:bottom-[2px]',
|
|
24
|
+
);
|
|
25
|
+
}
|
|
29
26
|
}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import { Directive
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnSelectGroup } from '@spartan-ng/brain/select';
|
|
3
|
-
import { hlm } from '<%- importAlias %>/utils';
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
5
3
|
|
|
6
4
|
@Directive({
|
|
7
5
|
selector: '[hlmSelectGroup], hlm-select-group',
|
|
8
6
|
hostDirectives: [BrnSelectGroup],
|
|
9
|
-
host: {
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
|
-
},
|
|
12
7
|
})
|
|
13
|
-
export class HlmSelectGroup {
|
|
14
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
15
|
-
protected readonly _computedClass = computed(() => hlm(this.userClass()));
|
|
16
|
-
}
|
|
8
|
+
export class HlmSelectGroup {}
|