@ngbase/adk 0.1.7 → 0.1.9
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/a11y/autofocus.d.ts +7 -1
- package/datepicker/datepicker-trigger.d.ts +1 -1
- package/datepicker/datepicker.d.ts +2 -2
- package/fesm2022/ngbase-adk-a11y.mjs +43 -20
- package/fesm2022/ngbase-adk-a11y.mjs.map +1 -1
- package/fesm2022/ngbase-adk-popover.mjs +5 -5
- package/fesm2022/ngbase-adk-popover.mjs.map +1 -1
- package/fesm2022/ngbase-adk-slider.mjs +10 -3
- package/fesm2022/ngbase-adk-slider.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tabs.mjs +2 -1
- package/fesm2022/ngbase-adk-tabs.mjs.map +1 -1
- package/package.json +13 -13
- package/schematics/components/files/avatar/avatar-llm.md.template +2 -0
- package/schematics/components/files/badge/badge-llm.md.template +2 -2
- package/schematics/components/files/badge/badge.ts.template +8 -3
- package/schematics/components/files/button/button-llm.md.template +5 -0
- package/schematics/components/files/checkbox/focus-style.directive.ts.template +9 -6
- package/schematics/components/files/checkbox/index.ts.template +1 -1
- package/schematics/components/files/form-field/form-field-llm.md.template +5 -3
- package/schematics/components/files/form-field/form-field.ts.template +1 -1
- package/schematics/components/files/form-field/input-style.directive.ts.template +2 -3
- package/schematics/components/files/icon/icon-llm.md.template +10 -2
- package/schematics/components/files/list/list.ts.template +2 -1
- package/schematics/components/files/pagination/pagination.ts.template +11 -12
- package/schematics/components/files/select/option.ts.template +2 -2
- package/schematics/components/files/selectable/selectable.ts.template +4 -3
- package/schematics/components/files/sidenav/sidenav-llm.md.template +23 -10
- package/schematics/components/files/tabs/tab.ts.template +1 -1
- package/schematics/components/files/theme/theme-button.ts.template +1 -1
- package/slider/slider.d.ts +4 -2
- package/schematics/components/files/theme/theme-button.component.ts.template +0 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngbase/adk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ng-base/ngbase.git"
|
|
@@ -40,14 +40,18 @@
|
|
|
40
40
|
"types": "./accordion/index.d.ts",
|
|
41
41
|
"default": "./fesm2022/ngbase-adk-accordion.mjs"
|
|
42
42
|
},
|
|
43
|
-
"./avatar": {
|
|
44
|
-
"types": "./avatar/index.d.ts",
|
|
45
|
-
"default": "./fesm2022/ngbase-adk-avatar.mjs"
|
|
46
|
-
},
|
|
47
43
|
"./autocomplete": {
|
|
48
44
|
"types": "./autocomplete/index.d.ts",
|
|
49
45
|
"default": "./fesm2022/ngbase-adk-autocomplete.mjs"
|
|
50
46
|
},
|
|
47
|
+
"./bidi": {
|
|
48
|
+
"types": "./bidi/index.d.ts",
|
|
49
|
+
"default": "./fesm2022/ngbase-adk-bidi.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./avatar": {
|
|
52
|
+
"types": "./avatar/index.d.ts",
|
|
53
|
+
"default": "./fesm2022/ngbase-adk-avatar.mjs"
|
|
54
|
+
},
|
|
51
55
|
"./breadcrumb": {
|
|
52
56
|
"types": "./breadcrumb/index.d.ts",
|
|
53
57
|
"default": "./fesm2022/ngbase-adk-breadcrumb.mjs"
|
|
@@ -56,10 +60,6 @@
|
|
|
56
60
|
"types": "./cache/index.d.ts",
|
|
57
61
|
"default": "./fesm2022/ngbase-adk-cache.mjs"
|
|
58
62
|
},
|
|
59
|
-
"./bidi": {
|
|
60
|
-
"types": "./bidi/index.d.ts",
|
|
61
|
-
"default": "./fesm2022/ngbase-adk-bidi.mjs"
|
|
62
|
-
},
|
|
63
63
|
"./carousel": {
|
|
64
64
|
"types": "./carousel/index.d.ts",
|
|
65
65
|
"default": "./fesm2022/ngbase-adk-carousel.mjs"
|
|
@@ -224,10 +224,6 @@
|
|
|
224
224
|
"types": "./toggle/index.d.ts",
|
|
225
225
|
"default": "./fesm2022/ngbase-adk-toggle.mjs"
|
|
226
226
|
},
|
|
227
|
-
"./toggle-group": {
|
|
228
|
-
"types": "./toggle-group/index.d.ts",
|
|
229
|
-
"default": "./fesm2022/ngbase-adk-toggle-group.mjs"
|
|
230
|
-
},
|
|
231
227
|
"./tooltip": {
|
|
232
228
|
"types": "./tooltip/index.d.ts",
|
|
233
229
|
"default": "./fesm2022/ngbase-adk-tooltip.mjs"
|
|
@@ -251,6 +247,10 @@
|
|
|
251
247
|
"./virtualizer": {
|
|
252
248
|
"types": "./virtualizer/index.d.ts",
|
|
253
249
|
"default": "./fesm2022/ngbase-adk-virtualizer.mjs"
|
|
250
|
+
},
|
|
251
|
+
"./toggle-group": {
|
|
252
|
+
"types": "./toggle-group/index.d.ts",
|
|
253
|
+
"default": "./fesm2022/ngbase-adk-toggle-group.mjs"
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
}
|
|
@@ -35,3 +35,5 @@ import { Avatar, AvatarGroup } from '@/ui/avatar';
|
|
|
35
35
|
<button <%= name %>Avatar src="https://x.me/1.jpg" size="lg" />
|
|
36
36
|
</<%= name %>-avatar-group>
|
|
37
37
|
```
|
|
38
|
+
|
|
39
|
+
Note: Use `<%= name %>-avatar-group` to wrap the `<%= name %>-avatar` and `button`. Always use `<%= name %>-avatar` for image avatar.
|
|
@@ -10,12 +10,12 @@ import { Badge } from '@/ui/badge';
|
|
|
10
10
|
|
|
11
11
|
- **Inputs:**
|
|
12
12
|
|
|
13
|
-
- `variant`: '
|
|
13
|
+
- `variant`: 'default' | 'secondary' | 'outline' | 'destructive' = 'default' - Badge variant
|
|
14
14
|
|
|
15
15
|
- **Export:** `<%= name %>Badge`
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
|
-
<<%= name %>-badge>Badge</<%= name %>-badge> <button <%= name %>Badge variant="
|
|
20
|
+
<<%= name %>-badge>Badge</<%= name %>-badge> <button <%= name %>Badge variant="secondary">Badge</button>
|
|
21
21
|
```
|
|
@@ -5,10 +5,15 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
|
5
5
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6
6
|
template: `<ng-content />`,
|
|
7
7
|
host: {
|
|
8
|
-
class: 'flex items-center gap-1 rounded-
|
|
9
|
-
'[class]': `variant() === '
|
|
8
|
+
class: 'inline-flex items-center gap-1 rounded-md border px-2.5 py-0.5 text-xs font-semibold',
|
|
9
|
+
'[class]': `variant() === 'default'
|
|
10
|
+
? 'bg-primary text-primary-foreground hover:bg-primary/80 border-transparent'
|
|
11
|
+
: variant() === 'secondary' ? 'bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent'
|
|
12
|
+
: variant() === 'outline' ? 'text-foreground border-input bg-background hover:bg-accent border-border'
|
|
13
|
+
: variant() === 'destructive' ? 'bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent'
|
|
14
|
+
: 'bg-muted border-transparent'`,
|
|
10
15
|
},
|
|
11
16
|
})
|
|
12
17
|
export class Badge {
|
|
13
|
-
readonly variant = input<'
|
|
18
|
+
readonly variant = input<'default' | 'secondary' | 'outline' | 'destructive'>('default');
|
|
14
19
|
}
|
|
@@ -19,4 +19,9 @@ import { Button } from '@/ui/button';
|
|
|
19
19
|
|
|
20
20
|
```html
|
|
21
21
|
<button <%= name %>Button>Button</button> <button <%= name %>Button variant="ghost">Button</button>
|
|
22
|
+
<button <%= name %>Button="icon">
|
|
23
|
+
<<%= name %>-icon name="lucideHouse" />
|
|
24
|
+
</button>
|
|
22
25
|
```
|
|
26
|
+
|
|
27
|
+
Note: When you use icon as button, then make sure to use icon variant
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
export const focusStyles = {
|
|
4
|
+
within: 'focus-within:ring-[2px] focus-within:border-primary',
|
|
5
|
+
focus:
|
|
6
|
+
'outline-none focus-visible:ring-[2px] ring-primary/30 ring-offset-background focus-visible:border-primary',
|
|
7
|
+
};
|
|
2
8
|
|
|
3
9
|
@Directive({
|
|
4
10
|
selector: '[<%= name %>FocusStyle]',
|
|
5
11
|
host: {
|
|
6
|
-
class:
|
|
7
|
-
'[class]': `!unfocus() ? 'focus-visible:ring-2 focus-within:ring-2 focus-within:ring-offset-2 ring-primary focus-visible:ring-offset-2 ring-offset-background data-[focus]:ring-2 data-[focus]:ring-offset-2 data-[focus]:ring-offset-background data-[focus]:ring-primary' : ''`,
|
|
12
|
+
class: focusStyles.focus,
|
|
8
13
|
},
|
|
9
14
|
})
|
|
10
|
-
export class FocusStyle {
|
|
11
|
-
unfocus = input(false, { transform: booleanAttribute });
|
|
12
|
-
}
|
|
15
|
+
export class FocusStyle {}
|
|
@@ -42,15 +42,17 @@ import {
|
|
|
42
42
|
```html
|
|
43
43
|
<<%= name %>-form-field>
|
|
44
44
|
<label <%= name %>Label>Label</label>
|
|
45
|
-
<input <%= name %>Input [(value)]="value" />
|
|
46
45
|
<p <%= name %>Description>Description</p>
|
|
47
|
-
<p <%= name %>Error="required">Error</p>
|
|
48
|
-
<p <%= name %>Error="!required && minlength">Error</p>
|
|
49
46
|
<<%= name %>-icon <%= name %>Prefix name="info" />
|
|
47
|
+
<input <%= name %>Input [(value)]="value" />
|
|
50
48
|
<<%= name %>-icon <%= name %>Suffix name="info" />
|
|
49
|
+
<p <%= name %>Error="required">Error</p>
|
|
50
|
+
<p <%= name %>Error="!required && minlength">Error</p>
|
|
51
51
|
</<%= name %>-form-field>
|
|
52
52
|
|
|
53
53
|
<<%= name %>-form-field>
|
|
54
54
|
<input <%= name %>Input [(ngModel)]="value" />
|
|
55
55
|
</<%= name %>-form-field>
|
|
56
56
|
```
|
|
57
|
+
|
|
58
|
+
Note: Use `<%= name %>-form-field` to wrap the `<%= name %>Input`, `<%= name %>-select` or `<%= name %>-autocomplete` and label. Never use any input, select or autocomplete directly.
|
|
@@ -25,7 +25,7 @@ import { NgbSelectTarget } from '@ngbase/adk/select';
|
|
|
25
25
|
template: `
|
|
26
26
|
<ng-content select="[<%= name %>Label]" />
|
|
27
27
|
<ng-content select="[<%= name %>Description]" />
|
|
28
|
-
<div class="
|
|
28
|
+
<div class="flex items-center" #target <%= name %>InputStyle>
|
|
29
29
|
<ng-content select="[<%= name %>Prefix]" />
|
|
30
30
|
<ng-content />
|
|
31
31
|
<ng-content select="[<%= name %>Suffix]" />
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Directive } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ɵFocusStyles as focusStyles } from '<%= basepath %>/checkbox';
|
|
3
3
|
|
|
4
4
|
@Directive({
|
|
5
5
|
selector: '[<%= name %>InputStyle]',
|
|
6
|
-
hostDirectives: [{ directive: FocusStyle, inputs: ['unfocus'] }],
|
|
7
6
|
host: {
|
|
8
|
-
class:
|
|
7
|
+
class: `mis inline-block rounded-lg bg-transparent px-2.5 py-2 border font-normal min-h-10 ${focusStyles.focus} ${focusStyles.within}`,
|
|
9
8
|
},
|
|
10
9
|
})
|
|
11
10
|
export class InputStyle {}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
```typescript
|
|
4
4
|
import { Icon } from '@/ui/icon';
|
|
5
|
+
import { provideIcons } from '@ng-icons/core';
|
|
6
|
+
import { lucideHouse } from '@ng-icons/lucide';
|
|
5
7
|
```
|
|
6
8
|
|
|
7
9
|
## Components
|
|
@@ -14,6 +16,12 @@ import { Icon } from '@/ui/icon';
|
|
|
14
16
|
|
|
15
17
|
## Usage
|
|
16
18
|
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
+
```typescript
|
|
20
|
+
@Component({
|
|
21
|
+
standalone: true,
|
|
22
|
+
viewProviders: [provideIcons({ lucideHouse })],
|
|
23
|
+
imports: [Icon],
|
|
24
|
+
template: `<<%= name %>-icon name="lucideHouse" />`,
|
|
25
|
+
})
|
|
26
|
+
export class AppComponent {}
|
|
19
27
|
```
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Directive } from '@angular/core';
|
|
2
2
|
import { NgbList, NgbListActionGroup, provideList } from '@ngbase/adk/list';
|
|
3
|
+
import { FocusStyle } from '../checkbox/focus-style.directive';
|
|
3
4
|
|
|
4
5
|
@Directive({
|
|
5
6
|
selector: '[<%= name %>ListStyle]',
|
|
@@ -12,7 +13,7 @@ export class ListStyle {}
|
|
|
12
13
|
|
|
13
14
|
@Directive({
|
|
14
15
|
selector: '[<%= name %>List]',
|
|
15
|
-
hostDirectives: [ListStyle],
|
|
16
|
+
hostDirectives: [ListStyle, FocusStyle],
|
|
16
17
|
providers: [provideList(List)],
|
|
17
18
|
host: {
|
|
18
19
|
role: 'list',
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
lucideChevronsLeft,
|
|
11
11
|
lucideChevronsRight,
|
|
12
12
|
} from '@ng-icons/lucide';
|
|
13
|
+
import { FormField } from '<%= basepath %>/form-field';
|
|
13
14
|
|
|
14
15
|
@Component({
|
|
15
16
|
selector: '<%= name %>-pagination',
|
|
@@ -22,21 +23,19 @@ import {
|
|
|
22
23
|
lucideChevronsRight,
|
|
23
24
|
}),
|
|
24
25
|
],
|
|
25
|
-
imports: [Button, Icon, Select, Option, NgbPaginationBtn],
|
|
26
|
+
imports: [Button, Icon, Select, Option, NgbPaginationBtn, FormField],
|
|
26
27
|
template: `
|
|
27
28
|
<div class="flex items-center gap-2">
|
|
28
29
|
<div>Rows per page</div>
|
|
29
|
-
<<%= name %>-
|
|
30
|
-
[value]="size()"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
</<%= name %>-select>
|
|
30
|
+
<<%= name %>-form-field class="!w-auto [&>.mis]:min-h-8 [&>.mis]:py-0">
|
|
31
|
+
<<%= name %>-select [value]="size()" (valueChange)="sizeChanged($event)">
|
|
32
|
+
@for (size of sizeOptions(); track size) {
|
|
33
|
+
<<%= name %>-option [value]="size">
|
|
34
|
+
{{ size }}
|
|
35
|
+
</<%= name %>-option>
|
|
36
|
+
}
|
|
37
|
+
</<%= name %>-select>
|
|
38
|
+
</<%= name %>-form-field>
|
|
40
39
|
</div>
|
|
41
40
|
<div>Page {{ active() }} of {{ totalSnaps() }}</div>
|
|
42
41
|
<div class="flex items-center gap-2">
|
|
@@ -14,7 +14,7 @@ import { ListStyle } from '<%= basepath %>/list';
|
|
|
14
14
|
<ng-content />`,
|
|
15
15
|
host: {
|
|
16
16
|
class: 'outline-none',
|
|
17
|
-
'[class.bg-muted]': 'option.active() || option.checked()',
|
|
17
|
+
'[class.bg-muted]': 'option.active() || (!option.multiple() && option.checked())',
|
|
18
18
|
},
|
|
19
19
|
})
|
|
20
20
|
export class Option<T> {
|
|
@@ -24,7 +24,7 @@ export class Option<T> {
|
|
|
24
24
|
@Component({
|
|
25
25
|
selector: '<%= name %>-option-group, [<%= name %>OptionGroup]',
|
|
26
26
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
-
template: `<div class="
|
|
27
|
+
template: `<div class="sticky -top-1 z-10 bg-popover px-2 py-1.5 text-sm text-muted-foreground">
|
|
28
28
|
{{ label() }}
|
|
29
29
|
</div>
|
|
30
30
|
<ng-content />`,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
2
2
|
import { NgbSelectable, NgbSelectableItem } from '@ngbase/adk/selectable';
|
|
3
|
+
import { ɵFocusStyle as FocusStyle } from '<%= basepath %>/checkbox';
|
|
3
4
|
|
|
4
5
|
@Component({
|
|
5
6
|
selector: '<%= name %>-selectable-item, [<%= name %>SelectableItem]',
|
|
6
7
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7
|
-
hostDirectives: [{ directive: NgbSelectableItem, inputs: ['value'] }],
|
|
8
|
+
hostDirectives: [{ directive: NgbSelectableItem, inputs: ['value'] }, FocusStyle],
|
|
8
9
|
template: `<ng-content />`,
|
|
9
10
|
host: {
|
|
10
11
|
class:
|
|
11
|
-
'flex-1 flex items-center font-medium justify-center px-3 py-1.5 cursor-pointer transition-colors rounded-md whitespace-nowrap
|
|
12
|
-
'[class]': `selectable.selected() ? 'bg-background text-primary shadow-md
|
|
12
|
+
'flex-1 flex items-center font-medium justify-center px-3 py-1.5 cursor-pointer transition-colors rounded-md whitespace-nowrap border',
|
|
13
|
+
'[class]': `selectable.selected() ? 'bg-background text-primary shadow-md border-border' : 'opacity-60 border-transparent'`,
|
|
13
14
|
},
|
|
14
15
|
})
|
|
15
16
|
export class SelectableItem<T> {
|
|
@@ -24,14 +24,27 @@ import { Sidenav, SidenavHeader } from '@/ui/sidenav';
|
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
```typescript
|
|
28
|
+
@Component({
|
|
29
|
+
standalone: true,
|
|
30
|
+
imports: [Sidenav, SidenavHeader],
|
|
31
|
+
template: ` <<%= name %>-sidenav [show]="show()" [mode]="mode()">
|
|
32
|
+
<<%= name %>-sidenav-header width="100px" minWidth="50px">
|
|
33
|
+
<div class="p-2">Collapsible content like side menu</div>
|
|
34
|
+
</<%= name %>-sidenav-header>
|
|
35
|
+
<div class="p-2">
|
|
36
|
+
<button <%= name %>Button="icon" (click)="toggle()">
|
|
37
|
+
<<%= name %>-icon name="lucideMenu" />
|
|
38
|
+
</button>
|
|
39
|
+
<p>Main content</p>
|
|
40
|
+
</div>
|
|
41
|
+
</<%= name %>-sidenav>`,
|
|
42
|
+
})
|
|
43
|
+
export class AppComponent {
|
|
44
|
+
readonly show = signal(false);
|
|
45
|
+
readonly mode = signal<'side' | 'over'>('side');
|
|
46
|
+
toggle() {
|
|
47
|
+
this.show.update(show => !show);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
37
50
|
```
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
@for (tab of tabs(); track tab.id) {
|
|
37
37
|
<button
|
|
38
38
|
[ngbTabButton]="tab"
|
|
39
|
-
class="whitespace-nowrap border-b-2 border-transparent
|
|
39
|
+
class="whitespace-nowrap border-b-2 border-transparent font-medium text-muted-foreground aria-[disabled=true]:cursor-not-allowed aria-[selected=true]:!border-primary aria-[disabled=true]:text-muted-foreground aria-[selected=true]:!text-primary aria-[disabled=true]:opacity-50 [&[data-ch='false']]:px-4 [&[data-ch='false']]:py-3 [&[data-ch='true']>*:first-child]:px-4 [&[data-ch='true']>*:first-child]:py-3"
|
|
40
40
|
></button>
|
|
41
41
|
}
|
|
42
42
|
</div>
|
|
@@ -12,7 +12,7 @@ import { injectTheme } from './theme.service';
|
|
|
12
12
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
13
|
viewProviders: [provideIcons({ lucideMoon, lucideSun })],
|
|
14
14
|
template: `
|
|
15
|
-
<button <%= name %>Button="icon" class="tour-mode
|
|
15
|
+
<button <%= name %>Button="icon" class="tour-mode" (click)="themeService.toggle()">
|
|
16
16
|
<<%= name %>-icon [name]="themeService.mode() === 'dark' ? 'lucideSun' : 'lucideMoon'" />
|
|
17
17
|
<span class="sr-only">Toggle theme</span>
|
|
18
18
|
</button>
|
package/slider/slider.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare class SliderThumb {
|
|
|
25
25
|
export declare class NgbSlider implements ControlValueAccessor {
|
|
26
26
|
private readonly el;
|
|
27
27
|
private readonly dir;
|
|
28
|
+
private cdr;
|
|
28
29
|
private readonly drag;
|
|
29
30
|
private readonly track;
|
|
30
31
|
readonly thumbs: import("@angular/core").Signal<readonly ElementRef<HTMLElement>[]>;
|
|
@@ -35,6 +36,7 @@ export declare class NgbSlider implements ControlValueAccessor {
|
|
|
35
36
|
readonly range: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
36
37
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
37
38
|
readonly orientation: import("@angular/core").InputSignal<"horizontal" | "vertical">;
|
|
39
|
+
readonly afterChange: import("@angular/core").OutputEmitterRef<number | number[]>;
|
|
38
40
|
private onChange?;
|
|
39
41
|
private onTouched?;
|
|
40
42
|
readonly noOfThumbs: import("@angular/core").Signal<number[]>;
|
|
@@ -43,7 +45,7 @@ export declare class NgbSlider implements ControlValueAccessor {
|
|
|
43
45
|
private activeIndex;
|
|
44
46
|
private totalWidth;
|
|
45
47
|
private totalSliderWidth;
|
|
46
|
-
private
|
|
48
|
+
private isChanged;
|
|
47
49
|
constructor();
|
|
48
50
|
private handleValueUpdate;
|
|
49
51
|
private updateElement;
|
|
@@ -62,7 +64,7 @@ export declare class NgbSlider implements ControlValueAccessor {
|
|
|
62
64
|
private updateValue;
|
|
63
65
|
private notifyChange;
|
|
64
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgbSlider, never>;
|
|
65
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbSlider, "[ngbSlider]", ["ngbSlider"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
67
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgbSlider, "[ngbSlider]", ["ngbSlider"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "afterChange": "afterChange"; }, never, never, true, never>;
|
|
66
68
|
}
|
|
67
69
|
export declare const aliasSlider: (slider: typeof NgbSlider) => ({
|
|
68
70
|
provide: import("@angular/core").InjectionToken<readonly import("@angular/forms").ControlValueAccessor[]>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { Button } from '<%= basepath %>/button';
|
|
3
|
-
import { Icon } from '<%= basepath %>/icon';
|
|
4
|
-
import { provideIcons } from '@ng-icons/core';
|
|
5
|
-
import { lucideMoon, lucideSun } from '@ng-icons/lucide';
|
|
6
|
-
import { injectTheme } from './theme.service';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: '<%= name %>-theme-button',
|
|
10
|
-
imports: [Icon, Button],
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
viewProviders: [provideIcons({ lucideMoon, lucideSun })],
|
|
13
|
-
template: `
|
|
14
|
-
<button <%= name %>Button="icon" class="tour-mode h-9 w-9" (click)="themeService.toggle()">
|
|
15
|
-
<<%= name %>-icon [name]="themeService.mode() === 'dark' ? 'lucideSun' : 'lucideMoon'" />
|
|
16
|
-
<span class="sr-only">Toggle theme</span>
|
|
17
|
-
</button>
|
|
18
|
-
`,
|
|
19
|
-
})
|
|
20
|
-
export class ThemeButton {
|
|
21
|
-
readonly themeService = injectTheme();
|
|
22
|
-
|
|
23
|
-
constructor() {
|
|
24
|
-
// shortcutListener('ctrl+d', () => this.themeService.toggle());
|
|
25
|
-
}
|
|
26
|
-
}
|