@foxeltech/angular-ui 0.0.1 → 0.0.3
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/components.css +6 -6
- package/fesm2022/foxeltech-angular-ui.mjs +32 -29
- package/fesm2022/foxeltech-angular-ui.mjs.map +1 -1
- package/index.d.ts +2 -1
- package/package.json +1 -1
- package/src/lib/styles/components.css +6 -6
- package/src/lib/styles/tailwind.css +1 -1
- package/src/lib/styles/theme.css +7 -7
- package/src/lib/ui/components/button/button.component.html +219 -209
- package/src/lib/ui/components/checkbox/checkbox.component.html +5 -3
- package/src/lib/ui/components/dnd-upload/dnd-upload.component.html +2 -2
- package/src/lib/ui/components/drawer/drawer.component.html +6 -2
- package/src/lib/ui/components/hero-icon/hero-icon.component.html +1 -0
- package/src/lib/ui/components/input/input.component.html +30 -27
- package/src/lib/ui/components/select/select.component.css +10 -5
- package/src/lib/ui/components/select/select.component.html +26 -20
- package/src/lib/ui/components/tab-group/tab-group.component.html +18 -11
- package/src/lib/ui/components/tag/tag.component.html +10 -8
- package/tailwind.config.js +1 -0
- package/tailwind.css +1 -1
- package/theme.css +7 -7
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<div class="mb-4 text-left w-full text-text-primary" [class]="class">
|
|
2
|
-
@if(label){
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
@if (label) {
|
|
3
|
+
<label class="block txt-field-label">
|
|
4
|
+
{{ label }}
|
|
5
|
+
@if (required) {
|
|
6
|
+
<span class="txt-required">*</span>
|
|
7
|
+
}
|
|
8
|
+
</label>
|
|
6
9
|
}
|
|
7
10
|
|
|
8
11
|
<div class="relative">
|
|
@@ -18,31 +21,31 @@
|
|
|
18
21
|
(focus)="onFocus()"
|
|
19
22
|
[attr.maxlength]="maxlength"
|
|
20
23
|
[class]="type === 'otp' ? 'input-otp' : 'input-default'"
|
|
21
|
-
[
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'txt-otp-input': type === 'otp'
|
|
25
|
-
}"
|
|
24
|
+
[class.input-invalid]="invalid"
|
|
25
|
+
[class.pr-8]="type === 'password' || suffixIcon"
|
|
26
|
+
[class.txt-otp-input]="type === 'otp'"
|
|
26
27
|
/>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
@if (type === 'password' || suffixIcon) {
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
class="absolute inset-y-0 right-2 flex items-center text-text-primary hover:text-text-secondary"
|
|
32
|
+
(click)="onSuffixClick()"
|
|
33
|
+
[disabled]="disabled"
|
|
34
|
+
>
|
|
35
|
+
@if (type === 'password') {
|
|
36
|
+
<i class="material-symbols-outlined text-lg select-none">{{
|
|
37
|
+
showPassword ? 'visibility_off' : 'visibility'
|
|
38
|
+
}}</i>
|
|
39
|
+
} @else if (suffixIcon) {
|
|
40
|
+
<i [class]="iconClass" class="text-lg select-none">{{ suffixIcon }}</i>
|
|
41
|
+
}
|
|
42
|
+
</button>
|
|
43
|
+
}
|
|
41
44
|
</div>
|
|
42
45
|
|
|
43
|
-
@if (invalid){
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
@if (invalid) {
|
|
47
|
+
<div class="txt-invalid">
|
|
48
|
+
{{ getErrorMessage(label) }}
|
|
49
|
+
</div>
|
|
47
50
|
}
|
|
48
51
|
</div>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
margin: 0 !important;
|
|
27
27
|
padding: 0 0.75rem !important;
|
|
28
28
|
border: 1px solid rgb(var(--border-default));
|
|
29
|
-
border-radius: 0.
|
|
29
|
+
border-radius: 0.375rem;
|
|
30
30
|
height: 36px !important;
|
|
31
31
|
align-items: center;
|
|
32
32
|
background-color: rgb(var(--bg-primary));
|
|
@@ -38,13 +38,18 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
::ng-deep .fx-select-field.mat-focused .mat-mdc-form-field-flex {
|
|
41
|
-
border: 2px solid rgb(var(--
|
|
41
|
+
border: 2px solid rgb(var(--gradient-primary-start)) !important;
|
|
42
42
|
outline: none !important;
|
|
43
|
-
border-radius: 0.
|
|
43
|
+
border-radius: 0.375rem;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
::ng-deep .fx-select-field.mat-form-field-invalid .mat-mdc-form-field-flex {
|
|
47
|
-
border
|
|
47
|
+
border: 1px solid rgb(var(--bg-error-bold)) !important;
|
|
48
|
+
box-shadow: none !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
::ng-deep mat-form-field[invalid] .mat-mdc-form-field-flex {
|
|
52
|
+
border: 1px solid rgb(var(--bg-error-bold)) !important;
|
|
48
53
|
box-shadow: none !important;
|
|
49
54
|
}
|
|
50
55
|
|
|
@@ -64,7 +69,7 @@
|
|
|
64
69
|
::ng-deep .mat-mdc-select-panel {
|
|
65
70
|
background-color: rgb(var(--bg-primary)) !important;
|
|
66
71
|
border: 1px solid rgb(var(--border-default)) !important;
|
|
67
|
-
border-radius: 0.
|
|
72
|
+
border-radius: 0.375rem !important;
|
|
68
73
|
box-shadow: 0 2px 4px rgb(0 0 0 / 0.1) !important;
|
|
69
74
|
}
|
|
70
75
|
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
<div class="mb-4 text-left w-full" [class]="class">
|
|
2
2
|
@if (label) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<label class="block txt-field-label">
|
|
4
|
+
{{ label }}
|
|
5
|
+
@if (required) {
|
|
6
|
+
<span class="txt-required">*</span>
|
|
7
|
+
}
|
|
8
|
+
</label>
|
|
7
9
|
}
|
|
8
10
|
|
|
9
|
-
<mat-form-field
|
|
11
|
+
<mat-form-field
|
|
12
|
+
[attr.invalid]="invalid || null"
|
|
13
|
+
class="fx-select-field w-full shadow-sm"
|
|
14
|
+
appearance="fill"
|
|
15
|
+
>
|
|
10
16
|
<mat-select
|
|
11
17
|
[placeholder]="placeholder"
|
|
12
18
|
[disabled]="disabled"
|
|
@@ -16,17 +22,17 @@
|
|
|
16
22
|
(openedChange)="onOpened($event)"
|
|
17
23
|
(blur)="onTouched()"
|
|
18
24
|
>
|
|
19
|
-
@if(enableSearch){
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
@if (enableSearch) {
|
|
26
|
+
<div class="px-semi w-full">
|
|
27
|
+
<input
|
|
28
|
+
type="text"
|
|
29
|
+
[placeholder]="'Search'"
|
|
30
|
+
[(ngModel)]="searchTerm"
|
|
31
|
+
(ngModelChange)="onSearchChange($event)"
|
|
32
|
+
(click)="$event.stopPropagation()"
|
|
33
|
+
class="text-text-primary placeholder:text-text-placeholder w-full bg-bg-primary border-b px-semi py-normal border-border-default focus:outline-none focus:border-gradient-primary-start text-sm text-text-primary tracking-normal ring-0 transition-colors duration-500 ease-in-out"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
30
36
|
}
|
|
31
37
|
<mat-option *ngFor="let option of filteredOptions" [value]="option.value">
|
|
32
38
|
<span class="txt-default">{{ option.label }}</span>
|
|
@@ -34,9 +40,9 @@
|
|
|
34
40
|
</mat-select>
|
|
35
41
|
</mat-form-field>
|
|
36
42
|
|
|
37
|
-
@if(invalid) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
@if (invalid) {
|
|
44
|
+
<div class="txt-invalid text-left">
|
|
45
|
+
{{ getErrorMessage(label) }}
|
|
46
|
+
</div>
|
|
41
47
|
}
|
|
42
48
|
</div>
|
|
@@ -29,17 +29,24 @@
|
|
|
29
29
|
class="tab-btn tab-bar-btn"
|
|
30
30
|
>
|
|
31
31
|
<div class="flex flex-row items-center justify-center">
|
|
32
|
-
@if(tab.icon) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
@if (tab.icon) {
|
|
33
|
+
<fx-ui-hero-icon
|
|
34
|
+
[icon]="tab.icon"
|
|
35
|
+
[size]="20"
|
|
36
|
+
class="flex mr-[2px]"
|
|
37
|
+
[ngClass]="{
|
|
38
|
+
'text-gradient-primary-start mb-small': i === activeIndex,
|
|
39
|
+
'text-text-placeholder': i !== activeIndex,
|
|
40
|
+
}"
|
|
41
|
+
></fx-ui-hero-icon>
|
|
42
|
+
}
|
|
43
|
+
<div
|
|
44
|
+
[ngClass]="
|
|
45
|
+
i === activeIndex ? 'txt-field-label text-gradient-primary-start' : 'txt-placeholder'
|
|
46
|
+
"
|
|
47
|
+
>
|
|
48
|
+
{{ tab.label }}
|
|
49
|
+
</div>
|
|
43
50
|
</div>
|
|
44
51
|
</button>
|
|
45
52
|
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<div
|
|
2
|
-
[class]="
|
|
2
|
+
[class]="
|
|
3
|
+
`flex flex-row gap-small ${rounded ? 'tag-round' : 'tag-square'} tag-${type}${solid ? '-solid' : ''}`
|
|
4
|
+
"
|
|
3
5
|
>
|
|
4
|
-
@if(icon){
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
@if (icon) {
|
|
7
|
+
<fx-ui-hero-icon
|
|
8
|
+
[class]="`flex txt-tag-${type} ${solid && type !== 'default' ? 'text-white' : ''}`"
|
|
9
|
+
[icon]="icon"
|
|
10
|
+
[size]="18"
|
|
11
|
+
></fx-ui-hero-icon>
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
<div [class]="`txt-tag-${type} ${solid ? 'text-white': ''}`">
|
|
14
|
+
<div [class]="`txt-tag-${type} ${solid && type !== 'default' ? 'text-white font-medium' : ''}`">
|
|
13
15
|
{{ label }}
|
|
14
16
|
</div>
|
|
15
17
|
</div>
|
package/tailwind.config.js
CHANGED
package/tailwind.css
CHANGED
package/theme.css
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
--gradient-primary-end: 4 255 135;
|
|
4
4
|
--bg-primary: 255 255 255;
|
|
5
5
|
--primary: 236 25 56;
|
|
6
|
-
--success:
|
|
7
|
-
--warning: 255
|
|
8
|
-
--critical:
|
|
9
|
-
--danger:
|
|
10
|
-
--discovery:
|
|
11
|
-
--information:
|
|
6
|
+
--success: 18 244 146;
|
|
7
|
+
--warning: 255 199 0;
|
|
8
|
+
--critical: 254 4 83;
|
|
9
|
+
--danger: 255 122 0;
|
|
10
|
+
--discovery: 156 129 255;
|
|
11
|
+
--information: 23 127 240;
|
|
12
12
|
--text-primary: 36 45 66;
|
|
13
13
|
--text-secondary: 97 101 108;
|
|
14
14
|
--border-default: 236 236 236;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
--discovery: 119 113 227;
|
|
45
45
|
--information: 62 175 240;
|
|
46
46
|
--text-primary: 247 247 247;
|
|
47
|
-
--text-secondary:
|
|
47
|
+
--text-secondary: 133 136 142;
|
|
48
48
|
--border-default: 55 58 65;
|
|
49
49
|
--text-placeholder: 133 136 142;
|
|
50
50
|
--step-bg: 255 255 255;
|