@spartan-ng/cli 0.0.1-alpha.574 → 0.0.1-alpha.576
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/healthcheck/generator.js +2 -0
- package/src/generators/healthcheck/generator.js.map +1 -1
- package/src/generators/healthcheck/healthchecks/hlm-dialog.d.ts +2 -0
- package/src/generators/healthcheck/healthchecks/hlm-dialog.js +39 -0
- package/src/generators/healthcheck/healthchecks/hlm-dialog.js.map +1 -0
- package/src/generators/migrate-dialog/compat.d.ts +2 -0
- package/src/generators/migrate-dialog/compat.js +6 -0
- package/src/generators/migrate-dialog/compat.js.map +1 -0
- package/src/generators/migrate-dialog/generator.d.ts +5 -0
- package/src/generators/migrate-dialog/generator.js +57 -0
- package/src/generators/migrate-dialog/generator.js.map +1 -0
- package/src/generators/migrate-dialog/schema.d.ts +4 -0
- package/src/generators/migrate-dialog/schema.json +19 -0
- package/src/generators/ui/libs/alert-dialog/files/index.ts.template +10 -7
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-action.ts.template +13 -0
- package/src/generators/ui/libs/alert-dialog/files/lib/{hlm-alert-dialog-cancel-button.ts.template → hlm-alert-dialog-cancel.ts.template} +7 -2
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-content.ts.template +4 -7
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-description.ts.template +1 -0
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-footer.ts.template +4 -7
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-header.ts.template +4 -7
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-overlay.ts.template +3 -1
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-title.ts.template +1 -0
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-trigger.ts.template +13 -0
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog.ts.template +3 -7
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-group.ts.template +5 -6
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-item.ts.template +5 -8
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-list.ts.template +5 -6
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete.ts.template +10 -12
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-content.ts.template +4 -7
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-item.ts.template +4 -7
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-next.ts.template +1 -0
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-previous.ts.template +1 -0
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-slide-display.ts.template +1 -0
- package/src/generators/ui/libs/carousel/files/lib/hlm-carousel.ts.template +2 -1
- package/src/generators/ui/libs/command/files/lib/hlm-command-dialog.ts.template +1 -0
- package/src/generators/ui/libs/command/files/lib/hlm-command-empty.ts.template +1 -0
- package/src/generators/ui/libs/command/files/lib/hlm-command-group-label.ts.template +6 -6
- package/src/generators/ui/libs/command/files/lib/hlm-command-group.ts.template +6 -6
- package/src/generators/ui/libs/command/files/lib/hlm-command-icon.ts.template +1 -0
- package/src/generators/ui/libs/command/files/lib/hlm-command-item.ts.template +6 -8
- package/src/generators/ui/libs/command/files/lib/hlm-command-list.ts.template +6 -6
- package/src/generators/ui/libs/command/files/lib/hlm-command-search-input.ts.template +4 -5
- package/src/generators/ui/libs/command/files/lib/hlm-command-search.ts.template +4 -7
- package/src/generators/ui/libs/command/files/lib/hlm-command-separator.ts.template +6 -6
- package/src/generators/ui/libs/command/files/lib/hlm-command-shortcut.ts.template +4 -5
- package/src/generators/ui/libs/command/files/lib/hlm-command.ts.template +4 -7
- package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker-multi.ts.template +8 -8
- package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker.ts.template +8 -8
- package/src/generators/ui/libs/date-picker/files/lib/hlm-date-range-picker.ts.template +8 -8
- package/src/generators/ui/libs/dialog/files/index.ts.template +3 -0
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-close.ts.template +4 -1
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-content.ts.template +6 -5
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-description.ts.template +1 -0
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-footer.ts.template +4 -7
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-header.ts.template +4 -7
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-overlay.ts.template +3 -1
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-title.ts.template +1 -0
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-trigger.ts.template +11 -0
- package/src/generators/ui/libs/dialog/files/lib/hlm-dialog.ts.template +3 -3
- package/src/generators/ui/libs/hover-card/files/lib/hlm-hover-card-content.ts.template +4 -17
- package/src/generators/ui/libs/popover/files/index.ts.template +5 -3
- package/src/generators/ui/libs/popover/files/lib/hlm-popover-trigger.ts.template +13 -0
- package/src/generators/ui/libs/popover/files/lib/hlm-popover.ts.template +14 -0
- package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-group.ts.template +3 -5
- package/src/generators/ui/libs/radio-group/files/lib/hlm-radio.ts.template +3 -2
- package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-group.ts.template +4 -7
- package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-handle.ts.template +2 -3
- package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-panel.ts.template +4 -7
- package/src/generators/ui/libs/sheet/files/index.ts.template +3 -0
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-close.ts.template +4 -1
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-content.ts.template +5 -5
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-description.ts.template +1 -0
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-footer.ts.template +4 -7
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-header.ts.template +4 -7
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-overlay.ts.template +3 -1
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-title.ts.template +1 -0
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-trigger.ts.template +11 -0
- package/src/generators/ui/libs/sheet/files/lib/hlm-sheet.ts.template +3 -3
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-wrapper.ts.template +2 -2
- package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar.ts.template +4 -4
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-content.ts.template +1 -0
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-list.ts.template +4 -5
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-paginated-list.ts.template +2 -1
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-trigger.ts.template +1 -0
- package/src/generators/ui/libs/tabs/files/lib/hlm-tabs.ts.template +4 -5
- package/src/generators/ui/libs/tooltip/files/lib/hlm-tooltip-trigger.ts.template +3 -0
- package/src/generators/ui/libs/tooltip/files/lib/hlm-tooltip.ts.template +4 -7
- package/src/generators/ui/supported-ui-libraries.json +40 -39
- package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-action-button.ts.template +0 -8
- package/src/generators/ui/libs/popover/files/lib/hlm-popover-close.ts.template +0 -19
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
|
|
2
|
-
import { BrnDialog,
|
|
2
|
+
import { BrnDialog, provideBrnDialogDefaultOptions } from '@spartan-ng/brain/dialog';
|
|
3
3
|
import { HlmDialogOverlay } from './hlm-dialog-overlay';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'hlm-dialog',
|
|
7
7
|
exportAs: 'hlmDialog',
|
|
8
|
-
imports: [
|
|
8
|
+
imports: [HlmDialogOverlay],
|
|
9
9
|
providers: [
|
|
10
10
|
{
|
|
11
11
|
provide: BrnDialog,
|
|
@@ -17,7 +17,7 @@ import { HlmDialogOverlay } from './hlm-dialog-overlay';
|
|
|
17
17
|
],
|
|
18
18
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
19
|
template: `
|
|
20
|
-
<
|
|
20
|
+
<hlm-dialog-overlay />
|
|
21
21
|
<ng-content />
|
|
22
22
|
`,
|
|
23
23
|
})
|
|
@@ -1,27 +1,14 @@
|
|
|
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 { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
|
|
12
2
|
import { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
13
3
|
import { hlm } from '<%- importAlias %>/utils';
|
|
14
4
|
import type { ClassValue } from 'clsx';
|
|
15
5
|
|
|
16
|
-
@
|
|
17
|
-
selector: 'hlm-hover-card-content',
|
|
18
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: '[hlmHoverCardContent],hlm-hover-card-content',
|
|
19
8
|
host: {
|
|
9
|
+
'data-slot': 'hover-card-content',
|
|
20
10
|
'[class]': '_computedClass()',
|
|
21
11
|
},
|
|
22
|
-
template: `
|
|
23
|
-
<ng-content />
|
|
24
|
-
`,
|
|
25
12
|
})
|
|
26
13
|
export class HlmHoverCardContent {
|
|
27
14
|
private readonly _renderer = inject(Renderer2);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HlmPopover } from './lib/hlm-popover';
|
|
2
2
|
import { HlmPopoverContent } from './lib/hlm-popover-content';
|
|
3
|
+
import { HlmPopoverTrigger } from './lib/hlm-popover-trigger';
|
|
3
4
|
|
|
4
|
-
export * from './lib/hlm-popover
|
|
5
|
+
export * from './lib/hlm-popover';
|
|
5
6
|
export * from './lib/hlm-popover-content';
|
|
7
|
+
export * from './lib/hlm-popover-trigger';
|
|
6
8
|
|
|
7
|
-
export const HlmPopoverImports = [HlmPopoverContent,
|
|
9
|
+
export const HlmPopoverImports = [HlmPopover, HlmPopoverContent, HlmPopoverTrigger] as const;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnPopoverTrigger } from '@spartan-ng/brain/popover';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: 'button[hlmPopoverTrigger],button[hlmPopoverTriggerFor]',
|
|
6
|
+
hostDirectives: [
|
|
7
|
+
{ directive: BrnPopoverTrigger, inputs: ['id', 'brnPopoverTriggerFor: hlmPopoverTriggerFor', 'type'] },
|
|
8
|
+
],
|
|
9
|
+
host: {
|
|
10
|
+
'data-slot': 'popover-trigger',
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
export class HlmPopoverTrigger {}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnPopover } from '@spartan-ng/brain/popover';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmPopover],hlm-popover',
|
|
6
|
+
hostDirectives: [
|
|
7
|
+
{
|
|
8
|
+
directive: BrnPopover,
|
|
9
|
+
inputs: ['align', 'autoFocus', 'closeDelay', 'closeOnOutsidePointerEvents', 'sideOffset', 'state', 'offsetX'],
|
|
10
|
+
outputs: ['stateChanged', 'closed'],
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
})
|
|
14
|
+
export class HlmPopover {}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
2
|
import { BrnRadioGroup } from '@spartan-ng/brain/radio-group';
|
|
3
3
|
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
|
-
@
|
|
7
|
-
selector: 'hlm-radio-group',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: '[hlmRadioGroup],hlm-radio-group',
|
|
9
8
|
hostDirectives: [
|
|
10
9
|
{
|
|
11
10
|
directive: BrnRadioGroup,
|
|
@@ -17,7 +16,6 @@ import type { ClassValue } from 'clsx';
|
|
|
17
16
|
'data-slot': 'radio-group',
|
|
18
17
|
'[class]': '_computedClass()',
|
|
19
18
|
},
|
|
20
|
-
template: '<ng-content />',
|
|
21
19
|
})
|
|
22
20
|
export class HlmRadioGroup {
|
|
23
21
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type BooleanInput } from '@angular/cdk/coercion';
|
|
1
2
|
import { isPlatformBrowser } from '@angular/common';
|
|
2
3
|
import {
|
|
3
4
|
booleanAttribute,
|
|
@@ -79,10 +80,10 @@ export class HlmRadio<T = unknown> {
|
|
|
79
80
|
public readonly value = input.required<T>();
|
|
80
81
|
|
|
81
82
|
/** Whether the checkbox is required. */
|
|
82
|
-
public readonly required = input(false, { transform: booleanAttribute });
|
|
83
|
+
public readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
83
84
|
|
|
84
85
|
/** Whether the checkbox is disabled. */
|
|
85
|
-
public readonly disabled = input(false, { transform: booleanAttribute });
|
|
86
|
+
public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* Event emitted when the checked state of this radio button changes.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
2
|
import { BrnResizableGroup } from '@spartan-ng/brain/resizable';
|
|
3
3
|
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
|
-
@
|
|
7
|
-
selector: 'hlm-resizable-group',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: '[hlmResizableGroup],hlm-resizable-group',
|
|
9
8
|
hostDirectives: [
|
|
10
9
|
{
|
|
11
10
|
directive: BrnResizableGroup,
|
|
@@ -14,11 +13,9 @@ import type { ClassValue } from 'clsx';
|
|
|
14
13
|
},
|
|
15
14
|
],
|
|
16
15
|
host: {
|
|
16
|
+
'data-slot': 'resizable-group',
|
|
17
17
|
'[class]': '_computedClass()',
|
|
18
18
|
},
|
|
19
|
-
template: `
|
|
20
|
-
<ng-content />
|
|
21
|
-
`,
|
|
22
19
|
})
|
|
23
20
|
export class HlmResizableGroup {
|
|
24
21
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { ClassValue } from 'clsx';
|
|
2
|
-
|
|
3
1
|
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
|
|
4
|
-
|
|
5
2
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
6
3
|
import { lucideGripVertical } from '@ng-icons/lucide';
|
|
7
4
|
import { BrnResizableHandle } from '@spartan-ng/brain/resizable';
|
|
8
5
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
9
6
|
import { hlm } from '<%- importAlias %>/utils';
|
|
7
|
+
import type { ClassValue } from 'clsx';
|
|
10
8
|
|
|
11
9
|
@Component({
|
|
12
10
|
selector: 'hlm-resizable-handle',
|
|
@@ -16,6 +14,7 @@ import { hlm } from '<%- importAlias %>/utils';
|
|
|
16
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
15
|
hostDirectives: [{ directive: BrnResizableHandle, inputs: ['withHandle', 'disabled'] }],
|
|
18
16
|
host: {
|
|
17
|
+
'data-slot': 'resizable-handle',
|
|
19
18
|
'[class]': '_computedClass()',
|
|
20
19
|
},
|
|
21
20
|
template: `
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
2
|
import { BrnResizablePanel } from '@spartan-ng/brain/resizable';
|
|
3
3
|
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
|
-
@
|
|
7
|
-
selector: 'hlm-resizable-panel',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: '[hlmResizablePanel],hlm-resizable-panel',
|
|
9
8
|
hostDirectives: [
|
|
10
9
|
{
|
|
11
10
|
directive: BrnResizablePanel,
|
|
@@ -13,11 +12,9 @@ import type { ClassValue } from 'clsx';
|
|
|
13
12
|
},
|
|
14
13
|
],
|
|
15
14
|
host: {
|
|
15
|
+
'data-slot': 'resizable-panel',
|
|
16
16
|
'[class]': '_computedClass()',
|
|
17
17
|
},
|
|
18
|
-
template: `
|
|
19
|
-
<ng-content />
|
|
20
|
-
`,
|
|
21
18
|
})
|
|
22
19
|
export class HlmResizablePanel {
|
|
23
20
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
@@ -6,6 +6,7 @@ import { HlmSheetFooter } from './lib/hlm-sheet-footer';
|
|
|
6
6
|
import { HlmSheetHeader } from './lib/hlm-sheet-header';
|
|
7
7
|
import { HlmSheetOverlay } from './lib/hlm-sheet-overlay';
|
|
8
8
|
import { HlmSheetTitle } from './lib/hlm-sheet-title';
|
|
9
|
+
import { HlmSheetTrigger } from './lib/hlm-sheet-trigger';
|
|
9
10
|
|
|
10
11
|
export * from './lib/hlm-sheet';
|
|
11
12
|
export * from './lib/hlm-sheet-close';
|
|
@@ -15,6 +16,7 @@ export * from './lib/hlm-sheet-footer';
|
|
|
15
16
|
export * from './lib/hlm-sheet-header';
|
|
16
17
|
export * from './lib/hlm-sheet-overlay';
|
|
17
18
|
export * from './lib/hlm-sheet-title';
|
|
19
|
+
export * from './lib/hlm-sheet-trigger';
|
|
18
20
|
|
|
19
21
|
export const HlmSheetImports = [
|
|
20
22
|
HlmSheet,
|
|
@@ -25,4 +27,5 @@ export const HlmSheetImports = [
|
|
|
25
27
|
HlmSheetHeader,
|
|
26
28
|
HlmSheetOverlay,
|
|
27
29
|
HlmSheetTitle,
|
|
30
|
+
HlmSheetTrigger,
|
|
28
31
|
] as const;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { BrnSheetClose } from '@spartan-ng/brain/sheet';
|
|
2
3
|
import { hlm } from '<%- importAlias %>/utils';
|
|
3
4
|
import type { ClassValue } from 'clsx';
|
|
4
5
|
|
|
5
6
|
@Directive({
|
|
6
|
-
selector: '[hlmSheetClose]
|
|
7
|
+
selector: 'button[hlmSheetClose]',
|
|
8
|
+
hostDirectives: [{ directive: BrnSheetClose, inputs: ['delay'] }],
|
|
7
9
|
host: {
|
|
10
|
+
'data-slot': 'sheet-close',
|
|
8
11
|
'[class]': '_computedClass()',
|
|
9
12
|
},
|
|
10
13
|
})
|
|
@@ -9,11 +9,10 @@ import {
|
|
|
9
9
|
input,
|
|
10
10
|
signal,
|
|
11
11
|
} from '@angular/core';
|
|
12
|
-
import {
|
|
12
|
+
import { provideIcons } from '@ng-icons/core';
|
|
13
13
|
import { lucideX } from '@ng-icons/lucide';
|
|
14
14
|
import { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
15
|
-
import {
|
|
16
|
-
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
15
|
+
import { HlmIconImports } from '<%- importAlias %>/icon';
|
|
17
16
|
import { hlm } from '<%- importAlias %>/utils';
|
|
18
17
|
import { cva } from 'class-variance-authority';
|
|
19
18
|
import type { ClassValue } from 'clsx';
|
|
@@ -40,16 +39,17 @@ export const sheetVariants = cva(
|
|
|
40
39
|
|
|
41
40
|
@Component({
|
|
42
41
|
selector: 'hlm-sheet-content',
|
|
43
|
-
imports: [HlmSheetClose,
|
|
42
|
+
imports: [HlmSheetClose, HlmIconImports],
|
|
44
43
|
providers: [provideIcons({ lucideX })],
|
|
45
44
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
45
|
host: {
|
|
46
|
+
'data-slot': 'sheet-content',
|
|
47
47
|
'[class]': '_computedClass()',
|
|
48
48
|
'[attr.data-state]': 'state()',
|
|
49
49
|
},
|
|
50
50
|
template: `
|
|
51
51
|
<ng-content />
|
|
52
|
-
<button
|
|
52
|
+
<button hlmSheetClose>
|
|
53
53
|
<span class="sr-only">Close</span>
|
|
54
54
|
<ng-icon hlm size="sm" name="lucideX" />
|
|
55
55
|
</button>
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '<%- importAlias %>/utils';
|
|
3
3
|
import type { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
|
-
@
|
|
6
|
-
selector: 'hlm-sheet-footer',
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmSheetFooter],hlm-sheet-footer',
|
|
8
7
|
host: {
|
|
8
|
+
'data-slot': 'sheet-footer',
|
|
9
9
|
'[class]': '_computedClass()',
|
|
10
10
|
},
|
|
11
|
-
template: `
|
|
12
|
-
<ng-content />
|
|
13
|
-
`,
|
|
14
11
|
})
|
|
15
12
|
export class HlmSheetFooter {
|
|
16
13
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '<%- importAlias %>/utils';
|
|
3
3
|
import type { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
|
-
@
|
|
6
|
-
selector: 'hlm-sheet-header',
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmSheetHeader],hlm-sheet-header',
|
|
8
7
|
host: {
|
|
8
|
+
'data-slot': 'sheet-header',
|
|
9
9
|
'[class]': '_computedClass()',
|
|
10
10
|
},
|
|
11
|
-
template: `
|
|
12
|
-
<ng-content />
|
|
13
|
-
`,
|
|
14
11
|
})
|
|
15
12
|
export class HlmSheetHeader {
|
|
16
13
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Directive, computed, effect, input, untracked } from '@angular/core';
|
|
2
2
|
import { injectCustomClassSettable } from '@spartan-ng/brain/core';
|
|
3
|
+
import { BrnSheetOverlay } from '@spartan-ng/brain/sheet';
|
|
3
4
|
import { hlm } from '<%- importAlias %>/utils';
|
|
4
5
|
import type { ClassValue } from 'clsx';
|
|
5
6
|
|
|
6
7
|
@Directive({
|
|
7
|
-
selector: '[hlmSheetOverlay],
|
|
8
|
+
selector: '[hlmSheetOverlay],hlm-sheet-overlay',
|
|
9
|
+
hostDirectives: [BrnSheetOverlay],
|
|
8
10
|
host: {
|
|
9
11
|
'[class]': '_computedClass()',
|
|
10
12
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnSheetTrigger } from '@spartan-ng/brain/sheet';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: 'button[hlmSheetTrigger]',
|
|
6
|
+
hostDirectives: [{ directive: BrnSheetTrigger, inputs: ['id', 'side', 'type'] }],
|
|
7
|
+
host: {
|
|
8
|
+
'data-slot': 'sheet-trigger',
|
|
9
|
+
},
|
|
10
|
+
})
|
|
11
|
+
export class HlmSheetTrigger {}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
|
|
2
2
|
import { BrnDialog, provideBrnDialogDefaultOptions } from '@spartan-ng/brain/dialog';
|
|
3
|
-
import { BrnSheet
|
|
3
|
+
import { BrnSheet } from '@spartan-ng/brain/sheet';
|
|
4
4
|
import { HlmSheetOverlay } from './hlm-sheet-overlay';
|
|
5
5
|
|
|
6
6
|
@Component({
|
|
7
7
|
selector: 'hlm-sheet',
|
|
8
8
|
exportAs: 'hlmSheet',
|
|
9
|
-
imports: [
|
|
9
|
+
imports: [HlmSheetOverlay],
|
|
10
10
|
providers: [
|
|
11
11
|
{
|
|
12
12
|
provide: BrnDialog,
|
|
@@ -22,7 +22,7 @@ import { HlmSheetOverlay } from './hlm-sheet-overlay';
|
|
|
22
22
|
],
|
|
23
23
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
24
|
template: `
|
|
25
|
-
<
|
|
25
|
+
<hlm-sheet-overlay />
|
|
26
26
|
<ng-content />
|
|
27
27
|
`,
|
|
28
28
|
})
|
|
@@ -20,6 +20,6 @@ export class HlmSidebarWrapper {
|
|
|
20
20
|
hlm('group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full', this.userClass()),
|
|
21
21
|
);
|
|
22
22
|
|
|
23
|
-
public readonly sidebarWidth = input(this._config.sidebarWidth);
|
|
24
|
-
public readonly sidebarWidthIcon = input(this._config.sidebarWidthIcon);
|
|
23
|
+
public readonly sidebarWidth = input<string>(this._config.sidebarWidth);
|
|
24
|
+
public readonly sidebarWidthIcon = input<string>(this._config.sidebarWidthIcon);
|
|
25
25
|
}
|
|
@@ -21,7 +21,7 @@ import { injectHlmSidebarConfig } from './hlm-sidebar.token';
|
|
|
21
21
|
},
|
|
22
22
|
template: `
|
|
23
23
|
<ng-template #contentContainer>
|
|
24
|
-
<ng-content
|
|
24
|
+
<ng-content />
|
|
25
25
|
</ng-template>
|
|
26
26
|
|
|
27
27
|
@if (collapsible() === 'none') {
|
|
@@ -41,7 +41,7 @@ import { injectHlmSidebarConfig } from './hlm-sidebar.token';
|
|
|
41
41
|
[style.--sidebar-width]="sidebarWidthMobile()"
|
|
42
42
|
>
|
|
43
43
|
<div class="flex h-full w-full flex-col">
|
|
44
|
-
<ng-container *ngTemplateOutlet="contentContainer"
|
|
44
|
+
<ng-container *ngTemplateOutlet="contentContainer" />
|
|
45
45
|
</div>
|
|
46
46
|
</hlm-sheet-content>
|
|
47
47
|
</hlm-sheet>
|
|
@@ -54,7 +54,7 @@ import { injectHlmSidebarConfig } from './hlm-sidebar.token';
|
|
|
54
54
|
data-slot="sidebar-inner"
|
|
55
55
|
class="bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow"
|
|
56
56
|
>
|
|
57
|
-
<ng-container *ngTemplateOutlet="contentContainer"
|
|
57
|
+
<ng-container *ngTemplateOutlet="contentContainer" />
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
60
60
|
}
|
|
@@ -65,7 +65,7 @@ export class HlmSidebar {
|
|
|
65
65
|
private readonly _config = injectHlmSidebarConfig();
|
|
66
66
|
|
|
67
67
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
68
|
-
public readonly sidebarWidthMobile = input(this._config.sidebarWidthMobile);
|
|
68
|
+
public readonly sidebarWidthMobile = input<string>(this._config.sidebarWidthMobile);
|
|
69
69
|
|
|
70
70
|
public readonly side = input<'left' | 'right'>('left');
|
|
71
71
|
public readonly variant = input<SidebarVariant>(this._sidebarService.variant());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
2
|
import { BrnTabsList } from '@spartan-ng/brain/tabs';
|
|
3
3
|
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
@@ -20,14 +20,13 @@ export const listVariants = cva(
|
|
|
20
20
|
);
|
|
21
21
|
type ListVariants = VariantProps<typeof listVariants>;
|
|
22
22
|
|
|
23
|
-
@
|
|
24
|
-
selector: 'hlm-tabs-list',
|
|
25
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
+
@Directive({
|
|
24
|
+
selector: '[hlmTabsList],hlm-tabs-list',
|
|
26
25
|
hostDirectives: [BrnTabsList],
|
|
27
26
|
host: {
|
|
27
|
+
'data-slot': 'tabs-list',
|
|
28
28
|
'[class]': '_computedClass()',
|
|
29
29
|
},
|
|
30
|
-
template: '<ng-content/>',
|
|
31
30
|
})
|
|
32
31
|
export class HlmTabsList {
|
|
33
32
|
public readonly orientation = input<ListVariants['orientation']>('horizontal');
|
|
@@ -25,6 +25,7 @@ import { listVariants } from './hlm-tabs-list';
|
|
|
25
25
|
providers: [provideIcons({ lucideChevronRight, lucideChevronLeft })],
|
|
26
26
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
27
|
host: {
|
|
28
|
+
'data-slot': 'tabs-paginated-list',
|
|
28
29
|
'[class]': '_computedClass()',
|
|
29
30
|
},
|
|
30
31
|
template: `
|
|
@@ -48,7 +49,7 @@ import { listVariants } from './hlm-tabs-list';
|
|
|
48
49
|
<div #tabListContainer class="z-[1] flex grow overflow-hidden" (keydown)="_handleKeydown($event)">
|
|
49
50
|
<div class="relative grow transition-transform" #tabList role="tablist" (cdkObserveContent)="_onContentChanges()">
|
|
50
51
|
<div #tabListInner [class]="_tabListClass()">
|
|
51
|
-
<ng-content
|
|
52
|
+
<ng-content />
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|
|
54
55
|
</div>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
2
|
import { BrnTabs } from '@spartan-ng/brain/tabs';
|
|
3
3
|
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
|
-
@
|
|
7
|
-
selector: 'hlm-tabs',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: '[hlmTabs],hlm-tabs',
|
|
9
8
|
hostDirectives: [
|
|
10
9
|
{
|
|
11
10
|
directive: BrnTabs,
|
|
@@ -14,9 +13,9 @@ import type { ClassValue } from 'clsx';
|
|
|
14
13
|
},
|
|
15
14
|
],
|
|
16
15
|
host: {
|
|
16
|
+
'data-slot': 'tabs',
|
|
17
17
|
'[class]': '_computedClass()',
|
|
18
18
|
},
|
|
19
|
-
template: '<ng-content/>',
|
|
20
19
|
})
|
|
21
20
|
export class HlmTabs {
|
|
22
21
|
public readonly tab = input.required<string>();
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnTooltip } from '@spartan-ng/brain/tooltip';
|
|
3
3
|
|
|
4
|
-
@
|
|
5
|
-
selector: 'hlm-tooltip',
|
|
6
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[hlmTooltip],hlm-tooltip',
|
|
7
6
|
hostDirectives: [BrnTooltip],
|
|
8
7
|
host: {
|
|
8
|
+
'data-slot': 'tooltip',
|
|
9
9
|
'[style]': '{display: "contents"}',
|
|
10
10
|
},
|
|
11
|
-
template: `
|
|
12
|
-
<ng-content />
|
|
13
|
-
`,
|
|
14
11
|
})
|
|
15
12
|
export class HlmTooltip {}
|