@ngbase/adk 0.1.1 → 0.1.2
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/accordion/accordion-item.d.ts +4 -0
- package/accordion/public-api.d.ts +1 -1
- package/autocomplete/autocomplete.d.ts +2 -2
- package/avatar/avatar.d.ts +1 -1
- package/breadcrumb/breadcrumb.d.ts +2 -3
- package/breadcrumb/public-api.d.ts +1 -1
- package/carousel/carousel.d.ts +1 -1
- package/chip/chip.d.ts +2 -2
- package/datepicker/calendar.d.ts +3 -3
- package/datepicker/datepicker.d.ts +2 -2
- package/datepicker/time.d.ts +2 -2
- package/dialog/dialog.d.ts +1 -1
- package/fesm2022/ngbase-adk-accordion.mjs +4 -1
- package/fesm2022/ngbase-adk-accordion.mjs.map +1 -1
- package/fesm2022/ngbase-adk-autocomplete.mjs +7 -36
- package/fesm2022/ngbase-adk-autocomplete.mjs.map +1 -1
- package/fesm2022/ngbase-adk-avatar.mjs +2 -2
- package/fesm2022/ngbase-adk-avatar.mjs.map +1 -1
- package/fesm2022/ngbase-adk-breadcrumb.mjs +2 -2
- package/fesm2022/ngbase-adk-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngbase-adk-carousel.mjs +2 -2
- package/fesm2022/ngbase-adk-carousel.mjs.map +1 -1
- package/fesm2022/ngbase-adk-chip.mjs +4 -2
- package/fesm2022/ngbase-adk-chip.mjs.map +1 -1
- package/fesm2022/ngbase-adk-datepicker.mjs +114 -328
- package/fesm2022/ngbase-adk-datepicker.mjs.map +1 -1
- package/fesm2022/ngbase-adk-dialog.mjs +12 -13
- package/fesm2022/ngbase-adk-dialog.mjs.map +1 -1
- package/fesm2022/ngbase-adk-form-field.mjs +2 -156
- package/fesm2022/ngbase-adk-form-field.mjs.map +1 -1
- package/fesm2022/ngbase-adk-menu.mjs +15 -30
- package/fesm2022/ngbase-adk-menu.mjs.map +1 -1
- package/fesm2022/ngbase-adk-otp.mjs +164 -0
- package/fesm2022/ngbase-adk-otp.mjs.map +1 -0
- package/fesm2022/ngbase-adk-pagination.mjs +8 -65
- package/fesm2022/ngbase-adk-pagination.mjs.map +1 -1
- package/fesm2022/ngbase-adk-popover.mjs +423 -548
- package/fesm2022/ngbase-adk-popover.mjs.map +1 -1
- package/fesm2022/ngbase-adk-portal.mjs +0 -1
- package/fesm2022/ngbase-adk-portal.mjs.map +1 -1
- package/fesm2022/ngbase-adk-radio.mjs +2 -16
- package/fesm2022/ngbase-adk-radio.mjs.map +1 -1
- package/fesm2022/ngbase-adk-resizable.mjs +10 -43
- package/fesm2022/ngbase-adk-resizable.mjs.map +1 -1
- package/fesm2022/ngbase-adk-select.mjs +67 -173
- package/fesm2022/ngbase-adk-select.mjs.map +1 -1
- package/fesm2022/ngbase-adk-sheet.mjs +95 -0
- package/fesm2022/ngbase-adk-sheet.mjs.map +1 -0
- package/fesm2022/ngbase-adk-sidenav.mjs +2 -2
- package/fesm2022/ngbase-adk-sidenav.mjs.map +1 -1
- package/fesm2022/ngbase-adk-slider.mjs +9 -23
- package/fesm2022/ngbase-adk-slider.mjs.map +1 -1
- package/fesm2022/ngbase-adk-sonner.mjs +13 -63
- package/fesm2022/ngbase-adk-sonner.mjs.map +1 -1
- package/fesm2022/ngbase-adk-stepper.mjs +16 -114
- package/fesm2022/ngbase-adk-stepper.mjs.map +1 -1
- package/fesm2022/ngbase-adk-switch.mjs +2 -2
- package/fesm2022/ngbase-adk-switch.mjs.map +1 -1
- package/fesm2022/ngbase-adk-table.mjs +10 -30
- package/fesm2022/ngbase-adk-table.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tabs.mjs +14 -94
- package/fesm2022/ngbase-adk-tabs.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tooltip.mjs +49 -39
- package/fesm2022/ngbase-adk-tooltip.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tour.mjs +1 -1
- package/fesm2022/ngbase-adk-tour.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tree.mjs +11 -43
- package/fesm2022/ngbase-adk-tree.mjs.map +1 -1
- package/form-field/public-api.d.ts +0 -1
- package/menu/menu-trigger.d.ts +2 -2
- package/menu/menu.d.ts +6 -6
- package/otp/index.d.ts +5 -0
- package/{form-field → otp}/otp.d.ts +1 -1
- package/otp/public-api.d.ts +1 -0
- package/package.json +25 -17
- package/pagination/pagination.d.ts +5 -1
- package/popover/popover-arrow.ng.d.ts +34 -0
- package/popover/popover.d.ts +12 -3
- package/popover/popover.service.d.ts +5 -4
- package/popover/public-api.d.ts +1 -0
- package/popover/utils.d.ts +32 -48
- package/portal/dialog-ref.d.ts +0 -1
- package/resizable/resizable-group.d.ts +2 -2
- package/resizable/resizable.d.ts +2 -2
- package/schematics/components/files/accordion/accordion.ts.template +6 -8
- package/schematics/components/files/autocomplete/autocomplete.ts.template +2 -6
- package/schematics/components/files/avatar/avatar.ts.template +2 -2
- package/schematics/components/files/breadcrumb/breadcrumb.ts.template +5 -5
- package/schematics/components/files/carousel/carousel.ts.template +2 -2
- package/schematics/components/files/chip/chip.ts.template +2 -2
- package/schematics/components/files/datepicker/calendar.ts.template +6 -6
- package/schematics/components/files/datepicker/datepicker.ts.template +33 -3
- package/schematics/components/files/datepicker/index.ts.template +0 -1
- package/schematics/components/files/datepicker/time.ts.template +12 -4
- package/schematics/components/files/dialog/dialog.ts.template +8 -8
- package/schematics/components/files/form-field/{input.ts.template → form-field.ts.template} +13 -2
- package/schematics/components/files/form-field/index.ts.template +1 -2
- package/schematics/components/files/form-field/input-style.directive.ts.template +1 -1
- package/schematics/components/files/menu/menu.ts.template +3 -3
- package/schematics/components/files/otp/index.ts.template +5 -0
- package/schematics/components/files/{form-field → otp}/otp.ts.template +3 -3
- package/schematics/components/files/pagination/pagination.ts.template +2 -2
- package/schematics/components/files/popover/popover.ts.template +7 -30
- package/schematics/components/files/radio/radio.ts.template +3 -8
- package/schematics/components/files/resizable/resizable.ts.template +7 -7
- package/schematics/components/files/select/option.ts.template +1 -0
- package/schematics/components/files/select/select.ts.template +8 -8
- package/schematics/components/files/sheet/sheet.ts.template +11 -76
- package/schematics/components/files/sidenav/sidenav.ts.template +3 -3
- package/schematics/components/files/slider/slider.ts.template +3 -10
- package/schematics/components/files/sonner/sonner.ts.template +3 -2
- package/schematics/components/files/stepper/stepper.ts.template +4 -4
- package/schematics/components/files/switch/switch.ts.template +1 -1
- package/schematics/components/files/tabs/tab.ts.template +11 -8
- package/schematics/components/files/theme/theme.service.ts.template +0 -11
- package/schematics/components/files/tooltip/tooltip.ts.template +8 -3
- package/schematics/components/files/tour/index.ts.template +0 -2
- package/schematics/components/files/tour/tour.ts.template +13 -2
- package/schematics/components/files/tree/tree.ts.template +3 -3
- package/schematics/components/schema.json +8 -0
- package/select/option-group.d.ts +3 -3
- package/select/select.d.ts +2 -2
- package/sheet/index.d.ts +5 -0
- package/sheet/public-api.d.ts +2 -0
- package/sheet/sheet.d.ts +26 -0
- package/sheet/sheet.service.d.ts +13 -0
- package/sidenav/public-api.d.ts +1 -1
- package/sidenav/sidenav.d.ts +1 -1
- package/slider/public-api.d.ts +1 -1
- package/slider/slider.d.ts +5 -5
- package/sonner/sonner.d.ts +2 -1
- package/stepper/animation.d.ts +1 -1
- package/stepper/step.d.ts +1 -1
- package/stepper/stepper.d.ts +2 -2
- package/switch/switch.d.ts +1 -1
- package/table/body-row.d.ts +3 -3
- package/table/head-row.d.ts +3 -3
- package/table/table.d.ts +1 -1
- package/tabs/tab-group.d.ts +4 -4
- package/tabs/tab.d.ts +2 -2
- package/tooltip/public-api.d.ts +1 -1
- package/tooltip/tooltip.d.ts +5 -1
- package/tooltip/tooltip.directive.d.ts +1 -1
- package/tooltip/tooltip.service.d.ts +4 -2
- package/tour/tour.service.d.ts +3 -4
- package/tree/public-api.d.ts +2 -2
- package/tree/tree-node.d.ts +2 -2
- package/tree/tree.d.ts +2 -2
- package/schematics/components/files/datepicker/datepicker-trigger.ts.template +0 -27
- package/schematics/components/files/theme/theme.component.ts.template +0 -165
- package/schematics/components/files/tour/tour-step.ts.template +0 -8
- package/schematics/components/files/tour/tour.service.ts.template +0 -7
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { Icon } from '<%= basepath %>/icon';
|
|
3
|
+
import { provideIcons } from '@ng-icons/core';
|
|
4
|
+
import { lucideGripVertical } from '@ng-icons/lucide';
|
|
2
5
|
import {
|
|
3
6
|
NgbGutter,
|
|
4
7
|
NgbResizable,
|
|
5
8
|
NgbResizableGroup,
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
aliasResizable,
|
|
10
|
+
aliasResizableGroup,
|
|
8
11
|
} from '@ngbase/adk/resizable';
|
|
9
|
-
import { Icon } from '<%= basepath %>/icon';
|
|
10
|
-
import { provideIcons } from '@ng-icons/core';
|
|
11
|
-
import { lucideGripVertical } from '@ng-icons/lucide';
|
|
12
12
|
|
|
13
13
|
@Component({
|
|
14
14
|
selector: '<%= name %>-resizable-group',
|
|
15
15
|
exportAs: '<%= name %>ResizableGroup',
|
|
16
16
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
-
providers: [
|
|
17
|
+
providers: [aliasResizableGroup(ResizableGroup)],
|
|
18
18
|
template: `<ng-content select="<%= name %>-resizable" />`,
|
|
19
19
|
host: {
|
|
20
20
|
class: 'flex w-full',
|
|
@@ -28,7 +28,7 @@ export class ResizableGroup extends NgbResizableGroup {}
|
|
|
28
28
|
selector: '<%= name %>-resizable',
|
|
29
29
|
exportAs: '<%= name %>Resizable',
|
|
30
30
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
-
providers: [
|
|
31
|
+
providers: [aliasResizable(Resizable)],
|
|
32
32
|
viewProviders: [provideIcons({ lucideGripVertical })],
|
|
33
33
|
imports: [Icon, NgbGutter],
|
|
34
34
|
template: `<ng-content />
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { Icon } from '<%= basepath %>/icon';
|
|
5
|
+
import { provideIcons } from '@ng-icons/core';
|
|
6
|
+
import { lucideChevronsUpDown } from '@ng-icons/lucide';
|
|
4
7
|
import {
|
|
8
|
+
aliasSelect,
|
|
5
9
|
NgbSelect,
|
|
6
10
|
NgbSelectOption,
|
|
7
11
|
NgbSelectOptionGroup,
|
|
8
|
-
provideSelect,
|
|
9
12
|
SelectValue,
|
|
10
13
|
} from '@ngbase/adk/select';
|
|
11
|
-
import { Icon } from '<%= basepath %>/icon';
|
|
12
|
-
import { provideIcons } from '@ng-icons/core';
|
|
13
|
-
import { lucideChevronsUpDown } from '@ng-icons/lucide';
|
|
14
14
|
import { Option } from './option';
|
|
15
15
|
import { SelectInput } from './select-input';
|
|
16
16
|
|
|
@@ -24,7 +24,7 @@ export class SelectOption<T> {}
|
|
|
24
24
|
selector: '<%= name %>-select',
|
|
25
25
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
26
26
|
viewProviders: [provideIcons({ lucideChevronsUpDown })],
|
|
27
|
-
providers: [
|
|
27
|
+
providers: [aliasSelect(Select)],
|
|
28
28
|
imports: [
|
|
29
29
|
Icon,
|
|
30
30
|
FormsModule,
|
|
@@ -38,12 +38,12 @@ export class SelectOption<T> {}
|
|
|
38
38
|
<button
|
|
39
39
|
ngbSelectValue
|
|
40
40
|
[class.opacity-50]="disabled()"
|
|
41
|
-
class="flex min-h-5 w-full items-center
|
|
41
|
+
class="flex min-h-5 w-full items-center gap-1 whitespace-nowrap text-left outline-none"
|
|
42
42
|
>
|
|
43
43
|
<!-- Prefix template -->
|
|
44
44
|
<ng-content select=".select-prefix" />
|
|
45
45
|
|
|
46
|
-
<span class="truncate" [class.text-muted]="!cValue()">
|
|
46
|
+
<span class="flex-1 truncate" [class.text-muted]="!cValue()">
|
|
47
47
|
<ng-content select="[<%= name %>SelectTrigger]">
|
|
48
48
|
{{ cValue() || placeholder() }}
|
|
49
49
|
</ng-content>
|
|
@@ -87,7 +87,7 @@ export class SelectOption<T> {}
|
|
|
87
87
|
</ng-template>
|
|
88
88
|
`,
|
|
89
89
|
host: {
|
|
90
|
-
class: 'flex cursor-pointer font-medium',
|
|
90
|
+
class: 'flex cursor-pointer font-medium outline-none',
|
|
91
91
|
'[class.pointer-events-none]': 'disabled()',
|
|
92
92
|
},
|
|
93
93
|
})
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import { NgStyle } from '@angular/common';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
OnDestroy,
|
|
6
|
-
ViewContainerRef,
|
|
7
|
-
afterNextRender,
|
|
8
|
-
inject,
|
|
9
|
-
signal,
|
|
10
|
-
viewChild,
|
|
11
|
-
} from '@angular/core';
|
|
12
|
-
import { BaseDialog, basePortal, DialogInput, DialogOptions, DialogRef } from '@ngbase/adk/portal';
|
|
13
|
-
import { createHostAnimation, fadeAnimation } from '@ngbase/adk/utils';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
14
3
|
import { Button } from '<%= basepath %>/button';
|
|
15
|
-
import { sideAnimation } from '@ngbase/adk/dialog';
|
|
16
4
|
import { Icon } from '<%= basepath %>/icon';
|
|
17
5
|
import { provideIcons } from '@ng-icons/core';
|
|
18
6
|
import { lucideX } from '@ng-icons/lucide';
|
|
7
|
+
import { sideAnimation } from '@ngbase/adk/dialog';
|
|
8
|
+
import { NgbSheet, NgbSheetContainer, ngbSheetPortal } from '@ngbase/adk/sheet';
|
|
9
|
+
import { aliasSheet } from '@ngbase/adk/sheet';
|
|
10
|
+
import { createHostAnimation, fadeAnimation } from '@ngbase/adk/utils';
|
|
19
11
|
|
|
20
12
|
@Component({
|
|
21
13
|
selector: '<%= name %>-sheet',
|
|
22
|
-
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
providers: [aliasSheet(SheetContainer)],
|
|
23
16
|
viewProviders: [provideIcons({ lucideX })],
|
|
17
|
+
imports: [NgStyle, Button, Icon],
|
|
24
18
|
template: `
|
|
25
19
|
<div
|
|
26
20
|
class="pointer-events-none flex h-full"
|
|
@@ -59,76 +53,17 @@ import { lucideX } from '@ng-icons/lucide';
|
|
|
59
53
|
`,
|
|
60
54
|
host: {
|
|
61
55
|
class: 'fixed block top-0 bottom-0 left-0 right-0 z-p',
|
|
62
|
-
'[@parentAnimation]': '',
|
|
63
|
-
'(@parentAnimation.done)': 'animationDone()',
|
|
64
56
|
},
|
|
65
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
66
57
|
animations: [
|
|
67
58
|
createHostAnimation(['@fadeAnimation', '@sideAnimation']),
|
|
68
59
|
fadeAnimation('300ms'),
|
|
69
60
|
sideAnimation,
|
|
70
61
|
],
|
|
71
62
|
})
|
|
72
|
-
export class SheetContainer extends
|
|
73
|
-
myDialog = viewChild('myDialog', { read: ViewContainerRef });
|
|
74
|
-
backdropColor = true;
|
|
75
|
-
options!: SheetOptions;
|
|
76
|
-
classNames = '';
|
|
77
|
-
isHideHeader = false;
|
|
78
|
-
position = signal<'left' | 'right' | 'center'>('left');
|
|
79
|
-
|
|
80
|
-
constructor() {
|
|
81
|
-
super();
|
|
82
|
-
afterNextRender(() => {
|
|
83
|
-
this._afterViewSource.next(this.myDialog()!);
|
|
84
|
-
this.position.set('center');
|
|
85
|
-
});
|
|
86
|
-
const ref = inject(DialogRef);
|
|
87
|
-
ref.afterClosed.subscribe(() => {
|
|
88
|
-
console.log('afterClosed', this.options.position);
|
|
89
|
-
this.position.set(this.options.position as 'left' | 'right' | 'center');
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
override setOptions(options: SheetOptions): void {
|
|
94
|
-
this.options = options;
|
|
95
|
-
this.classNames = this.options.classNames?.join(' ') || '';
|
|
96
|
-
this.isHideHeader = this.options.header || false;
|
|
97
|
-
this.backdropColor = this.options.backdropColor || true;
|
|
98
|
-
this.position.set(this.options.position as 'left' | 'right' | 'center');
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
ngOnDestroy(): void {
|
|
102
|
-
// this.position.set(this.options.position as 'left' | 'right' | 'center');
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export class SheetOptions extends DialogOptions {
|
|
107
|
-
position?: 'left' | 'right' = 'right';
|
|
108
|
-
}
|
|
63
|
+
export class SheetContainer extends NgbSheetContainer {}
|
|
109
64
|
|
|
110
65
|
export function sheetPortal() {
|
|
111
|
-
|
|
112
|
-
const base = basePortal(NAME, SheetContainer);
|
|
113
|
-
|
|
114
|
-
function open<T>(component: DialogInput, opt?: SheetOptions) {
|
|
115
|
-
const { diaRef } = base.open(
|
|
116
|
-
component,
|
|
117
|
-
comp => {
|
|
118
|
-
const options = { ...new SheetOptions(), ...opt };
|
|
119
|
-
comp.instance.setOptions(options);
|
|
120
|
-
},
|
|
121
|
-
opt,
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
const { afterClosed } = diaRef;
|
|
125
|
-
return { afterClosed };
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function closeAll() {
|
|
129
|
-
base.closeAll();
|
|
130
|
-
}
|
|
131
|
-
return { open, closeAll };
|
|
66
|
+
return ngbSheetPortal(SheetContainer);
|
|
132
67
|
}
|
|
133
68
|
|
|
134
|
-
export type Sheet =
|
|
69
|
+
export type Sheet = NgbSheet;
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
NgbSidenavHeaderContent,
|
|
6
6
|
NgbSidenavHeaderTrack,
|
|
7
7
|
NgbSidenavOverlay,
|
|
8
|
-
provideSidenav,
|
|
9
|
-
slideAnimation,
|
|
10
8
|
SidenavType,
|
|
9
|
+
aliasSidenav,
|
|
10
|
+
slideAnimation,
|
|
11
11
|
} from '@ngbase/adk/sidenav';
|
|
12
12
|
|
|
13
13
|
export type { SidenavType };
|
|
@@ -15,7 +15,7 @@ export type { SidenavType };
|
|
|
15
15
|
@Component({
|
|
16
16
|
selector: '<%= name %>-sidenav',
|
|
17
17
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
providers: [
|
|
18
|
+
providers: [aliasSidenav(Sidenav)],
|
|
19
19
|
imports: [NgbSidenavOverlay, NgbSidenavHeaderTrack],
|
|
20
20
|
template: `
|
|
21
21
|
@if (showOverlay()) {
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
NgbSlider,
|
|
4
|
-
SliderRange,
|
|
5
|
-
SliderThumb,
|
|
6
|
-
SliderTrack,
|
|
7
|
-
provideSlider,
|
|
8
|
-
} from '@ngbase/adk/slider';
|
|
2
|
+
import { NgbSlider, SliderRange, SliderThumb, SliderTrack, aliasSlider } from '@ngbase/adk/slider';
|
|
9
3
|
import { ɵFocusStyle as FocusStyle } from '<%= basepath %>/checkbox';
|
|
10
4
|
|
|
11
5
|
@Component({
|
|
12
6
|
selector: '<%= name %>-slider',
|
|
13
7
|
exportAs: '<%= name %>Slider',
|
|
14
8
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
-
providers: [
|
|
9
|
+
providers: [aliasSlider(Slider)],
|
|
16
10
|
imports: [FocusStyle, SliderTrack, SliderRange, SliderThumb],
|
|
17
11
|
template: `
|
|
18
12
|
<div
|
|
@@ -35,8 +29,7 @@ import { ɵFocusStyle as FocusStyle } from '<%= basepath %>/checkbox';
|
|
|
35
29
|
}
|
|
36
30
|
`,
|
|
37
31
|
host: {
|
|
38
|
-
class: 'block relative my-
|
|
39
|
-
'[class]': 'orientation() === "vertical" ? "w-2" : "h-2"',
|
|
32
|
+
class: 'block relative my-2 aria-[orientation=vertical]:w-2 aria-[orientation=horizontal]:h-2',
|
|
40
33
|
},
|
|
41
34
|
})
|
|
42
35
|
export class Slider extends NgbSlider {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { NgbSonner, ngbSonnerPortal, SonnerBase } from '@ngbase/adk/sonner';
|
|
2
|
+
import { NgbSonner, ngbSonnerPortal, sonnerAnimation, SonnerBase } from '@ngbase/adk/sonner';
|
|
3
3
|
import { Icon } from '<%= basepath %>/icon';
|
|
4
4
|
import { provideIcons } from '@ng-icons/core';
|
|
5
5
|
import {
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
@Component({
|
|
13
13
|
selector: '<%= name %>-sonner',
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
-
imports: [Icon, SonnerBase],
|
|
16
15
|
providers: [
|
|
17
16
|
provideIcons({ lucideCircleCheck, lucideInfo, lucideTriangleAlert, lucideCircleAlert }),
|
|
18
17
|
],
|
|
18
|
+
imports: [Icon, SonnerBase],
|
|
19
19
|
template: `
|
|
20
20
|
<ul class="fixed bottom-0 right-0 flex flex-col gap-1">
|
|
21
21
|
@for (msg of messages(); track msg.id) {
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
}
|
|
42
42
|
</ul>
|
|
43
43
|
`,
|
|
44
|
+
animations: [sonnerAnimation],
|
|
44
45
|
})
|
|
45
46
|
export class Sonner extends NgbSonner {
|
|
46
47
|
readonly icons = {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
3
3
|
import {
|
|
4
|
+
aliasStepper,
|
|
4
5
|
NgbStep,
|
|
5
6
|
NgbStepHeader,
|
|
6
7
|
NgbStepper,
|
|
7
8
|
NgbStepperStep,
|
|
8
9
|
provideStep,
|
|
9
|
-
|
|
10
|
-
slideAnimation,
|
|
10
|
+
stepperAnimation,
|
|
11
11
|
} from '@ngbase/adk/stepper';
|
|
12
12
|
|
|
13
13
|
@Component({
|
|
14
14
|
selector: '<%= name %>-stepper',
|
|
15
15
|
exportAs: '<%= name %>Stepper',
|
|
16
16
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
-
providers: [
|
|
17
|
+
providers: [aliasStepper(Stepper)],
|
|
18
18
|
imports: [NgTemplateOutlet, NgbStepperStep],
|
|
19
19
|
template: `
|
|
20
20
|
<div class="flex justify-between" [class.flex-col]="direction() === 'vertical'">
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
</div>
|
|
58
58
|
<ng-content />
|
|
59
59
|
`,
|
|
60
|
-
animations: [
|
|
60
|
+
animations: [stepperAnimation],
|
|
61
61
|
})
|
|
62
62
|
export class Stepper extends NgbStepper {}
|
|
63
63
|
|
|
@@ -11,7 +11,7 @@ import { NgbSwitch, NgbSwitchLabel, NgbSwitchThumb, NgbSwitchTrack } from '@ngba
|
|
|
11
11
|
template: `
|
|
12
12
|
<button
|
|
13
13
|
ngbSwitchTrack
|
|
14
|
-
class="relative w-9 rounded-full border-
|
|
14
|
+
class="relative w-9 rounded-full border-2 border-transparent bg-muted-background transition-colors aria-[checked=true]:bg-primary"
|
|
15
15
|
>
|
|
16
16
|
<span
|
|
17
17
|
#thumb="ngbSwitchThumb"
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
3
|
+
import { Icon } from '<%= basepath %>/icon';
|
|
4
|
+
import { provideIcons } from '@ng-icons/core';
|
|
5
|
+
import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
3
6
|
import {
|
|
7
|
+
aliasTab,
|
|
8
|
+
aliasTabs,
|
|
4
9
|
NgbTab,
|
|
10
|
+
NgbTabChangeEvent,
|
|
5
11
|
NgbTabHeader,
|
|
6
12
|
NgbTabLazy,
|
|
7
13
|
NgbTabs,
|
|
8
|
-
provideTab,
|
|
9
|
-
provideTabs,
|
|
10
14
|
TabButton,
|
|
11
15
|
TabButtonsGroup,
|
|
12
16
|
TabScroll,
|
|
13
17
|
} from '@ngbase/adk/tabs';
|
|
14
|
-
import { Icon } from '<%= basepath %>/icon';
|
|
15
|
-
import { provideIcons } from '@ng-icons/core';
|
|
16
|
-
import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
17
18
|
|
|
18
19
|
@Component({
|
|
19
20
|
selector: '<%= name %>-tabs',
|
|
20
21
|
imports: [Icon, TabButton, TabButtonsGroup, TabScroll],
|
|
21
22
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
-
providers: [
|
|
23
|
+
providers: [aliasTabs(Tabs)],
|
|
23
24
|
viewProviders: [provideIcons({ lucideChevronRight, lucideChevronLeft })],
|
|
24
25
|
template: `<div class="flex items-center border-b">
|
|
25
26
|
<ng-content select=".tab-start-header-content" />
|
|
@@ -35,7 +36,7 @@ import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
|
35
36
|
@for (tab of tabs(); track tab.id) {
|
|
36
37
|
<button
|
|
37
38
|
[ngbTabButton]="tab"
|
|
38
|
-
class="whitespace-nowrap border-b-2 border-transparent aria-[disabled=true]:cursor-not-allowed aria-[selected=true]:!border-primary aria-[disabled=true]:text-muted aria-[selected=true]:!text-primary aria-[disabled=true]:opacity-50"
|
|
39
|
+
class="whitespace-nowrap border-b-2 border-transparent px-4 py-3 font-medium text-muted aria-[disabled=true]:cursor-not-allowed aria-[selected=true]:!border-primary aria-[disabled=true]:text-muted aria-[selected=true]:!text-primary aria-[disabled=true]:opacity-50"
|
|
39
40
|
></button>
|
|
40
41
|
}
|
|
41
42
|
</div>
|
|
@@ -60,7 +61,7 @@ export class Tabs extends NgbTabs<Tab> {}
|
|
|
60
61
|
selector: '<%= name %>-tab',
|
|
61
62
|
exportAs: '<%= name %>Tab',
|
|
62
63
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
63
|
-
providers: [
|
|
64
|
+
providers: [aliasTab(Tab)],
|
|
64
65
|
imports: [NgTemplateOutlet],
|
|
65
66
|
template: `
|
|
66
67
|
@if (lazyTemplate(); as template) {
|
|
@@ -87,3 +88,5 @@ export class TabHeader {}
|
|
|
87
88
|
hostDirectives: [NgbTabLazy],
|
|
88
89
|
})
|
|
89
90
|
export class TabLazy {}
|
|
91
|
+
|
|
92
|
+
export type TabChangeEvent = NgbTabChangeEvent;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { inject, Injectable, signal } from '@angular/core';
|
|
2
2
|
import { isClient } from '@ngbase/adk/utils';
|
|
3
|
-
import { dialogPortal } from '<%= basepath %>/dialog';
|
|
4
|
-
import { ThemeComponent } from './theme.component';
|
|
5
3
|
|
|
6
4
|
@Injectable({ providedIn: 'root' })
|
|
7
5
|
export class ThemeService {
|
|
8
|
-
dialog = dialogPortal();
|
|
9
6
|
mode = signal<'light' | 'dark' | ''>('light');
|
|
10
7
|
|
|
11
8
|
constructor() {
|
|
@@ -31,14 +28,6 @@ export class ThemeService {
|
|
|
31
28
|
localStorage.setItem('theme', mode);
|
|
32
29
|
this.mode.set(mode);
|
|
33
30
|
}
|
|
34
|
-
|
|
35
|
-
open() {
|
|
36
|
-
this.dialog.open(ThemeComponent, {
|
|
37
|
-
title: 'Theme',
|
|
38
|
-
backdrop: false,
|
|
39
|
-
width: '20rem',
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
31
|
}
|
|
43
32
|
|
|
44
33
|
export const injectTheme = () => inject(ThemeService);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
2
|
+
import { injectTheme } from '<%= basepath %>/theme';
|
|
3
|
+
import { NgbPopoverArrow, providePopoverArrowTracker } from '@ngbase/adk/popover';
|
|
2
4
|
import {
|
|
5
|
+
NgbTooltip,
|
|
3
6
|
NgbTooltipTemplate,
|
|
4
7
|
provideNgbTooltipOptions,
|
|
8
|
+
tooltipAnimation,
|
|
5
9
|
TooltipOptions,
|
|
6
|
-
NgbTooltip,
|
|
7
10
|
} from '@ngbase/adk/tooltip';
|
|
8
|
-
import { injectTheme } from '<%= basepath %>/theme';
|
|
9
11
|
|
|
10
12
|
@Directive({
|
|
11
13
|
selector: '[<%= name %>Tooltip]',
|
|
@@ -25,12 +27,15 @@ export class Tooltip {}
|
|
|
25
27
|
@Component({
|
|
26
28
|
selector: '<%= name %>-tooltip',
|
|
27
29
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
|
-
|
|
30
|
+
providers: [providePopoverArrowTracker()],
|
|
31
|
+
imports: [NgbPopoverArrow],
|
|
32
|
+
template: `<div ngbPopoverArrow>{{ content() }}</div>`,
|
|
29
33
|
host: {
|
|
30
34
|
class:
|
|
31
35
|
'fixed inline-block rounded-lg bg-foreground px-3 py-1 border shadow-md z-p whitespace-pre-line max-w-[15rem] text-text',
|
|
32
36
|
'[class]': `theme.mode() === 'dark' ? 'light' : 'dark'`,
|
|
33
37
|
},
|
|
38
|
+
animations: [tooltipAnimation],
|
|
34
39
|
})
|
|
35
40
|
export class TooltipComponent extends NgbTooltipTemplate {
|
|
36
41
|
readonly theme = injectTheme();
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import { NgbTour } from '@ngbase/adk/tour';
|
|
1
|
+
import { Directive, inject, InjectionToken } from '@angular/core';
|
|
2
|
+
import { NgbTour, NgbTourService, NgbTourStep } from '@ngbase/adk/tour';
|
|
3
|
+
|
|
4
|
+
export const TourService = new InjectionToken<NgbTourService>('TourService', {
|
|
5
|
+
providedIn: 'root',
|
|
6
|
+
factory: () => inject(NgbTourService),
|
|
7
|
+
});
|
|
3
8
|
|
|
4
9
|
@Directive({
|
|
5
10
|
selector: '[<%= name %>Tour]',
|
|
6
11
|
hostDirectives: [NgbTour],
|
|
7
12
|
})
|
|
8
13
|
export class Tour {}
|
|
14
|
+
|
|
15
|
+
@Directive({
|
|
16
|
+
selector: '[<%= name %>TourStep]',
|
|
17
|
+
hostDirectives: [{ directive: NgbTourStep, inputs: ['ngbTourStep: <%= name %>TourStep'] }],
|
|
18
|
+
})
|
|
19
|
+
export class TourStep {}
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
NgbTreeNodeContent,
|
|
6
6
|
NgbTreeNodeDef,
|
|
7
7
|
NgbTreeNodeToggle,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
aliasTree,
|
|
9
|
+
aliasTreeNode,
|
|
10
10
|
} from '@ngbase/adk/tree';
|
|
11
11
|
|
|
12
12
|
@Component({
|
|
13
13
|
selector: '<%= name %>-tree',
|
|
14
14
|
exportAs: '<%= name %>Tree',
|
|
15
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
+
providers: [aliasTree(Tree)],
|
|
16
17
|
template: `<ng-container #container />`,
|
|
17
|
-
providers: [provideTree(Tree)],
|
|
18
18
|
host: {
|
|
19
19
|
class: 'block',
|
|
20
20
|
},
|
|
@@ -52,12 +52,15 @@
|
|
|
52
52
|
"list",
|
|
53
53
|
"mask",
|
|
54
54
|
"menu",
|
|
55
|
+
"otp",
|
|
55
56
|
"pagination",
|
|
56
57
|
"popover",
|
|
57
58
|
"progress",
|
|
58
59
|
"radio",
|
|
59
60
|
"resizable",
|
|
61
|
+
"scroll-area",
|
|
60
62
|
"select",
|
|
63
|
+
"selectable",
|
|
61
64
|
"separator",
|
|
62
65
|
"sheet",
|
|
63
66
|
"sidenav",
|
|
@@ -68,6 +71,7 @@
|
|
|
68
71
|
"stepper",
|
|
69
72
|
"switch",
|
|
70
73
|
"table",
|
|
74
|
+
"tabs",
|
|
71
75
|
"toggle",
|
|
72
76
|
"toggle-group",
|
|
73
77
|
"tooltip",
|
|
@@ -102,12 +106,15 @@
|
|
|
102
106
|
{ "value": "list", "label": "List" },
|
|
103
107
|
{ "value": "mask", "label": "Mask" },
|
|
104
108
|
{ "value": "menu", "label": "Menu" },
|
|
109
|
+
{ "value": "otp", "label": "OTP" },
|
|
105
110
|
{ "value": "pagination", "label": "Pagination" },
|
|
106
111
|
{ "value": "popover", "label": "Popover" },
|
|
107
112
|
{ "value": "progress", "label": "Progress" },
|
|
108
113
|
{ "value": "radio", "label": "Radio" },
|
|
109
114
|
{ "value": "resizable", "label": "Resizable" },
|
|
115
|
+
{ "value": "scroll-area", "label": "Scroll Area" },
|
|
110
116
|
{ "value": "select", "label": "Select" },
|
|
117
|
+
{ "value": "selectable", "label": "Selectable" },
|
|
111
118
|
{ "value": "separator", "label": "Separator" },
|
|
112
119
|
{ "value": "sheet", "label": "Sheet" },
|
|
113
120
|
{ "value": "sidenav", "label": "Sidenav" },
|
|
@@ -118,6 +125,7 @@
|
|
|
118
125
|
{ "value": "stepper", "label": "Stepper" },
|
|
119
126
|
{ "value": "switch", "label": "Switch" },
|
|
120
127
|
{ "value": "table", "label": "Table" },
|
|
128
|
+
{ "value": "tabs", "label": "Tabs" },
|
|
121
129
|
{ "value": "toggle", "label": "Toggle" },
|
|
122
130
|
{ "value": "toggle-group", "label": "Toggle Group" },
|
|
123
131
|
{ "value": "tooltip", "label": "Tooltip" },
|
package/select/option-group.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class NgbOptionGroup {
|
|
3
|
-
label: import("@angular/core").InputSignal<string>;
|
|
4
|
-
disabled: import("@angular/core").InputSignal<boolean>;
|
|
3
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbOptionGroup, never>;
|
|
6
|
-
static
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbOptionGroup, "[ngbOptionGroup]", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
7
|
}
|
package/select/select.d.ts
CHANGED
|
@@ -35,9 +35,9 @@ export declare class NgbSelect<T> extends SelectBase<T> {
|
|
|
35
35
|
};
|
|
36
36
|
constructor();
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbSelect<any>, never>;
|
|
38
|
-
static
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbSelect<any>, "[ngbSelect]", never, { "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "search": "searchChange"; }, ["optionTemplate"], never, true, never>;
|
|
39
39
|
}
|
|
40
|
-
export declare function
|
|
40
|
+
export declare function aliasSelect(select: typeof NgbSelect): (({
|
|
41
41
|
provide: import("@angular/core").InjectionToken<readonly import("@angular/forms").ControlValueAccessor[]>;
|
|
42
42
|
useExisting: import("@angular/core").Type<any>;
|
|
43
43
|
multi: boolean;
|
package/sheet/index.d.ts
ADDED
package/sheet/sheet.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OnDestroy, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { BaseDialog } from '@ngbase/adk/portal';
|
|
3
|
+
import { SheetOptions } from './sheet.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NgbSheetContainer extends BaseDialog implements OnDestroy {
|
|
6
|
+
myDialog: import("@angular/core").Signal<ViewContainerRef | undefined>;
|
|
7
|
+
readonly dir: import("@ngbase/adk/bidi").Directionality;
|
|
8
|
+
backdropColor: boolean;
|
|
9
|
+
options: SheetOptions;
|
|
10
|
+
classNames: string;
|
|
11
|
+
isHideHeader: boolean;
|
|
12
|
+
readonly position: import("@angular/core").Signal<{
|
|
13
|
+
params: {
|
|
14
|
+
outTransform: string;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
constructor();
|
|
18
|
+
setOptions(options: SheetOptions): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgbSheetContainer, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbSheetContainer, "mee-sheet", never, {}, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
export declare function aliasSheet(dialog: typeof NgbSheetContainer): {
|
|
24
|
+
provide: typeof NgbSheetContainer;
|
|
25
|
+
useExisting: typeof NgbSheetContainer;
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DialogInput, DialogOptions } from '@ngbase/adk/portal';
|
|
2
|
+
import { NgbSheetContainer } from './sheet';
|
|
3
|
+
export declare class SheetOptions extends DialogOptions {
|
|
4
|
+
position?: 'left' | 'right';
|
|
5
|
+
}
|
|
6
|
+
export declare function ngbSheetPortal(component: typeof NgbSheetContainer): {
|
|
7
|
+
open: <T>(component: DialogInput, opt?: SheetOptions) => {
|
|
8
|
+
afterClosed: import("rxjs").Observable<any>;
|
|
9
|
+
close: (data?: any) => void;
|
|
10
|
+
};
|
|
11
|
+
closeAll: () => void;
|
|
12
|
+
};
|
|
13
|
+
export type NgbSheet = ReturnType<typeof ngbSheetPortal>;
|
package/sidenav/public-api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { NgbSidenav, NgbSidenavOverlay,
|
|
1
|
+
export { NgbSidenav, NgbSidenavOverlay, aliasSidenav } from './sidenav';
|
|
2
2
|
export { NgbSidenavHeader, NgbSidenavHeaderContent, NgbSidenavHeaderTrack, slideAnimation, } from './sidenav-header';
|
|
3
3
|
export { type SidenavType } from './sidenav.service';
|
package/sidenav/sidenav.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare class NgbSidenav {
|
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbSidenav, never>;
|
|
18
18
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbSidenav, "[ngbSidenav]", ["ngbSidenav"], { "show": { "alias": "show"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, { "show": "showChange"; }, never, never, true, never>;
|
|
19
19
|
}
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const aliasSidenav: (sidenav: Type<NgbSidenav>) => (typeof SidenavService | {
|
|
21
21
|
provide: typeof NgbSidenav;
|
|
22
22
|
useExisting: Type<NgbSidenav>;
|
|
23
23
|
})[];
|
package/slider/public-api.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { NgbSlider, SliderTrack, SliderRange, SliderThumb,
|
|
1
|
+
export { NgbSlider, SliderTrack, SliderRange, SliderThumb, aliasSlider } from './slider';
|