ngwr 5.0.3 → 6.0.0
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/alert/public-api.d.ts +0 -1
- package/avatar/public-api.d.ts +0 -1
- package/button/public-api.d.ts +0 -1
- package/cdk/base.directive.d.ts +6 -1
- package/checkbox/public-api.d.ts +0 -1
- package/dialog/dialog.module.d.ts +1 -6
- package/divider/public-api.d.ts +0 -1
- package/dropdown/dropdown-menu-item.component.d.ts +12 -0
- package/dropdown/dropdown-menu.component.d.ts +14 -0
- package/dropdown/dropdown.directive.d.ts +29 -0
- package/dropdown/dropdown.types.d.ts +9 -0
- package/dropdown/index.d.ts +5 -0
- package/dropdown/public-api.d.ts +10 -0
- package/dropdown/styles/_index.scss +91 -0
- package/dropdown/styles/vars.scss +18 -0
- package/fesm2022/ngwr-alert.mjs +7 -27
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +7 -27
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +10 -31
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-cdk.mjs +9 -4
- package/fesm2022/ngwr-cdk.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +5 -24
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +130 -148
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +5 -19
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +315 -0
- package/fesm2022/ngwr-dropdown.mjs.map +1 -0
- package/fesm2022/ngwr-form.mjs +8 -29
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +11 -31
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +8 -28
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +125 -0
- package/fesm2022/ngwr-pagination.mjs.map +1 -0
- package/fesm2022/ngwr-pipes.mjs +5 -25
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +6 -25
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +6 -25
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +405 -0
- package/fesm2022/ngwr-select.mjs.map +1 -0
- package/fesm2022/ngwr-skeleton.mjs +5 -19
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +16 -28
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +258 -0
- package/fesm2022/ngwr-table.mjs.map +1 -0
- package/fesm2022/ngwr-tag.mjs +7 -21
- package/fesm2022/ngwr-tag.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +6 -25
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/form/public-api.d.ts +0 -1
- package/icon/public-api.d.ts +0 -1
- package/input/public-api.d.ts +0 -1
- package/package.json +33 -5
- package/pagination/index.d.ts +5 -0
- package/pagination/pagination.component.d.ts +23 -0
- package/pagination/pagination.types.d.ts +7 -0
- package/pagination/public-api.d.ts +8 -0
- package/pagination/styles/_index.scss +60 -0
- package/pagination/styles/vars.scss +14 -0
- package/pipes/public-api.d.ts +0 -1
- package/progress/public-api.d.ts +0 -1
- package/qr/public-api.d.ts +0 -1
- package/select/index.d.ts +5 -0
- package/select/public-api.d.ts +10 -0
- package/select/select-option-group.component.d.ts +19 -0
- package/select/select-option.component.d.ts +22 -0
- package/select/select.component.d.ts +63 -0
- package/select/select.types.d.ts +17 -0
- package/select/styles/_index.scss +237 -0
- package/select/styles/vars.scss +32 -0
- package/skeleton/index.d.ts +0 -1
- package/spinner/index.d.ts +0 -1
- package/spinner/spinner.component.d.ts +4 -2
- package/spinner/spinner.types.d.ts +7 -0
- package/spinner/styles/_index.scss +10 -3
- package/styles.scss +4 -0
- package/table/index.d.ts +5 -0
- package/table/public-api.d.ts +11 -0
- package/table/styles/_index.scss +4 -0
- package/table/styles/table-filter.scss +202 -0
- package/table/styles/table-sort.scss +47 -0
- package/table/styles/table.scss +232 -0
- package/table/styles/vars.scss +21 -0
- package/table/table-cell/index.d.ts +7 -0
- package/table/table-cell/table-cell.directive.d.ts +8 -0
- package/table/table-filter/index.d.ts +7 -0
- package/table/table-filter/table-filter.component.d.ts +18 -0
- package/table/table-sort/index.d.ts +7 -0
- package/table/table-sort/table-sort.component.d.ts +8 -0
- package/table/table.component.d.ts +33 -0
- package/table/types/index.d.ts +6 -0
- package/table/types/table-cell-context.d.ts +6 -0
- package/table/types/table-columns.d.ts +7 -0
- package/table/types/table-filter-emit.d.ts +5 -0
- package/table/types/table-filter-item.d.ts +6 -0
- package/table/types/table-order-item.d.ts +5 -0
- package/table/types/table-order.enum.d.ts +5 -0
- package/tag/public-api.d.ts +0 -1
- package/textarea/public-api.d.ts +0 -1
- package/alert/alert.module.d.ts +0 -7
- package/avatar/avatar.module.d.ts +0 -7
- package/button/button.module.d.ts +0 -8
- package/checkbox/checkbox.module.d.ts +0 -7
- package/divider/divider.module.d.ts +0 -7
- package/form/form.module.d.ts +0 -8
- package/icon/icon.module.d.ts +0 -7
- package/input/input.module.d.ts +0 -7
- package/pipes/pipes.module.d.ts +0 -7
- package/progress/progress.module.d.ts +0 -7
- package/qr/qr.module.d.ts +0 -7
- package/skeleton/skeleton.module.d.ts +0 -7
- package/spinner/spinner.module.d.ts +0 -7
- package/tag/tag.module.d.ts +0 -7
- package/textarea/textarea.module.d.ts +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngwr",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "NGWR – Angular UI components library",
|
|
6
6
|
"author": "Roman Khegay <rk@garuna.dev> (https://garuna.dev)",
|
|
@@ -84,6 +84,18 @@
|
|
|
84
84
|
"./textarea/styles": {
|
|
85
85
|
"sass": "./textarea/styles/_index.scss"
|
|
86
86
|
},
|
|
87
|
+
"./select/styles": {
|
|
88
|
+
"sass": "./select/styles/_index.scss"
|
|
89
|
+
},
|
|
90
|
+
"./pagination/styles": {
|
|
91
|
+
"sass": "./pagination/styles/_index.scss"
|
|
92
|
+
},
|
|
93
|
+
"./dropdown/styles": {
|
|
94
|
+
"sass": "./dropdown/styles/_index.scss"
|
|
95
|
+
},
|
|
96
|
+
"./table/styles": {
|
|
97
|
+
"sass": "./table/styles/_index.scss"
|
|
98
|
+
},
|
|
87
99
|
"./package.json": {
|
|
88
100
|
"default": "./package.json"
|
|
89
101
|
},
|
|
@@ -91,6 +103,10 @@
|
|
|
91
103
|
"types": "./alert/index.d.ts",
|
|
92
104
|
"default": "./fesm2022/ngwr-alert.mjs"
|
|
93
105
|
},
|
|
106
|
+
"./avatar": {
|
|
107
|
+
"types": "./avatar/index.d.ts",
|
|
108
|
+
"default": "./fesm2022/ngwr-avatar.mjs"
|
|
109
|
+
},
|
|
94
110
|
"./button": {
|
|
95
111
|
"types": "./button/index.d.ts",
|
|
96
112
|
"default": "./fesm2022/ngwr-button.mjs"
|
|
@@ -99,10 +115,6 @@
|
|
|
99
115
|
"types": "./cdk/index.d.ts",
|
|
100
116
|
"default": "./fesm2022/ngwr-cdk.mjs"
|
|
101
117
|
},
|
|
102
|
-
"./avatar": {
|
|
103
|
-
"types": "./avatar/index.d.ts",
|
|
104
|
-
"default": "./fesm2022/ngwr-avatar.mjs"
|
|
105
|
-
},
|
|
106
118
|
"./checkbox": {
|
|
107
119
|
"types": "./checkbox/index.d.ts",
|
|
108
120
|
"default": "./fesm2022/ngwr-checkbox.mjs"
|
|
@@ -115,6 +127,10 @@
|
|
|
115
127
|
"types": "./divider/index.d.ts",
|
|
116
128
|
"default": "./fesm2022/ngwr-divider.mjs"
|
|
117
129
|
},
|
|
130
|
+
"./dropdown": {
|
|
131
|
+
"types": "./dropdown/index.d.ts",
|
|
132
|
+
"default": "./fesm2022/ngwr-dropdown.mjs"
|
|
133
|
+
},
|
|
118
134
|
"./form": {
|
|
119
135
|
"types": "./form/index.d.ts",
|
|
120
136
|
"default": "./fesm2022/ngwr-form.mjs"
|
|
@@ -127,6 +143,10 @@
|
|
|
127
143
|
"types": "./input/index.d.ts",
|
|
128
144
|
"default": "./fesm2022/ngwr-input.mjs"
|
|
129
145
|
},
|
|
146
|
+
"./pagination": {
|
|
147
|
+
"types": "./pagination/index.d.ts",
|
|
148
|
+
"default": "./fesm2022/ngwr-pagination.mjs"
|
|
149
|
+
},
|
|
130
150
|
"./pipes": {
|
|
131
151
|
"types": "./pipes/index.d.ts",
|
|
132
152
|
"default": "./fesm2022/ngwr-pipes.mjs"
|
|
@@ -139,6 +159,10 @@
|
|
|
139
159
|
"types": "./qr/index.d.ts",
|
|
140
160
|
"default": "./fesm2022/ngwr-qr.mjs"
|
|
141
161
|
},
|
|
162
|
+
"./select": {
|
|
163
|
+
"types": "./select/index.d.ts",
|
|
164
|
+
"default": "./fesm2022/ngwr-select.mjs"
|
|
165
|
+
},
|
|
142
166
|
"./skeleton": {
|
|
143
167
|
"types": "./skeleton/index.d.ts",
|
|
144
168
|
"default": "./fesm2022/ngwr-skeleton.mjs"
|
|
@@ -147,6 +171,10 @@
|
|
|
147
171
|
"types": "./spinner/index.d.ts",
|
|
148
172
|
"default": "./fesm2022/ngwr-spinner.mjs"
|
|
149
173
|
},
|
|
174
|
+
"./table": {
|
|
175
|
+
"types": "./table/index.d.ts",
|
|
176
|
+
"default": "./fesm2022/ngwr-table.mjs"
|
|
177
|
+
},
|
|
150
178
|
"./tag": {
|
|
151
179
|
"types": "./tag/index.d.ts",
|
|
152
180
|
"default": "./fesm2022/ngwr-tag.mjs"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WrPaginationPosition } from './pagination.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class WrPaginationComponent {
|
|
4
|
+
currentPage: import("@angular/core").ModelSignal<number>;
|
|
5
|
+
total: import("@angular/core").InputSignalWithTransform<number, number>;
|
|
6
|
+
pageSize: import("@angular/core").ModelSignal<number>;
|
|
7
|
+
pageSizeOptions: import("@angular/core").InputSignal<number[]>;
|
|
8
|
+
showSizeChanger: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
9
|
+
showTotal: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
10
|
+
position: import("@angular/core").InputSignal<WrPaginationPosition>;
|
|
11
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
12
|
+
ofLabel: import("@angular/core").InputSignal<string>;
|
|
13
|
+
get hostClasses(): Record<string, boolean>;
|
|
14
|
+
protected readonly String: StringConstructor;
|
|
15
|
+
protected readonly totalPages: import("@angular/core").Signal<number>;
|
|
16
|
+
protected readonly currentRange: import("@angular/core").Signal<string>;
|
|
17
|
+
protected readonly pages: import("@angular/core").Signal<(number | "...")[]>;
|
|
18
|
+
protected isCurrentPage(page: number): boolean;
|
|
19
|
+
protected onPageChange(page: number): void;
|
|
20
|
+
protected onPageSizeChange(size: number): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrPaginationComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrPaginationComponent, "wr-pagination", never, { "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showSizeChanger": { "alias": "showSizeChanger"; "required": false; "isSignal": true; }; "showTotal": { "alias": "showTotal"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ofLabel": { "alias": "ofLabel"; "required": false; "isSignal": true; }; }, { "currentPage": "currentPageChange"; "pageSize": "pageSizeChange"; }, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
export * from './pagination.types';
|
|
8
|
+
export * from './pagination.component';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@forward "./vars";
|
|
2
|
+
|
|
3
|
+
.wr-pagination {
|
|
4
|
+
--wr-select-option-height: var(--wr-pagination-select-option-height);
|
|
5
|
+
--wr-select-padding-y: var(--wr-pagination-select-padding-y);
|
|
6
|
+
--wr-select-padding-x: var(--wr-pagination-select-padding-x);
|
|
7
|
+
|
|
8
|
+
display: block;
|
|
9
|
+
|
|
10
|
+
&-container {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: var(--wr-pagination-gap);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&--start {
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--center {
|
|
21
|
+
justify-content: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--end {
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--disabled {
|
|
29
|
+
opacity: 0.6;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-total {
|
|
34
|
+
color: var(--wr-pagination-total-color);
|
|
35
|
+
font-size: var(--wr-pagination-font-size);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-items {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: var(--wr-pagination-items-gap);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-ellipsis {
|
|
45
|
+
color: var(--wr-pagination-ellipsis-color);
|
|
46
|
+
padding: 0 var(--wr-pagination-item-padding);
|
|
47
|
+
user-select: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
wr-btn {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
min-width: var(--wr-pagination-item-size);
|
|
55
|
+
height: var(--wr-pagination-item-size);
|
|
56
|
+
padding: 0;
|
|
57
|
+
gap: 0;
|
|
58
|
+
text-align: center;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--wr-pagination-gap: 1rem;
|
|
3
|
+
--wr-pagination-items-gap: 0.5rem;
|
|
4
|
+
--wr-pagination-font-size: 0.875rem;
|
|
5
|
+
--wr-pagination-total-color: var(--wr-color-medium);
|
|
6
|
+
--wr-pagination-ellipsis-color: var(--wr-color-medium);
|
|
7
|
+
|
|
8
|
+
--wr-pagination-item-size: 1.625rem;
|
|
9
|
+
--wr-pagination-item-padding: 0.5rem;
|
|
10
|
+
|
|
11
|
+
--wr-pagination-select-option-height: var(--wr-pagination-item-size);
|
|
12
|
+
--wr-pagination-select-padding-y: 0;
|
|
13
|
+
--wr-pagination-select-padding-x: 0.825rem;
|
|
14
|
+
}
|
package/pipes/public-api.d.ts
CHANGED
package/progress/public-api.d.ts
CHANGED
package/qr/public-api.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
export * from './select.types';
|
|
8
|
+
export * from './select.component';
|
|
9
|
+
export * from './select-option.component';
|
|
10
|
+
export * from './select-option-group.component';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
import { QueryList, AfterContentInit } from '@angular/core';
|
|
8
|
+
import { WrOptionComponent } from './select-option.component';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class WrOptionGroupComponent implements AfterContentInit {
|
|
11
|
+
label: string;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
options: QueryList<WrOptionComponent>;
|
|
14
|
+
get hostClasses(): Record<string, boolean>;
|
|
15
|
+
ngAfterContentInit(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrOptionGroupComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrOptionGroupComponent, "wr-option-group", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["options"], ["*"], true, never>;
|
|
18
|
+
static ngAcceptInputType_disabled: unknown;
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class WrOptionComponent {
|
|
5
|
+
value: SafeAny;
|
|
6
|
+
label?: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
customTemplate?: TemplateRef<SafeAny>;
|
|
9
|
+
get hostClasses(): Record<string, boolean>;
|
|
10
|
+
protected readonly context: {
|
|
11
|
+
$implicit: SafeAny;
|
|
12
|
+
option: SafeAny;
|
|
13
|
+
};
|
|
14
|
+
private readonly selectComponent;
|
|
15
|
+
get isSelected(): boolean;
|
|
16
|
+
get isHighlighted(): boolean;
|
|
17
|
+
get isFiltered(): boolean;
|
|
18
|
+
select(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrOptionComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrOptionComponent, "wr-option", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["customTemplate"], never, true, never>;
|
|
21
|
+
static ngAcceptInputType_disabled: unknown;
|
|
22
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { QueryList, AfterContentInit, ElementRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { WrAbstractBase } from 'ngwr/cdk';
|
|
4
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
5
|
+
import { WrOptionGroupComponent } from './select-option-group.component';
|
|
6
|
+
import { WrOptionComponent } from './select-option.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* NGWR select component.
|
|
10
|
+
*
|
|
11
|
+
* {@tutorial} [How to use wr-select]{@link http://ngwr.dev/docs/components/select}
|
|
12
|
+
*/
|
|
13
|
+
export declare class WrSelectComponent extends WrAbstractBase implements ControlValueAccessor, AfterContentInit {
|
|
14
|
+
placeholder: string;
|
|
15
|
+
noItemsLabel: string;
|
|
16
|
+
multiple: boolean;
|
|
17
|
+
searchable: boolean;
|
|
18
|
+
clearable: boolean;
|
|
19
|
+
maxMultipleCount?: number;
|
|
20
|
+
set disabled(value: boolean);
|
|
21
|
+
get disabled(): boolean;
|
|
22
|
+
searchInput?: ElementRef<HTMLInputElement>;
|
|
23
|
+
options: QueryList<WrOptionComponent>;
|
|
24
|
+
optionGroups: QueryList<WrOptionGroupComponent>;
|
|
25
|
+
get hostClasses(): Record<string, boolean>;
|
|
26
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
27
|
+
onClickOutside(event: MouseEvent): void;
|
|
28
|
+
protected readonly value: import("@angular/core").WritableSignal<any>;
|
|
29
|
+
protected readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
30
|
+
protected readonly isFocused: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
protected readonly isDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
32
|
+
protected readonly searchValue: import("@angular/core").WritableSignal<string>;
|
|
33
|
+
protected readonly highlightedOptionIndex: import("@angular/core").WritableSignal<number>;
|
|
34
|
+
protected readonly selectedOptions: import("@angular/core").Signal<WrOptionComponent[]>;
|
|
35
|
+
protected readonly selectedLabel: import("@angular/core").Signal<any>;
|
|
36
|
+
protected readonly filteredOptions: import("@angular/core").Signal<WrOptionComponent[]>;
|
|
37
|
+
private readonly elementRef;
|
|
38
|
+
private readonly cdr;
|
|
39
|
+
get currentValue(): SafeAny;
|
|
40
|
+
get isMultiple(): boolean;
|
|
41
|
+
ngAfterContentInit(): void;
|
|
42
|
+
onChange: (value: string) => void;
|
|
43
|
+
onTouch: () => void;
|
|
44
|
+
onOptionSelect(option: WrOptionComponent): void;
|
|
45
|
+
onSearch(event: Event): void;
|
|
46
|
+
isHighlightedOption(option: WrOptionComponent): boolean;
|
|
47
|
+
isFilteredOption(option: WrOptionComponent): boolean;
|
|
48
|
+
writeValue(value: SafeAny): void;
|
|
49
|
+
registerOnChange(fn: (value: SafeAny) => void): void;
|
|
50
|
+
registerOnTouched(fn: () => void): void;
|
|
51
|
+
setDisabledState(isDisabled: boolean): void;
|
|
52
|
+
clear(event: Event): void;
|
|
53
|
+
toggle(): void;
|
|
54
|
+
private close;
|
|
55
|
+
private isSelectedOption;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrSelectComponent, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrSelectComponent, "wr-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "noItemsLabel": { "alias": "noItemsLabel"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "maxMultipleCount": { "alias": "maxMultipleCount"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["options", "optionGroups"], ["*"], true, never>;
|
|
58
|
+
static ngAcceptInputType_multiple: unknown;
|
|
59
|
+
static ngAcceptInputType_searchable: unknown;
|
|
60
|
+
static ngAcceptInputType_clearable: unknown;
|
|
61
|
+
static ngAcceptInputType_maxMultipleCount: unknown;
|
|
62
|
+
static ngAcceptInputType_disabled: unknown;
|
|
63
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
8
|
+
export interface WrSelectOption {
|
|
9
|
+
label: string;
|
|
10
|
+
value: SafeAny;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface WrSelectGroup {
|
|
14
|
+
label: string;
|
|
15
|
+
options: WrSelectOption[];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
@forward './vars';
|
|
2
|
+
|
|
3
|
+
.wr-select {
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
7
|
+
color: var(--wr-select-color);
|
|
8
|
+
font-size: var(--wr-select-font-size);
|
|
9
|
+
font-weight: var(--wr-select-font-weight);
|
|
10
|
+
line-height: var(--wr-select-line-height);
|
|
11
|
+
|
|
12
|
+
background-color: var(--wr-select-bg-color);
|
|
13
|
+
border: 1px solid var(--wr-select-border-color);
|
|
14
|
+
border-radius: var(--wr-select-border-radius);
|
|
15
|
+
box-shadow: var(--wr-select-box-shadow);
|
|
16
|
+
|
|
17
|
+
transition: var(--wr-transition-base);
|
|
18
|
+
|
|
19
|
+
&--disabled {
|
|
20
|
+
opacity: 0.6;
|
|
21
|
+
cursor: not-allowed;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--focused {
|
|
26
|
+
--wr-select-border-color: var(--wr-color-primary);
|
|
27
|
+
--wr-select-box-shadow: 0 0 0 3px rgba(var(--wr-color-primary-rgb), 0.125);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__trigger {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: var(--wr-select-padding-y) var(--wr-select-padding-x);
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
min-height: var(--wr-select-option-height);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__value {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex: 1;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
margin-right: 8px;
|
|
43
|
+
|
|
44
|
+
&:empty::before {
|
|
45
|
+
content: attr(placeholder);
|
|
46
|
+
color: var(--wr-select-placeholder-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
wr-tag {
|
|
50
|
+
line-height: var(--wr-select-tag-line-height);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__arrow {
|
|
55
|
+
--wr-icon-size: 1rem;
|
|
56
|
+
transition: transform 0.2s;
|
|
57
|
+
|
|
58
|
+
.wr-select--open & {
|
|
59
|
+
transform: rotate(180deg);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__dropdown {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 100%;
|
|
66
|
+
left: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
z-index: 1000;
|
|
69
|
+
margin-top: 4px;
|
|
70
|
+
|
|
71
|
+
background: var(--wr-select-dropdown-bg);
|
|
72
|
+
border: 1px solid var(--wr-select-dropdown-border-color);
|
|
73
|
+
border-radius: var(--wr-select-border-radius);
|
|
74
|
+
box-shadow: var(--wr-select-dropdown-shadow);
|
|
75
|
+
|
|
76
|
+
opacity: 0;
|
|
77
|
+
visibility: hidden;
|
|
78
|
+
transform: translateY(-10px);
|
|
79
|
+
transition: var(--wr-transition-base);
|
|
80
|
+
|
|
81
|
+
&--open {
|
|
82
|
+
opacity: 1;
|
|
83
|
+
visibility: visible;
|
|
84
|
+
transform: translateY(0);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&-content {
|
|
88
|
+
max-height: var(--wr-select-dropdown-max-height);
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__counter {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
margin-right: 4px;
|
|
97
|
+
margin-left: auto;
|
|
98
|
+
padding: 2px 6px;
|
|
99
|
+
font-size: var(--wr-select-counter-font-size);
|
|
100
|
+
color: var(--wr-color-medium);
|
|
101
|
+
border-radius: var(--wr-select-tag-border-radius);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&__tags {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-wrap: wrap;
|
|
107
|
+
gap: 4px;
|
|
108
|
+
align-items: center;
|
|
109
|
+
width: 100%;
|
|
110
|
+
|
|
111
|
+
&-container {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-wrap: wrap;
|
|
114
|
+
gap: 4px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&__tag {
|
|
119
|
+
&-remove {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
width: 16px;
|
|
124
|
+
height: var(--wr-select-tag-line-height);
|
|
125
|
+
margin-right: -3px;
|
|
126
|
+
padding: 0;
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
background: none;
|
|
129
|
+
border: none;
|
|
130
|
+
border-radius: 50%;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&__search-wrapper {
|
|
136
|
+
padding: var(--wr-select-padding-y) var(--wr-select-padding-x);
|
|
137
|
+
border-bottom: 1px solid var(--wr-select-border-color);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&__search {
|
|
141
|
+
flex: 1;
|
|
142
|
+
min-width: 50px;
|
|
143
|
+
border: none;
|
|
144
|
+
background: none;
|
|
145
|
+
outline: none;
|
|
146
|
+
padding: 0;
|
|
147
|
+
font-size: inherit;
|
|
148
|
+
font-family: inherit;
|
|
149
|
+
color: inherit;
|
|
150
|
+
|
|
151
|
+
&::placeholder {
|
|
152
|
+
color: var(--wr-select-placeholder-color);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&__clear {
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
padding: 0;
|
|
161
|
+
margin: 0 8px 0 0;
|
|
162
|
+
border: none;
|
|
163
|
+
background: none;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
color: var(--wr-color-medium);
|
|
166
|
+
transition: color 0.2s;
|
|
167
|
+
|
|
168
|
+
&:hover {
|
|
169
|
+
color: var(--wr-color-dark);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
wr-icon {
|
|
173
|
+
--wr-icon-size: 16px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&--multiple {
|
|
177
|
+
margin-left: auto;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&__no-data {
|
|
182
|
+
padding: var(--wr-select-padding-y) var(--wr-select-padding-x);
|
|
183
|
+
color: var(--wr-select-placeholder-color);
|
|
184
|
+
text-align: center;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.wr-option {
|
|
189
|
+
display: block;
|
|
190
|
+
padding: var(--wr-select-padding-y) var(--wr-select-padding-x);
|
|
191
|
+
cursor: pointer;
|
|
192
|
+
transition: background-color 0.2s;
|
|
193
|
+
min-height: var(--wr-select-option-height);
|
|
194
|
+
|
|
195
|
+
&__content {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
height: 100%;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&:hover:not(&--disabled) {
|
|
202
|
+
background-color: var(--wr-select-option-hover-bg);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&--selected {
|
|
206
|
+
color: var(--wr-select-option-selected-color);
|
|
207
|
+
background-color: var(--wr-select-option-selected-bg);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&--disabled {
|
|
211
|
+
color: var(--wr-select-option-disabled-color);
|
|
212
|
+
cursor: not-allowed;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&--highlighted {
|
|
216
|
+
background-color: var(--wr-select-option-hover-bg);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&--filtered {
|
|
220
|
+
display: none;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.wr-select-group {
|
|
225
|
+
&__label {
|
|
226
|
+
padding: var(--wr-select-padding-y) var(--wr-select-padding-x);
|
|
227
|
+
color: var(--wr-select-group-label-color);
|
|
228
|
+
font-size: var(--wr-select-group-label-font-size);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&__content {
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&--disabled {
|
|
235
|
+
opacity: 0.6;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--wr-select-color: var(--wr-color-dark);
|
|
3
|
+
--wr-select-placeholder-color: var(--wr-color-light);
|
|
4
|
+
--wr-select-bg-color: var(--wr-color-white);
|
|
5
|
+
--wr-select-border-color: var(--wr-color-light-lighter);
|
|
6
|
+
--wr-select-border-radius: 0.375rem;
|
|
7
|
+
--wr-select-box-shadow: none;
|
|
8
|
+
--wr-select-font-size: 0.875rem;
|
|
9
|
+
--wr-select-font-weight: 400;
|
|
10
|
+
--wr-select-line-height: 1.25rem;
|
|
11
|
+
--wr-select-padding-y: 0.375rem;
|
|
12
|
+
--wr-select-padding-x: 0.825rem;
|
|
13
|
+
|
|
14
|
+
--wr-select-dropdown-bg: var(--wr-color-white);
|
|
15
|
+
--wr-select-dropdown-border-color: var(--wr-color-light-lighter);
|
|
16
|
+
--wr-select-dropdown-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
17
|
+
--wr-select-dropdown-max-height: 256px;
|
|
18
|
+
|
|
19
|
+
--wr-select-option-hover-bg: rgba(var(--wr-color-light-rgb), 0.2);
|
|
20
|
+
--wr-select-option-selected-color: var(--wr-color-dark);
|
|
21
|
+
--wr-select-option-selected-bg: rgba(var(--wr-color-primary-rgb), 0.1);
|
|
22
|
+
--wr-select-option-disabled-color: var(--wr-color-medium);
|
|
23
|
+
--wr-select-option-height: 32px;
|
|
24
|
+
|
|
25
|
+
--wr-select-group-label-color: var(--wr-color-medium);
|
|
26
|
+
--wr-select-group-label-font-size: 0.75rem;
|
|
27
|
+
|
|
28
|
+
--wr-select-counter-color: var(--wr-color-medium);
|
|
29
|
+
--wr-select-counter-font-size: 0.775rem;
|
|
30
|
+
|
|
31
|
+
--wr-select-tag-line-height: 0.8rem;
|
|
32
|
+
}
|
package/skeleton/index.d.ts
CHANGED
package/spinner/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WrSpinnerSize } from './spinner.types';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
/**
|
|
3
4
|
* NGWR spinner component.
|
|
@@ -5,7 +6,8 @@ import * as i0 from "@angular/core";
|
|
|
5
6
|
* {@tutorial} [How to use wr-spinner]{@link http://ngwr.dev/docs/components/spinner
|
|
6
7
|
*/
|
|
7
8
|
export declare class WrSpinnerComponent {
|
|
8
|
-
|
|
9
|
+
size: import("@angular/core").InputSignal<WrSpinnerSize>;
|
|
10
|
+
get hostClasses(): Record<string, boolean>;
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrSpinnerComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WrSpinnerComponent, "wr-spinner", never, {}, {}, never, never, true, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrSpinnerComponent, "wr-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
13
|
}
|