@spartan-ng/cli 0.0.1-alpha.584 → 0.0.1-alpha.586
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
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, inject } from '@angular/core';
|
|
2
2
|
import { BrnSelectLabel } from '@spartan-ng/brain/select';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
import { HlmSelectContent } from './hlm-select-content';
|
|
6
5
|
|
|
7
6
|
@Directive({
|
|
8
7
|
selector: '[hlmSelectLabel], hlm-select-label',
|
|
9
8
|
hostDirectives: [BrnSelectLabel],
|
|
10
|
-
host: {
|
|
11
|
-
'[class]': '_computedClass()',
|
|
12
|
-
},
|
|
13
9
|
})
|
|
14
10
|
export class HlmSelectLabel {
|
|
15
11
|
private readonly _selectContent = inject(HlmSelectContent);
|
|
16
12
|
private readonly _stickyLabels = computed(() => this._selectContent.stickyLabels());
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
|
|
14
|
+
constructor() {
|
|
15
|
+
classes(() => [
|
|
20
16
|
'text-muted-foreground px-2 py-1.5 text-xs',
|
|
21
17
|
this._stickyLabels() ? 'bg-popover sticky top-0 z-[2] block' : '',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
);
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
25
20
|
}
|
|
@@ -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 { lucideCheck } from '@ng-icons/lucide';
|
|
4
4
|
import { BrnSelectOption } from '@spartan-ng/brain/select';
|
|
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-option',
|
|
@@ -12,9 +11,6 @@ import type { ClassValue } from 'clsx';
|
|
|
12
11
|
providers: [provideIcons({ lucideCheck })],
|
|
13
12
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
13
|
hostDirectives: [{ directive: BrnSelectOption, inputs: ['disabled', 'value'] }],
|
|
15
|
-
host: {
|
|
16
|
-
'[class]': '_computedClass()',
|
|
17
|
-
},
|
|
18
14
|
template: `
|
|
19
15
|
<span class="absolute right-2 flex size-3.5 items-center justify-center">
|
|
20
16
|
@if (this._brnSelectOption.selected()) {
|
|
@@ -27,11 +23,10 @@ import type { ClassValue } from 'clsx';
|
|
|
27
23
|
})
|
|
28
24
|
export class HlmSelectOption {
|
|
29
25
|
protected readonly _brnSelectOption = inject(BrnSelectOption, { host: true });
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
);
|
|
26
|
+
constructor() {
|
|
27
|
+
classes(
|
|
28
|
+
() =>
|
|
29
|
+
`data-[active]:bg-accent data-[active]:text-accent-foreground [&>ng-icon:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 [&>ng-icon]:pointer-events-none [&>ng-icon]:size-4 [&>ng-icon]:shrink-0`,
|
|
30
|
+
);
|
|
31
|
+
}
|
|
37
32
|
}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
2
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
3
|
import { lucideChevronDown } from '@ng-icons/lucide';
|
|
4
4
|
import { HlmIcon } 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-select-scroll-down',
|
|
10
9
|
imports: [NgIcon, HlmIcon],
|
|
11
10
|
providers: [provideIcons({ lucideChevronDown })],
|
|
12
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
-
host: {
|
|
14
|
-
'[class]': '_computedClass()',
|
|
15
|
-
},
|
|
16
12
|
template: `
|
|
17
13
|
<ng-icon hlm size="sm" class="ml-2" name="lucideChevronDown" />
|
|
18
14
|
`,
|
|
19
15
|
})
|
|
20
16
|
export class HlmSelectScrollDown {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
);
|
|
17
|
+
constructor() {
|
|
18
|
+
classes(() => 'flex cursor-default items-center justify-center py-1');
|
|
19
|
+
}
|
|
25
20
|
}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
2
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
3
|
import { lucideChevronUp } from '@ng-icons/lucide';
|
|
4
4
|
import { HlmIcon } 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-select-scroll-up',
|
|
10
9
|
imports: [NgIcon, HlmIcon],
|
|
11
10
|
providers: [provideIcons({ lucideChevronUp })],
|
|
12
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
-
host: {
|
|
14
|
-
'[class]': '_computedClass()',
|
|
15
|
-
},
|
|
16
12
|
template: `
|
|
17
13
|
<ng-icon hlm size="sm" class="ml-2" name="lucideChevronUp" />
|
|
18
14
|
`,
|
|
19
15
|
})
|
|
20
16
|
export class HlmSelectScrollUp {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
);
|
|
17
|
+
constructor() {
|
|
18
|
+
classes(() => 'flex cursor-default items-center justify-center py-1');
|
|
19
|
+
}
|
|
25
20
|
}
|
|
@@ -1,16 +1,11 @@
|
|
|
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: 'hlm-select-value,[hlmSelectValue], brn-select-value[hlm]',
|
|
7
|
-
host: {
|
|
8
|
-
'[class]': '_computedClass()',
|
|
9
|
-
},
|
|
10
6
|
})
|
|
11
7
|
export class HlmSelectValue {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
);
|
|
8
|
+
constructor() {
|
|
9
|
+
classes(() => 'data-[placeholder]:text-muted-foreground line-clamp-1 flex items-center gap-2 truncate');
|
|
10
|
+
}
|
|
16
11
|
}
|
|
@@ -1,14 +1,11 @@
|
|
|
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: 'hlm-select, brn-select [hlm]',
|
|
7
|
-
host: {
|
|
8
|
-
'[class]': '_computedClass()',
|
|
9
|
-
},
|
|
10
6
|
})
|
|
11
7
|
export class HlmSelect {
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
constructor() {
|
|
9
|
+
classes(() => 'space-y-2');
|
|
10
|
+
}
|
|
14
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnSeparator } from '@spartan-ng/brain/separator';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
export const hlmSeparatorClass =
|
|
7
6
|
'bg-border inline-flex shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px';
|
|
@@ -9,11 +8,9 @@ export const hlmSeparatorClass =
|
|
|
9
8
|
@Directive({
|
|
10
9
|
selector: '[hlmSeparator],hlm-separator',
|
|
11
10
|
hostDirectives: [{ directive: BrnSeparator, inputs: ['orientation', 'decorative'] }],
|
|
12
|
-
host: {
|
|
13
|
-
'[class]': '_computedClass()',
|
|
14
|
-
},
|
|
15
11
|
})
|
|
16
12
|
export class HlmSeparator {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
constructor() {
|
|
14
|
+
classes(() => hlmSeparatorClass);
|
|
15
|
+
}
|
|
19
16
|
}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { Directive
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnSheetClose } from '@spartan-ng/brain/sheet';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: 'button[hlmSheetClose]',
|
|
8
7
|
hostDirectives: [{ directive: BrnSheetClose, inputs: ['delay'] }],
|
|
9
8
|
host: {
|
|
10
9
|
'data-slot': 'sheet-close',
|
|
11
|
-
'[class]': '_computedClass()',
|
|
12
10
|
},
|
|
13
11
|
})
|
|
14
12
|
export class HlmSheetClose {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
13
|
+
constructor() {
|
|
14
|
+
classes(
|
|
15
|
+
() =>
|
|
16
|
+
'ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none',
|
|
17
|
+
);
|
|
18
|
+
}
|
|
22
19
|
}
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
ElementRef,
|
|
5
|
-
Renderer2,
|
|
6
|
-
computed,
|
|
7
|
-
effect,
|
|
8
|
-
inject,
|
|
9
|
-
input,
|
|
10
|
-
signal,
|
|
11
|
-
} from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, Renderer2, effect, inject, signal } from '@angular/core';
|
|
12
2
|
import { provideIcons } from '@ng-icons/core';
|
|
13
3
|
import { lucideX } from '@ng-icons/lucide';
|
|
14
4
|
import { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
15
5
|
import { HlmIconImports } from '<%- importAlias %>/icon';
|
|
16
|
-
import {
|
|
6
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
17
7
|
import { cva } from 'class-variance-authority';
|
|
18
|
-
import type { ClassValue } from 'clsx';
|
|
19
8
|
import { HlmSheetClose } from './hlm-sheet-close';
|
|
20
9
|
|
|
21
10
|
export const sheetVariants = cva(
|
|
@@ -44,7 +33,6 @@ export const sheetVariants = cva(
|
|
|
44
33
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
34
|
host: {
|
|
46
35
|
'data-slot': 'sheet-content',
|
|
47
|
-
'[class]': '_computedClass()',
|
|
48
36
|
'[attr.data-state]': 'state()',
|
|
49
37
|
},
|
|
50
38
|
template: `
|
|
@@ -63,13 +51,9 @@ export class HlmSheetContent {
|
|
|
63
51
|
private readonly _element = inject(ElementRef);
|
|
64
52
|
|
|
65
53
|
constructor() {
|
|
54
|
+
classes(() => sheetVariants({ side: this._sideProvider.side() }));
|
|
66
55
|
effect(() => {
|
|
67
56
|
this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
|
|
68
57
|
});
|
|
69
58
|
}
|
|
70
|
-
|
|
71
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
72
|
-
protected readonly _computedClass = computed(() =>
|
|
73
|
-
hlm(sheetVariants({ side: this._sideProvider.side() }), this.userClass()),
|
|
74
|
-
);
|
|
75
59
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { Directive
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnSheetDescription } from '@spartan-ng/brain/sheet';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: '[hlmSheetDescription]',
|
|
8
7
|
hostDirectives: [BrnSheetDescription],
|
|
9
8
|
host: {
|
|
10
9
|
'data-slot': 'sheet-description',
|
|
11
|
-
'[class]': '_computedClass()',
|
|
12
10
|
},
|
|
13
11
|
})
|
|
14
12
|
export class HlmSheetDescription {
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
constructor() {
|
|
14
|
+
classes(() => 'text-muted-foreground text-sm');
|
|
15
|
+
}
|
|
17
16
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
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: '[hlmSheetFooter],hlm-sheet-footer',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sheet-footer',
|
|
9
|
-
'[class]': '_computedClass()',
|
|
10
8
|
},
|
|
11
9
|
})
|
|
12
10
|
export class HlmSheetFooter {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => 'mt-auto flex flex-col gap-2 p-4');
|
|
13
|
+
}
|
|
15
14
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
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: '[hlmSheetHeader],hlm-sheet-header',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sheet-header',
|
|
9
|
-
'[class]': '_computedClass()',
|
|
10
8
|
},
|
|
11
9
|
})
|
|
12
10
|
export class HlmSheetHeader {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => 'flex flex-col gap-1.5 p-4');
|
|
13
|
+
}
|
|
15
14
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { Directive
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnSheetTitle } from '@spartan-ng/brain/sheet';
|
|
3
|
-
import {
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
5
4
|
|
|
6
5
|
@Directive({
|
|
7
6
|
selector: '[hlmSheetTitle]',
|
|
8
7
|
hostDirectives: [BrnSheetTitle],
|
|
9
8
|
host: {
|
|
10
9
|
'data-slot': 'sheet-title',
|
|
11
|
-
'[class]': '_computedClass()',
|
|
12
10
|
},
|
|
13
11
|
})
|
|
14
12
|
export class HlmSheetTitle {
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
constructor() {
|
|
14
|
+
classes(() => 'text-foreground font-semibold');
|
|
15
|
+
}
|
|
17
16
|
}
|
|
@@ -1,21 +1,15 @@
|
|
|
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: '[hlmSidebarContent],hlm-sidebar-content',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-content',
|
|
9
8
|
'data-sidebar': 'content',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
})
|
|
13
11
|
export class HlmSidebarContent {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',
|
|
18
|
-
this.userClass(),
|
|
19
|
-
),
|
|
20
|
-
);
|
|
12
|
+
constructor() {
|
|
13
|
+
classes(() => 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden');
|
|
14
|
+
}
|
|
21
15
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
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: '[hlmSidebarFooter],hlm-sidebar-footer',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-footer',
|
|
9
8
|
'data-sidebar': 'footer',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
})
|
|
13
11
|
export class HlmSidebarFooter {
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
constructor() {
|
|
13
|
+
classes(() => 'flex flex-col gap-2 p-2');
|
|
14
|
+
}
|
|
16
15
|
}
|
|
@@ -1,24 +1,20 @@
|
|
|
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: 'button[hlmSidebarGroupAction]',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-group-action',
|
|
9
8
|
'data-sidebar': 'group-action',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
})
|
|
13
11
|
export class HlmSidebarGroupAction {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
hlm(
|
|
12
|
+
constructor() {
|
|
13
|
+
classes(() => [
|
|
17
14
|
'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none hover:cursor-pointer focus-visible:ring-2 disabled:hover:cursor-default [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0',
|
|
18
15
|
// Increases the hit area of the button on mobile.
|
|
19
16
|
'after:absolute after:-inset-2 after:md:hidden',
|
|
20
17
|
'group-data-[collapsible=icon]:hidden',
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
24
20
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
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: 'div[hlmSidebarGroupContent]',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-group-content',
|
|
9
8
|
'data-sidebar': 'group-content',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
})
|
|
13
11
|
export class HlmSidebarGroupContent {
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
constructor() {
|
|
13
|
+
classes(() => 'w-full text-sm');
|
|
14
|
+
}
|
|
16
15
|
}
|
|
@@ -1,22 +1,18 @@
|
|
|
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: 'div[hlmSidebarGroupLabel], button[hlmSidebarGroupLabel]',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-group-label',
|
|
9
8
|
'data-sidebar': 'group-label',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
})
|
|
13
11
|
export class HlmSidebarGroupLabel {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
hlm(
|
|
12
|
+
constructor() {
|
|
13
|
+
classes(() => [
|
|
17
14
|
'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opa] duration-200 ease-linear outline-none focus-visible:ring-2 [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0',
|
|
18
15
|
'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
22
18
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
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: '[hlmSidebarGroup],hlm-sidebar-group',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-group',
|
|
9
8
|
'data-sidebar': 'group',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
})
|
|
13
11
|
export class HlmSidebarGroup {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
);
|
|
12
|
+
constructor() {
|
|
13
|
+
classes(() => 'relative flex w-full min-w-0 flex-col p-2');
|
|
14
|
+
}
|
|
18
15
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
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: '[hlmSidebarHeader],hlm-sidebar-header',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-header',
|
|
9
8
|
'data-sidebar': 'header',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
9
|
},
|
|
12
10
|
})
|
|
13
11
|
export class HlmSidebarHeader {
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
constructor() {
|
|
13
|
+
classes(() => 'flex flex-col gap-2 p-2');
|
|
14
|
+
}
|
|
16
15
|
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { HlmInput, inputVariants } from '<%- importAlias %>/input';
|
|
3
|
-
import {
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
4
4
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: 'input[hlmSidebarInput]',
|
|
7
7
|
host: {
|
|
8
8
|
'data-slot': 'sidebar-input',
|
|
9
9
|
'data-sidebar': 'input',
|
|
10
|
-
'[class]': '_computedClass()',
|
|
11
10
|
},
|
|
12
11
|
})
|
|
13
12
|
export class HlmSidebarInput extends HlmInput {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
classes(() => [
|
|
16
16
|
inputVariants({ error: this._state().error }),
|
|
17
17
|
'bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2',
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
21
20
|
}
|
|
@@ -1,21 +1,17 @@
|
|
|
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: 'main[hlmSidebarInset]',
|
|
7
6
|
host: {
|
|
8
7
|
'data-slot': 'sidebar-inset',
|
|
9
|
-
'[class]': '_computedClass()',
|
|
10
8
|
},
|
|
11
9
|
})
|
|
12
10
|
export class HlmSidebarInset {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
hlm(
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(() => [
|
|
16
13
|
'bg-background relative flex w-full flex-1 flex-col',
|
|
17
14
|
'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
15
|
+
]);
|
|
16
|
+
}
|
|
21
17
|
}
|