ezfw-core 1.0.84 → 1.0.86
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/EzBaseComponent.ts +29 -2
- package/components/avatar/EzAvatar.module.scss +118 -117
- package/components/badge/EzBadge.module.scss +161 -154
- package/components/button/EzButton.module.scss +295 -300
- package/components/card/EzCard.module.scss +45 -40
- package/components/checkbox/EzCheckbox.module.scss +7 -7
- package/components/dataview/EzDataView.module.scss +192 -177
- package/components/datepicker/EzDatePicker.module.scss +253 -186
- package/components/datepicker/EzDatePicker.ts +304 -11
- package/components/dialog/EzDialog.module.scss +143 -119
- package/components/dropdown/EzDropdown.module.scss +112 -81
- package/components/input/EzInput.module.scss +140 -155
- package/components/panel/EzPanel.module.scss +120 -103
- package/components/radio/EzRadio.module.scss +7 -7
- package/components/select/EzSelect.module.scss +201 -195
- package/components/select/EzSelect.ts +159 -11
- package/components/switch/EzSwitch.module.scss +8 -8
- package/components/tabs/EzTabPanel.module.scss +284 -290
- package/components/textarea/EzTextarea.module.scss +133 -109
- package/components/timepicker/EzTimePicker.module.scss +196 -157
- package/components/timepicker/EzTimePicker.ts +222 -5
- package/components/tooltip/EzTooltip.module.scss +121 -102
- package/components/tree/EzTree.module.scss +189 -165
- package/core/STYLES_IMPLEMENTATION.md +194 -0
- package/core/ez.ts +21 -1
- package/core/loader.ts +34 -0
- package/core/renderer.ts +11 -0
- package/core/styles.ts +603 -0
- package/islands/StaticHtmlRenderer.js +23 -9
- package/islands/StaticHtmlRenderer.ts +23 -4
- package/islands/ViteIslandsPlugin.js +2 -0
- package/islands/ViteIslandsPlugin.ts +28 -5
- package/islands/runtime.ts +5 -4
- package/islands/ssrShim.js +69 -0
- package/package.json +1 -1
- package/template/ez.styles.config.js +315 -0
- package/themes/ez-theme-slate.scss +2 -2
|
@@ -598,7 +598,7 @@ export class EzBaseComponent {
|
|
|
598
598
|
case '==': result = left == right; break;
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
-
el
|
|
601
|
+
this._setVisibility(el, result);
|
|
602
602
|
});
|
|
603
603
|
this._effects!.push(stop);
|
|
604
604
|
} else {
|
|
@@ -624,12 +624,39 @@ export class EzBaseComponent {
|
|
|
624
624
|
|
|
625
625
|
const stop = effect(() => {
|
|
626
626
|
const result = !!ez.getDeepValue(ez._controllers[activeCtrl!]?.state, props);
|
|
627
|
-
el
|
|
627
|
+
this._setVisibility(el, result);
|
|
628
628
|
});
|
|
629
629
|
this._effects!.push(stop);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
+
/**
|
|
634
|
+
* Set element visibility while preserving inline display style.
|
|
635
|
+
* Stores original display in data attribute when hiding.
|
|
636
|
+
*/
|
|
637
|
+
private _setVisibility(el: HTMLElement, visible: boolean): void {
|
|
638
|
+
if (visible) {
|
|
639
|
+
// Restore original display or clear the property
|
|
640
|
+
const originalDisplay = el.dataset.ezOriginalDisplay;
|
|
641
|
+
if (originalDisplay) {
|
|
642
|
+
el.style.display = originalDisplay;
|
|
643
|
+
delete el.dataset.ezOriginalDisplay;
|
|
644
|
+
} else {
|
|
645
|
+
// Only clear if currently hidden
|
|
646
|
+
if (el.style.display === 'none') {
|
|
647
|
+
el.style.display = '';
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
} else {
|
|
651
|
+
// Store current display before hiding (if not already 'none')
|
|
652
|
+
const currentDisplay = el.style.display;
|
|
653
|
+
if (currentDisplay && currentDisplay !== 'none') {
|
|
654
|
+
el.dataset.ezOriginalDisplay = currentDisplay;
|
|
655
|
+
}
|
|
656
|
+
el.style.display = 'none';
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
633
660
|
private _applyClsBind(el: HTMLElement, bind: BindConfig, ctrl: string | undefined): void {
|
|
634
661
|
if (!bind.cls) return;
|
|
635
662
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// ==========================================================
|
|
2
2
|
// EzAvatar - CSS Module
|
|
3
|
+
// All variants nested inside .avatar for specificity
|
|
3
4
|
// ==========================================================
|
|
4
5
|
|
|
5
6
|
.avatar {
|
|
@@ -22,150 +23,150 @@
|
|
|
22
23
|
font-size: 14px;
|
|
23
24
|
text-transform: uppercase;
|
|
24
25
|
user-select: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// ----------------------------------------------------------
|
|
28
|
-
// Image
|
|
29
|
-
// ----------------------------------------------------------
|
|
30
|
-
.avatarImg {
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
object-fit: cover;
|
|
34
|
-
}
|
|
35
26
|
|
|
36
|
-
// ----------------------------------------------------------
|
|
37
|
-
//
|
|
38
|
-
// ----------------------------------------------------------
|
|
39
|
-
.
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
// ----------------------------------------------------------
|
|
28
|
+
// Image
|
|
29
|
+
// ----------------------------------------------------------
|
|
30
|
+
.avatarImg {
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
object-fit: cover;
|
|
34
|
+
}
|
|
42
35
|
|
|
43
|
-
// ----------------------------------------------------------
|
|
44
|
-
//
|
|
45
|
-
// ----------------------------------------------------------
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
right: 0;
|
|
50
|
-
width: 12px;
|
|
51
|
-
height: 12px;
|
|
52
|
-
border-radius: 50%;
|
|
53
|
-
border: 2px solid var(--ez-surface-secondary, #ffffff);
|
|
54
|
-
}
|
|
36
|
+
// ----------------------------------------------------------
|
|
37
|
+
// Initials (fallback)
|
|
38
|
+
// ----------------------------------------------------------
|
|
39
|
+
.avatarInitials {
|
|
40
|
+
line-height: 1;
|
|
41
|
+
}
|
|
55
42
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
// ----------------------------------------------------------
|
|
44
|
+
// Status indicator
|
|
45
|
+
// ----------------------------------------------------------
|
|
46
|
+
.avatarStatus {
|
|
47
|
+
position: absolute;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
width: 12px;
|
|
51
|
+
height: 12px;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
border: 2px solid var(--ez-surface-secondary, #ffffff);
|
|
54
|
+
}
|
|
59
55
|
|
|
60
|
-
.
|
|
61
|
-
|
|
62
|
-
}
|
|
56
|
+
.statusOnline {
|
|
57
|
+
background-color: var(--ez-success, #22c55e);
|
|
58
|
+
}
|
|
63
59
|
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
}
|
|
60
|
+
.statusOffline {
|
|
61
|
+
background-color: var(--ez-text-tertiary, #94a3b8);
|
|
62
|
+
}
|
|
67
63
|
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
}
|
|
64
|
+
.statusBusy {
|
|
65
|
+
background-color: var(--ez-danger, #ef4444);
|
|
66
|
+
}
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.xs {
|
|
76
|
-
width: 24px;
|
|
77
|
-
height: 24px;
|
|
78
|
-
font-size: 10px;
|
|
68
|
+
.statusAway {
|
|
69
|
+
background-color: var(--ez-warning, #f59e0b);
|
|
70
|
+
}
|
|
79
71
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
// ----------------------------------------------------------
|
|
73
|
+
// Sizes
|
|
74
|
+
// ----------------------------------------------------------
|
|
75
|
+
&.xs {
|
|
76
|
+
width: 24px;
|
|
77
|
+
height: 24px;
|
|
78
|
+
font-size: 10px;
|
|
79
|
+
|
|
80
|
+
.avatarStatus {
|
|
81
|
+
width: 8px;
|
|
82
|
+
height: 8px;
|
|
83
|
+
border-width: 1.5px;
|
|
84
|
+
}
|
|
84
85
|
}
|
|
85
|
-
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
&.sm {
|
|
88
|
+
width: 32px;
|
|
89
|
+
height: 32px;
|
|
90
|
+
font-size: 12px;
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
.avatarStatus {
|
|
93
|
+
width: 10px;
|
|
94
|
+
height: 10px;
|
|
95
|
+
border-width: 2px;
|
|
96
|
+
}
|
|
96
97
|
}
|
|
97
|
-
}
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
&.lg {
|
|
100
|
+
width: 48px;
|
|
101
|
+
height: 48px;
|
|
102
|
+
font-size: 18px;
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
.avatarStatus {
|
|
105
|
+
width: 14px;
|
|
106
|
+
height: 14px;
|
|
107
|
+
}
|
|
107
108
|
}
|
|
108
|
-
}
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
&.xl {
|
|
111
|
+
width: 64px;
|
|
112
|
+
height: 64px;
|
|
113
|
+
font-size: 24px;
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
.avatarStatus {
|
|
116
|
+
width: 16px;
|
|
117
|
+
height: 16px;
|
|
118
|
+
}
|
|
118
119
|
}
|
|
119
|
-
}
|
|
120
120
|
|
|
121
|
-
// ----------------------------------------------------------
|
|
122
|
-
//
|
|
123
|
-
// ----------------------------------------------------------
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
121
|
+
// ----------------------------------------------------------
|
|
122
|
+
// Shape variants
|
|
123
|
+
// ----------------------------------------------------------
|
|
124
|
+
&.square {
|
|
125
|
+
border-radius: var(--ez-radius-lg, 8px);
|
|
126
|
+
}
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
128
|
+
&.rounded {
|
|
129
|
+
border-radius: var(--ez-radius-xl, 12px);
|
|
130
|
+
}
|
|
131
131
|
|
|
132
|
-
// ----------------------------------------------------------
|
|
133
|
-
// Color variants (for initials)
|
|
134
|
-
// ----------------------------------------------------------
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
132
|
+
// ----------------------------------------------------------
|
|
133
|
+
// Color variants (for initials)
|
|
134
|
+
// ----------------------------------------------------------
|
|
135
|
+
&.primary {
|
|
136
|
+
background-color: var(--ez-primary-light, #dbeafe);
|
|
137
|
+
color: var(--ez-primary, #2563eb);
|
|
138
|
+
}
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
140
|
+
&.success {
|
|
141
|
+
background-color: var(--ez-success-light, #dcfce7);
|
|
142
|
+
color: var(--ez-success, #16a34a);
|
|
143
|
+
}
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
145
|
+
&.warning {
|
|
146
|
+
background-color: var(--ez-warning-light, #fef3c7);
|
|
147
|
+
color: var(--ez-warning, #d97706);
|
|
148
|
+
}
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
150
|
+
&.danger {
|
|
151
|
+
background-color: var(--ez-danger-light, #fee2e2);
|
|
152
|
+
color: var(--ez-danger, #dc2626);
|
|
153
|
+
}
|
|
154
154
|
|
|
155
|
-
// ----------------------------------------------------------
|
|
156
|
-
// Clickable
|
|
157
|
-
// ----------------------------------------------------------
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
// ----------------------------------------------------------
|
|
156
|
+
// Clickable
|
|
157
|
+
// ----------------------------------------------------------
|
|
158
|
+
&.clickable {
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
&:hover {
|
|
163
|
+
transform: scale(1.05);
|
|
164
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
165
|
+
}
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
&:active {
|
|
168
|
+
transform: scale(0.98);
|
|
169
|
+
}
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
|
|
@@ -1,202 +1,209 @@
|
|
|
1
|
+
// ==========================================================
|
|
2
|
+
// EzBadge - CSS Module
|
|
3
|
+
// All properties use CSS variables for full customization
|
|
4
|
+
// All variants nested inside .badge for specificity
|
|
5
|
+
// ==========================================================
|
|
6
|
+
|
|
1
7
|
.badge {
|
|
2
8
|
display: inline-flex;
|
|
3
9
|
align-items: center;
|
|
4
|
-
gap: 4px;
|
|
10
|
+
gap: var(--ez-badge-gap, 4px);
|
|
5
11
|
|
|
6
|
-
|
|
12
|
+
height: var(--ez-badge-height, auto);
|
|
13
|
+
padding: var(--ez-badge-padding, 5px 10px);
|
|
7
14
|
|
|
8
|
-
font-size: 12px;
|
|
9
|
-
font-weight: 500;
|
|
15
|
+
font-size: var(--ez-badge-font-size, 12px);
|
|
16
|
+
font-weight: var(--ez-badge-font-weight, 500);
|
|
10
17
|
line-height: 1.4;
|
|
11
18
|
white-space: nowrap;
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.pill {
|
|
18
|
-
border-radius: 999px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.icon {
|
|
22
|
-
font-size: 10px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.text {
|
|
26
|
-
// empty for now
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.close {
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
justify-content: center;
|
|
33
|
-
|
|
34
|
-
width: 14px;
|
|
35
|
-
height: 14px;
|
|
36
|
-
margin-left: 2px;
|
|
37
|
-
margin-right: -4px;
|
|
38
|
-
padding: 0;
|
|
20
|
+
color: var(--ez-badge-color, var(--ez-text-secondary, #64748b));
|
|
21
|
+
background: var(--ez-badge-bg, var(--ez-surface-primary, #f1f5f9));
|
|
22
|
+
border: var(--ez-badge-border-width, 0) solid var(--ez-badge-border-color, transparent);
|
|
23
|
+
border-radius: var(--ez-badge-radius, var(--ez-radius-sm, 4px));
|
|
39
24
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
background: transparent;
|
|
43
|
-
border: none;
|
|
44
|
-
border-radius: 50%;
|
|
45
|
-
opacity: 0.7;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
transition: opacity 0.15s ease;
|
|
48
|
-
|
|
49
|
-
&:hover {
|
|
50
|
-
opacity: 1;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
25
|
+
transition: all 0.15s ease;
|
|
53
26
|
|
|
54
|
-
|
|
55
|
-
|
|
27
|
+
// ----------------------------------------------------------
|
|
28
|
+
// Child elements
|
|
29
|
+
// ----------------------------------------------------------
|
|
56
30
|
|
|
57
|
-
|
|
58
|
-
|
|
31
|
+
.icon {
|
|
32
|
+
font-size: var(--ez-badge-icon-size, 10px);
|
|
59
33
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Dot variant (just a small circle)
|
|
63
|
-
.dot {
|
|
64
|
-
width: 8px;
|
|
65
|
-
height: 8px;
|
|
66
|
-
padding: 0;
|
|
67
|
-
border-radius: 50%;
|
|
68
|
-
}
|
|
69
34
|
|
|
70
|
-
|
|
71
|
-
.default {
|
|
72
|
-
background: var(--ez-surface-primary, #f1f5f9);
|
|
73
|
-
color: var(--ez-text-secondary, #64748b);
|
|
35
|
+
.text {}
|
|
74
36
|
|
|
75
37
|
.close {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
79
41
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
42
|
+
width: 14px;
|
|
43
|
+
height: 14px;
|
|
44
|
+
margin-left: 2px;
|
|
45
|
+
margin-right: -4px;
|
|
46
|
+
padding: 0;
|
|
84
47
|
|
|
85
|
-
|
|
86
|
-
color:
|
|
87
|
-
}
|
|
88
|
-
}
|
|
48
|
+
font-size: 8px;
|
|
49
|
+
color: currentColor;
|
|
89
50
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
51
|
+
background: transparent;
|
|
52
|
+
border: none;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
opacity: 0.7;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
transition: opacity 0.15s ease;
|
|
94
57
|
|
|
95
|
-
|
|
96
|
-
|
|
58
|
+
&:hover {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
}
|
|
97
61
|
}
|
|
98
|
-
}
|
|
99
62
|
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
color: #ffffff;
|
|
63
|
+
// ----------------------------------------------------------
|
|
64
|
+
// Shape variants
|
|
65
|
+
// ----------------------------------------------------------
|
|
104
66
|
|
|
105
|
-
|
|
106
|
-
|
|
67
|
+
&.pill {
|
|
68
|
+
border-radius: 999px;
|
|
107
69
|
}
|
|
108
|
-
}
|
|
109
70
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
.close {
|
|
116
|
-
color: #ffffff;
|
|
71
|
+
&.dot {
|
|
72
|
+
width: 8px;
|
|
73
|
+
height: 8px;
|
|
74
|
+
padding: 0;
|
|
75
|
+
border-radius: 50%;
|
|
117
76
|
}
|
|
118
|
-
}
|
|
119
77
|
|
|
120
|
-
//
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
color: #ffffff;
|
|
78
|
+
// ----------------------------------------------------------
|
|
79
|
+
// Clickable state
|
|
80
|
+
// ----------------------------------------------------------
|
|
124
81
|
|
|
125
|
-
|
|
126
|
-
|
|
82
|
+
&.clickable {
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
filter: brightness(0.95);
|
|
87
|
+
}
|
|
127
88
|
}
|
|
128
|
-
}
|
|
129
89
|
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
border: 1px solid currentColor;
|
|
90
|
+
// ----------------------------------------------------------
|
|
91
|
+
// Color variants
|
|
92
|
+
// ----------------------------------------------------------
|
|
134
93
|
|
|
135
94
|
&.default {
|
|
136
|
-
|
|
137
|
-
|
|
95
|
+
background: var(--ez-badge-bg, var(--ez-surface-primary, #f1f5f9));
|
|
96
|
+
color: var(--ez-badge-color, var(--ez-text-secondary, #64748b));
|
|
138
97
|
}
|
|
139
98
|
|
|
140
99
|
&.primary {
|
|
141
|
-
|
|
100
|
+
background: var(--ez-badge-bg, var(--ez-primary, #2563eb));
|
|
101
|
+
color: var(--ez-badge-color, #ffffff);
|
|
142
102
|
}
|
|
143
103
|
|
|
144
104
|
&.success {
|
|
145
|
-
|
|
105
|
+
background: var(--ez-badge-bg, var(--ez-success, #10b981));
|
|
106
|
+
color: var(--ez-badge-color, #ffffff);
|
|
146
107
|
}
|
|
147
108
|
|
|
148
109
|
&.warning {
|
|
149
|
-
|
|
110
|
+
background: var(--ez-badge-bg, var(--ez-warning, #f59e0b));
|
|
111
|
+
color: var(--ez-badge-color, #ffffff);
|
|
150
112
|
}
|
|
151
113
|
|
|
152
114
|
&.danger {
|
|
153
|
-
|
|
115
|
+
background: var(--ez-badge-bg, var(--ez-danger, #ef4444));
|
|
116
|
+
color: var(--ez-badge-color, #ffffff);
|
|
154
117
|
}
|
|
155
118
|
|
|
156
119
|
&.info {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
//
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
120
|
+
background: var(--ez-badge-bg, var(--ez-info, #0ea5e9));
|
|
121
|
+
color: var(--ez-badge-color, #ffffff);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ----------------------------------------------------------
|
|
125
|
+
// Outline variants
|
|
126
|
+
// ----------------------------------------------------------
|
|
127
|
+
|
|
128
|
+
&.outline {
|
|
129
|
+
background: transparent;
|
|
130
|
+
border-width: 1px;
|
|
131
|
+
border-color: currentColor;
|
|
132
|
+
|
|
133
|
+
&.default {
|
|
134
|
+
color: var(--ez-badge-color, var(--ez-text-secondary, #64748b));
|
|
135
|
+
border-color: var(--ez-badge-border-color, var(--ez-border, #e2e8f0));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&.primary {
|
|
139
|
+
color: var(--ez-badge-color, var(--ez-primary, #2563eb));
|
|
140
|
+
background: transparent;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.success {
|
|
144
|
+
color: var(--ez-badge-color, var(--ez-success, #10b981));
|
|
145
|
+
background: transparent;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.warning {
|
|
149
|
+
color: var(--ez-badge-color, var(--ez-warning, #f59e0b));
|
|
150
|
+
background: transparent;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.danger {
|
|
154
|
+
color: var(--ez-badge-color, var(--ez-danger, #ef4444));
|
|
155
|
+
background: transparent;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.info {
|
|
159
|
+
color: var(--ez-badge-color, var(--ez-info, #0ea5e9));
|
|
160
|
+
background: transparent;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// ----------------------------------------------------------
|
|
165
|
+
// Sizes
|
|
166
|
+
// ----------------------------------------------------------
|
|
167
|
+
|
|
168
|
+
&.sm {
|
|
169
|
+
padding: var(--ez-badge-padding, 1px 6px);
|
|
170
|
+
font-size: var(--ez-badge-font-size, 10px);
|
|
171
|
+
gap: var(--ez-badge-gap, 3px);
|
|
172
|
+
|
|
173
|
+
.icon {
|
|
174
|
+
font-size: var(--ez-badge-icon-size, 8px);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.close {
|
|
178
|
+
width: 12px;
|
|
179
|
+
height: 12px;
|
|
180
|
+
font-size: 7px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.dot {
|
|
184
|
+
width: 6px;
|
|
185
|
+
height: 6px;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&.lg {
|
|
190
|
+
padding: var(--ez-badge-padding, 4px 12px);
|
|
191
|
+
font-size: var(--ez-badge-font-size, 14px);
|
|
192
|
+
gap: var(--ez-badge-gap, 6px);
|
|
193
|
+
|
|
194
|
+
.icon {
|
|
195
|
+
font-size: var(--ez-badge-icon-size, 12px);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.close {
|
|
199
|
+
width: 18px;
|
|
200
|
+
height: 18px;
|
|
201
|
+
font-size: 10px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&.dot {
|
|
205
|
+
width: 10px;
|
|
206
|
+
height: 10px;
|
|
207
|
+
}
|
|
201
208
|
}
|
|
202
209
|
}
|