@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.
@@ -1,8 +1,11 @@
1
1
  <div class="mb-4 text-left w-full text-text-primary" [class]="class">
2
- @if(label){<label class="block txt-field-label">
3
- {{ label }}
4
- @if (required) {<span class="txt-required">*</span>}
5
- </label>
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
- [ngClass]="{
22
- 'input-invalid': invalid,
23
- 'pr-8': type === 'password' || suffixIcon,
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
- <button
28
- type="button"
29
- class="absolute inset-y-0 right-2 flex items-center text-text-primary hover:text-text-secondary"
30
- (click)="onSuffixClick()"
31
- [disabled]="disabled"
32
- >
33
- @if (type === 'password') {
34
- <i class="material-symbols-outlined text-lg select-none">{{
35
- showPassword ? 'visibility_off' : 'visibility'
36
- }}</i>
37
- } @else if (suffixIcon) {
38
- <i [class]="iconClass" class="text-lg select-none">{{ suffixIcon }}</i>
39
- }
40
- </button>
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
- <div class="txt-invalid">
45
- {{ getErrorMessage(label) }}
46
- </div>
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.5rem;
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(--border-interactive)) !important;
41
+ border: 2px solid rgb(var(--gradient-primary-start)) !important;
42
42
  outline: none !important;
43
- border-radius: 0.5rem;
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-color: #ef4444 !important;
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.5rem !important;
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
- <label class="block txt-field-label">
4
- {{ label }}
5
- @if(required) {<span class="txt-required">*</span>}
6
- </label>
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 class="fx-select-field w-full shadow-sm" appearance="fill">
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
- <div class="px-semi w-full">
21
- <input
22
- type="text"
23
- [placeholder]="'Search'"
24
- [(ngModel)]="searchTerm"
25
- (ngModelChange)="onSearchChange($event)"
26
- (click)="$event.stopPropagation()"
27
- 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-border-interactive text-sm text-text-primary tracking-normal ring-0 transition-colors duration-500 ease-in-out"
28
- />
29
- </div>
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
- <div class="txt-invalid text-left">
39
- {{ getErrorMessage(label) }}
40
- </div>
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) {<fx-ui-hero-icon
33
- [icon]="tab.icon"
34
- [size]="20"
35
- class="flex mr-[2px]"
36
- [ngClass]="{
37
- 'text-primary mb-small': i === activeIndex,
38
- 'text-text-placeholder': i !== activeIndex
39
- }"
40
- ></fx-ui-hero-icon
41
- >}
42
- <div [ngClass]="i === activeIndex ? 'txt-field-label text-primary' : 'txt-placeholder'">{{ tab.label }}</div>
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]="`flex flex-row gap-small ${rounded ? 'tag-round' : 'tag-square'} tag-${type}${solid ? '-solid' : ''}`"
2
+ [class]="
3
+ `flex flex-row gap-small ${rounded ? 'tag-round' : 'tag-square'} tag-${type}${solid ? '-solid' : ''}`
4
+ "
3
5
  >
4
- @if(icon){
5
- <fx-ui-hero-icon
6
- [class]="`flex txt-tag-${type} ${solid ? 'text-white': ''}`"
7
- [icon]="icon"
8
- [size]="18"
9
- ></fx-ui-hero-icon>
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>
@@ -47,6 +47,7 @@ module.exports = {
47
47
  sm: '640px',
48
48
  md: '960px',
49
49
  lg: '1280px',
50
+ xl: '2560px'
50
51
  },
51
52
  boxShadow: {
52
53
  sm: '0 1px 2px 0 rgb(var(--shadow-color) / 0.05)',
package/tailwind.css CHANGED
@@ -9,7 +9,7 @@
9
9
  @tailwind utilities;
10
10
 
11
11
  html, body {
12
- font-family: 'BeVietnamPro';
12
+ font-family: 'DMSans';
13
13
  margin: 0;
14
14
  padding: 0;
15
15
  height: 100%;
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: 15 140 96;
7
- --warning: 255 188 59;
8
- --critical: 236 25 56;
9
- --danger: 249 133 7;
10
- --discovery: 119 113 227;
11
- --information: 62 175 240;
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: 97 101 108;
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;